/* ══════════════════════════════════════════════════════
   SWINGTRACE AI PRO — LANDING PAGE STYLES
   Design: Elevated version of the app's dark teal + green palette
   Fonts: Inter (Google Fonts)
══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────────── */
:root {
  /* Brand colours — derived from SwingTrace app */
  --green:          hsl(142, 100%, 42%);   /* App's primary CTA / logo green */
  --green-dim:      hsl(142, 100%, 32%);   /* Hover state */
  --green-glow:     hsl(142, 100%, 42% / 0.15);
  --green-glow-lg:  hsl(142, 100%, 42% / 0.08);
  --gold:           hsl(43, 92%, 58%);     /* App's secondary accent (Upgrade Plan) */
  --gold-dim:       hsl(43, 92%, 48%);

  /* Backgrounds — derived from app's dark teal */
  --bg:             hsl(205, 42%, 6%);     /* Page background */
  --surface:        hsl(205, 36%, 10%);    /* Card background */
  --surface-2:      hsl(205, 30%, 14%);    /* Elevated surface / input bg */
  --border:         hsl(205, 25%, 18%);    /* Border / divider */
  --border-light:   hsl(205, 20%, 24%);

  /* Text */
  --text:           hsl(0, 0%, 93%);
  --text-muted:     hsl(205, 18%, 58%);
  --text-subtle:    hsl(205, 15%, 40%);

  /* Typography */
  --font-sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --size-xs:        clamp(0.75rem,  1.5vw, 0.8125rem);
  --size-sm:        clamp(0.875rem, 1.8vw, 0.9375rem);
  --size-base:      clamp(1rem,     2vw,   1.0625rem);
  --size-lg:        clamp(1.125rem, 2.5vw, 1.25rem);
  --size-xl:        clamp(1.25rem,  3vw,   1.5rem);
  --size-2xl:       clamp(1.5rem,   4vw,   2rem);
  --size-3xl:       clamp(2rem,     5vw,   2.75rem);
  --size-4xl:       clamp(2.5rem,   6vw,   3.5rem);
  --size-hero:      clamp(2.75rem,  7vw,   4.5rem);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-card:    0 1px 2px hsl(0 0% 0% / .4), 0 4px 16px hsl(0 0% 0% / .25);
  --shadow-float:   0 8px 32px hsl(0 0% 0% / .4), 0 2px 8px hsl(0 0% 0% / .3);
  --shadow-green:   0 0 32px hsl(142 100% 42% / .2), 0 0 8px hsl(142 100% 42% / .1);

  /* Transitions */
  --ease:       cubic-bezier(.25, .46, .45, .94);
  --t-fast:     150ms;
  --t-base:     250ms;
  --t-slow:     400ms;

  /* Layout */
  --max-w:      1200px;
  --content-w:  720px;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--size-base);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
em { font-style: italic; }

/* Smooth scrolling pause for animated sections */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ── LAYOUT UTILITIES ────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.container--narrow { max-width: var(--content-w); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-gradient {
  font-style: normal;
  background: linear-gradient(135deg, var(--green) 0%, hsl(160, 100%, 50%) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── TYPOGRAPHY ──────────────────────────────────────── */
.section-eyebrow {
  display: inline-block;
  font-size: var(--size-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-size: var(--size-3xl);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--text);
  text-wrap: balance;
  margin-bottom: var(--space-sm);
}

.section-lead {
  font-size: var(--size-lg);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 56ch;
  text-wrap: pretty;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header .section-lead { margin-inline: auto; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: .875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: var(--size-base);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
  transition:
    background-color var(--t-fast) var(--ease),
    border-color     var(--t-fast) var(--ease),
    color            var(--t-fast) var(--ease),
    transform        var(--t-base) var(--ease),
    box-shadow       var(--t-base) var(--ease);
}

.btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.btn:active { transform: translateY(1px) !important; }

.btn--primary {
  background: var(--green);
  color: hsl(205, 42%, 6%);
  font-weight: 700;
  box-shadow: 0 4px 20px var(--green-glow), inset 0 1px 0 hsl(142 100% 70% / .3);
}

.btn--primary:hover {
  background: hsl(142, 100%, 48%);
  box-shadow: 0 6px 28px hsl(142 100% 42% / .4), inset 0 1px 0 hsl(142 100% 70% / .3);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}

.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.btn--sm {
  padding: .625rem 1.25rem;
  font-size: var(--size-sm);
  min-height: 40px;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--size-lg);
}

.btn-microcopy {
  font-size: var(--size-xs);
  color: var(--text-muted);
  display: block;
  margin-top: .6rem;
}

/* ── HEADER ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: hsl(205, 42%, 6% / .8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-base) var(--ease);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: 64px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: var(--size-base);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1;
}

.logo-badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--green);
  color: var(--bg);
  padding: .2rem .45rem;
  border-radius: 4px;
  line-height: 1;
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .header__nav { display: flex; }
}

.nav-link {
  font-size: var(--size-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.nav-link:hover { color: var(--text); }

.header__cta { flex-shrink: 0; }

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(64px + var(--space-xl));
  padding-bottom: var(--space-2xl);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, hsl(142 80% 12% / .7) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 80% 50%, hsl(142 80% 8% / .3) 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__pretitle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--green);
  letter-spacing: .02em;
}

.pretitle__dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 16px var(--green-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green), 0 0 16px var(--green-glow); }
  50% { opacity: .6; box-shadow: 0 0 4px var(--green); }
}

.hero__title {
  font-size: var(--size-hero);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.03em;
  color: var(--text);
}

/* Sparkline double-helix background canvas */
#helix-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;             /* below all page content — tablet + sections occlude it naturally */
  pointer-events: none;
  /* no mix-blend-mode — canvas is beneath hero/tablet, not on top */
}

/* ── Helix blur layer: between 3D canvas (z:0) and page content (z:2+) ─────────────── */
/* backdrop-filter blurs the WebGL geometry through this panel, creating a soft         */
/* neon glow. Keep blur low (2-4px) — much subtler than the header's 16px.             */
#helix-blur {
  position: fixed;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: hsl(205 42% 6% / 0.30); /* 30% tint — diffuses helix, text stays legible */
  pointer-events: none;
}

/* Ensure all page content stacks above the blur layer */
main#main-content,
.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}


.hero__title-brand {
  display: block;
  white-space: nowrap;   /* keeps 'SwingTrace AI Pro' on one line always */
  margin-bottom: .1em;
}

.hero__subtitle {
  font-size: var(--size-lg);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 50ch;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero__trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: var(--size-xs);
  color: var(--text-muted);
}

.trust-sep { opacity: .35; }

/* ── HERO VISUAL ───────────────────────────────────── */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: visible;
}

/* \u2500\u2500 TABLET CHASSIS \u2014 sparkline linework style \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.hero__tablet {
  position: relative;
  padding: 40px 16px 52px;
  border: 2.5px solid hsl(142 80% 42% / 0.58);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px hsl(142 100% 42% / 0.1),
    0 0 8px  hsl(142 100% 42% / 0.55),
    0 0 24px hsl(142 100% 42% / 0.28),
    0 0 56px hsl(142 100% 42% / 0.13);
  background: hsl(205, 42%, 6%); /* match --bg \u2014 occludes helix canvas behind tablet body */
}

/* Camera sensor dot */
.hero__tablet-camera {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border: 1.5px solid hsl(142 80% 42% / 0.55);
  border-radius: 50%;
  box-shadow: 0 0 4px hsl(142 100% 42% / 0.45);
}

/* Home indicator pill */
.hero__tablet-home {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 4px;
  border: 1.5px solid hsl(142 80% 42% / 0.48);
  border-radius: 2px;
  box-shadow: 0 0 5px hsl(142 100% 42% / 0.32);
}

/* Side buttons — shared */
.hero__tablet-btn {
  position: absolute;
  border: 1.5px solid hsl(142 80% 42% / 0.45);
  border-radius: 2px;
  box-shadow: 0 0 4px hsl(142 100% 42% / 0.3);
  background: transparent;
}

/* Power/sleep button — right side */
.hero__tablet-btn--power {
  width: 4px;
  height: 34px;
  right: -5px;
  top: 18%;
  border-left: none;
  border-radius: 0 2px 2px 0;
}

/* Volume up — left side */
.hero__tablet-btn--vol-up {
  width: 4px;
  height: 26px;
  left: -5px;
  top: 22%;
  border-right: none;
  border-radius: 2px 0 0 2px;
}

/* Volume down — left side */
.hero__tablet-btn--vol-dn {
  width: 4px;
  height: 26px;
  left: -5px;
  top: calc(22% + 36px);
  border-right: none;
  border-radius: 2px 0 0 2px;
}

.hero__image-wrap {
  position: relative;
  border-radius: 2px;   /* right-angle screen corners — frame is now the tablet screen */
  overflow: hidden;
  border: 1px solid hsl(142 80% 42% / 0.25);
  box-shadow: 0 0 0 0.5px hsl(142 100% 42% / 0.1); /* subtle inner screen glow */
}

.hero__video {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3 / 4;  /* iPad portrait — less tall than phone 9:16 */
  border-radius: 0;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.hero__image-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 80%, hsl(142 100% 42% / .08) 0%, transparent 70%);
  pointer-events: none;
}



/* ── SCROLL CUE ────────────────────────────────────── */
.hero__scroll-cue {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--green), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { opacity: 1; transform: scaleY(1) translateY(0); }
  100% { opacity: 0; transform: scaleY(.5) translateY(20px); }
}

/* ── SECTION BASE ────────────────────────────────────── */
.section {
  padding-block: var(--space-2xl);
}

/* ── TRUST BAR ───────────────────────────────────────── */
.trust-bar {
  padding-block: var(--space-md);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.trust-bar__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  list-style: none;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--size-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.trust-bar__item svg {
  color: var(--green);
  flex-shrink: 0;
}

/* ── PROBLEM ─────────────────────────────────────────── */
.section--problem { background: hsl(205, 42%, 6% / 0.48); }

.problem-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}

.problem-card:hover {
  border-color: hsl(142 80% 42% / .35);
  transform: translateY(-3px);
}

.problem-card:hover::before { opacity: 1; }

.problem-card__stat {
  font-size: var(--size-2xl);
  font-weight: 800;
  color: var(--green);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.problem-card__label {
  font-size: var(--size-sm);
  line-height: 1.6;
  color: var(--text-muted);
}

/* ── FEATURES ────────────────────────────────────────── */
.section--features { background: hsl(205, 36%, 10% / 0.52); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (orientation: landscape) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: .875rem;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.feature-card:hover {
  border-color: hsl(142 80% 42% / .4);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px hsl(142 100% 42% / .08);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-glow);
  border-radius: var(--radius-sm);
  color: var(--green);
  border: 1px solid hsl(142 80% 42% / .2);
  flex-shrink: 0;
}

.feature-card__title {
  font-size: var(--size-lg);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -.01em;
}

.feature-card__body {
  font-size: var(--size-sm);
  line-height: 1.7;
  color: var(--text-muted);
  flex: 1;
}

.feature-card__detail {
  font-size: var(--size-xs);
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  line-height: 1.5;
}

/* ── HOW IT WORKS ────────────────────────────────────── */
.section--how { background: hsl(205, 42%, 6% / 0.44); }

.how-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  margin-top: var(--space-lg);
}

/* Connecting line */
.how-steps::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 48px;
  bottom: 48px;
  width: 1px;
  background: linear-gradient(to bottom, var(--green), hsl(142 80% 42% / .1));
}

@media (min-width: 600px) {
  .how-steps::before { left: 32px; }
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding-block: var(--space-md);
  position: relative;
}

.how-step__number {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-sm);
  font-weight: 800;
  color: var(--green);
  letter-spacing: .02em;
  box-shadow: 0 0 16px var(--green-glow);
  z-index: 1;
  position: relative;
}

.how-step__content { padding-top: .625rem; }

.how-step__title {
  font-size: var(--size-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
  letter-spacing: -.015em;
}

.how-step__body {
  font-size: var(--size-base);
  line-height: 1.7;
  color: var(--text-muted);
}

.how-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

/* ── TESTIMONIALS ────────────────────────────────────── */
.section--testimonials { background: hsl(205, 36%, 10% / 0.52); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-sm);
}

/* When 3 cards drop to 2 columns in portrait, span the lone last card full-width */
@media (min-width: 570px) and (max-width: 880px) {
  .testimonials-grid > article:last-child {
    grid-column: 1 / -1;
  }
}

.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.testimonial-card--featured {
  border-color: hsl(142 80% 42% / .35);
  background: hsl(205, 36%, 8%);
  box-shadow: 0 0 0 1px hsl(142 80% 42% / .2), var(--shadow-card);
}

.testimonial-card:hover {
  border-color: hsl(142 80% 42% / .35);
  transform: translateY(-2px);
}

.testimonial-card__stars {
  color: var(--gold);
  font-size: .9rem;
  letter-spacing: .05em;
}

.testimonial-card__quote {
  font-size: var(--size-sm);
  line-height: 1.75;
  color: var(--text);
  font-style: italic;
  flex: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: .875rem;
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--green-glow);
  border: 2px solid hsl(142 80% 42% / .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-sm);
  font-weight: 700;
  color: var(--green);
}

.testimonial-card__meta { display: flex; flex-direction: column; gap: .2rem; }

.testimonial-card__name {
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--text);
  font-style: normal;
}

.testimonial-card__role {
  font-size: var(--size-xs);
  color: var(--text-muted);
}

.testimonial-card__email {
  font-size: var(--size-xs);
  color: var(--green);
  text-decoration: none;
  opacity: .8;
  transition: opacity var(--t-fast);
}

.testimonial-card__email:hover { opacity: 1; text-decoration: underline; }

/* ── EMAIL CAPTURE ───────────────────────────────────── */
.section--subscribe {
  background: hsl(205, 36%, 10% / 0.55);
  padding-block: var(--space-xl);
}

.subscribe-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  background: hsl(205, 34%, 14% / 0.90);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-lg), 5vw, var(--space-xl));
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px hsl(205 30% 10% / .06);
}

.subscribe-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green) 0%, hsl(160 100% 50%) 50%, var(--gold) 100%);
}

@media (min-width: 768px) {
  .subscribe-card {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.subscribe-card__title {
  font-size: var(--size-2xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: hsl(205, 42%, 8%);
  margin-bottom: .75rem;
}

.subscribe-card__body {
  font-size: var(--size-sm);
  line-height: 1.7;
  color: hsl(205, 20%, 38%);
}

.subscribe-form__row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.subscribe-form__input {
  flex: 1 1 230px;
  height: 52px;
  background: #ffffff;
  border: 1px solid #c8d2dc;
  border-radius: var(--radius-md);
  padding: 0 var(--space-sm);
  font-family: var(--font-sans);
  font-size: var(--size-base);
  color: hsl(205, 42%, 8%);
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  min-width: 0;
}

.subscribe-form__input::placeholder { color: hsl(205, 15%, 55%); }

.subscribe-form__input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.subscribe-form__btn {
  flex-shrink: 0;
  height: 52px;
  padding-inline: 1.5rem;
  font-size: var(--size-base);
}

.subscribe-form__privacy {
  margin-top: .75rem;
  font-size: var(--size-xs);
  color: hsl(205, 15%, 48%);
}

.subscribe-form__feedback {
  margin-top: .75rem;
  font-size: var(--size-sm);
  font-weight: 600;
  min-height: 1.5em;
}

.subscribe-form__feedback--success { color: var(--green); }
.subscribe-form__feedback--error   { color: hsl(0, 90%, 65%); }

/* ── FAQ ─────────────────────────────────────────────── */
.section--faq { background: hsl(205, 36%, 10% / 0.48); }

.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-xl);
  background: var(--surface); /* matches pricing-card opacity */
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--size-base);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  min-height: 56px;
  transition: background-color var(--t-fast) var(--ease);
}

.faq-question:hover { background: hsl(0 0% 100% / .03); }

.faq-question:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--t-base) var(--ease);
}

.faq-item.is-open .faq-chevron { transform: rotate(180deg); }
.faq-item.is-open .faq-question { color: var(--green); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--t-slow) var(--ease), padding var(--t-base) var(--ease);
}

.faq-item.is-open .faq-answer { max-height: 400px; }

.faq-answer__inner {
  padding: 0 var(--space-lg) var(--space-md);
  font-size: var(--size-sm);
  line-height: 1.75;
  color: var(--text-muted);
}

.faq-answer__inner a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ── FINAL CTA ───────────────────────────────────────── */
.section--final-cta {
  position: relative;
  padding-block: var(--space-2xl);
  overflow: hidden;
  background: var(--bg);
}

.final-cta__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 100%, hsl(142 80% 10% / .6) 0%, transparent 70%),
    radial-gradient(ellipse 100% 50% at 50% 80%, hsl(43 92% 8% / .2) 0%, transparent 60%);
  pointer-events: none;
}

.final-cta__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
}

.final-cta__title {
  font-size: var(--size-4xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  text-wrap: balance;
}

.final-cta__body {
  font-size: var(--size-lg);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 52ch;
  text-wrap: pretty;
}

.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-block: var(--space-xs);
}

.final-cta__authority {
  font-size: var(--size-sm);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.final-cta__authority a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ── SUBSCRIBER FEATURE CARDS ────────────────────────── */
.feature-card--subscriber {
  border-color: hsl(142 80% 42% / .18);
  position: relative;
}

.feature-card--subscriber::after {
  content: 'Subscriber';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  background: hsl(142 100% 42% / .12);
  border: 1px solid hsl(142 80% 42% / .25);
  border-radius: 100px;
  padding: .2rem .6rem;
  line-height: 1.5;
}

.features-subscriber-note {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: var(--size-xs);
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.features-subscriber-badge {
  display: inline-block;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  background: hsl(142 100% 42% / .12);
  border: 1px solid hsl(142 80% 42% / .25);
  border-radius: 100px;
  padding: .2rem .6rem;
  line-height: 1.5;
}

/* ── PRICING ─────────────────────────────────────────── */
.section--pricing { background: var(--bg); }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;        /* xs: single column */
  gap: var(--space-sm);
  align-items: start;
}

@media (min-width: 480px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);  /* sm: 2 columns */
    align-items: stretch;
  }
}

@media (min-width: 960px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);  /* lg: 4 columns — skip 3 always */
    align-items: stretch;
  }
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.pricing-card:hover {
  border-color: hsl(142 80% 42% / .3);
  transform: translateY(-3px);
}

.pricing-card--featured {
  border-color: hsl(142 80% 42% / .5);
  background: hsl(205, 34%, 9%);
  box-shadow: 0 0 0 1px hsl(142 80% 42% / .2), var(--shadow-card), var(--shadow-green);
}

.pricing-card--coach {
  border-color: hsl(43 90% 58% / .3);
}

.pricing-card__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--green);
  color: var(--bg);
  padding: .25rem .7rem;
  border-radius: 100px;
  line-height: 1.5;
  margin-bottom: calc(-1 * var(--space-xs));
}

.pricing-card__badge--coach {
  background: var(--gold);
  color: var(--bg);
}

.pricing-card__header {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.pricing-card__tier {
  font-size: var(--size-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pricing-card--featured .pricing-card__tier { color: var(--green); }

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: .25rem;
  line-height: 1;
}

.pricing-card__amount {
  font-size: var(--size-3xl);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}

.pricing-card__period {
  font-size: var(--size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-card__credits {
  font-size: var(--size-xs);
  color: var(--text-subtle);
  font-weight: 500;
}

.pricing-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  flex: 1;
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
}

.pricing-feature {
  font-size: var(--size-sm);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  color: var(--text-muted);
}

.pricing-feature::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  margin-top: .1em;
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.pricing-feature--yes {
  color: var(--text);
}

.pricing-feature--yes::before {
  background-color: hsl(142 100% 42% / .15);
  border: 1px solid hsl(142 80% 42% / .4);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' fill='none' stroke='hsl(142,100%,42%)' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='1.5,5 4,7.5 8.5,2.5'/%3E%3C/svg%3E");
}

.pricing-feature--no {
  color: var(--text-subtle);
}

.pricing-feature--no::before {
  background-color: hsl(0 0% 100% / .04);
  border: 1px solid var(--border);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' fill='none' stroke='hsl(0,0%,40%)' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='2' y1='2' x2='8' y2='8'/%3E%3Cline x1='8' y1='2' x2='2' y2='8'/%3E%3C/svg%3E");
}

.pricing-card__cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.pricing-footnote {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: var(--size-xs);
  color: var(--text-subtle);
  max-width: 60ch;
  margin-inline: auto;
  line-height: 1.6;
}

/* Stagger for pricing (4 children) */
[data-stagger].is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 320ms; }
[data-stagger].is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 400ms; }
[data-stagger].is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 480ms; }
[data-stagger].is-visible > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 560ms; }
[data-stagger].is-visible > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 640ms; }

/* ── SCROLL ANIMATIONS ───────────────────────────────── */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

[data-stagger].is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
[data-stagger].is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 80ms; }
[data-stagger].is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 160ms; }
[data-stagger].is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 240ms; }

/* Fade-up for sections */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: hsl(205, 42%, 6% / .8);         /* matches site-header */
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border);
  padding-block: var(--space-xl);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__brand { display: flex; flex-direction: column; gap: .75rem; }

.footer__tagline {
  font-size: var(--size-sm);
  color: var(--text-muted);
  max-width: 36ch;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.footer__links a {
  font-size: var(--size-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer__links a:hover { color: var(--text); }

.footer__legal {
  font-size: var(--size-xs);
  line-height: 1.65;
  color: var(--text-subtle);
  max-width: 80ch;
  margin-bottom: var(--space-sm);
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
}

.footer__copyright {
  font-size: var(--size-xs);
  color: var(--text-subtle);
}

.footer__copyright a {
  color: var(--green);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════
   SUBSCRIBE DRAWER — sticky slide-up footer tray
══════════════════════════════════════════════════════ */

/* Prevent page content hiding behind the two bars (44px subscribe + 52px app) */
body { padding-bottom: 96px; }

.bottom-dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90; /* below sticky header (100) */
  display: flex;
  flex-direction: column;
}

/* ── Trigger bar ── */
.subscribe-drawer__trigger {
  width: 100%;
  height: 44px;
  background: var(--surface-2);
  border: none;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2rem);
  gap: 1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--text);
  transition: background var(--t-fast) var(--ease);
}

.subscribe-drawer__trigger:hover { background: var(--surface); }

.subscribe-drawer__trigger-inner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.subscribe-drawer__label {
  font-size: var(--size-sm);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subscribe-drawer__label strong { color: var(--text); }

.subscribe-drawer__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.subscribe-drawer__cta {
  font-size: var(--size-xs);
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.subscribe-drawer__chevron {
  color: var(--green);
  flex-shrink: 0;
  transition: transform var(--t-base) var(--ease);
}

.bottom-dock.is-open .subscribe-drawer__chevron {
  transform: rotate(180deg);
}

/* ── Slide-up panel ── */
.subscribe-drawer__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 450ms cubic-bezier(.4, 0, .2, 1);
  background: #ffffff;
  border-top: 2px solid var(--green);
}

.bottom-dock.is-open .subscribe-drawer__panel {
  max-height: 500px;
}

.subscribe-drawer__panel-inner {
  padding: 1.75rem clamp(1rem, 4vw, 2rem);
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

/* ── Close button ── */
.subscribe-drawer__close {
  position: absolute;
  top: 0.875rem;
  right: clamp(0.5rem, 2vw, 1rem);
  background: none;
  border: none;
  color: hsl(205, 20%, 45%);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t-fast), background var(--t-fast);
  line-height: 0;
}

.subscribe-drawer__close:hover {
  color: hsl(205, 42%, 8%);
  background: #e8eef4;
}
/* ── SUBSCRIBE TEASER STRIP (above footer) ─────────── */
.subscribe-teaser-strip {
  display: block;
  width: 100%;
  background: hsl(142, 60%, 7%);
  border: none;
  border-top: 1px solid hsl(142, 80%, 18%);
  border-bottom: 1px solid hsl(142, 80%, 18%);
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--t-fast) var(--ease);
}

.subscribe-teaser-strip:hover { background: hsl(142, 60%, 10%); }

.subscribe-teaser-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.875rem clamp(1rem, 4vw, 2.5rem);
  flex-wrap: wrap;
}

.subscribe-teaser-strip__text {
  font-size: var(--size-sm);
  color: var(--text-muted);
}

.subscribe-teaser-strip__text strong { color: var(--text); }

.subscribe-teaser-strip__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--size-sm);
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

/* ── App CTA bar (very bottom, links to SwingTrace app) ── */
.app-cta-bar {
  display: block;
  width: 100%;
  height: 52px;
  background: var(--green);
  color: hsl(205, 42%, 6%);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--size-sm);
  transition: background var(--t-fast) var(--ease);
  box-shadow: 0 -4px 24px hsl(0 0% 0% / .3);
}

.app-cta-bar:hover { background: hsl(142, 100%, 48%); }

.app-cta-bar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ── NARROW MOBILE OVERFLOW FIX ─────────────────────────────────────────────
   Targets phones narrower than 480px (iPhone SE, most Android portrait).
   Root cause: CSS Grid's `1fr` = `minmax(auto, 1fr)`. The `auto` min expands
   to fit the button's min-content width (nowrap text ~420px), making the hero
   grid wider than the ~350px available viewport width, clipping content right.
   Fix: force grid min to 0 + allow hero CTA text to wrap at this width.
   SCOPE: hero section + header only. No desktop/tablet layout is affected.
──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 479px) {
  /* Constrain the hero grid column so it cannot expand beyond the viewport */
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Allow the primary CTA button to fill the column and wrap its text */
  .hero__actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    min-width: 0;
  }

  /* Prevent microcopy from overflowing on very narrow screens */
  .btn-microcopy {
    white-space: normal;
    overflow-wrap: break-word;
  }

  /* Allow "SwingTrace AI Pro" brand line to wrap naturally on narrow screens.
     white-space: nowrap was intentional on desktop to keep it one line;
     on mobile the text (~430px) exceeds the ~350px container. */
  .hero__title-brand {
    white-space: normal;
  }

  /* Tighten header CTA padding so logo + button fit within ~350px header.
     Logo (~192px) + gap (24px) + button: reduced padding brings total to ~330px. */
  .header__cta {
    padding: .5rem .875rem;
    font-size: var(--size-xs);
  }
}

