.panel {
  min-height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.panel-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  width: 100%;
  will-change: transform;
}

.subheadline {
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 620px;
  margin: 1rem auto 2.5rem auto;
  opacity: 0.9;
}

/* Section 1: Hero Top */
.section-top {
  background: radial-gradient(circle at 50% 20%, #e6f9ff 0%, #ffffff 80%);
}

.section-top .headline {
  color: #0f172a;
}

.section-top .subheadline {
  color: #475569;
}

.section-top .panel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.section-top .btn-primary {
  background-color: var(--brand-color);
  color: #ffffff;
}

.section-top .btn-primary:hover {
  background-color: var(--brand-dark);
}

.section-top .btn-secondary {
  background-color: #f1f5f9;
  color: #0f172a;
}

.section-top .btn-secondary:hover {
  background-color: #e2e8f0;
}

.interactive-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-brand-header {
  font-family: 'Roboto', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: left;
}

.hero-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-brand-copy .subheadline {
  margin: 0.2rem 0 0;
  max-width: 24rem;
}

.hero-cta-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make the button row relative so the icons can anchor to its right edge */
.hero-cta-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  position: relative; 
}

.hero-download-group {
  display: inline-flex;
}

/* Positioned exactly to the right of the button row to keep buttons centered */
.hero-socials {
  position: absolute;
  left: 100%; 
  top: 50%;
  transform: translateY(-50%);
  margin-left: 1.25rem; 
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #0f172a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: box-shadow 0.25s ease;
}

.hero-social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.25s ease;
}

.hero-social-link.instagram::before {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.hero-social-link.discord::before {
  background-color: var(--discord-color);
}

.hero-social-link:hover::before {
  opacity: 1;
}

.hero-social-link.instagram:hover {
  box-shadow: 0 6px 14px rgba(220, 39, 67, 0.3);
}

.hero-social-link.discord:hover {
  box-shadow: 0 6px 14px rgba(88, 101, 242, 0.35);
}

.hero-social-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
}

/* Section 2: Download & App Store Badges */
.section-download {
  background: linear-gradient(135deg, #08bbe7 0%, #0284c7 50%, #016597 100%);
  color: #ffffff;
  scroll-margin-top: var(--topbar-height);
  position: relative;
  overflow: hidden;
}

.section-download .badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.badge-group {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.3, 0, 0, 1), box-shadow 0.25s cubic-bezier(0.3, 0, 0, 1);
  text-decoration: none;
  border-radius: 8px;
}

.download-bike-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 176px;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.download-bike {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 320px;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.12));
}

.download-bike svg {
  display: block;
  width: 320px;
  height: auto;
}

.download-bike .rear-wheel,
.download-bike .front-wheel,
.download-bike .pedals {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.store-badge img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
}

.badge-caption {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.store-badge:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.store-badge.badge-coming-soon {
  opacity: 0.65;
  cursor: not-allowed;
  user-select: none;
}

.store-badge.badge-coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.store-badge.badge-coming-soon img {
  filter: grayscale(100%);
}

/* Section 3: Discord */
.section-discord {
  background: linear-gradient(135deg, var(--discord-color) 0%, var(--discord-color-dark) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--topbar-height);
}

.section-discord::before,
.section-discord::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section-discord::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 72%, rgba(255, 255, 255, 0.12) 0 1.5px, transparent 3px),
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.18) 0 2px, transparent 4px),
    radial-gradient(circle at 84% 64%, rgba(255, 255, 255, 0.1) 0 1.5px, transparent 3px);
  opacity: 0.8;
  animation: discordSparkleField 12s ease-in-out infinite alternate;
}

.section-discord::after {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.14), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(35, 44, 94, 0.3), transparent 34%);
  opacity: 0.9;
}

.section-discord .panel-content.discord-layout {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  text-align: left;
}

.discord-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.discord-visual-glow {
  position: absolute;
  width: min(420px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 34%, transparent 70%);
  filter: blur(10px);
  animation: discordGlowPulse 6s ease-in-out infinite;
}

.discord-visual-card {
  position: relative;
  width: min(360px, 100%);
  min-height: 360px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 70px rgba(18, 28, 84, 0.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(14px);
}

.discord-visual-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, transparent 32%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.12) 0%, transparent 28%);
  opacity: 0.55;
}

.discord-sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.95);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
  animation: sparkleFloat 7s ease-in-out infinite, sparkleTwinkle 2.8s ease-in-out infinite;
}

.sparkle-1 { top: 18%; left: 14%; animation-delay: 0s, 0s; }
.sparkle-2 { top: 30%; right: 16%; animation-delay: 0.8s, 0.2s; }
.sparkle-3 { bottom: 28%; left: 18%; animation-delay: 1.2s, 0.4s; }
.sparkle-4 { bottom: 18%; right: 24%; animation-delay: 0.5s, 0.8s; }
.sparkle-5 { top: 50%; left: 8%; width: 8px; height: 8px; animation-delay: 1.5s, 1.1s; }
.sparkle-6 { top: 56%; right: 10%; width: 8px; height: 8px; animation-delay: 2s, 1.3s; }

.discord-icon-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  animation: discordIconFloat 4.8s ease-in-out infinite;
}

.discord-icon {
  width: clamp(120px, 18vw, 180px);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(13, 18, 48, 0.25));
}

.discord-icon[src$=".webp"] {
  width: min(78%, 260px);
  max-height: 240px;
  object-fit: contain;
}

.discord-icon-shadow {
  position: absolute;
  inset: auto 18% 4% 18%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 13, 33, 0.28), transparent 70%);
  filter: blur(6px);
  opacity: 0.8;
  animation: discordShadowPulse 4.8s ease-in-out infinite;
}

.discord-visual-caption {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.discord-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.button-group-left {
  justify-content: flex-start;
}

.discord-note {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
}

.discord-note span {
  display: inline-block;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.24);
}

.discord-pretext {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.section-discord .btn-primary {
  background-color: #ffffff;
  color: var(--discord-color);
}

/* Section 4: How It Works */
.section-how-it-works {
  background:
    radial-gradient(circle at 12% 20%, rgba(8, 187, 231, 0.18), transparent 24%),
    radial-gradient(circle at 88% 78%, rgba(88, 101, 242, 0.13), transparent 26%),
    #f8fcfd;
  scroll-margin-top: var(--topbar-height);
}

.section-how-it-works .panel-content {
  max-width: 800px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 3.5rem);
  border-radius: 32px;
  box-shadow: 
    0 10px 30px rgba(8, 187, 231, 0.04),
    0 30px 60px rgba(15, 23, 42, 0.02);
  transition: box-shadow 0.3s ease;
}

.section-how-it-works .panel-content:hover {
  box-shadow: 
    0 15px 35px rgba(8, 187, 231, 0.08),
    0 35px 70px rgba(15, 23, 42, 0.05);
}

.section-how-it-works .headline {
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.section-how-it-works .subheadline {
  color: #475569;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto 2rem auto;
}

.section-how-it-works .btn-primary {
  color: #ffffff;
  background: var(--brand-color);
}

.section-how-it-works .btn-primary:hover {
  background: var(--brand-dark);
}

/* Animations */
@keyframes discordIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes discordShadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(0.9); opacity: 0.55; }
}

@keyframes sparkleFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -10px, 0) scale(1.08); }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes discordGlowPulse {
  0%, 100% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes discordSparkleField {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* Section 5: Subscriptions / Plans */
.section-cruise {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.plans-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.plan-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  flex: 1;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.plan-card.plan-featured {
  border: 2px solid var(--brand-color);
  background: linear-gradient(180deg, #ffffff 0%, #f0fbff 100%);
}

.card-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background-color: var(--brand-color);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.logo-box.home {
  border-radius: 16px;
  height: 84px;
  padding: 7px 0 5px 0;
  width: 84px;
}

.logo-name.home {
  font-size: 2.8rem;
  line-height: 0.95;
  margin: 0;
}

.plan-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.plan-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.plan-benefits {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-benefits li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.plan-benefits li::before {
  content: "✓";
  color: var(--brand-color);
  font-weight: 900;
  margin-right: 0.75rem;
}

.purchase-notice {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: rgba(8, 187, 231, 0.1);
  padding: 0.8rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .section-top .panel-content {
    max-width: calc(100% - 1rem);
    padding: 1.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px);
  }

  .section-top .button-group {
    gap: 0.85rem;
  }

  .hero-cta-wrapper {
    align-items: center;
  }

  .hero-cta-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-download-group {
    width: 100%;
    display: flex;
    flex-direction: column; /* Stack button and icons vertically */
    align-items: center;
  }

  /* Reset position, flow normally, use order to render underneath the button */
  .hero-socials {
    position: relative; 
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    margin-left: 0;
    margin-top: 1.25rem; 
    order: 2; /* Forces icons to render below the button in DOM layout */
  }

  .hero-download-group .btn-secondary {
    order: 1; /* Button renders above icons */
  }

  .section-top .btn-primary {
    box-shadow: 0 12px 25px rgba(5, 141, 174, 0.4);
  }

  .section-top .btn-secondary {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
  }

  .headline {
    font-size: 2.5rem;
  }

  .badge-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    justify-items: center;
    width: min(100%, 360px);
    margin: 1.5rem auto 0;
    gap: 0.75rem;
  }

  .store-badge {
    width: 100%;
  }

  .store-badge img {
    width: 100%;
    max-width: 180px;
  }

  .hero-brand-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .hero-brand-copy {
    align-items: center;
  }

  .hero-brand-copy .subheadline {
    max-width: 30rem;
    margin-top: 0.35rem;
  }

  .section-discord .panel-content.discord-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }

  .discord-visual {
    min-height: 320px;
  }

  .discord-visual-card {
    min-height: 300px;
    padding: 1.5rem;
  }

  .button-group-left {
    justify-content: center;
  }

  .discord-copy {
    margin-inline: auto;
  }

  .discord-note span {
    padding-left: 0;
    border-left: 0;
  }
}