/* =============================================================
   AceGenX Enterprise Solutions — design system
   Editorial corporate-light: warm porcelain, deep ink, azure
   structure, single warm amber accent. Custom line-art visuals.
   ============================================================= */

:root {
  --paper: oklch(0.972 0.006 85);
  --paper-2: oklch(0.951 0.009 80);
  --surface: oklch(0.995 0.004 85);
  --cloud: oklch(0.944 0.012 232);
  --ink: oklch(0.255 0.022 250);
  --ink-deep: oklch(0.196 0.028 252);
  --ink-2: oklch(0.355 0.026 250);
  --muted: oklch(0.515 0.021 250);
  --brand: oklch(0.520 0.120 250);
  --brand-deep: oklch(0.398 0.108 252);
  --brand-soft: oklch(0.930 0.040 250);
  --accent: oklch(0.748 0.135 64);
  --accent-deep: oklch(0.660 0.142 50);

  --line: oklch(0.255 0.022 250 / 0.12);
  --line-soft: oklch(0.255 0.022 250 / 0.07);
  --line-on-dark: oklch(0.97 0.01 250 / 0.14);

  --shell: 78rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
* { -webkit-tap-highlight-color: transparent; }

/* Ensure the [hidden] attribute always wins over utility display classes */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Atmospheric base: layered soft radial gradients (no flat fill) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60rem 50rem at 88% -8%, oklch(0.520 0.120 250 / 0.07), transparent 60%),
    radial-gradient(46rem 40rem at -6% 8%, oklch(0.748 0.135 64 / 0.05), transparent 55%),
    radial-gradient(70rem 60rem at 50% 116%, oklch(0.520 0.120 250 / 0.05), transparent 60%);
}

/* Fine grain overlay — fixed layer only, never on scroll containers */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: oklch(0.748 0.135 64 / 0.28); color: var(--ink-deep); }

h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; font-weight: 600; }

/* Display type with tight optical tracking */
.display {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-variation-settings: "opsz" 144;
}
.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--brand-deep);
}
.font-num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-feature-settings: "tnum" 1; }

/* ---------- Layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 768px) { .shell { padding-inline: 2.5rem; } }

.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- Links ---------- */
a { color: inherit; text-decoration: none; }
.link-underline {
  background-image: linear-gradient(var(--brand-deep), var(--brand-deep));
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease);
}
.link-underline:hover { background-size: 100% 1.5px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  padding: 0.92rem 1.4rem; border-radius: 0.85rem;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  color: oklch(0.99 0.004 85);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 1px 2px oklch(0.196 0.028 252 / 0.20), 0 10px 26px oklch(0.398 0.108 252 / 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px oklch(0.196 0.028 252 / 0.22), 0 18px 38px oklch(0.398 0.108 252 / 0.34);
}
.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 1px 2px oklch(0.255 0.022 250 / 0.04);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: oklch(0.520 0.120 250 / 0.45); box-shadow: 0 12px 26px oklch(0.255 0.022 250 / 0.10); }

.btn-on-dark {
  color: var(--ink-deep);
  background: oklch(0.97 0.01 85);
}
.btn-on-dark:hover { transform: translateY(-2px); background: oklch(1 0 0); box-shadow: 0 14px 30px oklch(0 0 0 / 0.30); }

.btn-outline-dark {
  color: oklch(0.97 0.01 85);
  border-color: var(--line-on-dark);
  background: oklch(0.97 0.01 250 / 0.04);
}
.btn-outline-dark:hover { transform: translateY(-2px); background: oklch(0.97 0.01 250 / 0.10); }

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 1.25rem;
  box-shadow: 0 1px 2px oklch(0.255 0.022 250 / 0.04), 0 10px 30px oklch(0.255 0.022 250 / 0.05);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: oklch(0.520 0.120 250 / 0.30);
  box-shadow: 0 2px 6px oklch(0.255 0.022 250 / 0.06), 0 22px 50px oklch(0.398 0.108 252 / 0.12);
}

/* Tinted icon tile */
.icon-tile {
  display: inline-grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 0.85rem;
  background: linear-gradient(160deg, var(--brand-soft), oklch(0.97 0.01 250));
  border: 1px solid oklch(0.520 0.120 250 / 0.16);
  color: var(--brand-deep);
}
.icon-tile--accent {
  background: linear-gradient(160deg, var(--accent-soft, oklch(0.945 0.045 70)), oklch(0.98 0.01 80));
  border-color: oklch(0.748 0.135 64 / 0.28);
  color: var(--accent-deep);
}
.icon { width: 1.5rem; height: 1.5rem; stroke-width: 1.5; fill: none; stroke: currentColor; }
.icon-sm { width: 1.15rem; height: 1.15rem; stroke-width: 1.6; fill: none; stroke: currentColor; }

/* Dark sections */
.section-dark {
  background:
    radial-gradient(50rem 40rem at 82% -10%, oklch(0.520 0.120 250 / 0.30), transparent 60%),
    radial-gradient(40rem 36rem at 6% 110%, oklch(0.748 0.135 64 / 0.14), transparent 60%),
    linear-gradient(180deg, var(--ink-deep), oklch(0.168 0.026 254));
  color: oklch(0.93 0.01 85);
}
.section-dark .eyebrow { color: oklch(0.80 0.09 70); }
.on-dark-muted { color: oklch(0.80 0.012 250); }

/* Hairline-divided list (alternative to card grids) */
.divide-rule > * + * { border-top: 1px solid var(--line); }

/* Tag / chip */
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.8rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.chip-dark { border-color: var(--line-on-dark); background: oklch(0.97 0.01 250 / 0.05); color: oklch(0.90 0.01 85); }
.chip .dot { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: var(--accent); }

/* Brand logo */
.brand-logo {
  display: block;
  height: 2.5rem;       /* 40px in header */
  width: auto;
  user-select: none;
}
@media (min-width: 1024px) {
  .brand-logo { height: 2.75rem; }
}
.brand-logo--lg { height: 3rem; }

/* Footer logo on dark backgrounds: sit on a white rounded pill */
.brand-logo--on-dark {
  display: inline-block;
  background: #ffffff;
  padding: 0.5rem 0.9rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.15), 0 8px 22px oklch(0 0 0 / 0.18);
}
.brand-logo--on-dark .brand-logo { height: 2.25rem; }

/* Client logo cells (text-only stand-ins; logos drop in later) */
.client-cell {
  display: grid; place-items: center;
  min-height: 4.25rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 0.85rem;
  font-family: var(--font-display, "Fraunces", serif);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.client-cell:hover {
  transform: translateY(-2px);
  border-color: oklch(0.520 0.120 250 / 0.35);
  box-shadow: 0 2px 6px oklch(0.255 0.022 250 / 0.04), 0 14px 32px oklch(0.398 0.108 252 / 0.08);
}
.client-cell--soft {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: oklch(0.972 0.006 85 / 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 20px oklch(0.255 0.022 250 / 0.05);
}
.nav-link {
  position: relative; font-weight: 500; font-size: 0.94rem; color: var(--ink-2);
  padding: 0.4rem 0; transition: color 0.2s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.35rem; height: 2px;
  background: var(--accent); border-radius: 2px;
}

/* Dropdown */
.has-dropdown > .dropdown {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%) translateY(6px);
  opacity: 0; visibility: hidden; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.1rem;
  box-shadow: 0 2px 6px oklch(0.255 0.022 250 / 0.06), 0 26px 60px oklch(0.255 0.022 250 / 0.14);
  padding: 0.6rem; width: min(40rem, 86vw);
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown-item { display: flex; gap: 0.85rem; padding: 0.7rem 0.8rem; border-radius: 0.75rem; transition: background-color 0.2s var(--ease); }
.dropdown-item:hover { background: oklch(0.520 0.120 250 / 0.07); }

/* Mobile drawer */
.drawer { transition: transform 0.4s var(--ease); transform: translateX(100%); }
.drawer.is-open { transform: translateX(0); }
.scrim { opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease); }
.scrim.is-open { opacity: 1; visibility: visible; }
body.no-scroll { overflow: hidden; }

/* ---------- Marquee ---------- */
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 3.5rem; padding-right: 3.5rem; flex-shrink: 0; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ---------- Scroll reveal ----------
   GSAP (anim.js) owns the entrance animation. The .reveal class is a hook
   GSAP scopes onto; without JS the element simply stays visible. The legacy
   .is-visible class is kept as a no-op for any orphan callers. */
.reveal { will-change: transform, opacity, filter; }

/* ---------- SplitText scaffolding ----------
   When SplitText wraps each character in a span, we hide overflow on the line
   so chars sliding up from below stay clipped. */
.split-headline,
[data-split-headline] {
  overflow: clip;
}
.split-headline .split-line,
[data-split-headline] .split-line {
  overflow: hidden;
  display: block;
}
/* Reduce flash before fonts load + SplitText runs */
.split-headline:not(.split-ready),
[data-split-headline]:not(.split-ready) {
  opacity: 0;
}
.split-ready { opacity: 1; }

/* Hero headline sizing — bigger and tighter than before */
.headline-xl {
  font-size: clamp(2.55rem, 5.5vw + 0.5rem, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
}

/* ---------- Hero: editorial typography ----------
   Pairs Fraunces (high-contrast modern serif) with a leading rule + italic
   emphasis to give the hero distinct character vs. generic "big sans" heroes.
   The headline weight, optical-size, and italic span are all part of the
   Fraunces variable font — no extra files. */
.hero-copy { position: relative; }

/* Eyebrow — leading rule + medium mono, deeper than the body eyebrow */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.hero-eyebrow__mark {
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-deep), var(--brand-deep));
}

/* Headline — Fraunces variable, slightly heavier, tighter optical track */
.hero-headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.6rem, 5.6vw + 0.4rem, 4.4rem);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink-deep);
}

/* Italic accent for "one service." — Fraunces italic is the showpiece */
.hero-headline__accent {
  position: relative;
  display: inline-block;
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  color: var(--brand-deep);
  white-space: nowrap;
  padding-bottom: 0.05em;
}

/* Hand-drawn underline beneath the italic accent — draws in on load */
.hero-headline__draw {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.55em;
  color: var(--accent-deep);
  overflow: visible;
  opacity: 0;
}
.hero-headline__draw path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
}
.split-ready .hero-headline__draw {
  opacity: 1;
  animation: hero-underline-draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.6s forwards;
}
@keyframes hero-underline-draw {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-headline__draw { opacity: 1; }
  .hero-headline__draw path { stroke-dashoffset: 0; }
}

/* Animated SVG dash draw */
.draw-line { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); animation: draw 1.6s var(--ease) forwards; animation-delay: 0.3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Floating node pulse on hero diagram */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pulse-soft { 0%,100% { opacity: 0.5; r: 4; } 50% { opacity: 1; r: 5.5; } }

/* ---------- Forms ---------- */
.field-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.4rem; }
.field {
  width: 100%; padding: 0.8rem 0.95rem; font-size: 0.98rem; font-family: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.8rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field::placeholder { color: oklch(0.6 0.02 250); }
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px oklch(0.520 0.120 250 / 0.16); }
.field:user-invalid { border-color: var(--accent-deep); }
.field-help { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }
.field-error { font-size: 0.8rem; color: var(--accent-deep); margin-top: 0.35rem; display: none; }
.field:user-invalid ~ .field-error { display: block; }

/* ---------- Accordion ---------- */
[data-acc-item] { border-bottom: 1px solid var(--line); }
[data-acc-trigger] { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; text-align: left; cursor: pointer; color: var(--ink); font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.15rem; }
[data-acc-trigger]:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 0.4rem; }
[data-acc-trigger] .acc-icon { flex-shrink: 0; transition: transform 0.35s var(--ease); color: var(--brand-deep); }
[data-acc-item].is-open [data-acc-trigger] .acc-icon { transform: rotate(45deg); }
[data-acc-panel] { overflow: hidden; max-height: 0; transition: max-height 0.4s var(--ease); }
[data-acc-panel] > div { padding-bottom: 1.4rem; color: var(--muted); max-width: 60ch; }

/* ---------- Comparison columns ---------- */
.compare-col { border-radius: 1.25rem; padding: 1.75rem; border: 1px solid var(--line); }
.compare-col--muted { background: var(--paper-2); }
.compare-col--brand { background: var(--surface); border-color: oklch(0.520 0.120 250 / 0.30); box-shadow: 0 2px 6px oklch(0.255 0.022 250 / 0.05), 0 22px 50px oklch(0.398 0.108 252 / 0.10); }

/* ---------- Scroll progress bar ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.scroll-progress > span { display: block; height: 100%; transform-origin: left center; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* ---------- Card pointer spotlight ---------- */
.card { position: relative; }
.card-hover { isolation: isolate; }
.card-hover::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), oklch(0.520 0.120 250 / 0.13), transparent 68%);
  transition: opacity 0.4s var(--ease);
}
.card-hover:hover::after { opacity: 1; }

/* ---------- Hero: scroll-driven video teardown ----------
   Section is tall on lg (provides scroll travel). Inner sticky container
   holds the video + two text stages. anim.js scrubs video.currentTime and
   choreographs the text variants. */
.hero-scrub {
  min-height: 100dvh;
  height: 320vh; /* total scroll travel — lg+ (longer so forward+rewind both breathe) */
}
@media (max-width: 1023px) {
  .hero-scrub { height: auto; min-height: 0; }
}

.hero-scrub__sticky {
  position: sticky; top: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}
@media (max-width: 1023px) {
  .hero-scrub__sticky { position: static; height: auto; padding: 3.5rem 0 4rem; }
}

.hero-scrub__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
  z-index: 0;
  background: oklch(0.196 0.028 252);
}
@media (max-width: 1023px) {
  .hero-scrub__video {
    position: relative;
    /* Portrait-ish frame so the exploded-teardown end state actually fits.
       The source frames have a vertical stack of components; a slightly taller
       canvas with cover-fit keeps the stack centered without crushing it.
       Width is explicit (viewport minus 3rem of margins) because `width: auto`
       on a canvas + aspect-ratio resolves to the canvas intrinsic size (300×150). */
    width: calc(100% - 3rem);
    aspect-ratio: 5 / 6;
    height: auto;
    min-height: 0;
    max-height: none;
    object-position: center;
    border-radius: 1.5rem;
    margin: 1.25rem 1.5rem 0;
  }
}

/* Soft tinted scrims for legibility — radial, not flat grey.
   Stronger and wider than before so the headline + body never compete
   with whatever's on the video frame underneath. Two stacked layers:
   a near-solid paper wash on the left third, then a softer falloff that
   carries the tint past the headline column. */
.hero-scrub__scrim { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hero-scrub__scrim--left {
  background:
    linear-gradient(90deg, oklch(0.972 0.006 85 / 0.985) 0%, oklch(0.972 0.006 85 / 0.96) 26%, oklch(0.972 0.006 85 / 0.74) 44%, oklch(0.972 0.006 85 / 0.32) 58%, oklch(0.972 0.006 85 / 0.0) 72%),
    radial-gradient(78rem 64rem at -5% 55%, oklch(0.951 0.009 80 / 0.65) 0%, oklch(0.951 0.009 80 / 0.0) 60%);
}
/* Closing state — a defined centered "panel" of paper-warm wash that the
   centered headline + CTA sits cleanly on top of. Horizontal-axis gradient
   so the panel is a deliberate centered surface, not a soft radial bloom. */
.hero-scrub__scrim--center {
  background:
    linear-gradient(90deg,
      oklch(0.972 0.006 85 / 0.0) 0%,
      oklch(0.972 0.006 85 / 0.55) 16%,
      oklch(0.972 0.006 85 / 0.985) 32%,
      oklch(0.972 0.006 85 / 0.985) 68%,
      oklch(0.972 0.006 85 / 0.55) 84%,
      oklch(0.972 0.006 85 / 0.0) 100%);
  opacity: 0; /* anim.js fades this in for variant B */
}

@media (max-width: 1023px) {
  .hero-scrub__scrim { display: none; }
}

.hero-scrub__stage {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  z-index: 2;
  will-change: transform, opacity;
}
.hero-scrub__stage .shell { width: 100%; }

.hero-scrub__stage--center {
  display: flex; align-items: center; justify-content: center;
  opacity: 0; /* anim.js fades in at end of scrub */
  transform: translateX(60px);
}

@media (max-width: 1023px) {
  .hero-scrub__stage { position: static; padding: 2rem 0 0; }
  .hero-scrub__stage--center { display: none; } /* mobile shows only variant A */
}

/* Section progress rail */
.hero-scrub__rail {
  position: absolute;
  left: 2.5rem; right: 2.5rem; bottom: 1.75rem;
  z-index: 3;
  align-items: center; gap: 1rem;
}
.hero-scrub__rail-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
  font-feature-settings: "tnum" 1;
}
.hero-scrub__rail-track {
  flex: 1; height: 1.5px;
  background: oklch(0.255 0.022 250 / 0.12);
  position: relative;
  overflow: hidden;
}
.hero-scrub__rail-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--brand-deep), var(--accent));
  transform-origin: left center;
  transform: scaleX(0);
}

/* Reduced motion: snap the video to its final frame, hide variant B, no scrub */
@media (prefers-reduced-motion: reduce) {
  .hero-scrub { height: auto; }
  .hero-scrub__sticky { position: static; height: auto; padding: 3rem 0; }
  .hero-scrub__video { position: relative; height: auto; max-height: 28rem; border-radius: 1.5rem; margin: 1rem 1.5rem 0; }
  .hero-scrub__stage { position: static; padding: 2rem 0; }
  .hero-scrub__stage--center { display: none; }
  .hero-scrub__rail { display: none !important; }
}

/* ---------- Legal pages (Privacy / Terms) ---------- */
.prose-legal { color: var(--ink-2); font-size: 1.0125rem; line-height: 1.72; max-width: 64ch; }
.prose-legal p { margin-bottom: 1.05rem; }
.prose-legal h2 { letter-spacing: -0.01em; }
.prose-legal ul { margin-bottom: 1.25rem; color: var(--ink-2); }
.prose-legal a { color: var(--brand-deep); }
.prose-legal a:hover { color: var(--brand); }
.prose-legal strong { color: var(--ink); font-weight: 600; }

/* ---------- Focus visibility (a11y) ---------- */
a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
.section-dark a:focus-visible,
.section-dark button:focus-visible { outline-color: var(--accent); }

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: 92px; }

/* ---------- Primary CTA sheen (magic-ui shiny-button, in vanilla) ---------- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 55%;
  background: linear-gradient(100deg, transparent, oklch(1 0 0 / 0.22), transparent);
  transform: skewX(-18deg); pointer-events: none; opacity: 0;
}
.btn-primary:hover::after { animation: sheen 0.8s var(--ease) forwards; }
@keyframes sheen { 0% { left: -60%; opacity: 1; } 100% { left: 140%; opacity: 1; } }

/* Touch devices: do not keep hover transforms stuck after a tap */
@media (hover: none) {
  .card-hover:hover { transform: none; }
  .card-hover:hover::after { opacity: 0; }
  .btn:hover, .btn-primary:hover, .btn-ghost:hover, .btn-on-dark:hover, .btn-outline-dark:hover { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--ink-deep); color: oklch(0.97 0.01 85);
  padding: 0.6rem 1rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.9rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--accent); }
