/* Agency landing site — dark-only, built on the approved brand tokens.
   Ground and surfaces from docs/design/brand/tokens; site-only values below. */
@import url('assets/agency-tokens.css');

:root {
  --bg: #0f0e15;
  --bg-2: #17161f;
  --panel: #1c1b25;
  --line: #2c2939;
  --text: #ece9f5;
  --text-2: #b9b4cc;
  --muted: #8a85a3;
  --violet: #5b4bdb;
  --violet-4: #8a7cf2;
  --violet-3: #a79bff;
  --lav: #2a2647;
  --teal: #1c9c94;
  --amber: #d9962b;
  --green: #2e9e6b;
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: Manrope, 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1240px;
  --ease-out: cubic-bezier(0.2, 0.65, 0.3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--violet-3); }
a:hover { color: var(--text); }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--violet); color: #fff; border-radius: 8px;
}
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: 48px; padding-right: 48px; }
.mono { font-family: var(--mono); }
.eyebrow {
  font-size: 11px; font-weight: 650; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted);
}

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 36px; height: 68px; }
.nav .logo { display: block; height: 32px; color: var(--text); }
.nav .logo svg { height: 32px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a, .nav .login { color: var(--text-2); text-decoration: none; font-size: 14px; }
.nav-links a:hover, .nav .login:hover { color: var(--text); }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 0; color: var(--text); cursor: pointer;
}

/* ---------- buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background 0.18s, border-color 0.18s;
}
.pill.primary { background: var(--violet); color: #fff; }
.pill.primary:hover { background: #6a5be6; color: #fff; transform: translateY(-1px); }
.pill.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.pill.secondary:hover { border-color: var(--muted); color: var(--text); }
.pill.small { padding: 9px 16px; font-size: 13px; }
.pill svg { flex-shrink: 0; }
.pill[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 22px; text-align: center; }
.hero .wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 340px; }
/* The mark assembles behind the headline and takes no vertical space, so the demo starts higher. */
.hero-mark {
  position: absolute; left: 50%; top: -24px; transform: translateX(-50%);
  width: 320px; height: 320px; pointer-events: none; z-index: 0;
  display: grid; place-items: center;
}
.hero .wrap > :not(.hero-mark), .hero-copy > * { position: relative; z-index: 1; }
.hero-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero-mark [data-logo-piece] { transform-box: fill-box; transform-origin: center; will-change: transform, opacity; }
/* Pieces are faint behind the headline; the outline trail stays at full strength. */
.hero-mark path[data-logo-piece]:not(.trail) { fill-opacity: 0.16; }
.hero-mark .trail { stroke: var(--violet-3); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 16 84; }
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(38px, 4.6vw, 60px);
  letter-spacing: -0.025em; line-height: 1.05; white-space: nowrap;
}
.hero .lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--text); opacity: 0.88; max-width: 46ch; }
/* The button waits below the mark: it is pushed to the bottom of the hero's minimum height. */
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; padding-top: 22px; }
.hero .lede { margin-top: 4px; }
/* Primary call to action: soft breathing glow plus a light sweep every few seconds, only while on screen. */
.pill.shine { position: relative; overflow: hidden; box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 0%, transparent), 0 10px 30px -10px color-mix(in srgb, var(--violet) 70%, transparent); }
.pill.shine .sheen { position: absolute; top: -20%; bottom: -20%; left: -40%; width: 34%; background: linear-gradient(105deg, transparent, #ffffff55 50%, transparent); transform: skewX(-18deg) translateX(-120%); pointer-events: none; }
.is-live .pill.shine { animation: cta-glow 3.2s ease-in-out infinite; }
.is-live .pill.shine .sheen { animation: cta-sheen 4s var(--ease-out) infinite 1.2s; }
@keyframes cta-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 0%, transparent), 0 10px 30px -10px color-mix(in srgb, var(--violet) 70%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--violet) 18%, transparent), 0 14px 44px -8px color-mix(in srgb, var(--violet) 90%, transparent); } }
@keyframes cta-sheen { 0%, 55% { transform: skewX(-18deg) translateX(-120%); } 80%, 100% { transform: skewX(-18deg) translateX(480%); } }
@media (prefers-reduced-motion: reduce) { .is-live .pill.shine, .is-live .pill.shine .sheen { animation: none; } }
.hero-cta .req { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hero-cta .also { font-size: 13px; color: var(--muted); }
.hero-cta .also a { color: var(--text-2); }
.hero-copy > * { opacity: 1; }
html.js .hero-copy.pending > * { opacity: 0; transform: translateY(10px); }
html.js .hero-copy.in > * { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
html.js .hero-copy.in > :nth-child(2) { transition-delay: 0.08s; }
html.js .hero-copy.in > :nth-child(3) { transition-delay: 0.16s; }

/* ---------- product frame ---------- */
.frame-section { position: relative; padding: 8px 0 96px; }
.glow {
  position: absolute; left: 50%; top: 40px; width: min(900px, 90vw); height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 34%, transparent), transparent);
  filter: blur(60px); pointer-events: none;
}
.frame {
  position: relative; margin: 0 auto; width: min(1200px, 100%);
  border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 30px 80px -30px #000, 0 0 0 1px #ffffff08 inset;
  aspect-ratio: 1200 / 720;
}
.frame > .demo { position: absolute; inset: 0; width: 1200px; height: 720px; transform-origin: top left; }

/* ---------- chips ---------- */
.chips { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 0 110px; text-align: center; }
.chips p { font-size: 17px; color: var(--text-2); }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 500;
}
.chip svg { color: var(--violet-3); }

/* ---------- sections ---------- */
.section { padding: 0 0 120px; }
.section h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.2vw, 40px);
  letter-spacing: -0.02em; line-height: 1.15;
}
.section h2 .dim { color: var(--muted); }
.section .copy { display: flex; flex-direction: column; gap: 18px; }
.section .copy p { font-size: 16px; line-height: 1.65; color: var(--text-2); max-width: 46ch; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 96px 0; margin-bottom: 120px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.three > div { display: flex; flex-direction: column; gap: 18px; padding: 8px 32px 8px 0; border-right: 1px solid var(--line); }
.three > div:last-child { border-right: 0; }
.three strong { font-size: 15px; font-weight: 600; }
.three p { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.three svg { display: block; overflow: visible; max-width: 100%; height: auto; }
.chip-row.left { justify-content: flex-start; max-width: none; }
.chip.small { padding: 7px 12px; font-size: 12.5px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.provider-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.provider {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg);
}
.provider strong { font-size: 13.5px; }
.provider span { font-size: 11.5px; color: var(--muted); }
.note { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* terminal section */
.terminal {
  border-radius: 14px; border: 1px solid var(--line); background: #0b0a10; overflow: hidden; font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
}
.terminal .bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.terminal .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.terminal pre { margin: 0; padding: 16px 18px; color: #bbc3d8; white-space: pre-wrap; overflow-x: auto; }
.terminal .ok { color: var(--green); }
.terminal .dim { color: var(--muted); }
.terminal .cur { display: inline-block; width: 7px; height: 14px; background: var(--violet-3); vertical-align: -2px; }
html.js .terminal .cur { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; margin-top: 40px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin-top: 10px; font-size: 14px; line-height: 1.65; color: var(--text-2); }

/* downloads */
.downloads { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 110px 0 96px; }
.downloads .intro { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.downloads .intro p { font-size: 16px; color: var(--text-2); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; text-align: left; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.card .head { display: flex; align-items: center; gap: 10px; }
.card .head strong { font-size: 16px; }
.card p { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.card .action { margin-top: auto; }
.state { margin-left: auto; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.state.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.state.warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.state.later { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }

/* footer */
.footer { border-top: 1px solid var(--line); }
.footer .wrap { padding-top: 48px; padding-bottom: 48px; display: flex; gap: 64px; align-items: flex-start; }
.footer .brand { display: flex; flex-direction: column; gap: 14px; flex: 1; font-size: 12.5px; color: var(--muted); }
.footer .brand svg { height: 22px; width: auto; display: block; }
.footer .col { display: flex; flex-direction: column; gap: 10px; }
.footer .col span { font-size: 12px; font-weight: 600; color: var(--text); }
.footer .col a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer .col a:hover { color: var(--text); }

/* Tall demo compositions are cropped to the height of the copy beside them. */
.crop { max-height: 520px; overflow: hidden; mask-image: linear-gradient(#000 72%, transparent); -webkit-mask-image: linear-gradient(#000 72%, transparent); }

/* Department process rail */
.process { position: relative; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); --p: 0; }
.process .eyebrow { display: block; margin-bottom: 22px; }
.process-director { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.director-node { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--violet-3); background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--text); font-size: 13.5px; font-weight: 600; }
.director-node svg { color: var(--violet-3); }
.is-live .director-node { animation: director-pulse 3s ease-in-out infinite; }
@keyframes director-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--violet) 16%, transparent); } }
.director-sub { font-size: 12.5px; color: var(--muted); }
.process-links { position: relative; height: 72px; margin: 4px 0 -2px; }
.process-links svg { display: block; width: 100%; height: 100%; overflow: visible; }
.process-links .fan { fill: none; stroke: var(--line); stroke-width: 1.4; transition: stroke 0.5s, opacity 0.5s; }
.process-links .fan.is-on { stroke: var(--violet-3); }
.process-links .back { fill: none; stroke: var(--violet-3); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: 0.35; transition: opacity 0.5s; }
.process-links .back.is-on { opacity: 1; }
.process-links .back-head { fill: var(--violet-3); opacity: 0.35; transition: opacity 0.5s; }
.process-links .back-head.is-on { opacity: 1; }
.process-links text { font-family: var(--mono); font-size: 11px; fill: var(--violet-3); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; opacity: 0; transition: opacity 0.5s; }
.process-links text.is-on { opacity: 1; }
.process-note { margin-top: 30px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); max-width: 70ch; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.steps::before { content: ''; position: absolute; left: 6%; right: 6%; top: 24px; height: 2px; background: var(--line); }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; min-width: 0; }
.step .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg); color: var(--muted); transition: color 0.5s, border-color 0.5s, background 0.5s, box-shadow 0.5s; }
.step.is-done .ic { color: var(--violet-3); border-color: var(--violet-3); }
.step.is-current .ic { color: #fff; background: var(--violet); border-color: var(--violet); box-shadow: 0 0 0 6px color-mix(in srgb, var(--violet) 22%, transparent); }
.step strong { font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.step span:not(.ic) { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.process-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; font-size: 13.5px; color: var(--text-2); }
.process-aside .dim { color: var(--muted); }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 14px; } .steps::before { display: none; } .process-links { display: none; } .process-director { margin-bottom: 24px; } }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Provider usage composition */
.usage-card .u-bar { transition: width 0.8s var(--ease-out); }
.usage-card.is-live .u-bar.u-low { animation: u-drain 9s ease-in-out infinite; }
@keyframes u-drain { 0%, 100% { width: 31%; } 50% { width: 24%; } }
.usage-card.is-live span.u-low { animation: u-blink 3s ease-in-out infinite; }
@keyframes u-blink { 0%, 100% { color: #B9B4CC; } 50% { color: #D9962B; } }
.usage-card .u-refresh { transform-origin: center; }
.usage-card.is-live .u-refresh { animation: u-spin 6s linear infinite; }
@keyframes u-spin { 0%, 80% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .usage-card.is-live .u-bar.u-low, .usage-card.is-live span.u-low, .usage-card.is-live .u-refresh { animation: none; } }

/* Loops: [data-loop] blocks animate only while on screen (main.js adds .is-live). */
.fig-flow { stroke-dashoffset: 0; }
.is-live .fig-flow { animation: fig-flow 1.6s linear infinite; }
@keyframes fig-flow { to { stroke-dashoffset: -10; } }
.fig-pulse { transform-box: fill-box; transform-origin: center; }
.is-live .fig-pulse { animation: fig-pulse 2.4s var(--ease-out) infinite; }
@keyframes fig-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.8); opacity: 0.45; } }
.is-live .fig-beam { animation: fig-beam 2.4s var(--ease-out) infinite; }
@keyframes fig-beam { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.fig-swap-a, .fig-swap-b { transition: fill 0.6s, stroke 0.6s; }
.is-live .fig-swap-a { animation: fig-swap-a 5s ease-in-out infinite; }
.is-live .fig-swap-b { animation: fig-swap-b 5s ease-in-out infinite; }
@keyframes fig-swap-a { 0%, 40% { fill: #5B4BDB; stroke: #5B4BDB; } 50%, 90% { fill: #A79BFF; stroke: #A79BFF; } }
@keyframes fig-swap-b { 0%, 40% { fill: #A79BFF; stroke: #A79BFF; } 50%, 90% { fill: #5B4BDB; stroke: #5B4BDB; } }
.loop-card.is-live .loop-dot { animation: loop-dot 2s ease-in-out infinite; }
@keyframes loop-dot { 0%, 100% { box-shadow: 0 0 0 0 #2E9E6B66; } 50% { box-shadow: 0 0 0 5px #2E9E6B00; } }
.loop-card.is-live .loop-bar { animation: loop-bar 12s linear infinite; }
@keyframes loop-bar { from { width: 38%; } to { width: 100%; } }

/* Hero mark: after the one-shot assembly, the pieces breathe very slightly while the hero is on screen. */
.hero-mark.idle.is-live [data-logo-piece="top"] { animation: idle-top 7s ease-in-out infinite; }
.hero-mark.idle.is-live [data-logo-piece="bottom-left"] { animation: idle-bl 7s ease-in-out infinite 0.6s; }
.hero-mark.idle.is-live [data-logo-piece="bottom-right"] { animation: idle-br 7s ease-in-out infinite 1.2s; }
@keyframes idle-top { 50% { transform: translateY(-1.6%); } }
@keyframes idle-bl { 50% { transform: translate(-1.4%, 0.8%); } }
@keyframes idle-br { 50% { transform: translate(1.4%, 0.8%); } }
@media (prefers-reduced-motion: reduce) { .is-live .fig-flow, .is-live .fig-pulse, .is-live .fig-beam, .is-live .fig-swap-a, .is-live .fig-swap-b, .loop-card.is-live .loop-dot, .loop-card.is-live .loop-bar, .hero-mark.idle.is-live [data-logo-piece] { animation: none; } }

/* ---------- reveal on scroll ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
html.js [data-reveal].in { opacity: 1; transform: none; }
html.js [data-reveal-stagger] > * { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
html.js [data-reveal-stagger].in > * { opacity: 1; transform: none; }
html.js [data-reveal-stagger].in > :nth-child(2) { transition-delay: 0.07s; }
html.js [data-reveal-stagger].in > :nth-child(3) { transition-delay: 0.14s; }
html.js [data-reveal-stagger].in > :nth-child(4) { transition-delay: 0.21s; }
html.js [data-reveal-stagger].in > :nth-child(5) { transition-delay: 0.28s; }
html.js [data-reveal-stagger].in > :nth-child(6) { transition-delay: 0.35s; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal], html.js [data-reveal-stagger] > *, html.js .hero-copy.pending > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pill { transition: none; }
  html.js .terminal .cur { animation: none; }
}

/* demo activity mark (28 px small symbol loop, per logo-motion.md) */
.activity-mark { position: relative; width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.activity-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.activity-mark .base { opacity: 0.3; }
.activity-mark [data-logo-piece] { transform-box: fill-box; transform-origin: center; }

/* demo compositions must never widen the page */
.two > * > div[style*='white-space'], .two [style*='nowrap'] { white-space: normal !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .two { gap: 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav-links, .nav .login, .nav .pill { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav.is-open .nav-links { display: flex; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.is-open .nav-links a { padding: 12px 0; font-size: 16px; }
  .hero { padding-top: 48px; }
  .hero-mark { width: 240px; height: 240px; top: -16px; }
  .hero .wrap { min-height: 250px; }
  .hero-cta { padding-top: 16px; }
  .hero h1 { white-space: normal; }
  .two, .three, .faq { grid-template-columns: minmax(0, 1fr); }
  .two > * { min-width: 0; }
  .three > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 0 28px; }
  .three > div:last-child { border-bottom: 0; }
  .band { padding: 64px 0; margin-bottom: 80px; }
  .section { padding-bottom: 80px; }
  .frame { border-radius: 12px; }
  .footer .wrap { flex-direction: column; gap: 28px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero-cta .pill { width: 100%; }
  .pill { white-space: normal; }
}

/* ---------- hero demo (scripted walkthrough) ---------- */
.frame > #demo { position: absolute; inset: 0; width: 1200px; height: 720px; transform-origin: top left; font-size: 13px; }
.d-stage { position: relative; width: 1200px; height: 720px; display: flex; flex-direction: column; background: #1e1e1e; color: #e6e7ed; overflow: hidden; transition: opacity 0.6s; }
.d-stage.is-fading { opacity: 0; }
.d-body { transition: opacity 0.3s; }
.d-body.is-switching { opacity: 0; }
.d-stage .is-settled { animation: none !important; }
.d-titlebar { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 80px; background: #252526; border-bottom: 1px solid #3c3c3c; color: #9ca3af; font-size: 12px; flex-shrink: 0; }
.d-titlebar b { color: #e6e7ed; font-weight: 600; }
.d-tabs { display: flex; gap: 4px; padding: 6px 12px 0; background: #121218; flex-shrink: 0; }
.d-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px 8px 0 0; font-size: 12px; color: #858895; background: transparent; }
.d-tab.is-active { background: #171820; color: #e6e7ed; box-shadow: inset 0 0 0 1px #ffffff0d; }
.d-tab-add { padding: 7px 8px; }
.d-body { display: flex; flex: 1; min-height: 0; background: #121218; }
.d-sidebar { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; background: #111218; border-right: 1px solid #ffffff0d; overflow: hidden; }
.d-head { display: flex; align-items: center; gap: 11px; padding: 18px 20px 14px; }
.d-head-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, #9b8afb 13%, transparent); }
.d-head b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-sub { font-size: 11px; color: #858895; }
.d-nav { display: flex; align-items: center; gap: 10px; margin: 0 14px 4px; padding: 8px 10px; border-radius: 8px; color: #858895; font-size: 13px; }
.d-nav .d-count { margin-left: auto; color: #9b8afb; font-size: 11px; }
.d-label { padding: 0 24px; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: 1.2px; font-size: 10px; font-weight: 650; color: #858895; }
.d-channels, .d-dms { padding: 0 14px; display: flex; flex-direction: column; gap: 2px; }
.d-channel { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; font-size: 13px; color: #e6e7ed; }
.d-channel.is-sel { background: color-mix(in srgb, #9b8afb 13%, transparent); color: #9b8afb; }
.d-icon { display: inline-flex; flex-shrink: 0; }
.d-person { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 7px; animation: d-in 0.45s var(--ease-out) both; }
.d-avatar { position: relative; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.d-avatar.sm { width: 28px; height: 28px; }
.d-dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #111218; background: #2e9e6b; }
.d-dot.waiting { background: #d9962b; }
.d-lines { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.d-name { font-size: 12.5px; color: #e6e7ed; white-space: nowrap; }
.d-badges { display: flex; gap: 4px; }
.d-badge { font-style: normal; font-size: 9.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.d-badge.prov { color: #7fb0e0; background: #7fb0e01f; }
.d-badge.model { color: #a79bff; background: #2a2647; font-family: var(--mono); font-weight: 500; }
.d-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #b9b4cc; }
.d-status em { font-style: normal; letter-spacing: 2px; color: #858895; }
.d-status code, .d-bubble code, .d-meta code { font-family: var(--mono); font-size: 10.5px; color: #858895; }
.d-status.wait { color: #d9962b; font-weight: 600; }
.d-mark { display: inline-block; flex-shrink: 0; }
.d-empty { margin: 4px 10px; font-size: 12px; color: #858895; line-height: 1.5; }
.d-models { margin: 4px 14px 6px; padding: 8px 0 10px; border-top: 1px solid #ffffff0d; border-bottom: 1px solid #ffffff0d; animation: d-in 0.4s var(--ease-out) both; }
.d-models .d-label { padding: 0 10px; margin: 6px 0 8px; }
.d-model-row { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; color: #b9b4cc; }
.d-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: #2a2647; color: #a79bff; font-family: var(--mono); font-size: 11px; }
.d-chip.is-open { box-shadow: 0 0 0 1px #9b8afb; }
.d-menu { position: absolute; right: 10px; top: 32px; z-index: 5; width: 250px; padding: 6px; border-radius: 9px; background: #1c1b25; border: 1px solid #332f45; box-shadow: 0 12px 30px -10px #000; animation: d-in 0.25s var(--ease-out) both; }
.d-menu-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px; border-radius: 6px; font-size: 11px; color: #858895; }
.d-menu-row.is-hover { background: color-mix(in srgb, #9b8afb 13%, transparent); }
.d-menu-row code { color: #e6e7ed; }
.d-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #171820; }
.d-chan-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid #ffffff0d; }
.d-chan-head b { font-size: 15px; }
.d-actions { display: flex; gap: 6px; }
.d-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #353544; border-radius: 9px; font-size: 12px; font-weight: 600; background: #22232c; }
.d-feed { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding: 22px 24px; }
.d-msg { display: flex; gap: 12px; align-items: flex-start; animation: d-in 0.6s var(--ease-out) both; }
.d-msg.me { flex-direction: column; align-items: flex-end; }
.d-meta { font-size: 11px; color: #858895; }
.d-meta b { color: #e6e7ed; font-weight: 600; }
.d-bubble { max-width: 560px; padding: 11px 14px; border-radius: 12px 12px 12px 4px; font-size: 13.5px; line-height: 1.6; background: color-mix(in srgb, #e6e7ed 5%, transparent); }
.d-msg.me .d-bubble { border-radius: 12px 12px 4px 12px; background: color-mix(in srgb, #9b8afb 18%, transparent); }
.d-bubble.working { display: inline-flex; align-items: center; gap: 7px; color: #b9b4cc; }
.d-bubble.working em { font-style: normal; letter-spacing: 2px; color: #858895; }
.d-need { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: #d9962b; background: color-mix(in srgb, #d9962b 14%, transparent); }
.d-composer { display: flex; align-items: center; gap: 10px; margin: 0 24px 20px; padding: 12px 14px; border: 1px solid #ffffff0d; border-radius: 12px; background: color-mix(in srgb, #e6e7ed 3%, transparent); color: #858895; font-size: 13.5px; }
.d-to { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 11px; color: #9b8afb; background: color-mix(in srgb, #9b8afb 13%, transparent); white-space: nowrap; }
.d-input { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.d-input.is-typing { color: #e6e7ed; }
.d-input.is-typing::after { content: ''; display: inline-block; width: 1.5px; height: 14px; background: #a79bff; vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.d-hint { font-size: 11px; white-space: nowrap; }
.d-start { align-self: center; margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 360px; color: #858895; font-size: 13px; line-height: 1.6; }
.d-start b { font-size: 16px; color: #e6e7ed; }
.d-primary { display: inline-block; margin-top: 6px; padding: 9px 16px; border-radius: 9px; background: #b7a1f5; color: #17171f; font-size: 12px; font-weight: 600; }
.d-overlay { position: absolute; inset: 36px 0 0 0; display: grid; place-items: center; background: #121218; transition: opacity 0.4s; }
.d-overlay.is-out { opacity: 0; }
.d-overlay[hidden] { display: none; }
.d-welcome { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 460px; }
.d-welcome > b { font-size: 20px; }
.d-recent { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.d-recent .d-label { padding: 0 4px; margin: 0 0 4px; }
.d-recent-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #353544; border-radius: 12px; background: #22232c; color: #e6e7ed; }
.d-recent-row b { font-size: 13.5px; }
.d-recent-row code { font-family: var(--mono); font-size: 11px; color: #858895; }
.d-recent-row .d-sub { margin-left: auto; }
.d-recent-row.d-open { color: #858895; border-style: dashed; background: transparent; }
.d-cursor { position: absolute; left: 0; top: 0; z-index: 20; opacity: 0; pointer-events: none; transition: transform 0.5s var(--ease-out), opacity 0.2s; filter: drop-shadow(0 2px 4px #0008); }
.d-cursor.is-visible { opacity: 1; }
.d-cursor.is-click svg { transform: scale(0.85); }
@keyframes d-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Caption floats over the bottom of the walkthrough; hidden while empty. */
.demo-caption { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(6px); z-index: 3; max-width: calc(100% - 32px); padding: 12px 22px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: 0 18px 40px -18px #000; font-size: 15px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: 0; transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.demo-caption.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) { .demo-caption { bottom: 10px; font-size: 11px; padding: 6px 12px; } }
@media (prefers-reduced-motion: reduce) { .d-person, .d-msg, .d-models, .d-menu { animation: none; } .d-input.is-typing::after { animation: none; } .d-cursor { display: none; } }

/* ---------- text pages (privacy, terms, licenses) ---------- */
.doc { padding: 48px 0 110px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-family: var(--display); font-size: 40px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.doc .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
.doc p, .doc li { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.doc p + p { margin-top: 14px; }
.doc ul { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc .lead { font-size: 18px; color: var(--text); }
@media (max-width: 860px) { .doc h1 { font-size: 30px; } }
