/* The Synth Studio: partner programme landing page
   Loads after fonts-local.css and tokens.css (brand primitives).
   Component base ported from the Synth Landing draft (iGaming lineage). */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  padding: 14px 0;
  transition: background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(8, 6, 15, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav-logo {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo img { width: 42px; height: 42px; }
.nav-logo span {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: 0.005em; color: #fff; white-space: nowrap; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-ghost {
  font-size: 15px; color: var(--ink-dim); text-decoration: none;
  transition: color 0.25s;
}
.nav-ghost:hover { color: var(--ink); }
.btn.nav-cta { padding: 11px 22px; font-size: 15px; }
.cta-short { display: none; }

/* ---------- scrub hero ---------- */

.scrub { position: relative; height: 400vh; background: var(--bg-base); }
/* svh, not dvh: the iOS URL bar animates dvh and relayouts the whole video
   stage mid-scroll. The strip svh can leave at the bottom sits under the
   near-black shade, so a fixed stage wins. */
.scrub-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scrub-stage video, .scrub-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.scrub-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(8, 6, 15, 0.78) 0%, rgba(8, 6, 15, 0.3) 42%, rgba(8, 6, 15, 0.06) 62%),
    linear-gradient(to top, rgba(8, 6, 15, 0.82) 0%, rgba(8, 6, 15, 0.1) 40%);
}

.hero-topline {
  position: absolute; left: 0; right: 0; top: 0;
  padding-top: max(15vh, 124px);
  will-change: opacity; /* opacity is written per frame while the scrub runs */
}
.hero-topline h1, .page-hero h1 { max-width: min(17ch, 100%); font-size: clamp(44px, 6.4vw, 88px); }
.hero-topline .lead, .page-hero .lead {
  margin-top: 20px; max-width: 46ch;
  font-size: clamp(16px, 1.7vw, 19px); color: var(--ink-dim);
}
.hero-cta { margin-top: 28px; }

.scrub-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
}
.scrub-copy .wrap { display: flex; flex-direction: column; gap: 12px; }

.stage-word {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  line-height: 1; letter-spacing: -0.02em;
  height: 1.12em; position: relative; color: #fff;
}
.stage-word span {
  position: absolute; left: 0; bottom: 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  white-space: nowrap;
}
.stage-word span.live { opacity: 1; transform: none; }

.stage-line {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 52ch; min-height: 3.2em;
  color: rgba(236, 232, 246, 0.8);
}
.stage-line span { display: none; }
.stage-line span.live { display: inline; }

.scrub-progress {
  height: 2px; margin-top: 18px; max-width: 420px;
  background: rgba(201, 188, 255, 0.18);
  border-radius: 2px; overflow: hidden;
}
.scrub-progress i {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%; /* scale, not width: no layout per frame */
  background: linear-gradient(90deg, var(--violet), var(--blue));
}

.scrub-hint {
  position: absolute; right: 38px; bottom: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--lavender); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  writing-mode: vertical-rl;
  transition: opacity 0.4s;
}
.scrub-hint::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--violet), transparent);
  animation: hint-drip 1.8s ease-in-out infinite;
}
@keyframes hint-drip {
  from { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  to { transform: scaleY(0); transform-origin: bottom; }
}
.scrub-hint.gone { opacity: 0; }

/* static fallback hero (reduced motion / load failure) */
.page-hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 72% 18%, rgba(139, 108, 255, 0.16), transparent 65%),
    radial-gradient(55% 70% at 18% 82%, rgba(79, 125, 255, 0.12), transparent 70%);
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 6, 15, 0.94) 10%, rgba(8, 6, 15, 0.55) 42%, rgba(8, 6, 15, 0.16) 72%);
}
.page-hero .wrap { position: relative; z-index: 1; padding-bottom: 72px; padding-top: 160px; }
.page-hero h1 { max-width: 17ch; }
.page-hero .lead { margin-top: 18px; color: var(--ink-dim); }

/* ---------- sections ---------- */

.section { padding: clamp(88px, 11vw, 140px) 0; }
.split { display: grid; gap: 26px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; }
.split h2 { font-size: clamp(36px, 4.6vw, 58px); max-width: min(14ch, 100%); }
.split .lead { color: var(--ink-dim); font-size: 17px; max-width: 52ch; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- terms grid ---------- */

.terms {
  margin-top: 56px;
  display: grid; gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.term {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 26px;
  background: var(--card);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}
.term h3 {
  font-size: 21px; letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display: inline-block;
}
.term p { margin-top: 12px; font-size: 15.5px; color: var(--ink-dim); line-height: 1.6; }
.term:hover { border-color: rgba(139, 108, 255, 0.4); box-shadow: 0 18px 44px -24px rgba(139, 108, 255, 0.5); }
.terms-close {
  margin-top: 34px; max-width: 62ch;
  font-size: 16.5px; color: var(--ink); line-height: 1.6;
}

/* ---------- how-it-works flow ---------- */

.flow {
  margin-top: 56px;
  list-style: none;
  display: grid; gap: 26px;
  max-width: 760px;
  position: relative;
}
.flow::before {
  content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px;
  width: 1px;
  background: linear-gradient(to bottom, var(--violet), rgba(139, 108, 255, 0.08));
}
.flow li {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px;
  align-items: start;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.flow b {
  position: relative; z-index: 1;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--lavender);
  background: var(--bg-soft);
  border: 1px solid rgba(201, 188, 255, 0.3); border-radius: 50%;
  transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.flow li:hover b {
  color: #fff; border-color: var(--lavender);
  box-shadow: 0 0 16px rgba(139, 108, 255, 0.7);
}
.flow h3 { font-size: 21px; letter-spacing: -0.01em; padding-top: 8px; }
.flow p { margin-top: 8px; font-size: 15.5px; color: var(--ink-dim); line-height: 1.6; max-width: 58ch; }

.flow-cta { margin-top: 52px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cta-note { font-size: 14px; color: var(--ink-dim); max-width: 34ch; line-height: 1.5; }

/* ---------- pledge cards (03 · Your name) ---------- */

.clusters {
  margin-top: 56px;
  display: grid; gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cluster {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 28px;
  background: linear-gradient(180deg, rgba(139, 108, 255, 0.05), transparent 55%);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}
.cluster h3 { font-size: 23px; letter-spacing: -0.01em; }
.cluster p { margin-top: 12px; color: var(--ink-dim); font-size: 15.5px; line-height: 1.62; }
.cluster:hover {
  border-color: rgba(139, 108, 255, 0.4);
  box-shadow: 0 18px 44px -24px rgba(139, 108, 255, 0.5);
}

/* ---------- FAQ ---------- */

.faqs { margin-top: 48px; display: grid; gap: 12px; max-width: 760px; }
.faqs details {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); overflow: hidden;
  transition: border-color 0.3s;
}
.faqs details[open] { border-color: rgba(139, 108, 255, 0.4); }
.faqs summary {
  cursor: pointer; list-style: none;
  padding: 18px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after {
  content: "+";
  font-family: var(--font-body); font-weight: 400;
  color: var(--lavender); font-size: 22px; line-height: 1;
  transition: transform 0.3s ease;
}
.faqs details[open] summary::after { transform: rotate(45deg); }
.faqs details p { padding: 0 22px 20px; color: var(--ink-dim); font-size: 15.5px; line-height: 1.6; max-width: 60ch; }

/* ---------- CTA band ---------- */

.cta-band { padding-top: 20px; }
.cta-panel {
  text-align: center;
  border: 1px solid var(--line); border-radius: 30px;
  padding: clamp(56px, 8vw, 96px) 28px;
  /* the hero's final frame carries the panel; scrim keeps the copy readable */
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(139, 108, 255, 0.12), transparent 70%),
    linear-gradient(rgba(8, 6, 15, 0.6), rgba(8, 6, 15, 0.68)),
    url("assets/stage_d_1600.jpg") center 62% / cover no-repeat,
    var(--bg-soft);
}
.cta-panel .lead { color: rgba(236, 232, 246, 0.85); }
.cta-panel h2 { font-size: clamp(38px, 5vw, 62px); }
.cta-panel .lead { margin: 18px auto 30px; max-width: 44ch; color: var(--ink-dim); font-size: 17px; }
.signoff {
  margin-top: 26px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.01em; color: var(--lavender);
}

.fineprint {
  list-style: none;
  margin: 34px auto 0; max-width: 760px;
  display: grid; gap: 10px;
}
.fineprint li {
  position: relative; padding-left: 24px;
  font-size: 13.5px; color: var(--ink-dim); line-height: 1.55;
}
.fineprint li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 12px; height: 1px;
  background: linear-gradient(90deg, var(--violet), transparent);
}

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 44px 0 60px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.footer-row .nav-logo img { width: 40px; height: 40px; }
.footer p { font-size: 14px; color: var(--ink-dim); }
.footer a { color: var(--lavender); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- life after the hero: staggered reveals ---------- */

.terms .term, .clusters .cluster, .flow li {
  opacity: 0; transform: translateY(22px);
}
.terms.in .term, .clusters.in .cluster, .flow.in li { opacity: 1; transform: none; }
.terms.in .term:nth-child(2), .clusters.in .cluster:nth-child(2), .flow.in li:nth-child(2) { transition-delay: 0.08s; }
.terms.in .term:nth-child(3), .clusters.in .cluster:nth-child(3), .flow.in li:nth-child(3) { transition-delay: 0.16s; }
.terms.in .term:nth-child(4), .clusters.in .cluster:nth-child(4), .flow.in li:nth-child(4) { transition-delay: 0.24s; }
.flow.in li:nth-child(5) { transition-delay: 0.32s; }
/* keep the container itself visible; children carry the motion */
.terms.reveal, .clusters.reveal, .flow.reveal { opacity: 1; transform: none; }

/* glow pulse as each box scrolls into view, timed to the reveal stagger */
@keyframes box-glow {
  0% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(139, 108, 255, 0); }
  45% { border-color: rgba(139, 108, 255, 0.55); box-shadow: 0 14px 52px -16px rgba(139, 108, 255, 0.6); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(139, 108, 255, 0); }
}
.terms.in .term, .clusters.in .cluster, .cta-panel.reveal.in {
  animation: box-glow 1.15s ease 0.15s 1;
}
.terms.in .term:nth-child(2), .clusters.in .cluster:nth-child(2) { animation-delay: 0.23s; }
.terms.in .term:nth-child(3), .clusters.in .cluster:nth-child(3) { animation-delay: 0.31s; }
.terms.in .term:nth-child(4), .clusters.in .cluster:nth-child(4) { animation-delay: 0.39s; }

/* aurora tint drifts with the section you are in */
.aurora { transition: filter 1s ease; }
/* while the opaque hero video pins over it, the aurora is invisible anyway:
   dropping the layer saves its 50px blur recomposite every frame */
.aurora.off { visibility: hidden; animation-play-state: paused; }
body[data-zone="deal"] .aurora { filter: blur(50px) saturate(1.2) hue-rotate(8deg); }
body[data-zone="how"] .aurora { filter: blur(50px) saturate(1.2) hue-rotate(-10deg); }
body[data-zone="name"] .aurora { filter: blur(50px) saturate(1.2) hue-rotate(14deg); }
body[data-zone="faq"] .aurora { filter: blur(50px) saturate(1.2) hue-rotate(6deg); }
body[data-zone="call"] .aurora { filter: blur(50px) saturate(1.3) hue-rotate(26deg); }

/* ---------- capture mode (?capture=0..1): deterministic freeze for screenshots ---------- */

html.capture .reveal,
html.capture .terms .term, html.capture .clusters .cluster,
html.capture .flow li { opacity: 1; transform: none; transition: none; }
html.capture .terms.in .term, html.capture .clusters.in .cluster, html.capture .cta-panel.reveal.in { animation: none; }
html.capture .aurora { animation: none; }
html.capture .scrub-hint::after { animation: none; }
html.capture .section { min-height: auto; }
html.capture { scroll-behavior: auto; }
/* tall-window captures: the fallback hero must not inherit a 92vh minimum */
html.capture .page-hero { min-height: 900px; }
html.capture .page-hero .wrap { padding-top: 240px; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora { animation: none; }
  .reveal,
  .terms .term, .clusters .cluster, .flow li { opacity: 1; transform: none; transition: none; }
  .terms.in .term, .clusters.in .cluster, .cta-panel.reveal.in { animation: none; }
  .scrub-hint::after { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .scrub { height: 340vh; }
  .split { grid-template-columns: 1fr; align-items: start; }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .nav-ghost { display: none; }
  .nav-logo span { font-size: 15px; }
  .btn.nav-cta { padding: 10px 16px; font-size: 13.5px; }
  .nav-logo img { width: 36px; height: 36px; }
  .terms { grid-template-columns: 1fr; }
  .clusters { grid-template-columns: 1fr; }
  .scrub-hint { right: 22px; bottom: 40px; }
  .flow::before { left: 17px; }
  .flow li { grid-template-columns: 36px minmax(0, 1fr); gap: 16px; }
  .flow b { width: 36px; height: 36px; font-size: 15px; }
  .flow h3 { padding-top: 5px; font-size: 19px; }
}

/* ---------- mobile polish ---------- */

@media (max-width: 480px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .eyebrow { font-size: 11px; letter-spacing: 0.16em; gap: 9px; }
  .eyebrow::before { width: 18px; }
  .hero-topline h1, .page-hero h1 { font-size: clamp(36px, 11vw, 44px); }
  .hero-cta { margin-top: 22px; padding: 13px 26px; font-size: 15px; }
  .stage-word { font-size: clamp(2rem, 9vw, 2.3rem); }
  .section { padding: 72px 0; }
  .split h2 { font-size: clamp(32px, 9vw, 38px); }
  .btn.nav-cta { padding: 11px 16px; }
  .cta-panel { border-radius: 22px; }
  .flow-cta { gap: 16px; }
}
