/* ============================================================
   digiview.sh: shared stylesheet (home, docs, 404).
   Light and dark follow the OS (no toggle). Colours come from
   css/tokens.css, the product's generated tokens (light on :root,
   dark under prefers-color-scheme), and motion from css/motion.css;
   both are copied verbatim from the product and never edited here.
   This file adds only site aliases, layout and the sections.
   Type is Inter (self-hosted, OFL). Status is never colour alone:
   a glyph or icon plus a word, as in the console.
   ============================================================ */

/* ---------- Font (self-hosted, OFL; see assets/fonts/LICENSE-Inter-OFL.txt) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable-450f3ba4.woff2") format("woff2-variations"),
       url("../assets/fonts/InterVariable-450f3ba4.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Site aliases (derived from tokens.css; light first) ---------- */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --band: #ffffff;               /* alternate section band */
  --line-soft: #e9e6ee;          /* hairlines inside cards */
  --header-bg: rgba(246, 245, 242, 0.82);
  --stage-bg: #ffffff;
  --tile-bg: #ffffff;
  --fx-bg: #f6f5f2;
  --glow: rgba(119, 85, 232, 0.12);
  --dot-grid: rgba(25, 25, 35, 0.05);
  --chip-dot: var(--brand);
  --ink-ground: #191923;         /* device art is always on Ink */
  --ink-text: #f6f5f2;
  --ink-muted: #a9a7b8;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --band: #13131b;
    --line-soft: #282834;
    --header-bg: rgba(25, 25, 35, 0.8);
    --stage-bg: #1c1c27;
    --tile-bg: #20202c;
    --fx-bg: #191923;
    --glow: rgba(166, 143, 247, 0.12);
    --dot-grid: rgba(246, 245, 242, 0.045);
    --chip-dot: var(--text-brand);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; }
a { color: var(--text-brand); text-decoration: none; transition: color var(--dur-fade) var(--curve-out); }
a:hover { color: var(--brand-hover); }
p a, li a, dd a, td a, .faq a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
p a:hover, li a:hover, dd a:hover, td a:hover, .faq a:hover { text-decoration-color: currentColor; }
a.text-link, a.btn { text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-subtle); color: var(--text); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; color: var(--text); }
h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
code, kbd, pre, samp { font-family: var(--font-mono); font-weight: 400; }
strong, b { font-weight: 600; }
.num, .metric-num, td, .tnum { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--brand); color: var(--text-on-brand); font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: var(--text-on-brand); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: 1320px; }
.mono { font-family: var(--font-mono); }

/* ---------- Scroll reveal (only once JS has run; boot.js adds .js) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(calc(var(--m) * 20px));
  transition: opacity 0.7s var(--curve-out) var(--d, 0ms), transform var(--dur-spring-gentle) var(--spring-gentle) var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; flex: none; min-height: 44px; border-radius: 8px; color: var(--text); }
.logo svg, .logo img { width: 160px; height: 35px; overflow: visible; }
/* The inline header lockup: the exact paths, coloured as the primary (light) or reversed (dark) file. */
.lk-back { fill: #b6a0f5; }
.lk-front { fill: #7755e8; }
.lk-word { fill: #191923; }
@media (prefers-color-scheme: dark) { .lk-front, .lk-word { fill: #ffffff; } }
/* Sidebar-logo hop (motion.md): one hop of the symbol on hover, at most once per 3 s (common.js adds .is-hopping). */
.lk-sym { transform-box: fill-box; transform-origin: 39.06% 100%; }
.logo.is-hopping .lk-sym { animation: dv-hop-y var(--dur-hop) linear 1, dv-hop-s var(--dur-hop) var(--curve-in-out) 1; --dv-hop-h: calc(var(--m) * -10.49%); }
.logo.is-hopping .lk-back { animation: dv-peek var(--dur-peek) var(--spring-bouncy) 270ms 1; transform-box: fill-box; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links > a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--text-muted); font-size: 14.5px; font-weight: 500;
  transition: color var(--dur-fade) var(--curve-out), background-color var(--dur-fade) var(--curve-out);
}
.nav-links > a:hover, .nav-links > a[aria-current="page"] { color: var(--text); background: var(--brand-subtle); }
.nav-links > a.cta {
  margin-left: 12px; padding: 9px 18px;
  background: var(--brand); color: var(--text-on-brand); font-weight: 600;
  transition: background-color var(--dur-fade) var(--curve-out), translate var(--dur-spring-snappy) var(--spring-snappy);
}
.nav-links > a.cta:hover { background: var(--brand-hover); color: var(--text-on-brand); translate: 0 calc(var(--motion-hover-lift) * -1); }
.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- Buttons (the console's: press 0.95, lift 2 px, springs) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: translate var(--dur-spring-snappy) var(--spring-snappy), scale var(--dur-spring-snappy) var(--spring-snappy),
    background-color var(--dur-fade) var(--curve-out), border-color var(--dur-fade) var(--curve-out), color var(--dur-fade) var(--curve-out);
}
.btn:hover { translate: 0 calc(var(--motion-hover-lift) * -1); }
.btn:active { scale: var(--motion-press); transition-duration: var(--dur-press); transition-timing-function: var(--curve-out); }
.btn svg { width: 16px; height: 16px; flex: none; transition: translate var(--dur-spring-snappy) var(--spring-snappy); }
.btn:hover svg { translate: var(--motion-nudge) 0; }
.btn-primary { background: var(--brand); color: var(--text-on-brand); box-shadow: var(--elev-md); }
.btn-primary:hover { background: var(--brand-hover); color: var(--text-on-brand); }
.btn-primary:active { background: var(--brand-pressed); }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn-secondary:hover { background: var(--brand-subtle); color: var(--text); }
.btn-ghost { color: var(--text-muted); padding: 0 14px; }
.btn-ghost:hover { color: var(--text); background: var(--brand-subtle); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--text-brand); }
.text-link svg { width: 16px; height: 16px; transition: translate var(--dur-spring-snappy) var(--spring-snappy); }
.text-link:hover svg { translate: var(--motion-nudge) 0; }

/* ---------- Sections ---------- */
section { position: relative; padding: 112px 0; }
.band { background: var(--band); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-brand);
}
.kicker::before { content: ""; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; opacity: 0.6; }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head .kicker::after { content: ""; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; opacity: 0.6; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 48px); margin-bottom: 18px; text-wrap: balance; }
.section-head p { color: var(--text-muted); font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.section-head .section-note { margin-top: 14px; font-size: 14px; line-height: 1.6; }
.brand-word { color: var(--text-brand); }
.fine { color: var(--text-muted); font-size: 13px; line-height: 1.5; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 88px; overflow: hidden; text-align: center; isolation: isolate; }
.screenfield { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -260px; width: 1100px; height: 700px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin-bottom: 30px; padding: 6px 14px 6px 6px;
  border-radius: 999px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text-muted); font-size: 13.5px; font-weight: 500; text-decoration: none;
  transition: border-color var(--dur-fade) var(--curve-out), color var(--dur-fade) var(--curve-out);
}
.hero-pill:hover { color: var(--text); border-color: var(--border-strong); }
.hero-pill .pill-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-pill .pill-short { display: none; }
.hero-pill svg { width: 14px; height: 14px; flex: none; transition: translate var(--dur-spring-snappy) var(--spring-snappy); }
.hero-pill:hover svg { translate: var(--motion-nudge) 0; }
.hero h1 {
  max-width: 960px; margin: 0 auto 26px;
  font-size: clamp(44px, 7vw, 84px); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero .lede {
  max-width: 760px; margin: 0 auto 40px;
  color: var(--text-muted); font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.6; text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 28px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 18px; }
.hero-meta li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); margin-left: -9px; margin-right: -9px; }
.hero-demo { position: relative; margin-top: 48px; max-width: 1240px; scroll-margin-top: calc(var(--header-h) + 12px); }
.hero-demo::before {
  content: ""; position: absolute; inset: 8% 6% -4%; z-index: -1; border-radius: 40px; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(30px);
}

/* ---------- Trust strip ---------- */
.trust { padding: 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--band); }
.trust-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust-item { display: flex; align-items: flex-start; gap: 14px; padding: 30px 24px; border-left: 1px solid var(--line-soft); }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--text-brand); }
.trust-item b { display: block; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }
.trust-item span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }

/* ---------- How it works: a demo beside each explanation ---------- */
.how-rows { display: grid; gap: 120px; }
.how-row { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 64px; align-items: center; }
.how-row.flip { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.how-row.flip .how-copy { order: 2; }
.how-copy .step-no {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font-size: 13px; font-weight: 600; color: var(--text-brand); font-variant-numeric: tabular-nums;
}
.how-copy .step-no i { width: 28px; height: 1.5px; border-radius: 2px; background: var(--border-strong); }
.how-copy h3 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; margin-bottom: 16px; text-wrap: balance; letter-spacing: -0.02em; font-weight: 700; }
.how-copy > p { color: var(--text-muted); font-size: 16.5px; line-height: 1.65; }
.how-points { display: grid; gap: 10px; margin: 22px 0 24px; }
.how-points li { position: relative; padding-left: 26px; color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.how-points li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em; width: 10px; height: 10px; border-radius: 3px;
  background: var(--brand-subtle); box-shadow: inset 0 0 0 1.5px var(--text-brand);
}
.how-copy .fine { margin: -8px 0 22px; }
.how-stage { min-width: 0; }

/* ---------- Metrics band ---------- */
.metrics { padding: 0; }
.metrics-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { padding: 52px 28px 48px; border-left: 1px solid var(--line-soft); }
.metric:first-child { border-left: 0; }
.metric-num {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-size: clamp(36px, 3.8vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
  color: var(--text); font-feature-settings: "tnum";
}
.metric-num small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--text-muted); }
.metric-label { margin-top: 12px; color: var(--text-muted); font-size: 14.5px; line-height: 1.5; max-width: 260px; }
.metric-label em { font-style: normal; opacity: 0.85; }

/* ---------- Features: bento with micro-animations ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  padding: 18px 18px 24px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--tile-bg); box-shadow: var(--elev-sm);
  transition: translate var(--dur-spring-bouncy) var(--spring-bouncy), border-color var(--dur-fade) var(--curve-out);
}
.tile::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: var(--elev-md); opacity: 0; pointer-events: none; transition: opacity var(--dur-fade) var(--curve-out); }
.tile:hover { translate: 0 calc(var(--motion-card-lift) * -1); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.tile:hover::after { opacity: 1; }
.tile-lg { grid-column: span 2; }
.tile > h3 { margin: 20px 4px 8px; font-size: 18px; font-weight: 600; text-wrap: balance; }
.tile > p { margin: 0 4px; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; }
.nowrap { white-space: nowrap; }

/* The animated panel at the top of each tile. Loops run only while the tile is on screen
   (.is-live, home.js), three cycles, then rest on their most telling frame (motion.md rule 9). */
.fx {
  position: relative; height: 176px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-soft); border-radius: 14px; background: var(--fx-bg);
  font-size: 12.5px; line-height: 1.4; color: var(--text-muted); font-feature-settings: "tnum";
}
.fx, .fx * { animation-play-state: paused !important; }
.tile.is-live .fx, .tile.is-live .fx * { animation-play-state: running !important; }
.fx-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.fx-badge svg { width: 11px; height: 11px; }
.fx-badge.ok { background: var(--success-subtle); color: var(--success); }
.fx-badge.warn { background: var(--warning-subtle); color: var(--warning); }
.fx-badge.bad { background: var(--danger-subtle); color: var(--danger); }
.fx-badge.info { background: var(--info-subtle); color: var(--info); }
.fx-badge.outline { box-shadow: inset 0 0 0 1px var(--border); color: var(--text); }
.fx-badge.brand { background: var(--brand-subtle); color: var(--text-brand); }

/* 1 · Share of voice: a 60 s loop, a new 15 s spot pops in */
.sov { width: calc(100% - 36px); max-width: 480px; }
.sov-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.sov-head b { color: var(--text); font-weight: 600; }
.sov-bar { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; height: 46px; }
.sov-seg {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 9px; border-radius: 8px;
  font-size: 11.5px; line-height: 1.25; overflow: hidden; white-space: nowrap;
}
.sov-seg small { font-size: 11px; opacity: 0.85; }
.sov-seg.l2 { background: var(--violet); color: #fff; }
.sov-seg.house { background: var(--lavender); color: #3a2a8c; }
.sov-seg.new { position: absolute; top: 0; bottom: 0; left: calc(75% + 1px); right: 0; background: var(--violet); color: #fff;
  transform-origin: 50% 100%; animation: sov-pop 6s var(--spring-bouncy) 3 both; }
@keyframes sov-pop { 0%, 30% { opacity: 0; scale: var(--motion-pop-glyph); } 40%, 92% { opacity: 1; scale: 1; } 100% { opacity: 1; scale: 1; } }
.sov-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; }
.sov-foot { margin-top: 10px; font-size: 12px; }
.sov-foot .fx-swap { height: 18px; }

.fx-swap { position: relative; display: block; height: 18px; width: 100%; }
.fx-swap > span { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sov-foot .fx-swap > span:first-child { animation: sw-a 6s var(--curve-out) 3 both; }
.sov-foot .fx-swap > span:last-child { animation: sw-b 6s var(--curve-out) 3 both; }
@keyframes sw-a { 0%, 32% { opacity: 1; } 38%, 100% { opacity: 0; } }
@keyframes sw-b { 0%, 36% { opacity: 0; } 42%, 100% { opacity: 1; } }

/* 2 · No overbooking: two holds race for one slot */
.race { width: calc(100% - 32px); max-width: 300px; display: grid; gap: 10px; }
.race-slot { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px dashed var(--border-strong); font-size: 12px; }
.race-slot b { color: var(--text); font-weight: 600; }
.race-hold { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 9px; background: var(--surface); box-shadow: var(--elev-sm); border: 1px solid var(--border); font-size: 12px; color: var(--text); }
.race-hold.a { animation: race-a 7s var(--spring-bouncy) 3 both; }
.race-hold.b { animation: race-b 7s var(--spring-gentle) 3 both; }
@keyframes race-a { 0%, 10% { translate: 0 calc(var(--m) * 24px); opacity: 0.6; } 28%, 100% { translate: 0 0; opacity: 1; } }
@keyframes race-b { 0%, 18% { translate: 0 calc(var(--m) * 10px); opacity: 0.6; } 34%, 100% { translate: 0 0; opacity: 1; } }
.race-msg { font-size: 11.5px; line-height: 1.35; color: var(--danger); min-height: 31px; animation: race-msg 7s var(--curve-out) 3 both; }
@keyframes race-msg { 0%, 34% { opacity: 0; } 40%, 100% { opacity: 1; } }

/* 3 · Proof of play: plan and proof bars per hour, delivery chips */
.pop { width: calc(100% - 36px); max-width: 480px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 18px; align-items: end; }
.pop-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 112px; }
.pop-h { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; align-items: end; height: 100%; position: relative; padding-bottom: 16px; }
.pop-h i { display: block; border-radius: 4px 4px 2px 2px; height: var(--h); }
.pop-h i:first-child { background: var(--lavender); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violet) 35%, transparent); }
.pop-h i:last-child { background: var(--violet); transform-origin: 50% 100%; animation: pop-grow 6.5s var(--spring-gentle) 3 both; animation-delay: var(--dl, 0ms); }
.pop-h span { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11px; }
@keyframes pop-grow { 0%, 8% { scale: 1 0.15; } 40%, 100% { scale: 1 1; } }
.pop-side { display: grid; gap: 8px; align-content: end; padding-bottom: 16px; }
.pop-legend { display: flex; gap: 10px; font-size: 11px; }
.pop-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.pop-chip { position: relative; height: 22px; }
.pop-chip > .fx-badge { position: absolute; left: 0; top: 0; }
.pop-chip > .q { animation: chip-1 6.5s var(--curve-out) 3 both; }
.pop-chip > .d { animation: chip-2 6.5s var(--curve-out) 3 both; }
.pop-chip > .k { animation: chip-3 6.5s var(--spring-bouncy) 3 both; }
@keyframes chip-1 { 0%, 30% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes chip-2 { 0%, 30% { opacity: 0; } 34%, 58% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes chip-3 { 0%, 58% { opacity: 0; scale: var(--motion-pop-glyph); } 66%, 100% { opacity: 1; scale: 1; } }

/* 4 · Emergency takeover: a calm band slides over every screen (gentle, no bounce) */
.emg { width: calc(100% - 32px); max-width: 300px; }
.emg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.emg-scr { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--ink-ground); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.emg-scr::before { content: ""; position: absolute; inset: 22% 18% auto 12%; height: 18%; border-radius: 3px; background: rgba(246,245,242,.75); }
.emg-scr::after { content: ""; position: absolute; inset: 0; background: var(--layer-l0); translate: -101% 0; animation: emg-in 7s var(--spring-gentle) 3 both; animation-delay: var(--dl, 0ms); }
@keyframes emg-in { 0%, 22% { translate: -101% 0; } 40%, 100% { translate: 0 0; } }
.emg-cap { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; }
.emg-cap .fx-badge { background: var(--layer-l0); color: var(--on-fill); }

/* 5 · Rest periods: a week with quiet hours */
.rest { width: calc(100% - 32px); max-width: 300px; display: grid; gap: 5px; }
.rest-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 11px; }
.rest-track { position: relative; height: 12px; border-radius: 4px; background: var(--lavender); overflow: hidden; }
@media (prefers-color-scheme: dark) { .rest-track { background: var(--brand-subtle); } }
.rest-track::before, .rest-track::after { content: ""; position: absolute; top: 0; bottom: 0; background: var(--ink-ground); }
@media (prefers-color-scheme: dark) { .rest-track::before, .rest-track::after { background: #0b0b10; box-shadow: inset 0 0 0 1px var(--border); } }
.rest-track::before { left: 0; width: 29.2%; }   /* 00:00–07:00 */
.rest-track::after { right: 0; width: 4.2%; }    /* 23:00–24:00 */
.rest-now { position: absolute; top: -2px; bottom: -2px; width: 2px; border-radius: 2px; background: var(--danger); left: 60%; animation: rest-now 8s linear 3 both; }
@keyframes rest-now { from { left: 60%; } to { left: 98%; } }
.rest-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 11.5px; }
.rest-pill { animation: rest-pill 8s var(--spring-bouncy) 3 both; }
@keyframes rest-pill { 0%, 85% { opacity: 0; scale: var(--motion-pop-glyph); } 92%, 100% { opacity: 1; scale: 1; } }
.rest-scale { display: flex; justify-content: space-between; padding-left: 38px; font-size: 11px; }
.rest-wrap { position: relative; }

/* 6 · Pair a screen: the code rises in, character by character (text never deforms) */
.pair { display: grid; justify-items: center; gap: 12px; }
.pair-code { display: flex; align-items: center; gap: 5px; }
.pair-code span {
  display: inline-grid; place-items: center; width: 26px; height: 36px; border-radius: 7px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text);
  font-size: 19px; font-weight: 700; font-feature-settings: "tnum";
  animation: pair-in 6s var(--spring-bouncy) 3 both; animation-delay: calc(var(--i) * 40ms);
}
.pair-code i { width: 8px; height: 3px; border-radius: 3px; background: var(--border-strong); }
@keyframes pair-in { 0%, 12% { opacity: 0; translate: 0 calc(var(--m) * 12px); } 22%, 100% { opacity: 1; translate: 0 0; } }
.pair-sub { font-size: 12px; }

/* 7 · Media that fits the slot: frames snap to the spot length */
.media { width: calc(100% - 32px); max-width: 300px; display: grid; gap: 10px; }
.media-strip { position: relative; height: 40px; border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.media-frames { position: absolute; inset: 4px; border-radius: 5px; background: repeating-linear-gradient(90deg, var(--violet) 0 10px, color-mix(in srgb, var(--violet) 70%, white) 10px 12px);
  transform-origin: 0 50%; animation: media-snap 6.5s var(--spring-snappy) 3 both; }
@keyframes media-snap { 0%, 20% { scale: 1.06 1; } 40%, 100% { scale: 1 1; } }
.media-slot { position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: var(--text); }
.media-meta { display: flex; justify-content: space-between; font-size: 11.5px; }
.media-meta b { color: var(--text); font-weight: 600; }
.media-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* 8 · Idle screens: the reversed symbol hops once on Ink */
.fx.ink { background: var(--ink-ground); border-color: transparent; color: var(--ink-muted); }
.idle { display: grid; justify-items: center; gap: 12px; }
.idle svg { width: 56px; height: auto; overflow: visible; }
.idle .i-sym { transform-box: fill-box; transform-origin: 39.06% 100%; animation: dv-hop-y 4.2s linear 3, dv-hop-s 4.2s var(--curve-in-out) 3; --dv-hop-h: calc(var(--m) * -10.49%); }
.idle .i-back { transform-box: fill-box; animation: idle-peek 4.2s var(--spring-jelly) 3; }
@keyframes idle-peek { 0%, 12%, 30%, 100% { translate: 0 0; } 20% { translate: calc(var(--m) * 5.52px) calc(var(--m) * -2.34px); } }
.idle p { color: var(--ink-text); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.idle small { font-size: 11.5px; color: var(--ink-muted); }

/* 9 · Updates that undo themselves: slot A / B */
.ab { width: calc(100% - 32px); max-width: 300px; display: grid; gap: 8px; }
.ab-slot { position: relative; display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 12px; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font-size: 12px; color: var(--text); }
.ab-slot .fx-swap { width: auto; flex: 0 0 132px; height: 22px; }
.ab-slot .fx-swap > span { display: flex; justify-content: flex-end; }
.ab-run { position: absolute; left: -1px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--success); }
.ab-a .ab-run { animation: ab-a 8s var(--curve-out) 3 both; }
.ab-b .ab-run { animation: ab-b 8s var(--curve-out) 3 both; }
@keyframes ab-a { 0%, 30% { opacity: 1; } 34%, 64% { opacity: 0; } 68%, 100% { opacity: 1; } }
@keyframes ab-b { 0%, 30% { opacity: 0; } 34%, 64% { opacity: 1; } 68%, 100% { opacity: 0; } }
.ab-b .fx-swap > span:nth-child(1) { animation: ab-s1 8s var(--curve-out) 3 both; }
.ab-b .fx-swap > span:nth-child(2) { animation: ab-s2 8s var(--curve-out) 3 both; }
.ab-b .fx-swap > span:nth-child(3) { animation: ab-s3 8s var(--curve-out) 3 both; }
@keyframes ab-s1 { 0%, 30% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes ab-s2 { 0%, 30% { opacity: 0; } 34%, 60% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes ab-s3 { 0%, 60% { opacity: 0; } 66%, 100% { opacity: 1; } }
.ab-note { font-size: 11.5px; }

/* 10 · Fleet health: a sparkline and its threshold */
.spark { width: calc(100% - 32px); max-width: 300px; }
.spark-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; margin-bottom: 6px; }
.spark-head b { color: var(--text); font-weight: 600; }
.spark svg { width: 100%; height: 96px; overflow: visible; }
.spark .sp-th { stroke: var(--warning); stroke-dasharray: 4 4; stroke-width: 1.2; }
.spark .sp-line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: sp-draw 7s var(--curve-out) 3 both; }
.spark .sp-area { fill: color-mix(in srgb, var(--chart-1) 14%, transparent); }
.spark text { fill: var(--text-muted); font-size: 11px; font-family: var(--font-sans); }
@keyframes sp-draw { 0%, 5% { stroke-dashoffset: 400; } 55%, 100% { stroke-dashoffset: 0; } }
.spark-foot { margin-top: 4px; font-size: 11.5px; }

/* 11 · API: requests and a problem+json */
.api { width: calc(100% - 32px); max-width: 320px; display: grid; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; }
.api p { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); white-space: nowrap; overflow: hidden; opacity: 0; animation: api-line 8s var(--curve-out) 3 both; animation-delay: var(--dl); }
.api p em { margin-left: auto; font-style: normal; color: var(--success); }
.api p.err em { color: var(--danger); }
.api b { font-weight: 600; color: var(--text-brand); }
@keyframes api-line { 0% { opacity: 0; translate: 0 calc(var(--m) * 6px); } 8%, 100% { opacity: 1; translate: 0 0; } }

/* 12 · Security events to four sinks */
.siem { width: calc(100% - 28px); max-width: 320px; display: grid; grid-template-columns: 88px 1fr 112px; align-items: center; gap: 6px; }
.siem-src { display: grid; place-items: center; height: 64px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.3; }
.siem-src small { display: block; font-weight: 400; color: var(--text-muted); }
.siem svg { width: 100%; height: 120px; overflow: visible; }
.siem svg path { fill: none; stroke: var(--border); stroke-width: 1.2; }
.siem svg circle { fill: var(--chart-1); offset-rotate: 0deg; animation: siem-flow 3.2s var(--curve-in-out) 3 both; animation-delay: var(--dl); opacity: 0; }
@keyframes siem-flow { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.siem-sinks { display: grid; gap: 6px; }
.siem-sinks span { display: flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-size: 11px; white-space: nowrap; }

/* ---------- Screenshots gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.shot { margin: 0; min-width: 0; }
.shot.wide { grid-column: 1 / -1; }
.shot-link { display: block; border-radius: 14px; text-decoration: none; }
.shot-link:focus-visible { outline-offset: 6px; border-radius: 16px; }
.shot-frame {
  position: relative; display: block; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--elev-lg);
  transition: translate var(--dur-spring-bouncy) var(--spring-bouncy), border-color var(--dur-fade) var(--curve-out);
}
.shot-bar { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; background: var(--surface-sunken); border-bottom: 1px solid var(--border); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.shot-bar span { margin: 0 auto; padding: 1px 12px; border-radius: 6px; background: var(--surface); color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 140px); }
.shot-bar::after { content: ""; width: 45px; flex: none; }
.shot-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot-zoom {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border);
  color: var(--text); font-size: 12.5px; font-weight: 500; opacity: 0; translate: 0 6px;
  transition: opacity var(--dur-fade) var(--curve-out), translate var(--dur-spring-snappy) var(--spring-snappy);
}
.shot-zoom svg { width: 14px; height: 14px; }
.shot-link:hover .shot-frame, .shot-link:focus-visible .shot-frame { border-color: var(--border-strong); translate: 0 calc(var(--motion-card-lift) * -1); }
.shot-link:hover .shot-zoom, .shot-link:focus-visible .shot-zoom { opacity: 1; translate: 0 0; }
.shot figcaption { margin-top: 16px; padding: 0 2px; }
.shot figcaption strong { display: block; font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.shot figcaption span { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.shots-note { margin-top: 36px; text-align: center; }

/* Lightbox (home.js; links open the image directly without JS) */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--text);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] .lb-inner { animation: dv-fade-in var(--dur-fade) var(--curve-out) backwards, dv-pop var(--dur-spring-bouncy) var(--spring-bouncy) backwards; --dv-pop-from: var(--motion-pop-dialog); }
.lb-inner { position: relative; display: grid; gap: 14px; width: min(1440px, calc(100vw - 120px)); max-height: calc(100vh - 48px); padding: 24px 0; }
.lb-inner img { width: 100%; height: auto; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.lb-cap { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: center; text-align: center; font-size: 14.5px; color: var(--text); }
.lb-cap strong { font-weight: 600; }
.lb-cap .lb-text { color: var(--text); opacity: 0.85; }
.lb-btn {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: background-color var(--dur-fade) var(--curve-out);
}
.lb-btn:hover { background: var(--brand-subtle); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { font-size: 12px; font-feature-settings: "tnum"; }

/* ---------- Deployment & architecture ---------- */
.arch { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.25fr) 64px minmax(0, 1fr); align-items: stretch; }
.arch-col, .arch-core { padding: 22px 22px 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--elev-sm); }
.arch-core { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: 0 0 0 4px var(--brand-subtle), var(--elev-md); }
.arch-h { margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.arch-h small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.arch-list { display: grid; gap: 10px; }
.arch-list li { padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--canvas); }
.arch-list b { display: block; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; }
.arch-list span { display: block; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.arch-out .arch-list li { border-style: dashed; border-color: var(--border); }
.arch-layers { display: grid; gap: 10px; }
.arch-layer { position: relative; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--canvas); }
.arch-layer b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.arch-layer b em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-muted); font-weight: 400; }
.arch-layer span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.arch-layer.is-core { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); background: var(--brand-subtle); }
.arch-layer.is-core b { color: var(--text-brand); font-family: var(--font-mono); font-weight: 500; }
.arch-layer .arch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.arch-layer .arch-chips span { display: inline-block; margin: 0; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 11.5px; line-height: 1.6; box-shadow: inset 0 0 0 1px var(--border); }
.arch-link { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 46px; padding: 0 6px; }
.arch-link i { position: relative; display: block; height: 1.5px; border-radius: 2px; background: var(--border); }
.arch-link i::after {
  content: ""; position: absolute; top: -3px; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle);
  animation: arch-dot 2.4s var(--curve-in-out) 3;
}
.arch-link i:nth-child(2)::after { animation-delay: -0.8s; }
.arch-link i:nth-child(3)::after { animation-delay: -1.6s; }
.arch-link.out i { background: repeating-linear-gradient(90deg, var(--border-strong) 0 4px, transparent 4px 8px); }
.arch-link.out i::after { background: var(--info); box-shadow: 0 0 0 3px var(--info-subtle); animation-duration: 3.2s; }
@keyframes arch-dot { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 7px); opacity: 0; } }
.arch, .arch * { animation-play-state: paused; }
.arch.is-live, .arch.is-live * { animation-play-state: running; }

.deploy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.panel { padding: 28px 28px 30px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--elev-sm); }
.panel h3 { font-size: 20px; margin-bottom: 8px; }
.panel > p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.panel .eyebrow { margin-bottom: 10px; }
.eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-brand); }

/* Retention: bars on a log time axis (35 days to 12 months) */
.ret { display: grid; gap: 14px; margin-top: 22px; }
.ret-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: center; gap: 14px; }
.ret-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.25; }
.ret-name small { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.ret-track { position: relative; height: 30px; border-radius: 8px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ret-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 8px;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 10px;
  font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; font-feature-settings: "tnum";
  background: var(--c);
  transform-origin: 0 50%; transition: scale 1.1s var(--spring-gentle) var(--d, 0ms);
}
.js .ret:not(.is-in) .ret-bar { scale: 0.03 1; }
.ret-axis { position: relative; height: 16px; margin: 2px 0 0 132px; font-size: 11.5px; color: var(--text-muted); }
.ret-axis > span { position: absolute; top: 0; left: var(--x); transform: translateX(-50%); white-space: nowrap; }
.ret-axis > span:first-child { transform: none; }
.ret-axis > span:last-child { transform: translateX(-100%); }
.ret-note { margin-top: 18px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.checks { display: grid; gap: 14px; margin-top: 18px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.checks li svg { width: 18px; height: 18px; margin-top: 2px; color: var(--success); }
.checks li b { color: var(--text); font-weight: 600; }
.checks code { font-size: 0.9em; color: var(--text-brand); }

.sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.sec-grid .panel h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.sec-grid .panel h3 svg { width: 20px; height: 20px; color: var(--text-brand); flex: none; }

/* Integrations: two slow rows of chips */
.integrations { margin-top: 80px; }
.integrations-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.integrations-head h3 { font-size: 22px; text-wrap: balance; }
.integrations-head p { color: var(--text-muted); font-size: 14.5px; }
.marquee { position: relative; display: grid; gap: 12px; 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-row { display: flex; width: max-content; gap: 12px; animation: marquee 60s linear infinite; }
.marquee-row.rev { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .marquee-row, .integrations:focus-within .marquee-row, .marquee.is-paused .marquee-row { animation-play-state: paused; }
.marquee-toggle { display: none; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: color var(--dur-fade) var(--curve-out), border-color var(--dur-fade) var(--curve-out); }
.js .marquee-toggle { display: inline-flex; }
.marquee-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.marquee-toggle svg { width: 14px; height: 14px; flex: none; }
.marquee-toggle .i-play, .marquee-toggle[aria-pressed="true"] .i-pause { display: none; }
.marquee-toggle[aria-pressed="true"] .i-play { display: block; }
.marquee-row ul { display: flex; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip small { color: var(--text-muted); font-size: 12.5px; font-weight: 400; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--chip-dot); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 6px)); } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color var(--dur-fade) var(--curve-out); }
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 24px; cursor: pointer; list-style: none; border-radius: 16px;
  font-size: 16.5px; font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background:
    linear-gradient(var(--text-brand), var(--text-brand)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--text-brand), var(--text-brand)) center / 1.5px 10px no-repeat,
    var(--brand-subtle);
  transition: rotate var(--dur-spring-snappy) var(--spring-snappy);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq .faq-body { padding: 0 24px 22px; color: var(--text-muted); font-size: 15px; line-height: 1.65; }
.faq .faq-body p + p { margin-top: 10px; }
.faq code { font-size: 0.9em; color: var(--text-brand); }
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size var(--dur-spring-gentle) var(--spring-gentle), content-visibility var(--dur-spring-gentle) allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* ---------- CTA band: Ink in both themes, with the reversed lockup ---------- */
.cta-band {
  overflow: hidden; text-align: center; padding: 120px 0 128px; isolation: isolate;
  background: var(--ink-ground); color: var(--ink-text); color-scheme: dark;
}
.cta-band .screenfield {
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 45%, transparent 20%, #000 75%);
  mask-image: radial-gradient(ellipse 62% 70% at 50% 45%, transparent 20%, #000 75%);
}
.cta-band::before { content: ""; position: absolute; z-index: -1; right: -10%; bottom: -30%; width: 70%; height: 90%; background: radial-gradient(closest-side, #2c2551, transparent); pointer-events: none; }
.stinger { width: min(360px, 76vw); height: auto; aspect-ratio: 440.246 / 95.333; margin: 0 auto 36px; overflow: visible; }
.stinger .st-back path { fill: #b6a0f5; }
.stinger .st-front path, .stinger .st-glyphs path, .stinger .st-dots path { fill: #ffffff; }
.cta-band h2 { font-size: clamp(32px, 4.4vw, 52px); max-width: 760px; margin: 0 auto 18px; text-wrap: balance; color: var(--ink-text); }
.cta-band p { max-width: 600px; margin: 0 auto 36px; color: var(--ink-muted); font-size: 18px; text-wrap: pretty; }
.cta-band .btn-primary { background: #7755e8; color: #fff; box-shadow: none; }
.cta-band .btn-primary:hover { background: #6a48dd; }
.cta-band .btn-secondary { background: transparent; border-color: #7a7891; color: var(--ink-text); }
.cta-band .btn-secondary:hover { background: #2c2551; }
.cta-band .btn-ghost { color: var(--ink-muted); }
.cta-band .btn-ghost:hover { color: var(--ink-text); background: #2c2551; }
.cta-band :focus-visible { outline-color: #a68ff7; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--line-soft); background: var(--surface-sunken); }
.footer-grid { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 48px; }
.footer-brand .footer-logo { display: block; margin-bottom: 16px; }
.footer-brand .footer-logo img { width: 160px; height: 35px; }
.footer-brand p { max-width: 320px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.by-kazlabs { display: inline-flex; align-items: center; margin-top: 12px; padding: 10px 0; }
.by-kazlabs img { width: 103px; height: 20px; opacity: 0.85; transition: opacity var(--dur-fade) var(--curve-out); }
.by-kazlabs:hover img { opacity: 1; }
.footer-col h2 { margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.footer-col a { display: block; width: fit-content; padding: 5px 0; color: var(--text-muted); font-size: 14.5px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  color: var(--text-muted); font-size: 13px;
}
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Docs ---------- */
.docs-main { padding: 56px 0 96px; }
.docs-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 64px; align-items: start; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.docs-nav-label { margin: 22px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.docs-nav-label:first-child { margin-top: 0; }
.docs-nav a {
  display: block; padding: 5px 0 5px 14px; margin-left: 1px; border-left: 2px solid var(--border);
  color: var(--text-muted); font-size: 14px; line-height: 1.4; text-decoration: none;
  transition: color var(--dur-fade) var(--curve-out), border-color var(--dur-fade) var(--curve-out);
}
.docs-nav a:hover { color: var(--text); }
.docs-nav a.is-active { color: var(--text); border-left-color: var(--brand); }
.docs-toc-mobile { display: none; }
.docs-content { min-width: 0; max-width: 820px; }
.docs-title { font-size: clamp(34px, 4vw, 46px); margin-bottom: 14px; }
.docs-lede { color: var(--text-muted); font-size: 18px; line-height: 1.6; max-width: 66ch; margin-bottom: 18px; }
.docs-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.docs-meta span { padding: 3px 11px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; color: var(--text-muted); background: var(--surface); }
.doc-section { padding: 40px 0 0; margin-top: 40px; border-top: 1px solid var(--line-soft); scroll-margin-top: calc(var(--header-h) + 12px); }
.doc-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.doc-section .kicker { margin-bottom: 10px; font-size: 11.5px; }
.doc-section h2 { font-size: 28px; margin-bottom: 16px; }
.doc-section h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.doc-section p, .doc-section li, .doc-section dd { color: var(--text-muted); font-size: 15.5px; line-height: 1.7; }
.doc-section p + p { margin-top: 12px; }
.doc-section ul, .doc-section ol { margin: 12px 0; padding-left: 4px; display: grid; gap: 6px; }
.doc-section ul > li { position: relative; padding-left: 20px; }
.doc-section ul > li::before { content: ""; position: absolute; left: 3px; top: 0.7em; width: 6px; height: 6px; border-radius: 2px; background: var(--brand); opacity: 0.7; }
.doc-section ol { counter-reset: n; }
.doc-section ol > li { position: relative; padding-left: 30px; counter-increment: n; }
.doc-section ol > li::before { content: counter(n); position: absolute; left: 0; top: 0.2em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-subtle); color: var(--text-brand); font-size: 11px; font-weight: 600; }
.doc-section strong { color: var(--text); }
.doc-section :not(pre) > code {
  padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  color: var(--text-brand); font-size: 0.86em; overflow-wrap: anywhere;
}
.code-block { position: relative; margin: 16px 0; }
.doc-section pre {
  margin: 16px 0; padding: 16px 18px; overflow-x: auto;
  border: 1px solid var(--border); border-radius: 12px; background: var(--ink-ground);
  color: #f6f5f2; font-size: 13.5px; line-height: 1.7; tab-size: 2; color-scheme: dark;
}
.code-block pre { margin: 0; padding-right: 84px; }
.doc-section pre code { font-size: inherit; }
.doc-section pre .c { color: #a9a7b8; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid #32323f; background: #252532; color: #e8e2ff;
  font-size: 12.5px; font-weight: 500;
  transition: background-color var(--dur-fade) var(--curve-out), color var(--dur-fade) var(--curve-out);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: #2c2551; color: #fff; }
.copy-btn.copied { color: #4cc38a; border-color: #4cc38a66; }
@media (max-width: 860px) {
  .code-block pre { padding-top: 54px; padding-right: 18px; }
  .copy-btn { top: 8px; right: 8px; height: 40px; padding: 0 12px; }
}
.table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.doc-section table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-feature-settings: "tnum"; }
.doc-section th, .doc-section td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; color: var(--text-muted); line-height: 1.55; }
.doc-section tr:last-child td { border-bottom: 0; }
.doc-section th { background: var(--surface-sunken); color: var(--text-muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.doc-section td:first-child { color: var(--text); }
.note {
  margin: 18px 0; padding: 14px 18px; border: 1px solid var(--border); border-left: 3px solid var(--info);
  border-radius: 0 12px 12px 0; background: var(--surface); color: var(--text-muted); font-size: 14.5px; line-height: 1.65;
}
.note strong { color: var(--text); }
.note.status { border-left-color: var(--warning); }
.doc-section dl { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 18px; margin: 14px 0; }
.doc-section dt { color: var(--text); font-size: 14.5px; font-weight: 500; }
.doc-section dd { margin: 0; }
.docs-end { margin-top: 64px; padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; box-shadow: var(--elev-sm); }
.docs-end h2 { font-size: 22px; margin-bottom: 4px; }
.docs-end p { color: var(--text-muted); font-size: 15px; }

/* ---------- 404 ---------- */
.err { min-height: calc(100vh - var(--header-h) - 160px); display: grid; place-items: center; padding: 96px 0; overflow: hidden; isolation: isolate; text-align: center; }
.err-screen { width: min(360px, 80vw); margin: 0 auto 34px; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--ink-ground); display: grid; place-items: center; box-shadow: var(--elev-lg); border: 8px solid #252532; }
.err-screen svg { width: 30%; height: auto; }
.err h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 18px; }
.err p.lede { max-width: 560px; margin: 0 auto 34px; color: var(--text-muted); font-size: 18px; }
.err code { padding: 1px 6px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-size: 0.86em; overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .how-row, .how-row.flip { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .how-row.flip .how-copy { order: 0; }
  .how-copy { max-width: 720px; }
  .how-rows { gap: 96px; }
  .sec-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .arch { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .arch-link { flex-direction: row; justify-content: center; gap: 54px; height: 54px; padding: 0; }
  .arch-link i { width: 1.5px; height: 100%; background: var(--border); }
  .arch-link.out i { background: repeating-linear-gradient(180deg, var(--border-strong) 0 4px, transparent 4px 8px); }
  .arch-link i::after { left: -3px; top: 0; animation-name: arch-dot-v; }
  @keyframes arch-dot-v { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 7px); opacity: 0; } }
  .arch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-row, .metrics-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust-item:nth-child(n + 3), .metric:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .metric:nth-child(3) { border-left: 0; }
  .deploy-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-nav { display: none; }
  .docs-toc-mobile { display: block; margin-bottom: 36px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
  .docs-toc-mobile summary { padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .docs-toc-mobile summary::-webkit-details-marker { display: none; }
  .docs-toc-mobile summary::after { content: "+"; color: var(--text-brand); font-size: 20px; line-height: 1; }
  .docs-toc-mobile[open] summary::after { content: "\2212"; }
  .docs-toc-mobile .toc-list { padding: 0 18px 16px; columns: 2; column-gap: 20px; }
  .docs-toc-mobile .toc-list a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-muted); break-inside: avoid; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 12px 20px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--elev-lg);
  }
  .nav-links.open > a { padding: 12px 8px; font-size: 16px; }
  .nav-links.open > a.cta { margin: 10px 0 0; text-align: center; padding: 12px 18px; }
}
@media (max-width: 760px) {
  section { padding: 76px 0; }
  .container { padding: 0 20px; }
  .hero { padding: 56px 0 56px; }
  .hero-pill { margin-bottom: 24px; min-height: 40px; font-size: 13px; }
  .text-link { padding: 10px 0; margin: -10px 0; }
  .footer-col a { min-width: 40px; padding: 10px 0; }
  .footer-bottom nav { gap: 8px; margin-left: -6px; }
  .footer-bottom nav a { padding: 10px 6px; }
  .hero h1 { font-size: clamp(42px, 12vw, 60px); margin-bottom: 20px; }
  .hero .lede { margin-bottom: 30px; }
  .hero-actions .btn { flex: 1 1 200px; }
  .hero-demo { margin-top: 44px; padding: 0; }
  .section-head { margin-bottom: 44px; }
  .section-head p { font-size: 16.5px; }
  .how-rows { gap: 80px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-lg { grid-column: auto; }
  .shots { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .shot.wide { grid-column: auto; }
  .shot-zoom { opacity: 1; translate: 0 0; right: 10px; bottom: 10px; padding: 4px 10px; font-size: 12px; }
  .metric { padding: 36px 16px 32px; }
  .metric:nth-child(odd) { padding-left: 0; }
  .metric-label { font-size: 13.5px; }
  .trust-item { padding: 22px 14px; }
  .trust-item:nth-child(odd) { padding-left: 0; }
  .panel { padding: 22px 20px 24px; }
  .ret-row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .ret-axis { margin-left: 106px; }
  .arch-list { grid-template-columns: minmax(0, 1fr); }
  .faq summary { padding: 18px 18px; font-size: 15.5px; }
  .faq .faq-body { padding: 0 18px 20px; }
  .cta-band { padding: 84px 0 92px; }
  .cta-band p { font-size: 16.5px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .lb-inner { width: calc(100vw - 24px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .doc-section h2 { font-size: 24px; }
  .doc-section dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .doc-section dd { margin-bottom: 10px; }
  .doc-section th, .doc-section td { padding: 9px 10px; font-size: 13.5px; }
  .docs-toc-mobile .toc-list { columns: 1; }
  .docs-toc-mobile .toc-list a { padding-block: 10px; }
  .docs-toc-mobile summary { min-height: 48px; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .trust-row, .metrics-row { grid-template-columns: minmax(0, 1fr); }
  .trust-item, .trust-item:nth-child(odd) { border-left: 0; padding: 20px 0; }
  .trust-item + .trust-item { border-top: 1px solid var(--line-soft); }
  .metric, .metric:nth-child(odd) { border-left: 0; padding: 30px 0 28px; }
  .metric + .metric { border-top: 1px solid var(--line-soft); }
  .metric-label { max-width: none; }
  .hero-meta { gap: 4px 14px; font-size: 12.5px; }
  .hero-pill .pill-long { display: none; }
  .hero-pill .pill-short { display: inline; }
  .hero-meta li + li::before { display: none; }
  .fx { font-size: 12px; }
  .tile { padding: 14px 14px 20px; }
  .pop { grid-template-columns: minmax(0, 1fr) 118px; gap: 12px; }
}

/* iOS safe areas */
@supports (padding: max(0px)) {
  .site-header .nav, .site-footer .container { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}

/* ---------- Reduced motion: still frames, no loops; each fx rests on its telling frame ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .fx *, .arch-link i::after, .marquee-row, .logo .lk-sym, .logo .lk-back { animation: none !important; }
  .ret-bar { transition: none; }
  .js .ret:not(.is-in) .ret-bar { scale: 1 1; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-row { width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-row ul { flex-wrap: wrap; justify-content: center; }
  .marquee-row ul[aria-hidden="true"] { display: none; }
  .js .marquee-toggle { display: none; }
  .faq details::details-content { transition: none; }
  .tile, .btn, .shot-frame { transition: none; }
  .sov-seg.new, .race-msg, .pop-chip > .k, .rest-pill, .api p, .pair-code span { opacity: 1; scale: 1; translate: none; }
  .sov-foot .fx-swap > span:first-child, .pop-chip > .q, .pop-chip > .d, .ab-b .fx-swap > span:nth-child(1), .ab-b .fx-swap > span:nth-child(2), .ab-b .ab-run { opacity: 0; }
  .sov-foot .fx-swap > span:last-child, .ab-b .fx-swap > span:nth-child(3) { opacity: 1; }
  .pop-h i:last-child { scale: 1 1; }
  .emg-scr::after { translate: 0 0; }
  .rest-now { left: 98%; }
  .spark .sp-line { stroke-dashoffset: 0; }
  .siem svg circle { opacity: 0; }
  .media-frames { scale: 1 1; }
}

/* A screenshot not captured yet (dev/tools/partials.py; deploy.sh refuses while any is pending) */
.shot-pending .shot-wait {
  display: grid; place-content: center; gap: 6px; aspect-ratio: 16 / 10; text-align: center; padding: 24px;
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--line-soft) 14px 16px), var(--canvas);
  color: var(--text-muted); font-size: 14px;
}
.shot-pending .shot-wait b { color: var(--text); font-size: 18px; }
