/* Apis — warm editorial system (DESIGN.md: Claude-inspired)
   Cream canvas, serif display, coral CTAs, dark product surfaces. */

:root {
  color-scheme: light;
  --primary: #cc785c;
  --primary-active: #a9583e;
  --ink: #141413;
  --body: #3d3d3a;
  --body-strong: #252523;
  --muted: #6c6a64;
  --muted-soft: #8e8b82;
  --hairline: #e6dfd8;
  --hairline-soft: #ebe6df;
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-cream-strong: #e8e0d2;
  --surface-dark: #181715;
  --surface-dark-elevated: #252320;
  --surface-dark-soft: #1f1e1b;
  --on-dark: #faf9f5;
  --on-dark-soft: #a09d96;
  --teal: #5db8a6;
  --amber: #e8a55a;
  --success: #5db872;
  --brand: #ff7a17;
  --accent: var(--primary);

  --serif: "Source Serif 4", "Tiempos Headline", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --radius-sm: var(--r-sm);
  --wrap: min(1200px, calc(100% - 48px));
  --section: 96px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--canvas); color: var(--body); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: #f0d5c8; color: var(--ink); }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--ink); color: var(--on-dark); padding: 10px 16px; border-radius: var(--r-md); }
.skip-link:focus { top: 12px; }
.container { width: var(--wrap); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2, .display { font-family: var(--serif); font-weight: 400; color: var(--ink); }
h1 { font-size: 64px; line-height: 1.05; letter-spacing: -1.5px; }
h2 { font-size: 48px; line-height: 1.1; letter-spacing: -1px; max-width: 18ch; }
.display { font-size: 56px; line-height: 1.08; letter-spacing: -1.2px; max-width: 20ch; }
h3 { font: 500 18px/1.4 var(--sans); color: var(--ink); }
.lead { font-size: 20px; line-height: 1.5; color: var(--body); max-width: 34ch; }
.section-intro { font-size: 18px; line-height: 1.55; color: var(--body); max-width: 60ch; margin-top: 20px; }
.muted { color: var(--muted); }
h1 em, h2 em { font-style: italic; color: var(--primary); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1.4 var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); position: relative; }
.card-index { font: 400 13px var(--mono); color: var(--primary); margin-bottom: 28px; }

/* ---------- Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 249, 245, 0.88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--hairline-soft); }
.nav { width: var(--wrap); margin-inline: auto; height: 64px; display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; margin-left: 16px; }
.nav-links a { font: 500 14px var(--sans); color: var(--body); transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-menu-toggle { display: none; height: 36px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.nav-menu-panel { display: none; }
.nav-menu-panel[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: var(--r-md); font: 500 14px/1 var(--sans); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s; white-space: nowrap; box-shadow: none; }
.pill-sm { height: 36px; padding: 0 16px; }
.pill-solid { background: var(--primary); color: #fff; }
.pill-solid:hover { background: var(--primary-active); color: #fff; }
.pill-ghost { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.pill-ghost:hover { background: var(--surface-soft); border-color: var(--surface-cream-strong); color: var(--ink); }
.pill-dark { background: var(--ink); color: var(--on-dark); }
.pill-dark:hover { background: var(--body-strong); color: var(--on-dark); }
.pill:active { transform: translateY(1px); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.text-link { color: var(--primary); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; border-bottom: 1px solid transparent; transition: border-color .15s, color .15s; }
.text-link:hover { color: var(--primary-active); border-color: currentColor; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--hairline-soft); }
.section-soft { background: var(--surface-soft); }
.section-dark { background: var(--surface-dark); color: var(--on-dark-soft); border-top: 0; }
.section-dark h2, .section-dark h3 { color: var(--on-dark); }
.section-dark .eyebrow { color: var(--on-dark-soft); }
.section-dark .section-intro, .section-dark .lead { color: var(--on-dark-soft); }
.section-dark .muted { color: #7d7a73; }

.hero { position: relative; padding: 88px 0 var(--section); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.hero-copy .lead { margin-top: 24px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 36px; font-size: 13px; color: var(--muted); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

/* ---------- Cards ---------- */
.card { background: var(--surface-card); border-radius: var(--r-lg); padding: 32px; border: 0; color: var(--body); box-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.grid .card { min-height: 240px; display: flex; flex-direction: column; transition: background .2s; }
.grid .card:hover { background: var(--surface-cream-strong); }
.grid h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -0.3px; line-height: 1.2; margin-bottom: 12px; }
.grid p:not(.card-index) { font-size: 15px; color: var(--body); }

/* ---------- Product mockups (dark) ---------- */
.mock, .product-preview { position: relative; background: var(--surface-dark); color: var(--on-dark); border-radius: var(--r-lg); padding: 0; overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 30px 60px -30px rgba(20, 20, 19, 0.45); }
.mock-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-dark-soft); border-bottom: 1px solid #2c2a26; }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3732; }
.mock-dots i:first-child { background: var(--primary); }
.mock-title { font: 400 12px var(--mono); color: var(--on-dark-soft); }
.mock-body { padding: 24px; display: grid; gap: 16px; }
.mock-q { font: 400 22px/1.3 var(--serif); color: var(--on-dark); letter-spacing: -0.3px; }
.mock-a { font-size: 14px; color: var(--on-dark-soft); }
.terminal-container { background: transparent; border: 0; padding: 0; max-width: none; width: 100%; font-family: var(--sans); }
.crew-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 400 11px var(--mono); color: var(--teal); text-transform: uppercase; letter-spacing: 1px; }
.crew-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
.mock-crew { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mock-crew > div { width: auto; }
.crew-step { background: var(--surface-dark-elevated); border-radius: var(--r-md); padding: 12px; display: grid; gap: 2px; }
.crew-index { font: 400 11px var(--mono); color: var(--primary); }
.crew-step strong { font-weight: 500; font-size: 14px; color: var(--on-dark); }
.crew-step small { font-size: 12px; color: var(--on-dark-soft); }
.animated-sources, .mock-sources { display: grid; gap: 6px; }
.source-row { display: flex; gap: 12px; align-items: center; font-size: 13px; color: #d6d3cc; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface-dark-soft); border: 1px solid #2c2a26; }
.source-row span { font: 400 11px var(--mono); color: var(--on-dark-soft); }
.mock-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface-dark-elevated); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 9999px; font: 500 12px var(--sans); background: rgba(232, 165, 90, .16); color: var(--amber); border: 0; }
.approval-status[data-status="allowed"] { background: rgba(93, 184, 114, .16); color: var(--success); }
.approval-status[data-status="denied"] { background: rgba(198, 69, 69, .18); color: #e07a7a; }
.mock-action { font-size: 14px; color: var(--on-dark); }
.approval-controls { margin-left: auto; display: flex; gap: 6px; }
.approval-choice { height: 32px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid #3a3732; background: transparent; color: var(--on-dark); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
.approval-choice:hover { border-color: #57534b; }
.approval-choice[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Hero product switcher ---------- */
.showcase-tabs { display: grid; gap: 16px; }
.showcase-tabs-list { display: inline-flex; justify-self: start; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--surface-card); }
.showcase-tab { height: 32px; padding: 0 18px; border-radius: 9999px; border: 0; background: transparent; color: var(--body); font: 500 14px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.showcase-tab[data-state="active"] { background: var(--canvas); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,19,.08); }
.showcase-panel { outline: none; }
.showcase-panel[data-state="inactive"] { display: none; }

/* ---------- Hive modes ---------- */
.mode-tabs { margin-top: 48px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--surface-card); margin-bottom: 16px; }
.tab { height: 36px; padding: 0 20px; border-radius: 9999px; border: 0; background: transparent; color: var(--body); font: 500 14px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--on-dark); }
.stage { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; background: var(--surface-dark); color: var(--on-dark-soft); padding: 48px; border-radius: var(--r-lg); }
.stage[data-state="inactive"] { display: none; }
.stage-kicker { font: 400 12px var(--mono); color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.stage-text h3 { font: 400 36px/1.15 var(--serif); letter-spacing: -0.5px; color: var(--on-dark); margin-bottom: 16px; }
.stage-text p:last-child { font-size: 16px; max-width: 46ch; }
.steps { display: grid; gap: 8px; align-content: center; counter-reset: step; }
.steps li { counter-increment: step; display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-dark-elevated); color: var(--on-dark); font-size: 15px; transition: background .15s, transform .15s; }
.steps li::before { content: "0" counter(step); font: 400 12px var(--mono); color: var(--primary); }
.steps li:hover { background: #2e2b27; transform: translateX(4px); }

/* ---------- Mori section ---------- */
.mori-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; }
.mori-points { display: grid; gap: 20px; margin-top: 32px; }
.mori-points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.mori-points li::before { content: "✳"; color: var(--primary); font-size: 18px; line-height: 1.4; }
.mori-points b { display: block; color: var(--on-dark); font-weight: 500; }

/* ---------- Mori demo (ported from Mori site) ---------- */
.m-demo { margin: 0; position: relative; container-type: inline-size; }
.m-demo-stage { position: relative; aspect-ratio: 720 / 450; border-radius: var(--r-lg); overflow: hidden; border: 1px solid #2c2a26; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55); transition: opacity 0.5s; }
.m-demo.is-fading .m-demo-stage, .m-demo.is-fading .m-demo-note { opacity: 0; }
.m-demo-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dw-bar { font: 500 10px var(--mono); fill: #6c6a64; text-anchor: middle; }
.dw-h { font: 400 18px var(--serif); fill: #141413; letter-spacing: -0.01em; }
.dw-sub { font: 400 10.5px var(--sans); fill: #6c6a64; }
.dw-row > rect:first-child { fill: #ffffff; stroke: #e6dfd8; }
.dw-icon { fill: #e8e0d2; }
.dw-label { font: 600 12.5px var(--sans); fill: #252523; }
.dw-hint { font: 400 9.5px var(--sans); fill: #8e8b82; }
.dw-on { fill: #5db8a6; }
.dw-off { fill: #d6cfc3; }
.dw-pill { font: 600 8.5px var(--sans); fill: #6c6a64; text-anchor: middle; }
.dm-select { opacity: 0; transition: opacity 0.2s; }
.dm-select > rect:not(.dm-select-box) { fill: #cc785c; opacity: 0; transition: opacity 0.2s 0.6s; }
.dm-select-box { fill: rgba(204, 120, 92, 0.07); stroke: #cc785c; stroke-width: 2; stroke-dasharray: 7 5; transform-box: fill-box; transform-origin: top left; transform: scale(0.02, 0.04); transition: transform 0.75s cubic-bezier(0.3, 0.7, 0.2, 1); }
.is-select .dm-select { opacity: 1; }
.is-select .dm-select-box { transform: scale(1); }
.is-select .dm-select > rect:not(.dm-select-box) { opacity: 1; }
.dm-mark { opacity: 0; transition: opacity 0.2s; }
.dm-stroke, .dm-stroke-under, .dm-leader { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.6s cubic-bezier(0.6, 0, 0.3, 1); }
.dm-stroke { stroke: #e8743f; stroke-width: 3.2; filter: drop-shadow(0 0 5px rgba(232, 116, 63, 0.55)); }
.dm-stroke-under { stroke: rgba(20, 20, 19, 0.18); stroke-width: 7.5; }
.dm-leader { stroke: #e8743f; stroke-width: 2; transition-delay: 0.45s; }
.dm-dot { fill: #e8743f; opacity: 0; transition: opacity 0.2s 0.45s; }
.dm-label { opacity: 0; transform-box: fill-box; transform-origin: left center; transform: scale(0.7); transition: opacity 0.2s 0.6s, transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1) 0.6s; }
.dm-label rect { fill: #e8743f; }
.dm-label text { font: 700 12px var(--sans); fill: #ffffff; text-anchor: middle; }
.is-mark-1 .dm-mark-1, .is-mark-2 .dm-mark-2 { opacity: 1; }
.is-mark-1 .dm-mark-1 :is(.dm-stroke, .dm-stroke-under, .dm-leader), .is-mark-2 .dm-mark-2 :is(.dm-stroke, .dm-stroke-under, .dm-leader) { stroke-dashoffset: 0; }
.is-mark-1 .dm-mark-1 :is(.dm-dot, .dm-label), .is-mark-2 .dm-mark-2 :is(.dm-dot, .dm-label) { opacity: 1; transform: none; }
.is-mark-1 .dm-mark-1 .dm-stroke, .is-mark-2 .dm-mark-2 .dm-stroke { animation: markBreathe 2.6s ease-in-out 0.7s infinite; }
@keyframes markBreathe { 50% { filter: drop-shadow(0 0 1px rgba(232, 116, 63, 0.25)); } }
.m-demo-keys, .m-demo-stay, .m-demo-ask { position: absolute; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.m-demo-keys { top: 9%; right: 4%; display: flex; align-items: center; gap: 1.1cqw; font-size: 1.9cqw; color: var(--on-dark-soft); }
.m-demo-keys kbd { font: 500 1.7cqw var(--mono); color: var(--on-dark); background: var(--surface-dark-elevated); border: 1px solid #3a3732; border-bottom-width: 2px; border-radius: 0.8cqw; padding: 0.5cqw 1cqw; }
.m-demo-keys b { font-weight: 500; }
.is-keys .m-demo-keys { opacity: 1; transform: none; }
.is-ask .m-demo-keys { opacity: 0; }
.m-demo-stay { top: 3%; left: 5.6%; font: 500 1.65cqw var(--mono); color: #fff; background: var(--primary); padding: 0.5cqw 1.2cqw; border-radius: 99px; }
.is-stay .m-demo-stay { opacity: 1; transform: none; }
.m-demo-pet { position: absolute; left: 1.4%; bottom: 1.2%; width: 12.5%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.m-demo-ask { left: 15%; bottom: 5%; max-width: 47%; margin: 0; padding: 1.2cqw 1.8cqw; border-radius: 1.6cqw 1.6cqw 1.6cqw 0.3cqw; background: var(--canvas); color: var(--ink); font-size: 1.85cqw; line-height: 1.35; font-weight: 500; }
.m-demo-ask span { display: block; font: 500 1.35cqw var(--mono); color: var(--muted); margin-bottom: 0.2cqw; }
.is-ask .m-demo-ask { opacity: 1; transform: none; }
.m-demo-note { position: absolute; z-index: 2; top: 33cqw; right: 1.6cqw; width: 26.8cqw; padding: 1.6cqw 1.8cqw; border-radius: 1.4cqw; background: rgba(24, 23, 21, 0.96); border: 1px solid #3a3732; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8); opacity: 0; transform: translateY(1cqw); transition: opacity 0.35s, transform 0.35s; }
.is-reply .m-demo-note { opacity: 1; transform: none; }
.m-demo-note p { margin: 0; }
.m-demo-note-q { display: none; }
.m-demo-note-head { display: flex; align-items: center; gap: 0.8cqw; font: 500 1.3cqw var(--mono); letter-spacing: .1em; color: var(--amber); margin-bottom: 0.8cqw !important; }
.m-demo-note-head img { width: 2.4cqw; height: 2.4cqw; image-rendering: pixelated; }
.m-demo-note-head i { font: italic 400 1.35cqw var(--sans); letter-spacing: 0; color: var(--on-dark-soft); margin-left: auto; }
.m-demo-note-text { font-size: 1.62cqw; line-height: 1.5; color: var(--on-dark); min-height: 12cqw; }
.m-demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font: 400 12px var(--mono); color: var(--muted); }
.section-dark .m-demo-bar { color: var(--on-dark-soft); }
.m-demo-bar i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-right: 8px; box-shadow: 0 0 0 3px rgba(93, 184, 166, 0.2); }
.m-demo-controls { display: flex; gap: 8px; }
.m-demo-controls button { cursor: pointer; height: 30px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink); font: 500 12px var(--sans); transition: border-color .15s, color .15s; }
.m-demo-controls button:hover { border-color: var(--primary); color: var(--primary); }
.section-dark .m-demo-controls button { background: var(--surface-dark-elevated); border-color: #3a3732; color: var(--on-dark); }
.is-static .m-demo-stage *, .is-static .m-demo-note { transition: none !important; animation: none !important; }
@container (max-width: 560px) {
  .m-demo-ask { display: none; }
  .m-demo-note { position: static; width: auto; margin-top: 12px; padding: 14px 16px; border-radius: var(--r-lg); opacity: 1; transform: none; }
  .m-demo-note-q { display: block; font-size: 13.5px; color: var(--on-dark); margin-bottom: 10px !important; }
  .m-demo-note-q span { font: 500 11px var(--mono); color: var(--on-dark-soft); margin-right: 8px; }
  .m-demo-note-head { font-size: 10px; gap: 6px; }
  .m-demo-note-head img { width: 16px; height: 16px; }
  .m-demo-note-head i { font-size: 11px; }
  .m-demo-note-text { font-size: 14.5px; min-height: 66px; }
  .m-demo-keys { font-size: 3cqw; }
  .m-demo-keys kbd { font-size: 2.6cqw; }
  .m-demo-stay { font-size: 2.6cqw; }
}

/* ---------- Principles ---------- */
.principles { display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.principles li { padding: 28px 0; border-bottom: 1px solid var(--hairline); display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.principles h3 { font: 400 22px/1.25 var(--serif); letter-spacing: -0.2px; }
.principles p { font-size: 15px; color: var(--body); }

/* ---------- Company ---------- */
.company-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 48px; align-items: start; }
.company-grid .lead { font-family: var(--serif); font-size: 28px; line-height: 1.3; color: var(--ink); letter-spacing: -0.3px; max-width: 24ch; }
.company-grid p:not(.lead) { font-size: 17px; margin-bottom: 24px; }

/* ---------- Callout band (coral) ---------- */
.callout { background: var(--primary); color: #fff; border-radius: var(--r-xl); padding: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.callout h2 { color: #fff; font-size: 40px; max-width: 20ch; }
.callout p { color: rgba(255,255,255,.85); margin-top: 12px; max-width: 48ch; }
.callout .pill-ghost { background: #fff; border-color: #fff; }
.callout .pill-ghost:hover { background: var(--canvas); }

/* ---------- Channels ---------- */
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.channel { position: relative; display: grid; gap: 6px; padding: 28px; background: var(--canvas); border: 1px solid var(--hairline); transition: border-color .2s, background .2s; }
.channel:hover { border-color: var(--primary); background: #fff; }
.channel > span:first-child { font: 500 12px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.channel strong { font: 400 24px/1.2 var(--serif); color: var(--ink); letter-spacing: -0.3px; }
.channel small { font-size: 14px; color: var(--muted); }
.channel .arrow { position: absolute; top: 26px; right: 28px; color: var(--primary); transition: transform .2s; }
.channel:hover .arrow { transform: translateX(4px); }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--hairline-soft); background: var(--surface-soft); padding: 18px 0; }
.ticker-track { display: flex; gap: 32px; width: max-content; animation: ticker 38s linear infinite; font: 400 22px var(--serif); color: var(--body-strong); white-space: nowrap; }
.ticker-track i { font-style: normal; color: var(--primary); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Footer (dark) ---------- */
.site-footer { background: var(--surface-dark); color: var(--on-dark-soft); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; }
.footer-statement { font: 400 28px/1.25 var(--serif); color: var(--on-dark); margin-top: 20px; max-width: 22ch; letter-spacing: -0.3px; }
.footer-email { display: inline-block; margin-top: 16px; font-size: 15px; color: var(--on-dark-soft); transition: color .15s; }
.footer-email:hover { color: var(--primary); }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 48px; align-content: start; }
.footer-links a { font-size: 14px; color: var(--on-dark-soft); transition: color .15s; }
.footer-links a:hover { color: var(--on-dark); }
.footer-base { margin-top: 64px; padding-top: 24px; border-top: 1px solid #2c2a26; font-size: 13px; color: #7d7a73; display: flex; justify-content: space-between; gap: 16px; }

/* ---------- Brand logo (Apis kit v1.0) ---------- */
.brand-logo, .footer-logo { display: inline-flex; text-decoration: none; color: var(--ink); }
.site-footer .footer-logo { color: var(--on-dark); }
.apis-logo { display: inline-flex; align-items: center; gap: 0.36em; line-height: 1; }
.apis-logo .apis-symbol { flex: none; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.apis-word { font-family: "Space Grotesk", sans-serif; font-weight: 600; letter-spacing: -0.05em; font-size: 1em; color: currentColor; transition: color .2s; }
.apis-word span { display: inline-block; }
.apis-word .dot { color: var(--brand); }
a:hover > .apis-logo .apis-symbol { transform: rotate(-8deg) scale(1.08); }
a:hover > .apis-logo .apis-word { color: var(--brand); }
a:hover > .apis-logo .apis-word .dot { color: var(--amber); }
.apis-symbol.is-animated .a-hex { stroke-dasharray: 170; stroke-dashoffset: 170; fill-opacity: 0; animation: apisHex 1.6s cubic-bezier(.65,0,.35,1) forwards; }
.apis-symbol.is-animated .a-a { stroke-dasharray: 60; stroke-dashoffset: 60; animation: apisA .7s cubic-bezier(.65,0,.35,1) .9s forwards; }
.apis-symbol.is-animated .a-bar { stroke-dasharray: 14; stroke-dashoffset: 14; animation: apisBar .3s ease 1.45s forwards; }
.apis-logo.is-animated .apis-word span { opacity: 0; transform: translateY(0.25em); animation: apisLetter .6s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: 1.3s; }
.apis-logo.is-animated .apis-word span:nth-child(2) { animation-delay: 1.38s; }
.apis-logo.is-animated .apis-word span:nth-child(3) { animation-delay: 1.46s; }
.apis-logo.is-animated .apis-word span:nth-child(4) { animation-delay: 1.54s; }
.apis-logo.is-animated .apis-word span:nth-child(5) { animation-delay: 1.62s; }
@keyframes apisHex { 70% { stroke-dashoffset: 0; fill-opacity: 0; } 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes apisA { to { stroke-dashoffset: 0; } }
@keyframes apisBar { to { stroke-dashoffset: 0; } }
@keyframes apisLetter { to { opacity: 1; transform: none; } }
.apis-loader { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.apis-loader .apis-symbol { animation: apisPulse 1.6s ease-in-out infinite; }
.apis-loader::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--brand); border-radius: 50%; animation: apisRing 1.6s ease-out infinite; }
@keyframes apisPulse { 50% { transform: scale(.86); } }
@keyframes apisRing { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Docs page ---------- */
.docs { padding: 64px 0 var(--section); }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; }
.docs-side { position: sticky; top: 96px; align-self: start; }
.docs-toc { display: grid; gap: 4px; }
.docs-toc a { padding: 8px 12px; border-radius: var(--r-md); font-size: 14px; color: var(--body); transition: background .15s, color .15s; }
.docs-toc a:hover { background: var(--surface-card); color: var(--ink); }
.docs-section { padding: 48px 0; border-top: 1px solid var(--hairline); max-width: 720px; }
.docs-section:first-child { padding-top: 0; border-top: 0; }
.docs-section .eyebrow { margin-bottom: 12px; }
.docs-section h1 { font-size: 56px; margin-bottom: 20px; }
.docs-section h2 { font-size: 36px; letter-spacing: -0.5px; margin-bottom: 16px; }
.docs-section p { font-size: 17px; line-height: 1.65; margin-bottom: 16px; }
.docs-section p.lead { font-size: 20px; }
.docs-list { display: grid; gap: 12px; margin-top: 20px; }
.docs-list li { background: var(--surface-card); border-radius: var(--r-lg); padding: 20px 24px; }
.docs-list p { margin: 6px 0 0; font-size: 15px; }
.docs-steps { display: grid; gap: 12px; margin-top: 20px; }
.docs-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.docs-steps li > span { font: 400 13px var(--mono); color: var(--primary); padding-top: 3px; }
.docs-steps p { margin: 6px 0 0; font-size: 15px; }
.brand-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .apis-symbol.is-animated path { stroke-dashoffset: 0 !important; fill-opacity: 1 !important; animation: none !important; }
  .apis-logo.is-animated .apis-word span { opacity: 1; transform: none; animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --section: 80px; }
  h1 { font-size: 52px; }
  h2 { font-size: 40px; }
  .display { font-size: 44px; }
  .hero-grid, .split, .company-grid, .stage, .mori-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid, .channels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --section: 64px; --wrap: calc(100% - 32px); }
  .nav { position: relative; gap: 12px; }
  .nav-links { display: none; }
  .nav-actions .pill-ghost { display: none; }
  .nav-menu-toggle { display: inline-flex; align-items: center; }
  .nav-menu-panel { display: grid; position: absolute; top: 64px; left: 0; right: 0; z-index: 40; background: var(--canvas); border-bottom: 1px solid var(--hairline); padding: 8px 16px 16px; }
  .nav-menu-panel a { display: flex; align-items: center; min-height: 44px; font: 500 16px var(--sans); color: var(--ink); border-top: 1px solid var(--hairline-soft); }
  .nav-menu-panel[hidden] { display: none !important; }
  h1 { font-size: 40px; letter-spacing: -1px; }
  h2 { font-size: 32px; letter-spacing: -0.6px; }
  .display { font-size: 34px; }
  .lead { font-size: 18px; }
  .hero { padding-top: 56px; }
  .stage { padding: 28px; }
  .stage-text h3 { font-size: 28px; }
  .grid, .channels { grid-template-columns: 1fr; }
  .principles li { grid-template-columns: 1fr; gap: 8px; }
  .mock-crew { grid-template-columns: 1fr 1fr; }
  .approval-controls { margin-left: 0; }
  .callout { padding: 32px; }
  .callout h2 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-side { position: static; }
  .docs-toc { display: flex; flex-wrap: wrap; }
  .docs-section h1 { font-size: 40px; }
  .docs-section h2 { font-size: 28px; }
}

/* ---------- Partners ---------- */
.partners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.partner { display: grid; gap: 16px; align-content: start; padding: 32px; border-radius: var(--r-lg); background: var(--canvas); border: 1px solid var(--hairline); transition: border-color .2s, background .2s; }
.partner:hover { border-color: var(--primary); background: #fff; }
.partner-logo { display: inline-flex; align-items: center; gap: 12px; }
.partner-logo img { width: 44px; height: 44px; }
.partner-logo b { font: 400 28px/1 var(--serif); color: var(--ink); letter-spacing: -0.4px; }
.partner-copy { font-size: 15px; color: var(--body); max-width: 44ch; }
.partner-link { font-weight: 500; font-size: 14px; color: var(--primary); }
.partner-empty { background: transparent; border: 1px dashed #c9c1b3; }
.partner-empty .partner-logo b { color: var(--muted); }
@media (max-width: 768px) { .partners { grid-template-columns: 1fr; } }
