/* Sopie. Every source type owns a colour, and the colour follows the item
   from the feed, through the merge, into the agent's answer.
   Vivid pop on warm light grey · tonal layers · round · springy motion. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* tonal layers, light */
  --base: #EFF1EC;
  --paper: #FAFBF7;
  --tone-1: #E5E8E1;
  --tone-2: #DADED4;
  /* ink and its layers */
  --ink: #17181F;
  --ink-up: #23252F;
  --ink-up-2: #2E313C;
  --ink-2: #444856;
  --ink-3: #5E6272;
  --ink-soft: #A9AEBB;
  /* source colours, one fixed meaning each */
  --video: #F0583F;
  --voice: #F6B93B;
  --code: #3FB67C;
  --web: #5AA7F2;
  --danger: #B3261E;
  --c: var(--video);

  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 32px;
  --r-xl: 40px;
  --pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-story: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-whisper: 0 1px 2px rgba(23, 24, 31, 0.05), 0 10px 28px -18px rgba(23, 24, 31, 0.22);

  --section: clamp(72px, 9vw, 128px);
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1280px;
  --nav-h: 72px;

  --z-nav: 20;
  --z-menu: 40;
  --z-progress: 50;
}

.is-video { --c: var(--video); }
.is-voice { --c: var(--voice); }
.is-code { --c: var(--code); }
.is-web { --c: var(--web); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--voice); color: var(--ink); }

/* inline icon guard: an unsized svg never balloons */
li > svg, p > svg, a > svg, button > svg, span > svg, td > svg, label > svg, summary > svg { width: 1.1em; height: 1.1em; flex: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.nowrap { white-space: nowrap; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
.sec--ink :focus-visible, .foot :focus-visible, .menu :focus-visible, .join :focus-visible { outline-color: var(--voice); }

.skip { position: absolute; left: 12px; top: -80px; z-index: var(--z-progress); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--pill); text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- type scale ---------- */
h2 { font-size: clamp(2.25rem, 1.3rem + 3.4vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; }
h3 { font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.95rem); line-height: 1.1; letter-spacing: -0.02em; }
h4 { font-size: 1.25rem; line-height: 1.15; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-2); }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 14px; border-radius: var(--pill);
  background: var(--tone-1); color: var(--ink);
  font: 700 0.85rem/1 var(--font-display); letter-spacing: 0.01em;
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* ---------- sections ---------- */
.sec { padding-block: var(--section); }
.sec--paper { background: var(--paper); }
.sec--ink { background: var(--ink); color: var(--paper); }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head p { margin-top: 18px; font-size: 1.2rem; color: var(--ink-2); max-width: 52ch; }
.sec--ink .sec-head p { color: var(--ink-soft); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center p { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  background-color: var(--ink); color: var(--paper);
  border: 0; border-radius: var(--pill);
  font: 700 1rem/1 var(--font-display); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  translate: var(--mx) var(--my);
  transition: translate 0.25s var(--ease-out), scale 0.16s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.btn svg { transition: transform 0.22s var(--ease-spring); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(250, 251, 247, 0.28) 48%, transparent 66%);
  transform: translateX(-130%);
}
.btn--primary::after { animation: sheen 5.5s var(--ease-out) 1.8s infinite; }
@media (hover: hover) {
  .btn:hover { background-color: var(--ink-up-2); }
  .btn:hover svg { transform: translateX(4px); }
}
.btn:active { scale: 0.96; }
.btn:disabled { cursor: progress; opacity: 0.72; scale: 1; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }
.btn--lg { min-height: 64px; padding: 0 36px; font-size: 1.12rem; }
.btn--block { width: 100%; }
.btn--paper { background-color: var(--paper); color: var(--ink); }
.btn--paper::after { background: linear-gradient(105deg, transparent 30%, rgba(23, 24, 31, 0.1) 48%, transparent 66%); }
@media (hover: hover) { .btn--paper:hover { background-color: #FFFFFF; } }
.ripple {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: 0.28; transform: scale(0.05);
  animation: ripple 0.3s var(--ease-out) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes sheen { 0% { transform: translateX(-130%); } 14%, 100% { transform: translateX(130%); } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 1rem/1.2 var(--font-display); text-decoration: none; color: var(--ink);
  padding: 10px 2px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 0 2px no-repeat;
  transition: background-size 0.25s var(--ease-out);
}
.link-arrow svg { transition: transform 0.22s var(--ease-spring); }
@media (hover: hover) {
  .link-arrow:hover { background-size: calc(100% - 28px) 2px; }
  .link-arrow:hover svg { transform: translate(3px, 1px); }
}

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 0 14px; border-radius: var(--pill);
  background: var(--c); color: var(--ink);
  font: 700 0.9rem/1 var(--font-display); white-space: nowrap;
}
.chip--soft { background: color-mix(in oklab, var(--c) 26%, var(--paper)); }
.chip--ink { background: var(--ink); color: var(--paper); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* ---------- brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand__name { font: 800 1.55rem/1 var(--font-display); letter-spacing: -0.03em; }
.mark { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; flex: none; }
.mark i { display: block; transition: transform 0.28s var(--ease-spring); }
.mark i:nth-child(1) { background: var(--video); border-radius: 50%; }
.mark i:nth-child(2) { background: var(--web); border-radius: 0 100% 0 0; }
.mark i:nth-child(3) { background: var(--code); border-radius: 0 0 0 100%; }
.mark i:nth-child(4) { background: var(--voice); border-radius: 50% 50% 50% 0; }
@media (hover: hover) {
  .brand:hover .mark i:nth-child(1) { transform: translate(-2px, -2px) scale(1.08); }
  .brand:hover .mark i:nth-child(2) { transform: translate(2px, -2px) rotate(12deg); transition-delay: 30ms; }
  .brand:hover .mark i:nth-child(3) { transform: translate(-2px, 2px) rotate(-12deg); transition-delay: 60ms; }
  .brand:hover .mark i:nth-child(4) { transform: translate(2px, 2px) scale(1.08); transition-delay: 90ms; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  height: var(--nav-h);
  background-color: var(--base);
  transition: background-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.nav.is-raised { background-color: var(--paper); box-shadow: var(--shadow-whisper); }
.nav__in { width: min(100% - 2 * var(--gutter), var(--max)); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 20px; }
.nav .brand { margin-right: auto; }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  position: relative; padding: 10px 14px; border-radius: var(--pill);
  text-decoration: none; font-weight: 500; font-size: 0.98rem;
  transition: background-color 0.18s var(--ease-out), scale 0.16s var(--ease-out);
}
.nav__links a:active { scale: 0.95; }
@media (hover: hover) { .nav__links a:hover { background-color: var(--tone-1); } }
.nav__links a[aria-current="page"] { background-color: var(--tone-1); font-weight: 700; }
.nav__toggle {
  display: none; position: relative;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--paper); cursor: pointer;
  transition: scale 0.16s var(--ease-out);
}
.nav__toggle:active { scale: 0.92; }
.nav__toggle span { position: absolute; left: 15px; right: 15px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform 0.25s var(--ease-out); }
.nav__toggle span:nth-child(1) { top: 19px; }
.nav__toggle span:nth-child(2) { top: 27px; }
@media (hover: hover) { .nav__toggle:hover span:nth-child(2) { transform: scaleX(0.6); transform-origin: right; } }

/* full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  width: 100vw; height: 100svh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 14px var(--gutter) 32px;
  background: var(--ink); color: var(--paper);
  overflow-y: auto; overflow-x: hidden;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s var(--ease-out), visibility 0s linear 0.22s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.22s var(--ease-out), visibility 0s; }
.menu__top { display: flex; align-items: center; justify-content: space-between; min-height: calc(var(--nav-h) - 14px); }
.menu__close {
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--ink); cursor: pointer; position: relative;
}
.menu__close::before, .menu__close::after { content: ""; position: absolute; left: 14px; right: 14px; top: 23px; height: 2.5px; border-radius: 2px; background: currentColor; }
.menu__close::before { transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu nav { display: grid; gap: 4px; margin-top: 8px; }
.menu nav a {
  display: flex; align-items: center; gap: 14px;
  font: 800 clamp(2rem, 9vw, 3.2rem)/1.08 var(--font-display); letter-spacing: -0.03em;
  text-decoration: none; padding: 6px 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.26s var(--ease-out), transform 0.26s var(--ease-out);
}
.menu nav a::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.menu.is-open nav a { opacity: 1; transform: none; }
.menu.is-open nav a:nth-child(2) { transition-delay: 30ms; }
.menu.is-open nav a:nth-child(3) { transition-delay: 60ms; }
.menu.is-open nav a:nth-child(4) { transition-delay: 90ms; }
.menu.is-open nav a:nth-child(5) { transition-delay: 120ms; }
.menu.is-open nav a:nth-child(6) { transition-delay: 150ms; }
.menu .btn { margin-top: auto; }
.menu__mail { color: var(--ink-soft); font-weight: 500; text-underline-offset: 4px; }

/* scroll progress (created by app.js, driven by CSS scroll timeline) */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    display: block; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: var(--z-progress);
    pointer-events: none; transform-origin: 0 50%; transform: scaleX(0);
    background: linear-gradient(90deg, var(--video) 0 25%, var(--voice) 25% 50%, var(--code) 50% 75%, var(--web) 75% 100%);
    animation: progress linear both; animation-timeline: scroll(root block);
  }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- reveal (classes added by app.js only) ---------- */
.rv { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-story); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------- hero: kinetic type + colour field ---------- */
.hero { padding: clamp(12px, 2vw, 24px) 0 clamp(28px, 3vw, 40px); }
.hero__in {
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto;
  min-height: calc(100svh - var(--nav-h) - clamp(40px, 5vw, 64px));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: stretch;
}
.hero__copy { container-type: inline-size; display: flex; flex-direction: column; justify-content: center; padding-block: 24px; }
.kin { font-size: clamp(2.25rem, 13.2cqi, 5.5rem); line-height: 1; letter-spacing: -0.04em; }
.kin__slot {
  display: grid; justify-items: start;
  overflow: clip; overflow-clip-margin: 0;
  padding-block: 0.04em 0.1em; margin-bottom: 0.06em;
}
.kin__w {
  grid-area: 1 / 1;
  display: inline-block; padding: 0.02em 0.3em 0.1em;
  border-radius: var(--pill);
  background-color: var(--c); color: var(--ink);
  white-space: nowrap;
  transform: translateY(118%) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 0.62s var(--ease-spring);
}
.kin__w.is-on { transform: none; }
.kin__w.is-out { transform: translateY(-118%) rotate(-3deg); transition: transform 0.45s var(--ease-out); }
.kin__w.no-t { transition: none; }
.kin__rest { display: block; padding-left: 0.04em; }
/* hero entrance: CSS only, so it plays with or without JS */
.hero__copy > *, .stage { animation: hero-in 0.7s var(--ease-story) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.08s; }
.hero__copy > :nth-child(3) { animation-delay: 0.16s; }
.hero__copy > :nth-child(4) { animation-delay: 0.24s; }
.stage { animation-name: stage-in; animation-duration: 0.8s; animation-delay: 0.1s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(22px); } }
@keyframes stage-in { from { opacity: 0; transform: scale(0.94) rotate(-1.5deg); } }
.hero__sub { margin-top: clamp(18px, 2.4vw, 28px); max-width: 38ch; font-size: clamp(1.1rem, 1rem + 0.45vw, 1.32rem); line-height: 1.45; color: var(--ink-2); }
.hero__form { margin-top: clamp(22px, 3vw, 34px); max-width: 560px; }
.combo {
  display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: var(--pill);
  background: var(--paper); box-shadow: var(--shadow-whisper);
  transition: box-shadow 0.2s var(--ease-out);
}
.combo:focus-within { box-shadow: 0 0 0 3px var(--ink), var(--shadow-whisper); }
.combo .btn { flex: none; }
.combo input[type="email"] {
  flex: 1 1 auto; min-width: 0; min-height: 50px;
  background: transparent; box-shadow: none; padding: 0 18px;
}
.combo input[type="email"]:focus-visible { outline: none; box-shadow: none; }
.hero__meta { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.hero__note { font-size: 0.95rem; color: var(--ink-3); }

.stage {
  --px: 0; --py: 0;
  position: relative; isolation: isolate; overflow: hidden;
  container-type: size;
  min-height: 420px;
  border-radius: var(--r-xl);
  background-color: var(--c);
  transition: background-color 0.7s var(--ease-out);
}
.hero[data-src="video"] { --c: var(--video); }
.hero[data-src="voice"] { --c: var(--voice); }
.hero[data-src="code"] { --c: var(--code); }
.hero[data-src="web"] { --c: var(--web); }
.stage__shapes { position: absolute; inset: 0; z-index: 0; }
.sh {
  position: absolute; display: block;
  transform: translate3d(calc(var(--px) * var(--d, 12px)), calc(var(--py) * var(--d, 12px)), 0);
  transition: transform 0.6s var(--ease-out);
}
.sh > b { display: block; width: 100%; height: 100%; transition: transform 0.9s var(--ease-spring); }
.sh > b > i {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-style: normal;
  background-color: var(--fill);
  transition: background-color 0.7s var(--ease-out);
  animation: drift var(--dur, 9s) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(var(--dx, 10px), var(--dy, -14px)) rotate(var(--dr, 6deg)); }
}
.sh--a { left: 4%; top: 7%; width: 64cqmin; height: 64cqmin; --d: 18px; --dur: 10s; --dx: 14px; --dy: 18px; --dr: 0deg; }
.sh--a i { border-radius: 50%; --fill: color-mix(in oklab, var(--c) 62%, var(--paper)); }
.sh--b { left: 36%; top: 61%; width: 58cqmin; height: 21cqmin; --d: 30px; --dur: 8s; --dx: -16px; --dy: -10px; --dr: -5deg; }
.sh--b i { border-radius: var(--pill); --fill: color-mix(in oklab, var(--c) 78%, var(--ink)); }
.sh--c { left: 6%; top: 76%; width: 46cqmin; height: 23cqmin; --d: 22px; --dur: 11s; --dx: 12px; --dy: -8px; --dr: 4deg; }
.sh--c i { border-radius: 999px 999px 0 0; --fill: color-mix(in oklab, var(--c) 38%, var(--paper)); }
.sh--d { left: 60%; top: 9%; width: 36cqmin; height: 34cqmin; --d: 26px; --dur: 9.5s; --dx: -10px; --dy: 16px; --dr: 14deg; }
.sh--d i { border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%; --fill: color-mix(in oklab, var(--c) 70%, var(--ink)); }
.sh--e { left: 78%; top: 44%; width: 13cqmin; height: 13cqmin; --d: 40px; --dur: 7s; --dx: 8px; --dy: -20px; --dr: 0deg; }
.sh--e i { border-radius: 50%; --fill: var(--paper); }
.sh--f { left: 14%; top: 56%; width: 22cqmin; height: 9cqmin; --d: 36px; --dur: 7.5s; --dx: 18px; --dy: 6px; --dr: -10deg; }
.sh--f i { border-radius: var(--pill); --fill: color-mix(in oklab, var(--c) 30%, var(--paper)); }
.sh--core { left: 38%; top: 34%; width: 27cqmin; height: 27cqmin; --d: 8px; --dur: 6s; --dx: 0px; --dy: -8px; --dr: 0deg; }
.sh--core i { border-radius: 50%; --fill: var(--ink); color: var(--paper); font: 800 clamp(0.85rem, 4.2cqmin, 1.6rem)/1.05 var(--font-display); letter-spacing: -0.02em; text-align: center; }
/* poses: each source makes its own shape the star */
.hero[data-src="voice"] .sh--a b { transform: translate(-6%, 18%) scale(0.62); }
.hero[data-src="voice"] .sh--b b { transform: translate(-30%, -56%) scale(1.3) rotate(-9deg); }
.hero[data-src="voice"] .sh--f b { transform: translate(140%, -380%) scale(1.6) rotate(8deg); }
.hero[data-src="voice"] .sh--d b { transform: translate(10%, 12%) scale(0.7) rotate(40deg); }
.hero[data-src="voice"] .sh--c b { transform: translate(20%, 0) scale(0.9); }
.hero[data-src="code"] .sh--c b { transform: translate(22%, -64%) scale(1.4); }
.hero[data-src="code"] .sh--a b { transform: translate(52%, -16%) scale(0.56); }
.hero[data-src="code"] .sh--b b { transform: translate(8%, -40%) scale(0.7) rotate(90deg); }
.hero[data-src="code"] .sh--d b { transform: translate(-150%, 30%) scale(0.75) rotate(-30deg); }
.hero[data-src="code"] .sh--e b { transform: translate(-120%, 180%) scale(1.4); }
.hero[data-src="web"] .sh--d b { transform: translate(-56%, 44%) scale(1.75) rotate(-24deg); }
.hero[data-src="web"] .sh--a b { transform: translate(-14%, 30%) scale(0.5); }
.hero[data-src="web"] .sh--b b { transform: translate(-18%, 22%) scale(0.85) rotate(-14deg); }
.hero[data-src="web"] .sh--f b { transform: translate(40%, -300%) scale(1.2) rotate(30deg); }
.hero[data-src="web"] .sh--c b { transform: translate(110%, 0) scale(0.8); }

.stage__cap { position: absolute; left: 22px; top: 22px; z-index: 2; }
.stage__cap p {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
  border-radius: var(--pill); background: var(--paper); color: var(--ink);
  font: 700 0.92rem/1 var(--font-display);
}
.stage__legend { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.src-pill {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 42px; padding: 0 16px 0 12px;
  border: 0; border-radius: var(--pill);
  background: var(--paper); color: var(--ink); cursor: pointer;
  font: 700 0.92rem/1 var(--font-display);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), scale 0.16s var(--ease-out), translate 0.22s var(--ease-spring);
}
.src-pill .dot { transition: transform 0.25s var(--ease-spring); }
.src-pill:active { scale: 0.95; }
@media (hover: hover) { .src-pill:hover { translate: 0 -2px; } .src-pill:hover .dot { transform: scale(1.35); } }
.src-pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.src-pill[aria-pressed="true"] .dot { transform: scale(1.2); box-shadow: 0 0 0 3px var(--ink-up-2); }

/* ---------- forms (element selectors: nothing native slips through) ---------- */
input, select, textarea {
  width: 100%;
  appearance: none; -webkit-appearance: none;
  min-height: 54px; padding: 0 18px;
  background-color: var(--paper); color: var(--ink);
  border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1.5px var(--tone-2);
  font: 500 1rem/1.3 var(--font-body);
  transition: box-shadow 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}
textarea { min-height: 150px; padding: 16px 18px; resize: vertical; line-height: 1.5; }
select {
  padding-right: 52px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317181F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 20px 20px;
}
select:invalid, select option[value=""] { color: var(--ink-3); }
select option { color: var(--ink); background: var(--paper); }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
@media (hover: hover) { input:hover, select:hover, textarea:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); } }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 4px color-mix(in oklab, var(--voice) 55%, transparent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger); background-color: #FFF6F4; }
input[type="checkbox"], input[type="radio"] { width: 22px; min-height: 0; height: 22px; padding: 0; border-radius: 7px; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background-color: var(--ink); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 7px var(--ink); }

.form {
  display: grid; gap: 18px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: var(--paper); color: var(--ink);
}
.field { display: grid; gap: 8px; }
.field label, .field .label { font: 700 1rem/1.2 var(--font-display); }
.field small { color: var(--ink-3); font-size: 0.9rem; }
.form input, .form select, .form textarea { background-color: var(--base); box-shadow: none; }
@media (hover: hover) { .form input:hover, .form select:hover, .form textarea:hover { background-color: var(--tone-1); box-shadow: none; } }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { background-color: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin-top: 10px; padding: 12px 16px; border-radius: var(--r-sm); background: #FBE3DF; color: #7D1812; font-weight: 500; line-height: 1.4; }
.form-error[hidden] { display: none; }
.form-success { display: none; }
.form-success.show { display: block; animation: pop-in 0.42s var(--ease-spring) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.hero .form-success {
  max-width: 560px; padding: 16px 22px; border-radius: var(--r-md);
  background: var(--code); color: var(--ink); font-weight: 700;
}
.btn.is-loading { opacity: 0.78; }

/* ---------- marquee + scallop ---------- */
.marquee { background: var(--ink); color: var(--ink); overflow: clip; padding: 18px 0 10px; }
.marquee__rail { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee__rail { animation-play-state: paused; }
.marquee__list { display: flex; gap: 12px; padding-right: 12px; }
.marquee__list li {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--pill);
  background: var(--c); font: 800 1.15rem/1 var(--font-display); letter-spacing: -0.01em; white-space: nowrap;
}
.marquee__list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); opacity: 0.8; }
@keyframes marquee { to { transform: translateX(-50%); } }

.scallop { position: relative; height: 36px; overflow: clip; background: var(--ink); }
.scallop::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 144px);
  background:
    radial-gradient(circle at 18px 36px, var(--video) 17.5px, transparent 18px) 0 0 / 144px 36px repeat-x,
    radial-gradient(circle at 54px 36px, var(--voice) 17.5px, transparent 18px) 0 0 / 144px 36px repeat-x,
    radial-gradient(circle at 90px 36px, var(--code) 17.5px, transparent 18px) 0 0 / 144px 36px repeat-x,
    radial-gradient(circle at 126px 36px, var(--web) 17.5px, transparent 18px) 0 0 / 144px 36px repeat-x;
  animation: scallop 14s linear infinite;
}
.scallop--to-ink { background: var(--base); }
.scallop--to-ink::before { animation-direction: reverse; }
.scallop--on-paper { background: var(--paper); }
@keyframes scallop { to { transform: translateX(-144px); } }

/* ---------- how it works: sticky scroll story ---------- */
.how { background: var(--paper); }
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.story__steps { display: grid; }
.step { min-height: 46svh; display: flex; flex-direction: column; justify-content: center; padding-block: 32px; transition: opacity 0.3s var(--ease-out); }
.step:first-child { min-height: 38svh; justify-content: flex-start; padding-top: 8px; }
.step:last-child { min-height: 42svh; }
.story.is-live .step:not(.is-active) { opacity: 0.55; }
.step__n {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 22px;
  background: var(--tone-1); color: var(--ink);
  font: 800 1.6rem/1 var(--font-display);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.3s var(--ease-spring);
}
.step.is-active .step__n { background: var(--ink); color: var(--paper); transform: scale(1.08) rotate(-6deg); }
.step h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.7rem); letter-spacing: -0.03em; }
.step p { margin-top: 14px; font-size: 1.14rem; color: var(--ink-2); max-width: 40ch; }
.step__chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }

.story__stage {
  position: sticky; top: calc(var(--nav-h) + 24px);
  height: min(760px, calc(100svh - var(--nav-h) - 48px));
  min-height: 460px;
  border-radius: var(--r-xl);
  background: var(--base);
  overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr; align-items: center;
  padding: clamp(18px, 2.4vw, 28px);
}
.story__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 3; }
.story__cap { position: relative; min-height: 1.3em; flex: 1 1 auto; font: 700 1rem/1.3 var(--font-display); color: var(--ink-2); }
.story__cap span { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(6px); transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out); }
.story__stage[data-state="1"] .story__cap [data-cap="1"],
.story__stage[data-state="2"] .story__cap [data-cap="2"],
.story__stage[data-state="3"] .story__cap [data-cap="3"] { opacity: 1; transform: none; }
.story__body { position: relative; display: grid; gap: 14px; align-content: center; justify-items: center; height: 100%; }
/* first state: a dashed "one entry" slot the sources fly towards, so the stage is never bare at scroll 0 */
.story__stage:not(.ag-stage) .story__body::before {
  content: "one\A entry"; white-space: pre; text-align: center;
  position: absolute; inset: 0; margin: auto; z-index: 0; pointer-events: none;
  width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2.5px dashed color-mix(in oklab, var(--ink) 38%, transparent);
  color: var(--ink-3); font: 800 1.1rem/1.1 var(--font-display); letter-spacing: -0.02em;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-spring);
}
.story__stage:not(.ag-stage)[data-state="1"] .story__body::before { opacity: 1; transform: none; animation: slot-breathe 3.2s ease-in-out infinite alternate; }
@keyframes slot-breathe { to { transform: scale(1.07); } }

/* ask bubble */
.ask {
  display: flex; align-items: center; gap: 12px; max-width: 100%;
  padding: 10px 18px 10px 10px; border-radius: var(--pill);
  background: var(--ink); color: var(--paper);
  font: 700 clamp(0.88rem, 0.8rem + 0.3vw, 1rem)/1.3 var(--font-display);
  opacity: 0; transform: translateY(-14px) scale(0.96);
  transition: opacity 0.4s var(--ease-out), transform 0.55s var(--ease-spring);
}
.ask__who { flex: none; display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: var(--pill); background: var(--ink-up-2); color: var(--ink-soft); font-size: 0.82rem; }

/* entry card */
.entry {
  width: min(100%, 440px);
  padding: 20px 22px; border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--shadow-whisper);
  opacity: 0; transform: translateY(16px) scale(0.92);
  transition: opacity 0.4s var(--ease-out) 0.35s, transform 0.6s var(--ease-spring) 0.35s;
}
.entry__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entry__name { font: 800 1.45rem/1.1 var(--font-display); letter-spacing: -0.02em; }
.entry__sum { margin-top: 8px; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.entry__sources { margin-top: 14px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: inset 0 1px 0 var(--tone-1); }
.entry__sources > span { font: 700 0.85rem/1 var(--font-display); color: var(--ink-3); }
.entry__dots { display: flex; gap: 6px; }
.entry__dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); opacity: 0; transform: scale(0.4); transition: opacity 0.25s var(--ease-out), transform 0.4s var(--ease-spring); }
.entry__dots i:nth-child(1) { transition-delay: 0.62s; }
.entry__dots i:nth-child(2) { transition-delay: 0.7s; }
.entry__dots i:nth-child(3) { transition-delay: 0.78s; }
.entry__dots i:nth-child(4) { transition-delay: 0.86s; }
.entry__dots i:nth-child(5) { transition-delay: 0.94s; }

/* relations */
.rel { width: min(100%, 440px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.rel li {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 6px 16px 6px 6px; border-radius: var(--pill);
  background: var(--tone-1);
  opacity: 0; transform: translateX(-18px);
  transition: opacity 0.3s var(--ease-out), transform 0.45s var(--ease-spring);
}
.rel li span { font-weight: 500; color: var(--ink); min-width: 0; }
.rel li b { flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--pill); background: var(--paper); font: 700 0.82rem/1 var(--font-display); }

/* flying source pills (outer = x, middle = y: different curves give an arc) */
.flies { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fly { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translateX(var(--x1)); transition: transform 0.7s cubic-bezier(0.55, 0, 0.75, 0.25); transition-delay: calc(var(--i) * 70ms); }
.fly > span { display: block; transform: translateY(var(--y1)); transition: transform 0.7s var(--ease-story); transition-delay: calc(var(--i) * 70ms); }
.fly .chip {
  min-height: 44px; padding: 0 18px; font-size: 1rem;
  transform: translate(-50%, -50%) rotate(var(--r1, 0deg));
  transition: transform 0.7s var(--ease-out), opacity 0.35s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms);
  animation: bob 3.6s ease-in-out calc(var(--i) * -0.7s) infinite alternate;
}
@keyframes bob { to { translate: 0 -8px; } }
.fly:nth-child(1) { --i: 0; --x1: -210px; --y1: -170px; --r1: -6deg; }
.fly:nth-child(2) { --i: 1; --x1: 190px; --y1: -110px; --r1: 5deg; }
.fly:nth-child(3) { --i: 2; --x1: -220px; --y1: 40px; --r1: 4deg; }
.fly:nth-child(4) { --i: 3; --x1: 210px; --y1: 90px; --r1: -4deg; }
.fly:nth-child(5) { --i: 4; --x1: -20px; --y1: 190px; --r1: 3deg; }

/* states */
.story__stage[data-state="1"] .fly .chip { opacity: 1; }
.story__stage:not([data-state="1"]) .fly { transform: translateX(0); }
.story__stage:not([data-state="1"]) .fly > span { transform: translateY(46px); }
.story__stage:not([data-state="1"]) .fly .chip { transform: translate(-50%, -50%) scale(0.35); opacity: 0; animation: none; }
.story__stage:not([data-state="1"]) .entry { opacity: 1; transform: none; }
.story__stage:not([data-state="1"]) .entry__dots i { opacity: 1; transform: none; }
.story__stage[data-state="1"] .entry { transition-delay: 0s; }
.story__stage[data-state="3"] .ask { opacity: 1; transform: none; }
.story__stage[data-state="3"] .rel li { opacity: 1; transform: none; }
.story__stage[data-state="3"] .rel li:nth-child(1) { transition-delay: 0.15s; }
.story__stage[data-state="3"] .rel li:nth-child(2) { transition-delay: 0.32s; }
.story__stage[data-state="3"] .rel li:nth-child(3) { transition-delay: 0.49s; }
.story__stage[data-state="1"] .entry__dots i { transition-delay: 0s; }

/* ---------- feature bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  height: 100%; min-width: 0;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: var(--r-lg);
  background: var(--paper);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.sec--paper .card { background: var(--base); }
.card p { color: var(--ink-2); max-width: 46ch; }
.card .btn, .card .link-arrow { margin-top: auto; align-self: flex-start; }
@media (hover: hover) {
  .card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px -26px color-mix(in oklab, var(--c) 70%, transparent); }
  .card:hover .glyph i { transform: scale(1.22) rotate(-14deg); }
}
.card__head { display: flex; align-items: center; gap: 14px; }
.card__head h3 { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem); }
.glyph { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--c) 24%, var(--paper)); }
.glyph i { display: block; width: 26px; height: 26px; background: var(--c); transition: transform 0.3s var(--ease-spring); }
.glyph--circle i { border-radius: 50%; }
.glyph--pill i { width: 30px; height: 14px; border-radius: var(--pill); }
.glyph--half i { width: 30px; height: 15px; border-radius: 30px 30px 0 0; }
.glyph--blob i { border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%; }
.glyph--quarter i { border-radius: 0 100% 0 0; }
.card--color { background: var(--c); }
.card--color p { color: var(--ink); }
.card--color .glyph { background: color-mix(in oklab, var(--c) 55%, var(--paper)); }
.card--color .glyph i { background: var(--ink); }

/* stacked source rows (dedup card) */
.card__foot { margin-top: auto; display: grid; gap: 12px; justify-items: start; }
.card__foot > * { width: 100%; }
.card__foot > .tag { width: auto; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.stack li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 6px 8px 6px 16px; border-radius: var(--pill);
  background: color-mix(in oklab, var(--c) 30%, var(--paper));
  font-weight: 500;
}
.stack li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack li b { flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--pill); background: var(--paper); font: 700 0.82rem/1 var(--font-display); }
.stack li.is-entry { background: var(--ink); color: var(--paper); font: 800 1.05rem/1.2 var(--font-display); }
.stack li.is-entry b { background: var(--ink-up-2); color: var(--paper); }

/* example code */
.code { margin-top: auto; background: var(--ink); color: var(--paper); border-radius: var(--r-md); overflow: hidden; min-width: 0; }
.code__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; font: 700 0.9rem/1.2 var(--font-display); color: var(--ink-soft); background: var(--ink-up); }
.code__bar .chip { min-height: 28px; padding: 0 12px; font-size: 0.78rem; }
.code pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; font: 400 0.86rem/1.7 var(--font-mono); tab-size: 2; color: #E4E7EF; }
.code pre:focus-visible { outline-color: var(--voice); outline-offset: -4px; }
.code .c { color: var(--ink-soft); }
.code .k { color: #B7BDCC; }
.code .s { color: var(--paper); }
.code .t-video { color: var(--video); font-weight: 700; }
.code .t-code { color: var(--code); font-weight: 700; }
.code .t-web { color: var(--web); font-weight: 700; }
.code .t-voice { color: var(--voice); font-weight: 700; }

/* ---------- use cases: split, interactive ---------- */
.cases__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: stretch; }
.cases__copy p.lead { margin-top: 18px; }
.cases__tabs { margin-top: clamp(26px, 3vw, 40px); display: grid; gap: 8px; }
.case-tab {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 64px; padding: 10px 22px 10px 14px;
  border: 0; border-radius: var(--pill);
  background: transparent; color: var(--ink); cursor: pointer; text-align: left;
  font: 700 clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem)/1.2 var(--font-display);
  transition: background-color 0.2s var(--ease-out), scale 0.16s var(--ease-out);
}
.case-tab .glyph { width: 44px; height: 44px; }
.case-tab .glyph i { width: 20px; height: 20px; }
.case-tab .glyph--pill i { width: 24px; height: 11px; }
.case-tab .glyph--half i { width: 24px; height: 12px; }
.case-tab:active { scale: 0.98; }
@media (hover: hover) { .case-tab:hover { background: var(--base); } .case-tab:hover .glyph i { transform: scale(1.2) rotate(-12deg); } }
.case-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.case-tab[aria-selected="true"] .glyph { background: var(--c); }
.case-tab[aria-selected="true"] .glyph i { background: var(--ink); }
.cases__copy { min-width: 0; }
.cases__panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.case > p { overflow-wrap: anywhere; }
html:not(.js) .cases__tabs { display: none; }
.cases.is-live .cases__panels > * { grid-area: 1 / 1; }
.cases.is-live .case:not(.is-on) { opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.985); }
.case {
  display: flex; flex-direction: column; gap: 18px; min-width: 0;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--r-xl);
  background-color: var(--c); color: var(--ink);
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out), visibility 0s;
}
.case__head { display: flex; align-items: center; gap: 14px; }
.case__head .glyph { background: color-mix(in oklab, var(--c) 50%, var(--paper)); }
.case__head .glyph i { background: var(--ink); }
.case__src { font: 700 0.95rem/1 var(--font-display); }
.case h3 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.9rem); letter-spacing: -0.03em; }
.case__flow { margin-top: auto; display: grid; gap: 10px; }
.case__flow > div {
  display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 16px 20px; border-radius: var(--r-md);
  background: color-mix(in oklab, var(--c) 42%, var(--paper));
}
.case__flow dt { font: 800 0.92rem/1.2 var(--font-display); }
.case__flow dd { font-size: 1.04rem; line-height: 1.45; }
.case__flow > div:last-child { background: var(--ink); color: var(--paper); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 10px; }
.faq__item { border-radius: var(--r-md); background: var(--paper); transition: background-color 0.2s var(--ease-out); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 20px 20px 26px;
  font: 700 clamp(1.08rem, 1rem + 0.35vw, 1.26rem)/1.3 var(--font-display);
  border-radius: var(--r-md);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__pm { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--tone-1); transition: transform 0.25s var(--ease-spring), background-color 0.2s var(--ease-out); }
.faq__pm::before, .faq__pm::after { content: ""; position: absolute; left: 13px; right: 13px; top: 19px; height: 2.5px; border-radius: 2px; background: var(--ink); }
.faq__pm::after { transform: rotate(90deg); }
@media (hover: hover) { .faq__item summary:hover .faq__pm { transform: scale(1.1); } }
.faq__item[open] .faq__pm { transform: rotate(45deg); background: var(--voice); }
.faq__a { padding: 0 26px 24px; color: var(--ink-2); max-width: 64ch; }
.faq__item[open] .faq__a { animation: rise 0.28s var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- waitlist band ---------- */
.join { background: var(--ink); color: var(--paper); padding-block: var(--section); overflow: clip; }
.join__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.join__copy, .join__form { min-width: 0; }
.join h2 { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 5rem); }
.join__copy p { margin-top: 20px; max-width: 40ch; font-size: 1.2rem; color: #C9CEDB; }
.confetti { margin-top: clamp(32px, 4vw, 56px); display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.confetti i { display: block; animation: drift var(--dur, 6s) ease-in-out var(--delay, 0s) infinite alternate; }
.confetti i:nth-child(1) { width: 76px; height: 76px; border-radius: 50%; background: var(--video); --dx: 0px; --dy: -14px; --dr: 0deg; }
.confetti i:nth-child(2) { width: 92px; height: 46px; border-radius: 92px 92px 0 0; background: var(--code); --dur: 7s; --delay: -2s; --dx: 6px; --dy: -8px; --dr: 6deg; }
.confetti i:nth-child(3) { width: 66px; height: 74px; border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%; background: var(--web); --dur: 5.5s; --delay: -1s; --dx: -4px; --dy: -16px; --dr: 18deg; }
.confetti i:nth-child(4) { width: 116px; height: 46px; border-radius: var(--pill); background: var(--voice); rotate: -7deg; --dur: 6.5s; --delay: -3s; --dx: 8px; --dy: -10px; --dr: -6deg; }
.join .form { box-shadow: none; }
.join .form-success { padding: clamp(24px, 3vw, 40px); border-radius: var(--r-lg); background: var(--code); color: var(--ink); }
.join .form-success h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); }
.join .form-success p { margin-top: 10px; font-size: 1.1rem; }

/* ---------- content page hero (for builders) ---------- */
.page-hero { padding: clamp(28px, 4vw, 56px) 0 var(--section); }
.page-hero__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: stretch; }
.page-hero__copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding-block: 12px; }
.page-hero h1 { font-size: clamp(2.6rem, 1.3rem + 4.6vw, 5.25rem); line-height: 1; letter-spacing: -0.04em; }
.page-hero .lead { margin-top: 22px; }
.page-hero__actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.page-hero__field { position: relative; isolation: isolate; overflow: hidden; container-type: size; min-height: 340px; border-radius: var(--r-xl); background: var(--c); }
.page-hero--center { text-align: center; }
.page-hero--center .lead { margin-inline: auto; }
.page-hero--center .page-hero__actions { justify-content: center; }

/* simple steps (content pages) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; padding: 28px; border-radius: var(--r-lg); background: var(--paper); display: flex; flex-direction: column; gap: 12px; }
.steps li::before { content: counter(s); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--tone-1)); font: 800 1.3rem/1 var(--font-display); }

/* ---------- carousel ---------- */
[data-slider] { position: relative; }
.slider__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.slider__head h2, .slider__head h3 { margin: 0; }
.slider__nav { display: flex; gap: 8px; flex: none; }
.slider-btn {
  width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--ink); color: var(--paper);
  transition: scale 0.16s var(--ease-out), opacity 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
  position: relative; overflow: hidden; isolation: isolate;
}
.slider-btn:active { scale: 0.92; }
.slider-btn:disabled { opacity: 0.3; cursor: default; scale: 1; }
.slider-btn svg { width: 20px; height: 20px; }
[data-slider-track] {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, calc((100% - 32px) / 3));
  gap: 16px; align-items: stretch;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px;
}
[data-slider-track]::-webkit-scrollbar { display: none; }
[data-slider-track] > * { scroll-snap-align: start; grid-column: auto; height: 100%; }
[data-slider-track] > * > .card { height: 100%; }

/* ---------- footer ---------- */
.foot { background: #101117; color: #C9CEDB; padding: clamp(48px, 6vw, 80px) 0 28px; }
.foot__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 32px; align-items: start; }
.foot .brand { color: var(--paper); }
.foot__brand p { margin-top: 16px; max-width: 34ch; color: var(--ink-soft); }
.foot__nav { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px 36px; }
.foot a:not(.brand) { text-decoration: none; color: #E4E7EF; }
.foot__nav a, .foot__mail {
  display: inline-block; padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 2px) / 0 2px no-repeat;
  transition: background-size 0.25s var(--ease-out), transform 0.2s var(--ease-out);
}
@media (hover: hover) { .foot__nav a:hover, .foot__mail:hover { background-size: 100% 2px; transform: translateX(3px); } }
.foot__mail { font: 700 1.15rem/1.3 var(--font-display); color: var(--paper); }
.foot__label { display: block; margin-bottom: 8px; font: 700 0.85rem/1 var(--font-display); color: var(--ink-soft); }
.foot__bar { margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; box-shadow: inset 0 1px 0 var(--ink-up-2); font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  html:not(.js) .nav__links { display: flex; overflow-x: auto; }
  html:not(.js) .nav__toggle { display: none; }
  .bento .span-7, .bento .span-5 { grid-column: 1 / -1; }
  .foot__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 20px; }
  .hero__copy { padding-block: 12px 0; }
  .stage { min-height: 0; height: clamp(320px, 92vw, 460px); }
  .story { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* phones: nothing sticky. Without JS the shared stage simply follows the steps in its final state;
     with JS it is replaced by one small stage per step (see app.js) */
  .story__stage { position: static; height: auto; min-height: 0; margin-top: 8px; }
  .story--m > .story__stage { display: none; }
  .story__stage:not(.ag-stage) .story__body::before { display: none; }

  /* vertical timeline: a line down the left edge, a numbered badge per step, text never faded */
  .story__steps { position: relative; }
  .story .step, .story .step:first-child, .story .step:last-child {
    position: relative; min-height: 0; justify-content: flex-start;
    padding: 0 0 44px 48px;
  }
  .story .step:last-child { padding-bottom: 0; }
  .story.is-live .step:not(.is-active) { opacity: 1; }
  .story .step:nth-child(1) { --sc: var(--video); --sc2: var(--voice); }
  .story .step:nth-child(2) { --sc: var(--voice); --sc2: var(--code); }
  .story .step:nth-child(3) { --sc: var(--code); --sc2: var(--web); }
  .story .step .step__n {
    position: absolute; left: 0; top: 0; z-index: 1;
    width: 36px; height: 36px; margin: 0;
    background: var(--sc); color: var(--ink); transform: none;
    font-size: 1.05rem;
  }
  .story .step h3 { padding-top: 3px; font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); }
  .story .step p { margin-top: 10px; font-size: 1.05rem; }
  /* the line: a grey track plus a four-colour fill, one segment per step (badge centre to next badge centre) */
  .story .step::before, .story .step::after {
    content: ""; position: absolute; left: 16px; top: 18px; bottom: -18px; width: 4px; border-radius: 2px;
  }
  .story .step:last-child::before, .story .step:last-child::after { bottom: 0; }
  .story .step::before { background: var(--tone-2); }
  .story .step::after { background: linear-gradient(to bottom, var(--sc), var(--sc2)); transform-origin: top; }
  .story.is-anim .step:not(.is-in)::after { transform: scaleY(0); }
  .story.is-anim .step.is-in::after { animation: ms-line 1.2s var(--ease-story) backwards; }
  .story.is-anim .step:not(.is-in) .step__n { background: var(--tone-1); transform: scale(0.82); }
  .story.is-anim .step.is-in .step__n { animation: ms-badge 0.7s var(--ease-spring) backwards; }
  @keyframes ms-line { from { transform: scaleY(0); } }
  @keyframes ms-badge {
    0% { transform: scale(0.5) rotate(-24deg); box-shadow: 0 0 0 0 color-mix(in oklab, var(--sc) 65%, transparent); }
    55% { transform: scale(1.22) rotate(6deg); }
    100% { transform: none; box-shadow: 0 0 0 14px color-mix(in oklab, var(--sc) 0%, transparent); }
  }

  /* per-step stage card, placed under the step text (built by app.js; base state = final state) */
  .mstage {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start;
    max-width: 520px; margin-top: 20px; padding: 12px;
    border-radius: var(--r-lg); background: var(--base);
    -webkit-tap-highlight-color: transparent;
  }
  .story.is-anim .mstage { cursor: pointer; }
  .mstage__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .mstage__replay {
    min-height: 32px; padding: 0 14px; border: 0; border-radius: var(--pill);
    background: var(--paper); color: var(--ink); cursor: pointer;
    font: 700 0.85rem/1 var(--font-display);
  }
  .mstage__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
  .mstage .ask, .mstage .entry, .mstage .rel li, .mstage .ag-query, .mstage .entry__dots i { opacity: 1; transform: none; transition: none; }
  .mstage .ask, .mstage .ag-task, .mstage .ag-query { justify-self: start; font-size: 0.9rem; }
  .mstage .entry { width: 100%; padding: 14px 16px; }
  .mstage .rel { width: 100%; }
  .ms__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-block: 6px; }
  .ms__chips .chip { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
  .ms__merge { position: relative; container-type: inline-size; }
  .story.is-anim .ms__merge { padding-top: 48px; }
  .ms__flies { position: absolute; inset: 48px 0 0; z-index: 2; pointer-events: none; }
  .mf { position: absolute; left: 0; right: 0; top: 50%; display: flex; justify-content: center; opacity: 0; transform: translateY(-50%); }
  .mf__in { display: block; max-width: 100%; }
  .mf .chip { min-height: 38px; padding: 0 16px; font-size: 0.92rem; }

  /* before a stage plays, the parts that animate in are hidden (only when JS armed the timeline) */
  .story.is-anim .mstage:not(.is-play) :is(.a-drop, .a-slide, .a-rise, .a-pulse, .a-seq > li, .a-dots .entry__dots i) { opacity: 0; }

  /* step 1: chips drop in from above with a small bounce, then drift */
  .mstage.is-play .a-drop { animation: ms-drop 0.95s linear calc(var(--i, 0) * 0.11s) backwards; }
  .mstage.is-play .a-drift {
    animation: ms-drop 0.95s linear calc(var(--i, 0) * 0.11s) backwards,
               ms-drift 3.4s ease-in-out calc(1.3s + var(--i, 0) * 0.11s) infinite alternate;
  }
  .a-drift:nth-child(odd) { --dx: -4px; --dr: -1.6deg; }
  .a-drift:nth-child(even) { --dx: 4px; --dr: 1.6deg; }
  @keyframes ms-drop {
    0% { opacity: 0; translate: 0 -130px; animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.5); }
    12% { opacity: 1; }
    55% { opacity: 1; translate: 0 0; animation-timing-function: ease-out; }
    72% { translate: 0 -12px; animation-timing-function: ease-in; }
    88% { translate: 0 0; animation-timing-function: ease-out; }
    94% { translate: 0 -3px; animation-timing-function: ease-in; }
    100% { opacity: 1; translate: 0 0; }
  }
  @keyframes ms-drift { to { transform: translate(var(--dx, 3px), -6px) rotate(var(--dr, 1.5deg)); } }

  /* step 2: chips glide on curved paths (x and y ease differently) into one entry card that pulses */
  .mstage.is-play .mf {
    animation: ms-gx 1.1s cubic-bezier(0.55, 0, 0.8, 0.45) calc(var(--n, 0) * 0.1s) both,
               ms-fade 1.1s linear calc(var(--n, 0) * 0.1s) both;
  }
  .mstage.is-play .mf__in { animation: ms-gy 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) calc(var(--n, 0) * 0.1s) both; }
  @keyframes ms-gx { from { translate: var(--fx, 0px) 0; } to { translate: 0 0; } }
  @keyframes ms-gy { from { translate: 0 var(--fy, 0px); } to { translate: 0 0; } }
  @keyframes ms-fade {
    0% { opacity: 0; scale: 1; }
    10%, 72% { opacity: 1; scale: 1; }
    100% { opacity: 0; scale: 0.35; }
  }
  .mstage.is-play .a-pulse {
    animation: ms-pulse 0.9s var(--ease-spring) var(--t0, 1.4s) backwards,
               ms-ring 1.5s ease-out calc(var(--t0, 1.4s) + 0.2s) 2;
  }
  @keyframes ms-pulse {
    0% { opacity: 0; scale: 0.88; }
    45% { opacity: 1; scale: 1.06; }
    100% { opacity: 1; scale: 1; }
  }
  @keyframes ms-ring {
    from { box-shadow: var(--shadow-whisper), 0 0 0 0 color-mix(in oklab, var(--ink) 30%, transparent); }
    to { box-shadow: var(--shadow-whisper), 0 0 0 20px color-mix(in oklab, var(--ink) 0%, transparent); }
  }
  .mstage.is-play .a-dots .entry__dots i { animation: ms-pop 0.45s var(--ease-spring) calc(var(--t0, 0.5s) + 0.3s + var(--k, 0) * 0.08s) backwards; }
  .entry__dots i:nth-child(2) { --k: 1; }
  .entry__dots i:nth-child(3) { --k: 2; }
  .entry__dots i:nth-child(4) { --k: 3; }
  .entry__dots i:nth-child(5) { --k: 4; }
  @keyframes ms-pop { from { opacity: 0; scale: 0.3; } }
  .mstage.is-play .a-seq > li { animation: ms-slide 0.5s var(--ease-spring) calc(var(--t0, 1.4s) + 0.9s + var(--k, 0) * 0.3s) backwards; }

  /* step 3: the question slides in, the answer card rises */
  .mstage.is-play .a-slide { animation: ms-slide 0.55s var(--ease-spring) backwards; }
  .mstage.is-play .a-rise { animation: ms-rise 0.7s var(--ease-spring) var(--t0, 0.5s) backwards; }
  @keyframes ms-slide { from { opacity: 0; translate: -36px 0; scale: 0.96; } }
  @keyframes ms-rise { from { opacity: 0; translate: 0 36px; scale: 0.94; } }
  .fly:nth-child(1) { --x1: -96px; --y1: -110px; }
  .fly:nth-child(2) { --x1: 92px; --y1: -66px; }
  .fly:nth-child(3) { --x1: -86px; --y1: 10px; }
  .fly:nth-child(4) { --x1: 84px; --y1: 70px; }
  .fly:nth-child(5) { --x1: -20px; --y1: 132px; }
  .fly .chip { min-height: 38px; font-size: 0.9rem; padding: 0 14px; }
  .cases__in, .join__in, .page-hero__in { grid-template-columns: minmax(0, 1fr); }
  .bento .span-4, .bento .span-6 { grid-column: 1 / -1; }
  .grid-3, .steps { grid-template-columns: minmax(0, 1fr); }
  [data-slider-track] { grid-auto-columns: minmax(260px, 84%); }
}
@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .combo { flex-direction: column; align-items: stretch; padding: 0; background: transparent; box-shadow: none; border-radius: 0; gap: 10px; }
  .combo:focus-within { box-shadow: none; }
  .combo input[type="email"] { background: var(--paper); border-radius: var(--pill); box-shadow: var(--shadow-whisper); min-height: 54px; }
  .combo input[type="email"]:focus-visible { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 4px color-mix(in oklab, var(--voice) 55%, transparent); }
  .combo .btn { width: 100%; }
  .stage__cap { left: 14px; top: 14px; }
  .stage__legend { left: 12px; right: 12px; bottom: 12px; gap: 6px; }
  .src-pill { min-height: 38px; padding: 0 12px 0 10px; font-size: 0.85rem; }
  .story__stage { padding: 14px; border-radius: var(--r-lg); }
  .story__cap { display: none; }
  .story__top { justify-content: flex-end; }
  .story__body { gap: 10px; }
  .ask { font-size: 0.84rem; padding: 8px 14px 8px 8px; }
  .entry { padding: 16px 18px; }
  .entry__name { font-size: 1.2rem; }
  .entry__sum { font-size: 0.92rem; }
  .rel li { min-height: 38px; font-size: 0.88rem; line-height: 1.25; }
  .case__flow > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .case-tab { min-height: 56px; }
  .marquee__list li { min-height: 42px; font-size: 1rem; padding: 0 18px; }
  .scallop { height: 28px; }
  .scallop::before {
    width: calc(100% + 112px);
    background:
      radial-gradient(circle at 14px 28px, var(--video) 13.5px, transparent 14px) 0 0 / 112px 28px repeat-x,
      radial-gradient(circle at 42px 28px, var(--voice) 13.5px, transparent 14px) 0 0 / 112px 28px repeat-x,
      radial-gradient(circle at 70px 28px, var(--code) 13.5px, transparent 14px) 0 0 / 112px 28px repeat-x,
      radial-gradient(circle at 98px 28px, var(--web) 13.5px, transparent 14px) 0 0 / 112px 28px repeat-x;
    animation-name: scallop-sm;
  }
  .confetti i:nth-child(1) { width: 56px; height: 56px; }
  .confetti i:nth-child(2) { width: 70px; height: 35px; }
  .confetti i:nth-child(3) { width: 50px; height: 56px; }
  .confetti i:nth-child(4) { width: 86px; height: 36px; }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
  .code pre { font-size: 0.78rem; padding: 16px; }
}
@keyframes scallop-sm { to { transform: translateX(-112px); } }
@media (max-width: 380px) {
  .brand__name { font-size: 1.35rem; }
  .src-pill { font-size: 0.8rem; }
}
@media (min-width: 1800px) {
  :root { --max: 1440px; }
  body { font-size: 1.125rem; }
}

/* ---------- reduced motion: everything readable, nothing moving ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .btn { translate: none; }
  .rv { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .sh { transform: none; }
  .marquee__rail { width: auto; }
  .marquee__list { flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); }
  .marquee__list[aria-hidden="true"] { display: none; }
  .progress { display: none; }
}
