/* ==========================================================================
   premium-landing kit — premium.css
   Brand-agnostic component layer for Stripe-grade marketing pages.
   Values calibrated against live captures of stripe.com, linear.app,
   vercel.com, attio.com and ramp.com (see references/signature-moves.md).

   HOW TO THEME: change only the "Brand inputs" block. Everything else
   derives from it. Dark sections: add data-theme="dark" to any element.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  /* === Brand inputs — the only block you normally edit ================== */
  --brand: #533afd;                 /* ONE saturated accent: CTAs, links, active states */
  --brand-ink: #ffffff;             /* text on --brand */
  --grad-1: #ffcf5e;                /* 3–5 gradient hues: used ONLY in gradient/visual layers */
  --grad-2: #ff8c6c;
  --grad-3: #da4bfe;
  --grad-4: #7f7dfc;
  --ink: #061b31;                   /* headings — tinted near-black, never #000 */
  --canvas: #ffffff;
  --canvas-alt: #f8fafd;            /* alternating section tint (barely there) */
  --night: #0d1738;                 /* dark-section canvas — tinted, never #000 */
  --font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --w-display: 300;                 /* Stripe sets headings LIGHT. Use 500–600 for a bolder brand. */
  --w-strong: 500;

  /* === Type scale (fluid; desktop values match Stripe's measured scale) == */
  --fs-hero: clamp(2.25rem, 1.4rem + 3.2vw, 3.5rem);     /* 36 → 56 */
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 3rem);            /* 28 → 48 */
  --fs-h3: clamp(1.25rem, 1.1rem + .6vw, 1.625rem);       /* 20 → 26 */
  --fs-lead: clamp(1.125rem, 1.05rem + .35vw, 1.375rem);  /* 18 → 22 */
  --fs-body: 1rem;
  --fs-sm: .875rem;
  --fs-xs: .75rem;
  --fs-stat: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);        /* 36 → 48 */
  --lh-tight: 1.05;
  --lh-snug: 1.15;
  --lh-body: 1.5;
  --track-hero: -0.025em;
  --track-h2: -0.02em;
  --track-h3: -0.01em;

  /* === Layout ============================================================ */
  --container: 1232px;              /* Stripe content width */
  --container-narrow: 768px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 9vw, 128px);
  --gap: 16px;                      /* card grid gap — tight gaps read "engineered" */

  /* === Shape ============================================================ */
  --r-xs: 4px;                      /* buttons, badges (Stripe: 4px) */
  --r-sm: 6px;                      /* cards (Stripe: 6px) */
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* === Motion (measured) ================================================ */
  --ease-out: cubic-bezier(.25, 1, .5, 1);       /* Stripe UI: color/bg/arrow, 300ms */
  --ease-reveal: cubic-bezier(.33, 1, .68, 1);   /* Stripe reveals + odometer */
  --ease-expo: cubic-bezier(.16, 1, .3, 1);      /* long, luxurious settles */
  --ease-card: cubic-bezier(.165, .84, .44, 1);  /* Stripe card hover-grow, 800ms */
  --ease-inout: cubic-bezier(.4, 0, .2, 1);      /* nav panel swaps */
  --dur-fast: 160ms;
  --dur: 300ms;
  --dur-slow: 500ms;
  --dur-xslow: 800ms;
}

/* Derived tokens are declared on every theme scope so they re-derive inside
   data-theme="dark" sections (custom properties resolve where declared). */
:root, [data-theme] {
  --ink-2: color-mix(in oklab, var(--ink) 74%, var(--canvas));   /* body copy */
  --ink-3: color-mix(in oklab, var(--ink) 56%, var(--canvas));   /* muted / two-tone tail */
  --ink-4: color-mix(in oklab, var(--ink) 34%, var(--canvas));   /* placeholder, disabled */
  --line: color-mix(in oklab, var(--ink) 10%, var(--canvas));    /* hairlines (Stripe #e5edf5) */
  --line-strong: color-mix(in oklab, var(--ink) 18%, var(--canvas));
  --surface: var(--canvas);
  --surface-2: color-mix(in oklab, var(--ink) 3%, var(--canvas));
  --brand-hover: color-mix(in oklab, var(--brand) 82%, #000);
  --brand-soft: color-mix(in oklab, var(--brand) 12%, var(--canvas));
  --brand-line: color-mix(in oklab, var(--brand) 38%, var(--canvas));
  --shadow-tint: color-mix(in oklab, var(--ink) 70%, #0037a0);
  /* Layered, tinted shadows — never one flat black blur */
  --shadow-sm: 0 1px 2px color-mix(in oklab, var(--shadow-tint) 8%, transparent),
               0 3px 6px color-mix(in oklab, var(--shadow-tint) 6%, transparent);
  --shadow-md: 0 6px 22px color-mix(in oklab, var(--shadow-tint) 10%, transparent),
               0 2px 6px color-mix(in oklab, var(--shadow-tint) 6%, transparent);
  --shadow-lg: 0 30px 45px -30px color-mix(in oklab, var(--shadow-tint) 30%, transparent),
               0 18px 36px -18px rgb(0 0 0 / .10);                 /* Stripe's float shadow */
  --shadow-xl: 0 50px 100px -20px color-mix(in oklab, var(--shadow-tint) 25%, transparent),
               0 30px 60px -30px rgb(0 0 0 / .30);
}

[data-theme="dark"] {
  --ink: #ffffff;
  --canvas: var(--night);
  --canvas-alt: color-mix(in oklab, var(--night) 88%, #fff);
  --ink-2: color-mix(in oklab, #fff 78%, var(--night));
  --ink-3: color-mix(in oklab, var(--brand) 25%, color-mix(in oklab, #fff 62%, var(--night))); /* Stripe tints muted text toward brand on dark */
  --line: color-mix(in oklab, #fff 10%, var(--night));
  --line-strong: color-mix(in oklab, #fff 18%, var(--night));
  --surface: color-mix(in oklab, #fff 5%, var(--night));
  --surface-2: color-mix(in oklab, #fff 8%, var(--night));
  --brand-soft: color-mix(in oklab, var(--brand) 22%, var(--night));
  --shadow-tint: #000;
  background: var(--canvas);
  color: var(--ink-2);
}

/* ----------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--canvas); color: var(--ink-2);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-display); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: color-mix(in oklab, var(--brand) 70%, transparent); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----------------------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------------------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--canvas-alt); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.stack > * + * { margin-top: var(--stack, 16px); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 939px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Blueprint rails: hairline verticals at the container edges running the full
   page height + full-bleed horizontal rules. Stripe's quiet "engineered" frame. */
.rails { position: relative; }
.rails::before, .rails::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); pointer-events: none; z-index: 1;
  left: max(var(--gutter), calc(50% - var(--container) / 2 - 16px));
}
.rails::after { left: auto; right: max(var(--gutter), calc(50% - var(--container) / 2 - 16px)); }
.rails > [data-theme="dark"] { z-index: 2; } /* full-bleed dark bands cover the light rails */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule--dashed { background: none; border-top: 1px dashed var(--line-strong); }
@media (max-width: 639px) { .rails::before, .rails::after { display: none; } }

/* ----------------------------------------------------------------------------
   4. Type
   ------------------------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); letter-spacing: 0; }
.eyebrow .muted { color: var(--ink-3); font-weight: 400; }
.hero-title { font-size: var(--fs-hero); font-weight: var(--w-display); line-height: var(--lh-tight); letter-spacing: var(--track-hero); }
.h2 { font-size: var(--fs-h2); font-weight: var(--w-display); line-height: var(--lh-tight); letter-spacing: var(--track-h2); }
.h3 { font-size: var(--fs-h3); font-weight: var(--w-display); line-height: var(--lh-snug); letter-spacing: var(--track-h3); }
.lead { font-size: var(--fs-lead); line-height: 1.4; color: var(--ink-3); font-weight: 300; letter-spacing: -0.01em; }
.body-sm { font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-3); }
/* THE Stripe copy device: one sentence in ink, the continuation muted, same size.
   <h2 class="h2 two-tone">Built for scale. <span>Every request, every region, every time.</span></h2> */
.two-tone { color: var(--ink); }
.two-tone > span:not(.line), .two-tone .tail { color: var(--ink-3); }
/* Small-copy version: bold lead-in + muted rest. <p class="lede-in"><b>Ship faster.</b> Prebuilt …</p> */
.lede-in { color: var(--ink-3); font-size: var(--fs-body); line-height: 1.45; }
.lede-in > b, .lede-in > strong { color: var(--ink); font-weight: var(--w-strong); }
.gradient-text {
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2) 30%, var(--grad-3) 65%, var(--grad-4));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: .8125rem; }

/* ----------------------------------------------------------------------------
   5. Buttons & links (Stripe: 4px radius, 300ms ease-out, hover arrow)
   ------------------------------------------------------------------------- */
.btn {
  --_bg: transparent; --_fg: var(--brand); --_bd: var(--brand-line);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 22px; border-radius: var(--r-xs);
  background: var(--_bg); color: var(--_fg); box-shadow: inset 0 0 0 1px var(--_bd);
  font-size: 1rem; font-weight: 450; line-height: 1; white-space: nowrap;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.btn:hover { --_fg: var(--brand-hover); --_bd: var(--brand-hover); }
.btn:active { transform: translateY(1px); }
.btn--primary { --_bg: var(--brand); --_fg: var(--brand-ink); --_bd: transparent; }
.btn--primary:hover { --_bg: var(--brand-hover); --_fg: var(--brand-ink); --_bd: transparent; }
.btn--ghost { --_bd: transparent; padding-inline: 12px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
[data-theme="dark"] .btn:not(.btn--primary) { --_fg: #fff; --_bd: var(--line-strong); }
[data-theme="dark"] .btn:not(.btn--primary):hover { --_bd: #fff; }
.link { color: var(--brand); font-weight: 450; display: inline-flex; align-items: center; gap: 6px; transition: color var(--dur) var(--ease-out); }
.link:hover { color: var(--brand-hover); }
[data-theme="dark"] .link { color: color-mix(in oklab, var(--brand) 55%, #fff); }

/* Hover arrow: chevron slides right as the shaft fades in (Stripe exact).
   <svg class="arrow" viewBox="0 0 10 10" aria-hidden="true"><path class="arrow-shaft" d="M0 5h7"/><path class="arrow-head" d="M1 1l4 4-4 4"/></svg> */
.arrow { width: 10px; height: 10px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.arrow-shaft { opacity: 0; transition: opacity var(--dur) var(--ease-out); }
.arrow-head { transition: transform var(--dur) var(--ease-out); }
:is(a, button):hover > .arrow .arrow-shaft, :is(a, button):focus-visible > .arrow .arrow-shaft { opacity: 1; }
:is(a, button):hover > .arrow .arrow-head, :is(a, button):focus-visible > .arrow .arrow-head { transform: translateX(3px); }

/* ----------------------------------------------------------------------------
   6. Navigation (+ morphing dropdown driven by premium.js → initMorphNav)
   ------------------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), backdrop-filter var(--dur), transform 400ms var(--ease-expo); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-scrolled { background: color-mix(in oklab, var(--canvas) 90%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav__logo { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 1.125rem; letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: 2px; margin-right: auto; }
.nav__link { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: var(--r-xs); font-size: var(--fs-sm); font-weight: 450; color: var(--ink); transition: color 240ms cubic-bezier(.45,.05,.55,.95), background-color 240ms cubic-bezier(.45,.05,.55,.95); }
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--surface-2); }
.nav__link .chev { width: 10px; height: 10px; transition: transform 240ms var(--ease-out); }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__burger { display: none; width: 40px; height: 40px; border-radius: var(--r-xs); align-items: center; justify-content: center; }
@media (max-width: 939px) {
  .nav__links, .nav__actions .btn:not(.btn--primary) { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__inner { justify-content: space-between; }
}
/* The single popover that morphs between menus */
.nav-pop {
  position: absolute; top: calc(100% - 6px); left: 0; z-index: 60;
  width: var(--pop-w, 400px); height: var(--pop-h, 200px);
  transform: translateX(var(--pop-x, 0px)) translateY(6px) rotateX(-12deg); transform-origin: 50% -40px;
  opacity: 0; pointer-events: none; perspective: 1200px;
  background: var(--canvas); border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line), var(--shadow-xl);
  transition: opacity 240ms var(--ease-inout), transform 300ms var(--ease-inout), width 300ms var(--ease-inout), height 300ms var(--ease-inout);
  overflow: hidden;
}
.nav-pop.is-open { opacity: 1; pointer-events: auto; transform: translateX(var(--pop-x, 0px)) translateY(0) rotateX(0); }
.nav-pop.no-anim { transition: opacity 240ms var(--ease-inout), transform 300ms var(--ease-inout); }
.nav-pop__panel { position: absolute; top: 0; left: 0; width: max-content; padding: 20px; opacity: 0; pointer-events: none; transform: translateX(var(--from, 20%)); transition: opacity 250ms var(--ease-inout), transform 500ms var(--ease-inout); }
.nav-pop__panel.is-active { opacity: 1; pointer-events: auto; transform: none; }
.nav-pop__caret { position: absolute; top: -6px; left: var(--caret-x, 50%); width: 12px; height: 12px; background: var(--canvas); transform: translateX(-50%) rotate(45deg); border-radius: 2px 0 0 0; box-shadow: -1px -1px 0 var(--line); transition: left 300ms var(--ease-inout); }
.menu-grid { display: grid; grid-template-columns: repeat(2, 240px); gap: 4px 12px; }
.menu-item { display: flex; gap: 12px; padding: 10px; border-radius: var(--r-sm); transition: background-color 200ms var(--ease-out); }
.menu-item:hover { background: var(--surface-2); }
.menu-item__icon { flex: none; width: 32px; height: 32px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.menu-item__title { font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.menu-item__desc { font-size: .8125rem; color: var(--ink-3); line-height: 1.35; }
/* Mobile sheet */
.mobile-sheet { position: fixed; inset: 0; z-index: 70; background: var(--canvas); padding: 20px var(--gutter); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); overflow-y: auto; }
.mobile-sheet.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-sheet a { display: block; padding: 14px 0; font-size: 1.125rem; color: var(--ink); border-bottom: 1px solid var(--line); }

/* ----------------------------------------------------------------------------
   7. Cards & bento
   ------------------------------------------------------------------------- */
.card {
  position: relative; background: var(--surface); border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px var(--line); overflow: hidden; isolation: isolate;
}
.card--raised { box-shadow: 0 0 0 1px var(--line), var(--shadow-md); }
.card--float { box-shadow: var(--shadow-lg); }
.card--glass { background: color-mix(in oklab, var(--canvas) 45%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 15px 35px rgb(23 23 23 / .08), inset 0 0 0 1px color-mix(in oklab, #fff 50%, transparent); }
.card__body { padding: 24px; position: relative; z-index: 1; }
.card__title { font-size: var(--fs-h3); font-weight: var(--w-display); line-height: var(--lh-snug); letter-spacing: var(--track-h3); color: var(--ink); max-width: 20ch; }
/* The visual area bleeds to the card edges; copy sits top-left. */
.card__visual { position: relative; min-height: 260px; overflow: hidden; }
/* Corner affordance (Stripe's expand square) */
.card__corner { position: absolute; top: 16px; right: 16px; z-index: 2; width: 36px; height: 36px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.card:hover .card__corner { background: var(--brand); color: var(--brand-ink); }
/* Interactive card: soft lift on hover */
.card--interactive { transition: transform var(--dur-slow) var(--ease-card), box-shadow var(--dur-slow) var(--ease-card); }
.card--interactive:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-lg); }
/* Gradient wash behind a card's visual (blurred hue blobs, not a flat gradient) */
.wash { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 85% 100%, color-mix(in oklab, var(--grad-3) 55%, transparent), transparent 70%),
    radial-gradient(50% 50% at 15% 95%, color-mix(in oklab, var(--grad-2) 50%, transparent), transparent 70%),
    radial-gradient(45% 40% at 60% 70%, color-mix(in oklab, var(--grad-4) 40%, transparent), transparent 70%);
  filter: saturate(1.1);
}
.bento { display: grid; gap: var(--gap); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bento > .card { display: flex; flex-direction: column; }
.bento > .card > .card__visual, .bento > .card > :last-child:not(.card__body):not(.card__corner) { margin-top: auto; } /* visuals sit on the card floor, never float mid-card */
.bento > .span-2 { grid-column: span 2; } .bento > .span-3 { grid-column: span 3; }
.bento > .span-4 { grid-column: span 4; } .bento > .span-6 { grid-column: span 6; }
.bento > .row-2 { grid-row: span 2; }
@media (max-width: 939px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento > [class*="span-"] { grid-column: span 2; } .bento > .row-2 { grid-row: auto; } }

/* Spotlight: pointer-following glow + glowing border (premium.js sets --mx/--my) */
.spotlight { --mx: 50%; --my: 50%; }
.spotlight::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity var(--dur) var(--ease-out);
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in oklab, var(--brand) 9%, transparent), transparent 45%);
}
.spotlight::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; border-radius: inherit; padding: 1px;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in oklab, var(--brand) 70%, transparent), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity var(--dur) var(--ease-out);
}
.spotlight:hover::before, .spotlight:hover::after { opacity: 1; }

/* Gradient-border field (Stripe's AI input): 1px border that glows toward the pointer + one shimmer sweep */
.glow-field { position: relative; border-radius: var(--r-sm); padding: 1px; background: var(--line-strong); overflow: hidden; isolation: isolate; transition: background-color 200ms var(--ease-out); }
.glow-field::before { content: ""; position: absolute; width: 260%; aspect-ratio: 1; left: var(--mx, 50%); top: var(--my, 50%); transform: translate(-50%, -50%); z-index: -1; opacity: 0; transition: opacity var(--dur) ease-out;
  background: radial-gradient(closest-side, var(--brand) 20%, color-mix(in oklab, var(--grad-3) 75%, transparent) 50%, transparent 100%); }
.glow-field:hover::before, .glow-field.is-shimmering::before { opacity: 1; }
.glow-field.is-shimmering::before { animation: glow-sweep 1s cubic-bezier(.39,.58,.57,1) both; }
@keyframes glow-sweep { from { left: -60%; top: 50%; } to { left: 160%; top: 50%; } }
.glow-field > :first-child { position: relative; border-radius: calc(var(--r-sm) - 1px); background: var(--canvas); }
.glow-field:focus-within { background: var(--brand); outline: 3px solid color-mix(in oklab, var(--brand) 25%, transparent); }
.glow-field:focus-within::before { opacity: 0; }

/* ----------------------------------------------------------------------------
   8. Badges, pills, avatars
   ------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: var(--r-xs); font-size: .6875rem; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge--success { background: rgb(21 190 83 / .14); color: #108c3d; box-shadow: inset 0 0 0 1px rgb(21 190 83 / .4); }
.badge--warn { background: rgb(255 160 0 / .14); color: #a35f00; box-shadow: inset 0 0 0 1px rgb(255 160 0 / .4); }
.badge--brand { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-line); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border-radius: var(--r-pill); font-size: .8125rem; color: var(--ink-2); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.pill__tag { height: 22px; padding: 0 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; background: var(--brand); color: var(--brand-ink); font-size: .6875rem; font-weight: 600; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: #15be53; box-shadow: 0 0 0 0 rgb(21 190 83 / .5); animation: live-pulse 2s var(--ease-out) infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgb(21 190 83 / .45); } 70%, 100% { box-shadow: 0 0 0 7px rgb(21 190 83 / 0); } }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .625rem; font-weight: 600; color: #fff; flex: none; }

/* ----------------------------------------------------------------------------
   9. Product-UI mock primitives — compose believable fake product screens.
      Real-looking data (names, amounts, dates) is what sells "data-rich".
   ------------------------------------------------------------------------- */
.ui { font-size: 12px; line-height: 1.4; color: var(--ink-2); font-family: var(--font-sans); }
.ui-window { background: var(--canvas); border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); overflow: hidden; }
.ui-window--glass { background: color-mix(in oklab, var(--canvas-alt) 45%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 0 6px 6px; box-shadow: 0 15px 35px rgb(23 23 23 / .08); }
.ui-window--glass > .ui-page { background: var(--canvas); border-radius: 4px; box-shadow: 0 3px 6px rgb(23 23 23 / .06); }
.ui-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; }
.ui-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ui-url { margin: 0 auto; height: 20px; min-width: 40%; padding: 0 10px; border-radius: var(--r-pill); background: color-mix(in oklab, var(--canvas) 50%, transparent); display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 10px; color: var(--ink-3); }
.ui-side { width: 160px; padding: 14px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.ui-side a { padding: 5px 8px; border-radius: 4px; color: var(--ink-3); font-size: 11.5px; }
.ui-side a.is-active { background: var(--surface-2); color: var(--ink); font-weight: 500; }
.ui-h { font-size: 13px; font-weight: 500; color: var(--ink); }
.ui-kpi { font-size: 22px; font-weight: 400; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ui-label { font-size: 10.5px; color: var(--ink-3); }
.ui-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ui-table th { text-align: left; font-weight: 500; font-size: 10px; color: var(--ink); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ui-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ui-skel { height: 8px; border-radius: 4px; background: var(--surface-2); }
.ui-toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--canvas); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); font-size: 12px; }
.ui-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.ui-bars > i { flex: 1; border-radius: 1px; background: var(--brand); opacity: .85; height: var(--h, 40%); transform-origin: bottom; }
.is-in .ui-bars > i, .ui-bars.is-in > i { animation: bar-grow 900ms var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 18ms); }
@keyframes bar-grow { from { transform: scaleY(0); } }
.ui-progress { height: 8px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.ui-progress > i { display: block; height: 100%; width: var(--v, 60%); border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--grad-3)); }
/* Stacked floating panes: the hero "product collage" */
.collage { position: relative; }
.collage > * { position: absolute; }
.float { animation: float 7s ease-in-out infinite; animation-delay: var(--float-delay, 0s); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ----------------------------------------------------------------------------
   10. Logo marquee (premium.js clones items so the loop is seamless)
   ------------------------------------------------------------------------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; align-items: center; gap: var(--marquee-gap, 64px); width: max-content; animation: marquee var(--marquee-dur, 40s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track > * { flex: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--marquee-gap, 64px) / 2)); } }
.logo { height: 28px; width: auto; color: var(--ink-3); opacity: .9; transition: color var(--dur) var(--ease-out), opacity var(--dur); }
.logo:hover { color: var(--ink); opacity: 1; }
.logo-strip { display: grid; grid-template-columns: repeat(var(--cols, 6), 1fr); align-items: center; justify-items: center; border-block: 1px solid var(--line); padding-block: 22px; }

/* ----------------------------------------------------------------------------
   11. Rotator — auto-advancing tabs with progress (features, stats, stories)
   ------------------------------------------------------------------------- */
.rotator__tabs { display: flex; gap: 0; border-top: 1px solid var(--line); }
.rotator__tab { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; text-align: left; padding: 18px 20px 0 0; position: relative; color: var(--ink-3); transition: color var(--dur) var(--ease-out); }
.rotator__tab[aria-selected="true"] { color: var(--ink); }
.rotator__tab .tab-title { display: block; font-weight: var(--w-strong); color: inherit; }
.rotator__tab .tab-desc { display: block; font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; }
/* progress hairline sits on the top border */
.rotator__tab::before { content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.rotator__tab[aria-selected="true"]::before { animation: tab-progress var(--rotator-dur, 6s) linear forwards; }
.rotator.is-paused .rotator__tab[aria-selected="true"]::before { animation-play-state: paused; }
.rotator.is-static .rotator__tab[aria-selected="true"]::before { animation: none; transform: none; }
@keyframes tab-progress { to { transform: scaleX(1); } }
.rotator__panels { position: relative; display: grid; }
.rotator__panel { grid-area: 1 / 1; opacity: 0; transform: translateY(12px) scale(.985); filter: blur(4px); pointer-events: none; transition: opacity 500ms var(--ease-reveal), transform 700ms var(--ease-expo), filter 500ms var(--ease-reveal); }
.rotator__panel.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }

/* Stats row (Stripe): big light numbers, active item dark, others muted, gradient tick on the rule */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); border-block: 1px solid var(--line); }
.stat { position: relative; padding: 36px 16px; text-align: center; color: var(--ink-3); transition: color var(--dur) var(--ease-out); }
.stat__num { display: block; font-size: var(--fs-stat); font-weight: var(--w-display); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; color: inherit; }
.stat__label { display: block; margin-top: 10px; font-size: var(--fs-sm); line-height: 1.4; color: inherit; }
.stat[aria-selected="true"], .stat.is-active { color: var(--ink); }
.stat::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--ink), transparent); opacity: 0; transition: opacity var(--dur) var(--ease-out); }
.stat[aria-selected="true"]::before, .stat.is-active::before { opacity: 1; }
@media (max-width: 639px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ----------------------------------------------------------------------------
   12. Carousel — scroll-snap track whose last card peeks past the edge
   ------------------------------------------------------------------------- */
.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: var(--slide-w, calc((100% - 3 * var(--gap)) / 3.6)); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 4px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__nav { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 20px; }
.carousel__btn { width: 40px; height: 40px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), opacity var(--dur); }
.carousel__btn:hover { background: var(--brand); color: var(--brand-ink); }
.carousel__btn:disabled { opacity: .4; pointer-events: none; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 939px) { .carousel__track { --slide-w: 72%; } }
/* Story card: image grows wider while its image counter-scales (Stripe 800ms) */
.story { display: flex; flex-direction: column; gap: 14px; }
.story__media { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.story__media > img, .story__media > .story__art { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-xslow) var(--ease-card); }
.story:hover .story__media > img, .story:hover .story__media > .story__art { transform: scale(1.04); }

/* ----------------------------------------------------------------------------
   13. Odometer & cycling text (premium.js → initOdometers / initCyclers)
   ------------------------------------------------------------------------- */
.odo { display: inline-flex; font-variant-numeric: tabular-nums; line-height: 1; }
.odo__d { display: inline-block; height: 1em; overflow: hidden; }
.odo__strip { display: flex; flex-direction: column; transition: transform 900ms var(--ease-reveal); transition-delay: calc(var(--i, 0) * 50ms); }
.odo__strip > span { height: 1em; }
/* States share one grid cell, so the cell keeps the widest state's width (no layout shift).
   Items are pinned to the start so a short badge isn't stretched to the longest; add
   .cycle--end in right-aligned cells (table status columns). */
.cycle { display: inline-grid; vertical-align: bottom; overflow: hidden; justify-items: start; }
.cycle--end { justify-items: end; }
.cycle > * { grid-area: 1 / 1; transition: transform 700ms var(--ease-expo), opacity 500ms var(--ease-reveal); }
.cycle > :not(.is-active) { transform: translateY(100%); opacity: 0; }
.cycle > .is-leaving { transform: translateY(-100%); opacity: 0; }

/* ----------------------------------------------------------------------------
   14. Backgrounds & atmosphere
   ------------------------------------------------------------------------- */
.gradient-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* Stripe's classic skewed band: wrap the canvas, skew the wrapper, keep content upright */
.skew-band { position: absolute; inset: 0 0 auto 0; height: 100%; transform: skewY(-12deg); transform-origin: 0 0; overflow: hidden; z-index: 0; }
.bg-dots { background-image: radial-gradient(color-mix(in oklab, var(--ink) 16%, transparent) 1px, transparent 1px); background-size: 12px 12px; }
.bg-grid { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; }
.bg-fade { -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; z-index: 0; }
.noise::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Pinstripe texture (Attio) — pair with a gradient and an edge mask */
.bg-pinstripe { background-image: repeating-linear-gradient(to right, color-mix(in oklab, var(--ink) 5%, transparent) 0 1px, transparent 1px 8px); }
/* Ruled grid (Attio): 1px gap over the line colour so cells read as a hairline table.
   Fill every row: an empty slot shows as a solid line-coloured block. With an odd count,
   let the last cell span the remainder (e.g. .ruled > :last-child { grid-column: span 2 }). */
.ruled { display: grid; gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.ruled > * { background: var(--canvas); }
/* Edge light (Linear): a 1px border lit only near one corner, as if from a light above */
.edge-light { position: relative; }
.edge-light::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(ellipse 40% 55% at var(--light-x, 0%) 0%, color-mix(in oklab, var(--ink) 35%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.edge-light--right { --light-x: 100%; }
/* Spinning conic border (Attio hero input): one slow lap every 30s */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.border-spin { border: 1px solid transparent; border-radius: var(--r-md);
  background: linear-gradient(var(--canvas), var(--canvas)) padding-box,
              conic-gradient(from var(--spin), var(--line-strong), var(--brand), var(--grad-3), var(--line-strong) 40%, var(--line-strong)) border-box;
  animation: spin-border 30s linear infinite; }
@keyframes spin-border { to { --spin: 360deg; } }
/* Comet tracer (Ramp AI input): a short bright arc laps the border every 3.4s — "working…" without a spinner */
.border-trace { position: relative; }
.border-trace::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin), transparent 0 12deg, color-mix(in oklab, var(--ink) 14%, transparent) 28deg, color-mix(in oklab, var(--brand) 70%, transparent) 60deg, var(--brand) 86deg 92deg, transparent 94deg 1turn);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-border 3.4s linear infinite; }
/* Text shimmer for AI/processing states (Linear "Thinking…", Ramp "personalizing…") */
.shimmer-text { background: linear-gradient(90deg, var(--ink-3) 0 38%, var(--ink) 50%, var(--ink-3) 62% 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shimmer-text 1.8s linear infinite; }
@keyframes shimmer-text { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* Skeleton → value loading (Ramp counters) */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-xs); color: transparent; }
.skeleton::after { content: ""; position: absolute; inset: 0 -200% 0 0; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--canvas) 70%, transparent), transparent) 0 0 / 50% 100%; animation: skeleton 1.5s ease-in-out infinite; }
@keyframes skeleton { to { transform: translateX(-50%); } }

/* Sticky chapter nav with scroll-spy + progress hairline (Stripe product pages, Attio)
   <nav class="chapter-nav" data-spy><div class="container chapter-nav__inner"><a href="#a">A</a>…</div><i class="chapter-nav__progress"></i></nav> */
.chapter-nav { position: sticky; top: 0; z-index: 40; background: color-mix(in oklab, var(--canvas) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.chapter-nav__inner { display: flex; gap: 32px; height: 56px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.chapter-nav a { font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; transition: color var(--dur) var(--ease-out); }
.chapter-nav a[aria-current="true"] { color: var(--brand); }
.chapter-nav__progress { position: absolute; left: 0; top: 0; height: 2px; width: 100%; transform-origin: left; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--grad-3), var(--brand), var(--grad-4), var(--grad-2)); }

/* Brightness hover (Linear): one rule for every clickable surface on dark UIs */
.hover-bright { transition: filter 160ms cubic-bezier(.25,.46,.45,.94), transform 160ms cubic-bezier(.25,.46,.45,.94); }
.hover-bright:hover { filter: brightness(1.3); }
.hover-bright:active { transform: scale(.97); }

/* Diagram connectors (Stripe dark-section architecture maps) */
.wire { stroke: color-mix(in oklab, var(--brand) 55%, transparent); stroke-width: 1; stroke-dasharray: 2 3; fill: none; }
.wire--flow { stroke-dasharray: 2 6; animation: wire-flow 1.2s linear infinite; }
@keyframes wire-flow { to { stroke-dashoffset: -16; } }
.node { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-xs); background: var(--brand); color: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px -8px color-mix(in oklab, var(--brand) 70%, transparent); }
.node--ghost { background: transparent; color: var(--ink-3); box-shadow: none; border: 1px dashed var(--line-strong); }

/* ----------------------------------------------------------------------------
   15. Accordion list (customer stories / FAQ)
   ------------------------------------------------------------------------- */
.acc { border-top: 1px dashed var(--line-strong); }
.acc__item { border-bottom: 1px dashed var(--line-strong); }
.acc__head { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 0; text-align: left; font-size: var(--fs-h3); font-weight: var(--w-display); color: var(--ink); letter-spacing: var(--track-h3); }
.acc__icon { margin-left: auto; flex: none; width: 40px; height: 40px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); transition: transform var(--dur) var(--ease-out), background-color var(--dur), color var(--dur); }
.acc__head:hover .acc__icon { background: var(--brand); color: var(--brand-ink); }
.acc__icon { transition: background-color var(--dur), color var(--dur); }
.acc__icon > * { transition: transform var(--dur) var(--ease-out); }
.acc__head[aria-expanded="true"] .acc__icon > * { transform: rotate(45deg); } /* rotate the "+", not the square */
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 500ms var(--ease-expo); }
.acc__head[aria-expanded="true"] + .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel > div > * { padding-bottom: 24px; }

/* ----------------------------------------------------------------------------
   16. Code window
   ------------------------------------------------------------------------- */
.code { background: #0b1220; color: #e6edf3; border-radius: var(--r-sm); font: 500 12.5px/1.9 var(--font-mono); padding: 16px 0; overflow: hidden; box-shadow: var(--shadow-lg); }
[data-theme="dark"] .code { background: color-mix(in oklab, #000 35%, var(--night)); box-shadow: inset 0 0 0 1px var(--line); }
.code__line { display: block; padding: 0 18px; white-space: pre; }
.code__line::before { content: attr(data-n); display: inline-block; width: 2ch; margin-right: 16px; color: #5b6b85; text-align: right; }
.code .k { color: #c792ea; } .code .s { color: #ffcb6b; } .code .f { color: #82aaff; } .code .c { color: #637777; } .code .n { color: #f78c6c; }
.caret { display: inline-block; width: 7px; height: 1.1em; vertical-align: -2px; background: currentColor; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.code__text { display: inline-block; vertical-align: top; }
.js [data-type]:not(.is-typed-all) .code__text { clip-path: inset(0 100% 0 0); }
.js [data-type] .code__line.is-typed .code__text { clip-path: inset(0 -2px 0 0); transition: clip-path var(--type-dur, 600ms) steps(var(--chars, 30)); }

/* ----------------------------------------------------------------------------
   17. Live feed (premium.js → initFeeds): new rows slide in at the top
   ------------------------------------------------------------------------- */
.feed { display: flex; flex-direction: column; gap: 8px; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.feed > * { flex: none; }

/* ----------------------------------------------------------------------------
   18. Reveal on scroll (premium.js → initReveal adds .is-in)
   ------------------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transition: opacity 600ms var(--ease-reveal), transform 800ms var(--ease-expo), filter 600ms var(--ease-reveal); transition-delay: calc(var(--i, 0) * 80ms + var(--delay, 0ms)); }
.js [data-reveal="up"], .js [data-reveal=""] { transform: translateY(16px); }
.js [data-reveal="blur"] { transform: translateY(10px); filter: blur(8px); }
.js [data-reveal="scale"] { transform: scale(.96); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
/* Hero entrance (runs on load, no observer) */
.js .enter { opacity: 0; transform: translateY(14px); filter: blur(6px); animation: enter 900ms var(--ease-expo) forwards; animation-delay: calc(120ms + var(--i, 0) * 90ms); }
@keyframes enter { to { opacity: 1; transform: none; filter: none; } }
/* Headline lines sharpen in from blur (Linear: blur 10px, rise 20%, 1000ms, ~100ms apart).
   <h1 class="hero-title"><span class="line enter" style="--i:0">Line one</span> <span class="line enter" style="--i:1">line two</span></h1>
   The padding/negative-margin pair stops the blur being clipped. */
.line { display: inline-block; padding: 30px; margin: -30px; }
.js .line.enter { transform: translateY(20%); filter: blur(10px); animation-duration: 1000ms; animation-timing-function: cubic-bezier(.25,.1,.25,1); }

/* Scroll-scrubbed words (premium.js → data-scrub): words go from faint to ink as you scroll */
[data-scrub] .w { color: var(--ink-4); transition: color 500ms cubic-bezier(0,0,0,1); }
[data-scrub] .w.is-on { color: var(--ink); }

/* ----------------------------------------------------------------------------
   19. Footer
   ------------------------------------------------------------------------- */
.footer { padding-block: 64px 40px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer h4 { font-size: var(--fs-sm); font-weight: 500; margin-bottom: 14px; }
.footer a { display: block; color: var(--ink-3); padding: 5px 0; transition: color var(--dur) var(--ease-out); }
.footer a.nav__logo { display: inline-flex; color: var(--ink); }
.footer a:hover { color: var(--ink); }
@media (max-width: 939px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }

/* ----------------------------------------------------------------------------
   20. Reduced motion — everything still renders in its final state
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .enter { opacity: 1; transform: none; filter: none; }
  .marquee__track { animation: none; }
  .float, .border-trace::before, .border-spin, .shimmer-text, .skeleton::after { animation: none; }
}
