/* MANIFOLD — landing page stylesheet.
   Sections: tokens · reset · layout · buttons · header + mega menu · hero +
   demo wall · value cards + stats · demo grid · how it works · page kinds ·
   features · faq · cta · footer · docs · motion · responsive. */

/* ------------------------------------------------------------ tokens */
:root {
  --ink: #0f1014;
  --ink-2: #16171d;
  --ink-3: #1f2028;
  --ink-line: rgba(255,255,255,.09);
  --paper: #ffffff;
  --mist: #f5f6fb;
  --mist-2: #eceef6;
  --line: #e4e6ef;
  --text: #14151b;
  --muted: #6b6e7f;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-3: #d946ef;
  --grad: linear-gradient(90deg, #22d3ee, #6366f1 55%, #d946ef);
  --grad-tile-a: linear-gradient(135deg, #22d3ee, #6366f1);
  --grad-tile-b: linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-tile-c: linear-gradient(135deg, #10b981, #0ea5e9);
  --ok: #10b981;

  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-xs: 0.78rem;
  --text-sm: 0.9rem;
  --text-md: 1rem;
  --text-lg: 1.15rem;
  --text-xl: clamp(1.3rem, 1.1rem + .9vw, 1.6rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --text-hero: clamp(2.5rem, 1.4rem + 5vw, 5.4rem);

  --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-12: 3rem; --space-16: 4rem;
  --space-24: clamp(4.5rem, 3rem + 5vw, 7.5rem);

  --radius-sm: 10px; --radius: 16px; --radius-lg: 24px; --radius-pill: 999px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --shadow: 0 1px 2px rgba(20,21,27,.05), 0 20px 50px -20px rgba(20,21,27,.22);
  --shadow-lg: 0 30px 80px -30px rgba(20,21,27,.45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16171d; --mist: #0f1014; --mist-2: #1c1d25; --line: #262833;
    --text: #f2f2f7; --muted: #9a9daf;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 20px 50px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16171d; --mist: #0f1014; --mist-2: #1c1d25; --line: #262833;
  --text: #f2f2f7; --muted: #9a9daf;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 20px 50px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font-text); font-size: var(--text-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 var(--space-4); font-weight: 650; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); letter-spacing: -0.015em; }
h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
p { margin: 0 0 var(--space-4); }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--mist-2); padding: .1em .35em; border-radius: 5px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 100; background: var(--text); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: var(--space-4); }

/* ------------------------------------------------------------ layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-24); position: relative; }
.section-mist { background: var(--mist); }
.center { text-align: center; max-width: 52rem; margin-inline: auto; margin-bottom: var(--space-12); }
.h-display { font-size: var(--text-2xl); letter-spacing: -0.035em; }
.section-lede { color: var(--muted); font-size: var(--text-lg); max-width: 48ch; margin-inline: auto; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: var(--radius-pill); background: var(--mist-2); color: var(--text); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; margin-bottom: var(--space-4); }
.pill-grad { background: var(--grad); color: #fff; }
.pill-dark { background: rgba(255,255,255,.1); color: #fff; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ----------------------------------------------------------- buttons */
.button { display: inline-flex; align-items: center; gap: .55rem; padding: .9rem 1.5rem; border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; line-height: 1; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button:hover { transform: translateY(-2px); }
.button-grad { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(99,102,241,.7); }
.button-grad:hover { box-shadow: 0 16px 36px -10px rgba(99,102,241,.8); }
.button-outline { border-color: rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.04); }
.button-outline:hover { border-color: #fff; }
.button-light { background: #fff; color: var(--ink); padding-block: .7rem; }
.button-light:hover { background: #f0f0f5; }

/* ------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,16,20,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--ink-line); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: var(--space-6); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; fill: url(#brand-grad); }
.site-header .brand-mark, .site-footer .brand-mark { fill: #fff; }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav-item { position: static; }
.nav-link { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .85rem; border-radius: var(--radius-pill); text-decoration: none; font-weight: 500; font-size: var(--text-sm); background: transparent; border: 0; cursor: pointer; color: rgba(255,255,255,.82); transition: background .2s, color .2s; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: rgba(255,255,255,.08); color: #fff; }
.chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-cta { margin-left: var(--space-3); }

.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink-2); border-bottom: 1px solid var(--ink-line); box-shadow: var(--shadow-lg); max-height: calc(100vh - var(--header-h)); overflow: auto; color: #fff; }
.mega-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-6) var(--space-8); padding-block: var(--space-8); }
.mega-group h4 { margin-bottom: var(--space-3); color: rgba(255,255,255,.5); }
.mega-group a { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; text-decoration: none; font-size: var(--text-sm); color: rgba(255,255,255,.85); border-radius: 4px; }
.mega-group a:hover { color: #fff; }
.mega-group small { color: rgba(255,255,255,.4); font-size: var(--text-xs); }
.mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); border-top: 1px solid var(--ink-line); padding-top: var(--space-4); color: rgba(255,255,255,.55); font-size: var(--text-sm); }
.mega-foot a { color: #fff; }

.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--ink-line); border-radius: var(--radius-sm); background: transparent; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: #fff; transition: transform .25s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------- hero */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; padding-top: var(--space-16); margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + var(--space-16)); }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 50% -10%, rgba(99,102,241,.35), transparent 55%),
                    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: auto, 28px 28px; }
.hero-number { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); font-family: var(--font-display); font-weight: 800; font-size: clamp(14rem, 34vw, 30rem); line-height: 1; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(255,255,255,.07), transparent 75%); -webkit-background-clip: text; background-clip: text; }
.hero-inner { position: relative; text-align: center; max-width: 60rem; padding-top: var(--space-12); }
.hero-title { font-size: var(--text-hero); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: var(--space-6); }
.hero-lede { font-size: var(--text-lg); color: rgba(255,255,255,.68); max-width: 58ch; margin-inline: auto; margin-bottom: var(--space-8); }
.hero-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: var(--space-6); font-size: var(--text-sm); color: rgba(255,255,255,.45); }
.hero-note b { color: rgba(255,255,255,.85); font-weight: 600; }

/* the wall: three rows of demo screenshots, tilted in 3D, drifting */
.wall { position: relative; margin-top: var(--space-24); height: clamp(320px, 42vw, 560px); perspective: 1600px; }
.wall::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(180deg, transparent, var(--ink)); pointer-events: none; z-index: 2; }
.wall-tilt { position: absolute; left: 50%; top: 0; width: 160%; transform: translateX(-50%) rotateX(34deg) rotateZ(-7deg); transform-origin: 50% 0; transform-style: preserve-3d; display: grid; gap: 22px; }
.wall-row { display: flex; gap: 22px; width: max-content; animation: drift 90s linear infinite; }
.wall-row:nth-child(2) { animation-duration: 120s; animation-direction: reverse; }
.wall-row:nth-child(3) { animation-duration: 105s; }
.wall-card { width: 300px; aspect-ratio: 4 / 5; flex: none; border-radius: 12px; overflow: hidden; background: var(--ink-3); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08); }
.wall-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@keyframes drift { to { transform: translateX(-50%); } }
.sticker { position: absolute; left: clamp(8px, 6vw, 90px); top: 8%; z-index: 3; width: 128px; height: 128px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: rotate(-12deg); box-shadow: 0 20px 40px -15px rgba(99,102,241,.8), 0 0 0 6px rgba(255,255,255,.08); }
.sticker-big { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.04em; line-height: 1; }
.sticker-small { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-top: .3rem; }

/* ------------------------------------------------- value cards + stats */
.value-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.value-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-8) var(--space-6) var(--space-6); text-align: center; box-shadow: var(--shadow); }
.value-card h3 { font-size: var(--text-lg); margin-bottom: .4rem; }
.value-card p { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.tile-scene { position: relative; height: 128px; margin-bottom: var(--space-6); display: grid; place-items: center; }
.tile { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; box-shadow: 0 16px 30px -12px rgba(20,21,27,.4); transform: rotate(-6deg); }
.tile svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile-a { background: var(--grad-tile-a); }
.tile-b { background: var(--grad-tile-b); }
.tile-c { background: var(--grad-tile-c); }
.float-tag { position: absolute; padding: .3rem .6rem; border-radius: var(--radius-pill); background: var(--paper); border: 1px solid var(--line); font-size: var(--text-xs); color: var(--muted); box-shadow: var(--shadow); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.float-tag.t1 { left: 12%; top: 14%; }
.float-tag.t2 { right: 10%; top: 26%; }
.float-tag.t3 { left: 18%; bottom: 10%; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); margin: var(--space-16) 0 0; padding: 0; text-align: center; }
.stat dd { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat dt { margin-top: .5rem; font-size: var(--text-sm); color: var(--muted); }
.hosts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin: var(--space-12) 0 0; font-size: var(--text-sm); color: var(--muted); }
.hosts > span:first-child { margin-right: .5rem; }
.host { padding: .45rem .9rem; border-radius: var(--radius-pill); background: var(--paper); border: 1px solid var(--line); color: var(--text); font-weight: 500; font-size: var(--text-xs); }
.watermark { position: absolute; left: 50%; bottom: -.12em; transform: translateX(-50%); font-family: var(--font-display); font-weight: 800; font-size: clamp(12rem, 30vw, 26rem); line-height: 1; letter-spacing: -0.06em; color: var(--mist-2); pointer-events: none; user-select: none; z-index: 0; }
.section-mist > .container { position: relative; z-index: 1; }

/* ------------------------------------------------------------- demos */
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); margin-bottom: var(--space-8); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); width: 100%; }
.chip { padding: .5rem .95rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--paper); border-color: var(--text); }
.chip small { opacity: .55; margin-left: .3rem; }
.search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 380px; }
.search svg { position: absolute; left: .9rem; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; padding: .7rem 1rem .7rem 2.6rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); color: var(--text); font: inherit; font-size: var(--text-sm); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.filter-count { margin: 0; color: var(--muted); font-size: var(--text-sm); white-space: nowrap; }

.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--space-6); }
.demo-card { display: block; background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px; text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.demo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.demo-card[hidden] { display: none; }
.frame { border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.frame-bar { height: 22px; display: flex; align-items: center; gap: 5px; padding-left: 10px; background: var(--mist-2); }
.frame-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.demo-thumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mist-2); container-type: size; }
.demo-thumb img { width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: top; transition: transform 6s var(--ease); }
.demo-card:hover .demo-thumb img { transform: translateY(calc(-1 * max(0px, 100% - 100cqh))); }
.demo-tags { display: flex; gap: .3rem; flex: none; }
.badge { padding: .3rem .6rem; border-radius: var(--radius-pill); font-size: var(--text-xs); color: var(--muted); border: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.badge-new { color: #fff; border-color: transparent; background: var(--grad); }
.demo-open { position: absolute; right: .6rem; bottom: .6rem; padding: .45rem .8rem; border-radius: var(--radius-pill); background: var(--ink); color: #fff; font-size: var(--text-xs); font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease); }
.demo-card:hover .demo-open, .demo-card:focus-visible .demo-open { opacity: 1; transform: none; }
.demo-body { padding: var(--space-4) .5rem .5rem; }
.demo-body h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.demo-body p { margin: 0 0 .7rem; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.demo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: var(--text-xs); color: var(--muted); }
.meta-pages { white-space: nowrap; margin-right: .2rem; }
.badge { padding: .2rem .55rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); color: var(--text); white-space: nowrap; line-height: 1.3; font-weight: 500; }
.badge-new { color: #fff; border-color: transparent; background: var(--grad); }
.empty { text-align: center; color: var(--muted); padding: var(--space-12) 0; }

/* ------------------------------------------------------ how it works */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-12); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); }
.steps li { display: flex; gap: var(--space-4); }
.steps h3 { font-size: var(--text-lg); margin-bottom: .25rem; }
.steps p { color: var(--muted); margin: 0; font-size: var(--text-sm); }
.step-n { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 700; }
.tree { margin: 0; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--ink); color: rgba(255,255,255,.85); font-size: var(--text-sm); line-height: 1.75; overflow: auto; box-shadow: var(--shadow-lg); }
.tree code { background: none; padding: 0; color: inherit; font-size: inherit; }
.tree .k { color: #22d3ee; }
.tree .c { color: #d946ef; }
.tree .m { color: rgba(255,255,255,.4); }

/* -------------------------------------------------------- page kinds */
.kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--space-4); }
.kind { background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); }
.kind strong { display: block; font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: .2rem; letter-spacing: -0.01em; }
.kind span { color: var(--muted); font-size: var(--text-sm); }
.kind em { font-style: normal; color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------- features */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--space-6); }
.feature { padding: var(--space-6); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.feature h3 { font-size: var(--text-md); margin-bottom: .35rem; }
.feature p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.f-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mist-2); margin-bottom: var(--space-4); }
.f-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------- faq */
.faq-list { max-width: 54rem; margin-inline: auto; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: var(--space-4) 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; color: var(--muted); transition: transform .25s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-bottom: var(--space-4); max-width: 60ch; }

/* --------------------------------------------------------------- cta */
.cta { padding: 0 0 var(--space-24); background: var(--mist); }
.cta-inner { text-align: center; background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: var(--space-16) var(--gutter); position: relative; overflow: hidden; }
.cta-inner::before { content: ""; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(50% 50% at 50% 0%, rgba(99,102,241,.45), transparent 70%); pointer-events: none; }
.cta-inner > * { position: relative; }
.cta-inner p { color: rgba(255,255,255,.65); font-size: var(--text-lg); }

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #fff; padding-top: var(--space-16); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-12); }
.footer-brand p { color: rgba(255,255,255,.55); max-width: 36ch; margin-top: var(--space-4); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.footer-links h4 { color: rgba(255,255,255,.45); }
.footer-links a { display: block; padding: .25rem 0; text-decoration: none; color: rgba(255,255,255,.75); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--ink-line); margin-top: var(--space-12); padding-block: var(--space-6); font-size: var(--text-sm); color: rgba(255,255,255,.5); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #fff; }

/* -------------------------------------------------------------- docs */
.doc { padding-block: var(--space-16) var(--space-24); }
.doc-inner { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.doc-toc a { display: block; padding: .3rem 0; font-size: var(--text-sm); color: var(--muted); text-decoration: none; }
.doc-toc a:hover { color: var(--text); }
.prose { max-width: 72ch; }
.prose .eyebrow { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--accent); margin-bottom: var(--space-3); }
.prose h1 { font-size: var(--text-2xl); margin-bottom: var(--space-6); }
.prose h2 { font-size: var(--text-xl); margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.prose h3 { font-size: var(--text-lg); margin-top: var(--space-8); }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: .35rem; }
.prose strong { color: var(--text); }
.prose pre { background: var(--ink); color: rgba(255,255,255,.85); padding: var(--space-4) var(--space-6); border-radius: var(--radius); overflow: auto; font-size: var(--text-sm); line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin: var(--space-6) 0; }
.prose th, .prose td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; }
.prose .wide { max-width: none; }
.note { border-left: 3px solid var(--accent); background: var(--mist); padding: var(--space-4) var(--space-6); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: var(--space-6) 0; }
.note p { margin: 0; color: var(--text); }

/* ------------------------------------------------------------ motion */
/* Above the fold nothing waits for an observer: the hero rises on load. */
.rise { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
:where(.js) .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
:where(.js) .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :where(.js) .reveal { opacity: 1; transform: none; transition: none; }
  .rise { animation: none; }
  .wall-row { animation: none; }
  .demo-thumb img, .demo-card, .button { transition: none; }
}

/* -------------------------------------------------------- responsive */
@media (max-width: 1023px) {
  .value-cards { grid-template-columns: 1fr; max-width: 34rem; margin-inline: auto; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: var(--space-8); }
  .how, .footer-inner, .doc-inner { grid-template-columns: 1fr; }
  .doc-toc { position: static; display: flex; flex-wrap: wrap; gap: .25rem var(--space-4); }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ink); }
  .menu-toggle { display: flex; }
  .nav { position: fixed; inset: var(--header-h) 0 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); color: #fff; padding: var(--space-4) var(--gutter) var(--space-12); overflow: auto; transform: translateX(100%); transition: transform .3s var(--ease); visibility: hidden; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav-link { padding: .9rem .5rem; border-bottom: 1px solid var(--ink-line); border-radius: 0; font-size: var(--text-md); justify-content: space-between; width: 100%; color: #fff; }
  .nav-cta { margin: var(--space-6) 0 0; justify-content: center; }
  .mega { position: static; box-shadow: none; border: 0; max-height: none; background: transparent; }
  .mega-inner { padding-inline: 0; grid-template-columns: 1fr; gap: var(--space-6); padding-block: var(--space-4); }
  .mega-group a { padding-block: .45rem; font-size: var(--text-md); }
  .mega-group small { white-space: nowrap; }
  .mega-foot { display: none; }
  .hero { padding-top: calc(var(--header-h) + var(--space-12)); }
  .hero-number { display: none; }   /* the watermark crowds the headline on a phone */
  /* Phones get a flat, two-row wall: the 3D tilt over three animated rows
     is more compositing than a small GPU should spend on decoration. */
  .wall { height: 280px; margin-top: var(--space-16); perspective: none; }
  .wall-tilt { width: 200%; gap: 12px; transform: translateX(-50%) rotateZ(-4deg); }
  .wall-row { gap: 12px; }
  .wall-row:nth-child(3) { display: none; }
  .wall-card { width: 150px; }
  .sticker { width: 96px; height: 96px; }
  .sticker-big { font-size: 1.4rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { padding-block: var(--space-12); }
  .footer-links { grid-template-columns: 1fr 1fr; }
}
