/* =============================================================
   "The Buyer Left the Funnel" — landing-page extensions
   -------------------------------------------------------------
   Ported from a Claude Design prototype (GrowthScaler DS v1.2)
   onto the production GrowthScaler design system.

   This file loads ONLY on the-buyer-left-the-funnel.html. It is
   purely additive — it composes from production tokens
   (colors_and_type.css + site.css) and never modifies a shared
   rule. Three v1.2 atoms the production DS predates are supplied
   here (gs-hero--split, gs-arrow-host, gs-dark-inset); everything
   else is net-new page components or .page-btf-scoped overrides.
   ============================================================= */

html { scroll-padding-top: 96px; }

/* ---------- v1.2 atoms missing from the production DS --------- */

/* split hero: headline left, dark inset right */
.gs-hero--split .gs-hero__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-16); align-items: center;
}
@media (max-width: 900px) {
  .gs-hero--split .gs-hero__inner { grid-template-columns: 1fr; gap: var(--s-12); }
}

/* arrow nudge when the whole control (not just the <a>) is hovered */
.gs-arrow-host:hover .gs-arrow { transform: translateX(3px); }

/* dark inset card on a light section */
.gs-dark-inset {
  position: relative; background: var(--graphite-deep); color: #fff;
  border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-lg);
  box-shadow: var(--shadow-result); overflow: hidden; padding: 28px 28px;
}
.gs-dark-inset::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,132,252,0.4), transparent);
}
.gs-dark-inset__label {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.gs-dark-inset__label .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: #C084FC; box-shadow: 0 0 8px rgba(192,132,252,0.6);
}
.gs-dark-inset__body { position: relative; }

/* ---------- Hero eyebrow row -------------------------------- */
.page-btf .eyebrow-row {
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6);
}
.page-btf .eyebrow-row .gs-eyebrow { color: var(--fg-3); }

/* ---------- Hero stat carousel (inside the dark inset) ------- */
.stat-carousel { position: relative; display: flex; flex-direction: column; gap: var(--s-8); }

.stat-carousel__glow {
  position: absolute; top: -40px; left: -30px; width: 300px; height: 300px; border-radius: 999px;
  background: radial-gradient(circle, rgba(168,85,247,0.30), rgba(124,58,237,0.10) 45%, transparent 70%);
  filter: blur(8px); pointer-events: none; z-index: 0;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .stat-carousel__glow { animation: stat-glow-drift 9s ease-in-out infinite alternate; }
}
@keyframes stat-glow-drift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.9; }
  100% { transform: translate(160px, 30px) scale(1.15); opacity: 0.65; }
}

.stat-carousel__track { position: relative; min-height: 240px; z-index: 1; }
.stat-carousel__slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transform: translateX(24px); pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.stat-carousel__slide.is-active {
  position: relative; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
}

.stat-carousel__ghost {
  position: absolute; top: -34px; right: -6px; z-index: -1;
  font-size: 190px; font-weight: var(--w-black); line-height: 1; letter-spacing: -0.04em;
  color: rgba(255,255,255,0.045); pointer-events: none; user-select: none;
}

.stat-carousel__index {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(255,255,255,0.5);
  display: block; margin-bottom: var(--s-5);
}
.stat-carousel__value {
  display: flex; align-items: flex-start; font-size: 96px; font-weight: var(--w-black); line-height: 0.9;
  letter-spacing: var(--tr-tight);
  background: linear-gradient(135deg, #fff 30%, #C084FC);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.stat-carousel__num { font-variant-numeric: tabular-nums; }
.stat-carousel__approx { font-weight: var(--w-bold); font-size: 0.55em; align-self: center; margin-right: 2px; }
.stat-carousel__unit { font-weight: var(--w-bold); font-size: 0.46em; margin-top: 0.12em; }
.stat-carousel__title {
  font-size: var(--t-h5); font-weight: var(--w-bold); color: #fff;
  margin: var(--s-6) 0 var(--s-3); letter-spacing: var(--tr-tight);
}
.stat-carousel__note { font-size: var(--t-body-sm); color: rgba(255,255,255,0.62); margin: 0; line-height: 1.5; max-width: 38ch; }

.stat-carousel__controls {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--s-6); position: relative; z-index: 1;
}
.stat-carousel__dots { display: flex; align-items: center; gap: var(--s-3); }
.stat-carousel__dot {
  position: relative; width: 30px; height: 4px; border-radius: 999px; border: 0; cursor: pointer; padding: 0;
  background: rgba(255,255,255,0.18); overflow: hidden;
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}
.stat-carousel__dot:hover { background: rgba(255,255,255,0.34); }
.stat-carousel__dot.is-active { width: 52px; background: rgba(255,255,255,0.18); }
.stat-carousel__dot-fill {
  position: absolute; inset: 0; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #A855F7, #C084FC);
}
.stat-carousel__dot.is-active .stat-carousel__dot-fill { width: 100%; }
.stat-carousel__dot.is-progress .stat-carousel__dot-fill {
  width: 0; animation: stat-dot-progress var(--stat-dur, 5000ms) linear forwards;
}
@keyframes stat-dot-progress { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .stat-carousel__dot.is-progress .stat-carousel__dot-fill { animation: none; width: 100%; }
}
.stat-carousel__arrows { display: flex; gap: var(--s-3); }
.stat-carousel__arrow {
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  color: #fff; font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.stat-carousel__arrow:hover { background: rgba(255,255,255,0.14); border-color: rgba(192,132,252,0.5); transform: translateY(-1px); }
.stat-carousel__arrow:active { transform: translateY(0); }

/* ---------- Dark thesis band: on-dark heads + recolor cells -- */
/* Production .gs-on-dark recolors eyebrows/mono-nums/buttons but
   NOT headings or ledes, and .gs-section-head h2 is hardcoded
   graphite — which would vanish on the dark band. Restore on-dark
   contrast, scoped to this page's dark sections only. */
.page-btf .gs-section--dark .gs-section-head h2 { color: #fff; }
.page-btf .gs-section--dark .gs-section-head h2 em { color: #C084FC; -webkit-text-fill-color: #C084FC; }
.page-btf .gs-section--dark .gs-section-head__lede { color: rgba(255,255,255,0.7); }

.page-btf .gs-section--dark .gs-thesis-grid__cell {
  background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.10); box-shadow: none;
}
.page-btf .gs-section--dark .gs-thesis-grid__cell:hover {
  box-shadow: none; border-color: rgba(192,132,252,0.40);
}
.page-btf .gs-section--dark .gs-thesis-grid__num {
  font-family: var(--font-mono); font-size: var(--t-eyebrow); letter-spacing: var(--tr-mono);
  text-transform: uppercase; color: rgba(255,255,255,0.5); display: block; margin-bottom: var(--s-3);
}
.page-btf .gs-section--dark .gs-thesis-grid__cell p { color: rgba(255,255,255,0.62) !important; }
.page-btf .gs-section--dark .gs-thesis-grid__cell p.gs-thesis-grid__title { color: #fff !important; }

/* ---------- "What's inside" — two-part index ---------------- */
.parts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.part-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--r-lg); padding: var(--s-10); box-shadow: var(--shadow-card);
}
.part-card__kicker {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--fg-4);
}
.part-card__h { font-size: var(--t-h3); font-weight: var(--w-bold); margin: var(--s-3) 0 var(--s-2); }
.part-card__sub { font-size: var(--t-body-sm); color: var(--fg-3); margin: 0 0 var(--s-6); }
.part-card__list { list-style: none; padding: 0; margin: 0; }
.part-card__item {
  display: grid; grid-template-columns: 40px 1fr; gap: var(--s-4);
  padding: var(--s-5) 0; border-top: 1px solid var(--surface-border);
}
.part-card__item-num {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); color: var(--fg-4); padding-top: 3px;
}
.part-card__item-title { font-size: var(--t-body-sm); font-weight: var(--w-semibold); color: var(--graphite); margin: 0 0 2px; letter-spacing: var(--tr-tight); }
.part-card__item-note { font-size: var(--t-card); color: var(--fg-3); margin: 0; line-height: 1.5; }
@media (max-width: 800px) { .parts-grid { grid-template-columns: 1fr; } }

/* ---------- Phased agenda stepper --------------------------- */
.phase-stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); position: relative; }
.phase-card {
  position: relative; background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--r-lg); padding: var(--s-8); box-shadow: var(--shadow-card);
}
.phase-card__rail {
  display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-6);
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--fg-4);
}
.phase-card__dot { width: 9px; height: 9px; border-radius: 999px; background: var(--graphite); flex: none; }
.phase-card:nth-child(2) .phase-card__dot { background: var(--accent-grad-2); box-shadow: 0 0 0 4px rgba(168,85,247,0.12); }
.phase-card:nth-child(3) .phase-card__dot { background: var(--accent-grad-3); }
.phase-card__h { font-size: var(--t-h4); font-weight: var(--w-bold); margin: 0 0 var(--s-2); }
.phase-card__win { font-size: var(--t-card); color: var(--fg-3); margin: 0 0 var(--s-6); }
.phase-card__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.phase-card__list li { position: relative; padding-left: var(--s-7); font-size: var(--t-body-sm); color: var(--fg-2); line-height: 1.5; }
.phase-card__list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px;
  background:
    linear-gradient(45deg, transparent 45%, var(--graphite) 45%, var(--graphite) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--graphite) 45%, var(--graphite) 55%, transparent 55%);
}
@media (max-width: 900px) { .phase-stepper { grid-template-columns: 1fr; } }

/* ---------- Credibility band -------------------------------- */
.cred-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--s-16); align-items: center; }
.cred-sources { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.cred-chip {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--fg-3);
  border: 1px solid var(--surface-border); border-radius: var(--r-pill);
  padding: 7px 14px; background: var(--surface);
}
@media (max-width: 800px) { .cred-band { grid-template-columns: 1fr; gap: var(--s-8); } }

/* =============================================================
   GATE — multi-step email capture
   ============================================================= */
.gate { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch;
  border: 1px solid var(--surface-border); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-result); background: var(--surface); }
.gate__aside {
  background: var(--graphite-deep); color: #fff; padding: var(--s-14) var(--s-12);
  position: relative; overflow: hidden;
}
.gate__aside::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,132,252,0.4), transparent);
}
.gate__aside-h { font-size: var(--t-h2); color: #fff; margin: 0 0 var(--s-5); line-height: var(--lh-heading); }
.gate__aside-p { color: var(--fg-on-dark-muted); font-size: var(--t-body-sm); margin: 0 0 var(--s-8); }
.gate__aside-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.gate__aside-list li {
  display: grid; grid-template-columns: 16px 1fr; gap: var(--s-4); align-items: start;
  font-size: var(--t-body-sm); color: var(--fg-on-dark-muted); line-height: 1.5;
}
.gate__aside-list li::before {
  content: ""; width: 7px; height: 7px; margin-top: 7px; border-radius: 999px;
  background: #C084FC; box-shadow: 0 0 8px rgba(192,132,252,0.6);
}
.gate__form { padding: var(--s-14) var(--s-12); display: flex; flex-direction: column; }

.gate__progress { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-10); }
.gate__dot {
  width: 28px; height: 4px; border-radius: 999px; background: var(--surface-warm-2);
  transition: background var(--dur) var(--ease);
}
.gate__dot.is-active { background: var(--graphite); }
.gate__dot.is-done { background: var(--accent-grad-2); }
.gate__step-meta {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--fg-4);
  margin-left: auto;
}

.gate__steps { position: relative; flex: 1; }
.gate__step { display: none; }
.gate__step.is-active { display: block; animation: gate-in var(--dur) var(--ease); }
@keyframes gate-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gate__step-h { font-size: var(--t-h3); font-weight: var(--w-bold); margin: 0 0 var(--s-2); letter-spacing: var(--tr-tight); }
.gate__step-sub { font-size: var(--t-body-sm); color: var(--fg-3); margin: 0 0 var(--s-8); }

.gate__field { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.gate__label {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--fg-3);
}
.gate__input, .gate__select {
  font-family: var(--font-sans); font-size: var(--t-body); color: var(--graphite);
  background: var(--surface); border: 1px solid var(--surface-border-strong);
  border-radius: var(--r-sm); padding: 14px 16px; width: 100%; min-height: 48px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gate__input::placeholder { color: var(--fg-4); }
.gate__input:focus, .gate__select:focus {
  outline: none; border-color: var(--accent-grad-1);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.10);
}
.gate__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.gate__error { font-size: var(--t-card); color: var(--status-dont-ink); min-height: 18px; margin: 0; }

.gate__actions { display: flex; align-items: center; gap: var(--s-4); margin-top: auto; padding-top: var(--s-8); }
.gate__back {
  background: none; border: 0; cursor: pointer; padding: 12px 4px;
  font-size: var(--t-body-sm); font-weight: var(--w-semibold); color: var(--fg-3);
}
.gate__back:hover { color: var(--graphite); }
.gate__next { margin-left: auto; }
.gate__legal { font-size: var(--t-card); color: var(--fg-4); margin: var(--s-6) 0 0; line-height: 1.5; }

.gate__success { display: none; text-align: left; }
.gate__success.is-active { display: block; animation: gate-in var(--dur) var(--ease); }
.gate__success-mark {
  width: 48px; height: 48px; border-radius: 999px; background: var(--graphite-deep);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--s-6);
  position: relative;
}
.gate__success-mark::after {
  content: ""; width: 18px; height: 10px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px);
}
@media (max-width: 800px) {
  .gate { grid-template-columns: 1fr; }
  .gate__aside { padding: var(--s-10); }
  .gate__form { padding: var(--s-10); }
  .gate__row { grid-template-columns: 1fr; }
}
