/* Kinetic marketing surface (docs/design/FlexYield_DesignSystem_final).
   INVARIANT: nothing here targets :root or bare elements — everything nests
   under .landing so it cannot leak into the app. Keyframes are global but
   fy- prefixed. The leak-guard test enforces this.
   Colors: seam tokens from tokens.css ONLY (--bg --surface --ink --accent …
   plus the derived tints) — the six chain brand colors on marquee hover are
   the single sanctioned exception. */

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("/assets/cabinet-grotesk-variable-a861e104.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/satoshi-variable-0513381f.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

html:has(body.landing) {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

/* ---- Keyframes (global, fy- prefixed) ---- */
@keyframes fy-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fy-spin-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes fy-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fy-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-18px) rotate(var(--rot, 0deg)); }
}
@keyframes fy-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.7; } }

.landing {
  /* Local non-color helpers (colors live in tokens.css on body). */
  --surface-glass: color-mix(in srgb, var(--surface) 90%, transparent);
  --radius-card: 24px;
  --radius-input: 12px;
  --radius-pill: 999px;

  /* ---- Base ---- */
  min-height: 100dvh;
  line-height: 1.55;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  & *, & *::before, & *::after { box-sizing: border-box; margin: 0; padding: 0; }
  & :is(h1, h2, h3, h4, h5, h6) { color: var(--ink); text-wrap: balance; font-family: var(--font-display); }
  & :is(p, li) { text-wrap: pretty; }
  & :is(img, picture, canvas, svg) { display: block; max-width: 100%; }
  & :is(input, button, select) { font: inherit; color: inherit; }
  & button { cursor: pointer; background: none; border: none; }
  & a { color: var(--accent); text-decoration: none; }
  & a:hover { color: var(--accent-hov); }
  & ::selection { background: var(--accent-35); color: var(--ink); }
  & :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
  & code, & pre { font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
  & .visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }

  /* ---- Layout ---- */
  .container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 40px; }
  .section { padding-block: 100px; position: relative; }

  /* ---- Type ramp ---- */
  .section__eyebrow {
    color: var(--accent); text-transform: uppercase; letter-spacing: 0.16em;
    font-family: var(--font-body); font-size: 13px; font-weight: 700; margin-bottom: 14px;
  }
  .section__title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(36px, 4.5vw, 56px); letter-spacing: -0.02em; line-height: 1.06;
    margin-bottom: 16px; max-width: 800px;
  }
  .section__subtitle { color: var(--ink2); font-size: 17px; max-width: 620px; margin-bottom: 40px; }
  .section__footer-link { margin-top: 28px; font-size: 15px; font-weight: 600; }
  .meta-label {
    color: var(--ink3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  }

  /* ---- Buttons (pills) ---- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 24px; font-family: var(--font-body); font-size: 15px; font-weight: 700;
    text-decoration: none; border-radius: var(--radius-pill); line-height: 1.4; white-space: nowrap;
    transition: transform 0.25s var(--ease), background 0.25s var(--ease),
                color 0.25s var(--ease), border-color 0.25s var(--ease),
                box-shadow 0.25s var(--ease);
  }
  .btn--primary { background: var(--accent); color: var(--on-accent); }
  .btn--primary:hover {
    background: var(--accent-hov); color: var(--on-accent);
    transform: scale(1.05); box-shadow: 0 0 40px var(--accent-35);
  }
  .btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--line-18); }
  .btn--outline:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.05); }
  .btn--lg { padding: 16px 34px; font-size: 17px; }
  .btn--full { width: 100%; }

  /* ---- Scroll reveal (armed by reveal_controller; no-JS sees everything) ---- */
  .reveal-ready .fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .reveal-ready .fade-in.is-visible { opacity: 1; transform: translateY(0); }

  /* ---- Floating pill nav ---- */
  .nav {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
    display: flex; align-items: center; gap: 22px;
    max-width: calc(100vw - 32px); white-space: nowrap;
    background: var(--nav-bg);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--line-10); border-radius: var(--radius-pill);
    padding: 10px 12px 10px 22px;
    box-shadow: 0 12px 40px var(--shadow-c);
  }
  .nav__logo { display: flex; align-items: center; gap: 9px; color: var(--ink); }
  .nav__logo:hover { color: var(--ink); }
  .nav__logo-text {
    font-family: var(--font-display); font-weight: 800;
    letter-spacing: 0.14em; font-size: 14px;
  }
  .nav__links { display: flex; align-items: center; gap: 22px; }
  .nav__link { color: var(--ink2); font-size: 14px; transition: color 0.2s var(--ease); }
  .nav__link:hover { color: var(--accent); }
  .nav__cta-link {
    background: var(--accent); color: var(--on-accent); border-radius: var(--radius-pill);
    padding: 8px 18px; font-weight: 700; font-size: 14px;
    transition: transform 0.25s var(--ease), background 0.25s var(--ease);
  }
  .nav__cta-link:hover { background: var(--accent-hov); color: var(--on-accent); transform: scale(1.04); }

  /* Mobile-only nav elements — invisible on desktop by design. */
  .nav__menu-btn { display: none; }
  .nav__panel { display: none; }

  /* ---- Animated orbit logo ---- */
  .fy-logo { color: var(--accent); }
  .fy-logo__outer { animation: fy-spin 14s linear infinite; transform-origin: 22px 22px; }
  .fy-logo__inner { animation: fy-spin-rev 9s linear infinite; transform-origin: 22px 22px; }

  /* ---- Hero ---- */
  .hero {
    position: relative; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    /* Bottom padding reserves the scroll-cue zone (28px offset + 44px line
       + label) so centered content can never overlap it. */
    text-align: center; padding: 130px 24px 130px; overflow: hidden;
  }
  .hero__ornament { position: absolute; inset: 0; pointer-events: none; }
  .hero__glow {
    position: absolute; top: -25%; left: 50%; transform: translateX(-50%);
    width: 1100px; height: 1100px; border-radius: var(--radius-pill);
    background: radial-gradient(circle,
      color-mix(in srgb, var(--accent) 16%, transparent) 0%,
      color-mix(in srgb, var(--accent) 5%, transparent) 42%, transparent 68%);
    animation: fy-pulse 7s ease-in-out infinite;
  }
  .hero__orn { position: absolute; }
  .hero__orn--stat1 { top: 17%; left: 3%; }
  .hero__orn--stat2 { top: 32%; right: 3%; }
  .hero__orn--ring { bottom: 22%; left: 12%; }
  .hero__orn--cube { bottom: 30%; right: 13%; }
  .hero__float { animation: fy-float 9s ease-in-out infinite; }
  .hero__float--slow { animation-duration: 11s; }
  .hero__orn--stat1 .hero__float { --rot: -8deg; }
  .hero__orn--stat2 .hero__float { --rot: 7deg; }
  /* The two measured stat cards stay STATIC (Johannes 2026-07-28): keep
     their resting tilt, no hover/float motion — both seams. */
  .hero__orn--stat1 .hero__float,
  .hero__orn--stat2 .hero__float {
    animation: none;
    transform: rotate(var(--rot));
  }
  .hero__stat-card {
    width: 200px; padding: 16px 18px; text-align: center;
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, transparent), var(--surface-glass));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 22px; backdrop-filter: blur(8px);
    box-shadow: 0 24px 60px var(--shadow-c);
  }
  .hero__stat-card--plain {
    width: 180px;
    background: var(--surface-glass);
    border-color: color-mix(in srgb, var(--line) 12%, transparent);
  }
  .hero__stat-card-value {
    font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--accent);
    font-variant-numeric: tabular-nums;
  }
  .hero__stat-card--plain .hero__stat-card-value { color: var(--ok); }
  .hero__ring {
    position: relative; width: 120px; height: 120px; border-radius: var(--radius-pill);
    border: 1.5px solid color-mix(in srgb, var(--accent) 25%, transparent);
    animation: fy-spin 40s linear infinite;
  }
  .hero__ring-dot {
    position: absolute; top: -5px; left: 50%; width: 9px; height: 9px;
    background: var(--accent); border-radius: var(--radius-pill);
  }
  .hero__cube {
    width: 64px; height: 64px; border-radius: 20px; opacity: 0.85;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
    transform: rotate(14deg);
    box-shadow: 0 18px 50px color-mix(in srgb, var(--accent) 25%, transparent);
  }
  .hero__content { position: relative; max-width: 1000px; }
  .hero__title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(56px, 8.5vw, 116px); line-height: 0.98; letter-spacing: -0.03em;
    margin-bottom: 28px;
  }
  .hero__title-accent {
    background: linear-gradient(100deg, var(--accent) 20%, var(--accent-hov) 55%, var(--ink) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .hero__subtitle { color: var(--ink2); font-size: 20px; max-width: 600px; margin: 0 auto 40px; }
  .hero__ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
  .hero__stats { display: flex; gap: 64px; justify-content: center; flex-wrap: wrap; }
  .hero__stat-value {
    display: block; font-family: var(--font-display); font-weight: 800; font-size: 34px;
    color: var(--accent); font-variant-numeric: tabular-nums;
  }
  .hero__stat-label {
    display: block; color: var(--ink3); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.12em;
  }
  .hero__scroll-cue {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    color: var(--ink3); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
  }
  .hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(180deg, var(--accent), transparent); }

  /* Short viewports have no spare room for garnish — content wins. */
  @media (max-height: 760px) {
    .hero__scroll-cue { display: none; }
  }

  /* Parallax ornament is desktop garnish only (README: hidden below 1280px). */
  @media (max-width: 1279px) {
    .hero__orn { display: none; }
  }

  /* ---- Chain marquee ---- */
  .marquee {
    border-top: 1px solid var(--line-8); border-bottom: 1px solid var(--line-8);
    padding: 22px 0; overflow: hidden; background: var(--band);
  }
  .marquee__track {
    display: flex; width: max-content;
    animation: fy-marquee 48s linear infinite;
    font-family: var(--font-display); font-weight: 800; font-size: 20px;
    letter-spacing: 0.06em; color: var(--ink3); white-space: nowrap;
  }
  /* Pause-on-hover is a mouse affordance only: on touch screens a tap
     sets a sticky :hover and freezes the ribbon until the next tap. */
  @media (hover: hover) {
    .marquee:hover .marquee__track { animation-play-state: paused; }
  }
  .marquee__group { display: flex; gap: 56px; padding-right: 56px; flex: none; }
  .marquee__item {
    display: flex; align-items: center; gap: 12px; cursor: default;
    filter: grayscale(1); opacity: 0.65;
    transition: filter 0.25s, opacity 0.25s, color 0.25s;
  }
  .marquee__item img { border-radius: var(--radius-pill); }
  .marquee__item:hover { filter: grayscale(0); opacity: 1; }
  /* The one sanctioned use of hardcoded color: per-chain brand tones. */
  .marquee__item--ethereum:hover { color: #627EEA; }
  .marquee__item--base:hover { color: #0052FF; }
  .marquee__item--arbitrum:hover { color: #12AAFF; }
  .marquee__item--optimism:hover { color: #FF0420; }
  .marquee__item--polygon:hover { color: #8247E5; }
  .marquee__item--solana:hover { color: #14F195; }

  /* ---- Try it live (playground) ---- */
  .playground {
    max-width: 820px; margin: 0 auto;
    background: linear-gradient(180deg, var(--accent-08), var(--line-4));
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: var(--radius-card); padding: 32px 34px 30px;
  }
  .playground h2 { font-size: 24px; font-weight: 800; }
  .playground__desc { color: var(--ink2); margin: 6px 0 16px; font-size: 15px; max-width: 46rem; }
  .playground-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 16px; }
  .playground-form select {
    background: var(--input-bg); color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--line) 20%, transparent);
    border-radius: var(--radius-input); padding: 11px 14px; font-size: 14px;
    flex: 1; min-width: 11rem;
  }
  .playground-meta { color: var(--accent); font-weight: 600; font-size: 14px; min-height: 1.4em; margin-bottom: 8px; }
  .playground-output {
    background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--line) 12%, transparent);
    border-radius: 16px; padding: 16px 18px; overflow-x: auto;
    min-height: 7rem; font-size: 13px; line-height: 1.6; margin-bottom: 12px;
  }
  .playground-output code { color: var(--code-ink); }
  .playground__foot { color: var(--ink3); font-size: 14px; }
  .try-section { padding: 120px 40px 40px; }

  /* ---- Problem / solution ---- */
  .ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .ps-card {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 32px;
    transition: transform 0.3s var(--ease);
  }
  .ps-card:hover { transform: translateY(-8px); }
  .ps-card--problem { border-color: color-mix(in srgb, var(--err) 25%, transparent); }
  .ps-card--solution {
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, transparent), var(--surface));
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  }
  .ps-card__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 8px; }
  .ps-card--problem .ps-card__title { color: var(--err); }
  .ps-card--solution .ps-card__title { color: var(--accent); }
  .ps-card__text { color: var(--ink2); font-size: 15px; margin-bottom: 18px; }
  .ps-card__list { list-style: none; display: grid; gap: 8px; color: var(--ink2); font-size: 15px; }
  .ps-card__list li { padding-left: 26px; position: relative; }
  .ps-card__list li::before { content: "✕"; position: absolute; left: 0; color: var(--err); font-weight: 700; }
  .ps-card__list--check li::before { content: "✓"; color: var(--ok); }

  /* ---- How it works: pinned scroll scene.
     Static (no-JS / reduced-motion) default: beats stack in normal flow.
     pinned_scene_controller adds .is-pinned for the 280vh sticky crossfade. */
  .pinned {
    border-top: 1px solid var(--line-8); border-bottom: 1px solid var(--line-8);
    background: radial-gradient(ellipse at 50% 120%, var(--accent-14), transparent 60%), var(--bg);
  }
  .pinned__sticky {
    display: grid; gap: 72px; justify-items: center;
    padding: 100px 24px; position: relative;
  }
  .pinned__kicker {
    color: var(--accent); font-size: 13px; letter-spacing: 0.16em;
    text-transform: uppercase; font-weight: 700;
  }
  .pinned__beat { text-align: center; max-width: 820px; padding: 0 24px; }
  .pinned__num {
    color: var(--accent); font-family: var(--font-display); font-weight: 800;
    font-size: 22px; letter-spacing: 0.1em; margin-bottom: 10px;
  }
  .pinned__headline {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(44px, 6vw, 80px); letter-spacing: -0.03em; line-height: 1;
  }
  .pinned__beat--accent .pinned__headline { color: var(--accent); }
  .pinned__copy { color: var(--ink2); font-size: 19px; margin: 20px auto 0; max-width: 560px; }
  .pinned__code {
    background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--line) 12%, transparent);
    border-radius: 16px; padding: 18px 22px; font-size: 13px; line-height: 1.7;
    color: var(--code-ink); margin: 24px auto 0; max-width: 640px; text-align: left; overflow-x: auto;
  }
  .pinned__dots { display: none; }
  .pinned__dot {
    width: 28px; height: 4px; border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--line) 15%, transparent);
    transition: background 0.3s;
  }
  .pinned__dot.is-active { background: var(--accent); }

  .pinned.is-pinned {
    position: relative; height: 280vh;

    .pinned__sticky {
      position: sticky; top: 0; height: 100vh; overflow: hidden; padding: 0 24px;
      display: flex; align-items: center; justify-content: center; gap: 0;
    }
    .pinned__kicker { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
    .pinned__beat {
      position: absolute; opacity: 0; transform: translateY(30px) scale(0.96);
      transition: opacity 0.45s ease, transform 0.45s var(--ease);
      pointer-events: none;
    }
    .pinned__beat.is-active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
    .pinned__beat.is-before { transform: translateY(-30px) scale(0.96); }
    .pinned__dots {
      display: flex; gap: 8px;
      position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%);
    }
  }

  /* ---- Community coming-soon page ---- */
  .community-list {
    list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px; margin: 8px 0 32px; padding: 0;
  }
  .community-list__item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-input); padding: 14px 16px;
  }
  .community-list__item svg { width: 18px; height: 18px; color: var(--ink2); flex: none; }
  .community-list__label { font-weight: 600; color: var(--ink); }
  .community-list__soon {
    margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
  }
  .community-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
  .community-note { color: var(--ink3); font-size: 14px; }

  /* ---- Measured status (landing) + status page ---- */
  .measured__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
  .measured__head .section__title { margin-bottom: 0; font-size: clamp(30px, 3.5vw, 44px); }
  .measured__link { font-size: 14px; font-weight: 600; }
  .measured__card {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 12px 28px 20px; overflow-x: auto;
  }
  .measured__note { color: var(--ink3); font-size: 13px; margin-top: 16px; }
  .status-table { width: 100%; border-collapse: collapse; }
  .status-table th {
    text-align: left; color: var(--ink2); border-bottom: 1px solid var(--line-18);
    padding: 14px 12px 8px 0; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .status-table td { border-bottom: 1px solid var(--line-10); padding: 10px 12px 10px 0; color: var(--ink2); font-size: 15px; }
  .status-table td:first-child { color: var(--ink); }
  .status-table tr:last-child td { border-bottom: none; }
  .status-table :is(th, td).numeric { text-align: right; font-variant-numeric: tabular-nums; }
  .chain-code {
    color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-radius: 4px; padding: 1px 6px; font-size: 13px;
  }
  .status-ok, .status-warn, .status-critical, .status-muted {
    display: inline-block; border-radius: var(--radius-pill); padding: 2px 12px;
    font-size: 13px; font-weight: 700;
  }
  .status-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
  .status-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
  .status-critical { color: var(--err); background: color-mix(in srgb, var(--err) 12%, transparent); }
  .status-muted { color: var(--ink3); background: var(--line-8); }

  /* ---- Capabilities 2×2 ---- */
  .cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .cap-card {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 32px;
    transition: transform 0.3s var(--ease), border-color 0.3s;
  }
  .cap-card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
  .cap-card__icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
    color: var(--accent);
  }
  .cap-card__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 6px; }
  .cap-card__desc { color: var(--ink2); font-size: 15px; margin-bottom: 16px; }
  .cap-card__tag {
    display: inline-block; color: var(--on-accent); background: var(--accent);
    border-radius: var(--radius-pill); padding: 4px 14px; font-size: 13px; font-weight: 700;
  }
  .cap-card__tag--roadmap {
    color: var(--ink2); background: transparent;
    border: 1px solid var(--line-18); font-weight: 600;
  }

  /* ---- Pricing cards ---- */
  .plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; align-items: stretch; }
  .plan-card {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 30px 28px;
    display: flex; flex-direction: column; gap: 8px;
    transition: transform 0.3s var(--ease);
  }
  .plan-card:hover { transform: translateY(-8px); }
  .plan-card--highlight {
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), var(--surface));
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  }
  .plan-card__name { font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .plan-card__flag { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
  .plan-card__price { font-family: var(--font-display); font-weight: 800; font-size: 34px; }
  .plan-card__interval { font-family: var(--font-body); font-size: 15px; color: var(--ink2); font-weight: 400; }
  .plan-card__desc { color: var(--ink2); font-size: 14px; flex: 1; }
  .plan-card .ps-card__list { font-size: 14px; flex: 1; align-content: start; }
  .plan-card__cta { margin-top: 12px; display: grid; }
  .plan-card__cta form { display: grid; }
  .plan-card__cta .btn { padding: 10px 20px; font-size: 14px; }
  .founding-cta {
    margin-top: 64px; padding: 32px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: var(--radius-card);
    background: linear-gradient(160deg, var(--accent-08), var(--surface));
  }
  .founding-cta .section__subtitle { margin-bottom: 24px; }
  .pricing-page, .docs-page, .status-page, .legal-page { padding-top: 130px; }

  /* ---- Roadmap ---- */
  .roadmap-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: stretch; }
  .roadmap-phase {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 24px 22px;
    display: flex; flex-direction: column;
    transition: transform 0.3s var(--ease);
  }
  .roadmap-phase:hover { transform: translateY(-8px); }
  .roadmap-phase--now { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
  .roadmap-phase__badge {
    align-self: flex-start; color: var(--ink2); background: transparent;
    border: 1px solid var(--line-18); border-radius: var(--radius-pill);
    padding: 2px 12px; font-size: 12px; font-weight: 700; margin-bottom: 14px;
  }
  .roadmap-phase--now .roadmap-phase__badge { color: var(--on-accent); background: var(--accent); border-color: transparent; }
  .roadmap-phase--next .roadmap-phase__badge {
    color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  }
  .roadmap-phase__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 12px; }
  .roadmap-phase__list { list-style: none; display: grid; gap: 8px; color: var(--ink2); font-size: 13.5px; flex: 1; align-content: start; }
  .roadmap-phase__list li { display: flex; gap: 8px; }
  .roadmap-phase__list li::before { content: "·"; color: var(--accent); font-weight: 700; }
  .roadmap-phase__status {
    color: var(--ink3); font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.12em; margin-top: 16px; font-weight: 600;
  }
  .roadmap-phase__status--active { color: var(--accent); }

  /* ---- The long view ---- */
  .vision {
    border-top: 1px solid var(--line-8);
    background: radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%), var(--bg);
  }
  .vision .section { padding-block: 110px; }
  .vision__intro {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px;
    align-items: start; margin-bottom: 52px;
  }
  .vision__intro .section__subtitle { margin-bottom: 0; font-size: 16px; }
  .vision__lead { color: var(--ink); font-size: 20px; line-height: 1.6; }
  .vision__lead strong { color: var(--accent); font-weight: 600; }
  .vision__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .vision__card {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 30px 28px;
    transition: transform 0.3s var(--ease), border-color 0.3s;
  }
  .vision__card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
  .vision__card-num {
    display: block; color: var(--accent); text-transform: uppercase;
    letter-spacing: 0.14em; font-size: 12px; font-weight: 700; margin-bottom: 10px;
  }
  .vision__card-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
  .vision__card-text { color: var(--ink2); font-size: 14.5px; }
  .vision__note { color: var(--ink3); font-size: 14px; margin-top: 32px; max-width: 560px; }

  /* ---- Early access ---- */
  .early-access { border-top: 1px solid var(--line-8); }
  .ea-wrapper { display: grid; grid-template-columns: 1fr 480px; gap: 64px; align-items: center; }
  .ea-desc { color: var(--ink2); font-size: 16px; max-width: 460px; }
  .provider-cta { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line-10); max-width: 460px; }
  .provider-cta__title { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-bottom: 8px; }
  .provider-cta__text { color: var(--ink2); font-size: 16px; margin-bottom: 18px; }
  .ea-form-wrap {
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: var(--radius-card); padding: 32px;
  }
  .ea-form { display: grid; gap: 14px; }
  .ea-form__group { display: grid; gap: 6px; }
  .ea-form__label { color: var(--ink2); font-size: 14px; }
  .ea-form__input {
    width: 100%; background: var(--input-bg); color: var(--ink);
    border: 1px solid var(--line-18); border-radius: var(--radius-input);
    padding: 11px 14px; font-size: 14px;
  }
  .ea-form__input::placeholder { color: var(--ink3); }
  .ea-form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-14); }
  .ea-form__choices { border: none; }
  .ea-form__choices legend { color: var(--ink2); font-size: 14px; margin-bottom: 6px; }
  .ea-form__choices label {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--line-18); border-radius: var(--radius-input);
    padding: 11px 14px; font-size: 14px; color: var(--ink2); cursor: pointer;
    margin-bottom: 8px;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  }
  .ea-form__choices label:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
  .ea-form__choices label:has(:checked) { border-color: var(--accent); color: var(--ink); background: var(--accent-08); }
  .ea-form__choices input[type="radio"] { accent-color: var(--accent); }
  .ea-form__errors { color: var(--err); font-size: 14px; }
  .ea-form__errors ul { list-style: none; }
  .ea-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .ea-form__note { font-size: 13px; color: var(--ink3); text-align: center; }
  .ea-form__signin { font-size: 14px; color: var(--ink2); text-align: center; margin-top: 16px; }
  .ea-success { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 0; color: var(--accent); }
  .ea-success__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--accent); }
  .ea-success__text { font-size: 14px; color: var(--ink2); }
  .ea-success__text code { font-size: 13px; color: var(--accent); }

  /* ---- Footer ---- */
  .footer { border-top: 1px solid var(--line-10); }
  .footer__top {
    display: grid; grid-template-columns: 1fr auto auto auto; gap: 56px;
    align-items: start; padding-block: 36px 28px;
  }
  .footer__brand { display: grid; gap: 12px; justify-items: start; }
  .footer__brand-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .footer__jademind {
    margin: 0 0 4px;
    color: var(--ink3);
    font-size: 13px;
    letter-spacing: 0.02em;
  }
  .footer__jademind a { color: var(--ink2); font-weight: 600; }
  .footer__jademind a:hover { color: var(--accent); }
  .footer__imprint {
    padding: 8px 40px 14px;
    color: var(--ink3);
    font-size: 13px;
    line-height: 1.8;
  }
  .footer__imprint span { white-space: nowrap; }
  .footer__imprint span:not(:last-child)::after { content: "  ·  "; white-space: normal; }
  .footer__imprint a { color: var(--ink3); text-decoration: underline; }
  .footer__imprint a:hover { color: var(--accent); }
  .footer__tagline { color: var(--ink3); font-size: 14px; margin-left: 6px; }
  .footer__col { display: grid; gap: 8px; justify-items: start; }
  .footer__col-title {
    color: var(--ink3); font-size: 11px; font-weight: 700; font-family: var(--font-body);
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px;
  }
  .footer__col a { color: var(--ink2); font-size: 14px; white-space: nowrap; transition: color 0.2s var(--ease); }
  .footer__col a:hover { color: var(--accent); }
  .social-links { display: flex; gap: 10px; list-style: none; flex-wrap: wrap; }
  .social-links a {
    width: 36px; height: 36px; border: 1px solid color-mix(in srgb, var(--line) 14%, transparent);
    border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center;
    color: var(--ink2);
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  }
  .social-links a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .social-links svg { width: 16px; height: 16px; }
  .footer__legal-bar { border-top: 1px solid var(--line-10); }
  .footer__legal {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding-block: 14px; color: var(--ink3); font-size: 13px;
  }
  .footer__legal a { color: var(--ink3); }
  .footer__legal a:hover { color: var(--accent); }

  /* ---- Docs & legal prose pages ---- */
  .docs-page .container, .legal-page .container { max-width: 860px; }
  .docs-page section, .legal-page section { margin-top: 56px; }
  .docs-page section h2, .legal-page section h2 {
    font-family: var(--font-display); font-weight: 800; font-size: 26px;
    letter-spacing: -0.01em; margin-bottom: 12px;
  }
  .docs-page p, .legal-page p { color: var(--ink2); font-size: 15px; margin-bottom: 12px; max-width: 72ch; }
  .docs-page :is(ul, ol), .legal-page :is(ul, ol) { color: var(--ink2); font-size: 15px; padding-left: 22px; display: grid; gap: 8px; margin-bottom: 12px; }
  .docs-page strong, .legal-page strong { color: var(--ink); }
  .docs-page pre {
    background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--line) 12%, transparent);
    border-radius: 16px; padding: 16px 18px; overflow-x: auto;
    font-size: 13px; line-height: 1.7; margin-block: 14px;
  }
  .docs-page pre code { color: var(--code-ink); background: none; padding: 0; }
  .docs-page code, .legal-page code, .status-page .section__subtitle code {
    color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-radius: 4px; padding: 1px 6px; font-size: 13px;
  }
  .docs-page table {
    width: 100%; border-collapse: collapse; margin-block: 14px;
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: 16px; overflow: hidden;
  }
  .docs-page table th {
    text-align: left; color: var(--ink2); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 12px 16px 8px; border-bottom: 1px solid var(--line-18);
  }
  .docs-page table td { padding: 10px 16px; border-bottom: 1px solid var(--line-10); color: var(--ink2); font-size: 14px; }
  .docs-page table tr:last-child td { border-bottom: none; }
  .docs-page .playground { max-width: none; margin-block: 32px 8px; }
  .status-page .container { max-width: 960px; }
  .status-page .status-table td { white-space: nowrap; }
  .status-page .status-table td:first-child { white-space: normal; }
  .status-page .measured__card { margin-bottom: 32px; }


  /* ADR-009 pre-live supply disclosure (pricing side). */
  .supply-disclosure {
    margin: -20px 0 32px;
    padding: 12px 16px;
    border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
    background: color-mix(in srgb, var(--warn) 8%, transparent);
    border-radius: var(--radius-input);
    color: var(--ink2);
    font-size: 14px;
    max-width: 720px;
  }

  /* ---- Docs side nav + scroll-spy (Kinetic docs spec) ---- */
  .docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
  .doc-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; }
  .doc-nav__group {
    margin: 14px 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--ink3);
  }
  .doc-nav__group:first-child { margin-top: 0; }
  .doc-nav__link {
    display: block; padding: 6px 10px; border-radius: 8px;
    color: var(--ink2); font-size: 14px; text-decoration: none;
    transition: color 150ms ease-out, background 150ms ease-out;
  }
  .doc-nav__link:hover { color: var(--ink); background: var(--line-4); }
  .doc-nav__link--active { color: var(--accent); background: var(--accent-08); font-weight: 600; }
  .docs-main { max-width: 760px; min-width: 0; }
  @media (max-width: 960px) {
    .docs-layout { grid-template-columns: 1fr; }
    .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
    .doc-nav__group { width: 100%; }
  }

  /* ---- Status 30-day tick strips ---- */
  .tick-strip { display: flex; gap: 3px; align-items: center; margin-top: 10px; }
  .tick { width: 6px; height: 18px; border-radius: 2px; flex: 0 1 auto; }
  .tick--ok { background: var(--ok); }
  .tick--warn { background: var(--warn); }
  .tick--err { background: var(--err); }
  .tick--muted { background: var(--line-10); }

  /* ---- Auth pages ---- */
  .auth-theme-toggle { position: fixed; top: 20px; right: 20px; z-index: 10; }
  .auth-main {
    min-height: 100dvh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 32px; padding: 32px 16px;
  }
  .auth-logo { justify-content: center; }
  .auth-card {
    width: 100%; max-width: 26rem;
    background: var(--surface); border: 1px solid var(--line-10);
    border-radius: 14px; padding: 32px;
    box-shadow: 0 24px 60px var(--shadow-c);
  }
  .auth-card__title {
    font-family: var(--font-display); font-size: 22px; font-weight: 800;
    margin-bottom: 20px; text-align: center;
  }
  .auth-card p { color: var(--ink2); font-size: 14px; margin-bottom: 14px; }
  .auth-links { font-size: 14px; color: var(--ink2); text-align: center; margin-top: 20px; }

  /* ---- Flash ---- */
  .landing-flash-wrap {
    position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
    z-index: 90; width: min(90vw, 32rem);
  }
  .flash { padding: 12px 16px; border-radius: var(--radius-input); font-size: 14px; margin-bottom: 16px; }
  .flash--notice { background: var(--accent-08); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
  .flash--alert { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 25%, transparent); }

  /* ---- Responsive ---- */
  @media (max-width: 1024px) {
    .plan-grid { grid-template-columns: repeat(2, 1fr); }
    .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
    .vision__intro { grid-template-columns: 1fr; gap: 24px; }
    .vision__cards { grid-template-columns: 1fr; }
    .ea-wrapper { grid-template-columns: 1fr; gap: 48px; }
    .footer__top { grid-template-columns: 1fr; gap: 40px; }
  }

  @media (max-width: 768px) {
    .container { padding-inline: 24px; }
    .section { padding-block: 72px; }

    /* Compact pill: logo + toggle + CTA + menu button; page links move
       into the disclosure panel. Desktop keeps the full inline pill. */
    .nav { gap: 12px; padding: 8px 10px 8px 16px; }
    .nav__links { gap: 12px; }
    .nav__links .nav__link { display: none; }
    .nav__menu-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 36px; height: 36px; border-radius: var(--radius-pill);
      border: 1px solid var(--line-18); color: var(--ink2); font-size: 16px;
    }
    .nav--open .nav__menu-btn { color: var(--accent); border-color: var(--accent); }
    .nav--open .nav__panel {
      display: flex; flex-direction: column; gap: 4px;
      position: absolute; top: calc(100% + 10px); left: 0; right: 0;
      background: var(--nav-bg);
      backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
      border: 1px solid var(--line-10); border-radius: 20px;
      padding: 10px; box-shadow: 0 12px 40px var(--shadow-c);
    }
    .nav__panel-link {
      display: block; padding: 12px 16px; border-radius: 12px;
      color: var(--ink); font-size: 16px;
    }
    .nav__panel-link:hover { color: var(--accent); background: var(--line-4); }

    .hero { padding: 150px 24px 90px; }
    .hero__title { font-size: clamp(38px, 11vw, 56px); }
    .hero__stats { gap: 32px; }
    .ps-grid, .cap-grid, .plan-grid, .roadmap-grid { grid-template-columns: 1fr; }
    .hero__ctas { flex-direction: column; align-items: stretch; }
    .try-section { padding: 72px 24px 24px; }
    .measured__card { padding: 8px 18px 16px; }

    /* Tables scroll inside their section instead of panning the page. */
    & table { display: block; overflow-x: auto; }

    /* Imprint facts may wrap on phones — the managing-directors line is
       wider than a phone screen when kept on one line. */
    .footer__imprint span { white-space: normal; }

    /* Long CTA labels (waitlist-mode copy) wrap inside the pill instead
       of stretching the page. */
    .btn { white-space: normal; }

    /* Code boxes wrap on phones — sideways scrolling reads as text cut
       off at the box edge. */
    .pinned__code, .playground-output {
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    /* The 280vh scroll scene is desktop-only; phones get the static
       stacked layout (the controller also opts out below 769px). The
       single-column grid must cap its track at the viewport — an auto
       track grows to the beats' max-content (the curl code block) and
       pans the page. */
    .pinned__sticky { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
    .pinned__beat, .pinned__code { max-width: 100%; }

    /* Defense in depth: even if the scene state is present (resize from
       desktop, controller race), phones render the static layout. */
    .pinned.is-pinned { height: auto; }
    .pinned.is-pinned .pinned__sticky {
      position: static; height: auto;
      display: grid; gap: 72px; padding: 100px 24px;
    }
    .pinned.is-pinned .pinned__kicker { position: static; transform: none; white-space: normal; }
    .pinned.is-pinned .pinned__beat {
      position: static; opacity: 1; transform: none; pointer-events: auto;
    }
    .pinned.is-pinned .pinned__dots { display: none; }
  }
}

/* Reduced motion: kill ambient/scroll motion; controllers also no-op.
   (Scoped to .landing descendants — the guard's global rules still hold.) */
@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .landing .marquee__track { animation: none !important; }
  .landing .hero__orn { display: none !important; }
}
