/* Semola AI
   Layout: one centered 1120px column; hero splits text / "grain" canvas; sections separated by space and hairlines, cards only where items are objects. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfbf9;
  --surface: #f2f3ef;
  --ink: #15181b;
  --muted: #5b6066;
  --line: #e3e4df;
  --grain: #c5c7c0;
  --accent: #d09a1e;      /* semolina gold, for marks */
  --accent-ink: #8a5d00;  /* gold dark enough for text */
  --btn-bg: #15181b;
  --btn-fg: #fbfbf9;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.2vw, 4.25rem);

  --grain-w: 8px;           /* grains keep the logo's 1.618 : 1 */
  --grain-h: 5px;
  --grain-tilt: -34deg;     /* grey = routine, tilted; gold = done, level */
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur: 700ms;
  --stagger: 70ms;

  --radius: 14px;
  --maxw: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f10;
    --surface: #15181a;
    --ink: #edeee9;
    --muted: #9ba0a5;
    --line: #25282b;
    --grain: #3a3e42;
    --accent: #e6b546;
    --accent-ink: #e6b546;
    --btn-bg: #edeee9;
    --btn-fg: #0d0f10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f10;
  --surface: #15181a;
  --ink: #edeee9;
  --muted: #9ba0a5;
  --line: #25282b;
  --grain: #3a3e42;
  --accent: #e6b546;
  --accent-ink: #e6b546;
  --btn-bg: #edeee9;
  --btn-fg: #0d0f10;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap {
  max-width: calc(var(--maxw) + 2 * 24px);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: var(--grain-w); height: var(--grain-h); border-radius: 50%;
  background: var(--accent);
}

/* Header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em; }
.brand svg { width: 22px; height: 22px; overflow: visible; }
.brand .pulse { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.brand .ai { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 24px; margin-left: 8px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.9375rem; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.lang:hover { color: var(--ink); background: var(--surface); }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav .btn-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 10px;
  font: 500 0.9375rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s, border-color .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { opacity: .88; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 8px; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero h1 { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--muted); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 34em; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-note { font-size: var(--step--1); color: var(--muted); font-family: var(--font-mono); }
.grain-box {
  position: relative; aspect-ratio: 1 / 1; max-width: 100%;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden;
}
.grain-box canvas { width: 100%; height: 100%; }
.grain-legend {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.grain-legend b { display: inline-block; width: var(--grain-w); height: var(--grain-h); margin-right: 4px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grain-box { aspect-ratio: 16 / 10; }
}

/* Tools */
.tools { border-block: 1px solid var(--line); padding-block: clamp(40px, 6vw, 72px); }
.tools-head { display: grid; gap: 6px; margin-bottom: 32px; }
.tools-head h2 { font-size: var(--step-2); letter-spacing: -0.02em; }
.tools-head p { color: var(--muted); font-family: var(--font-mono); font-size: var(--step--1); }
.tools-body { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 44px; align-items: center; }
.tools-rails { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tools-rails .rail { fill: none; stroke: var(--line); stroke-width: 1; transition: opacity .4s; }
.tools-rails .rail.out { opacity: 0; }
.tools-rails .comet { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 14 200; stroke-dashoffset: 14; animation: rail-comet .9s var(--ease) forwards; }
@keyframes rail-comet { to { stroke-dashoffset: -86; } }
.tools-hub { position: relative; z-index: 1; width: 28px; height: 28px; overflow: visible; }
.tools-hub g { fill: currentColor; }
.tools-hub .gold { fill: var(--accent); }
.tools-hub .pulse { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.tools-groups > .tg, .tools-rest > .tg { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 8px 16px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.tools-groups > .tg:first-child { border-top: 0; padding-top: 0; }
.tools-more > summary { display: none; }
.tg { min-width: 0; }
.tg h3 { display: flex; align-items: center; gap: 10px; min-height: 36px; font: 500 0.6875rem/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.ti { width: 20px; height: 20px; flex: none; color: var(--muted); }
.tg ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.8125rem; color: color-mix(in srgb, var(--ink) 80%, transparent);
  transition: border-color .3s, color .3s;
}
.chip::before {
  content: ""; flex: none; width: var(--grain-w); height: var(--grain-h); border-radius: 50%;
  background: var(--grain); rotate: var(--grain-tilt); transition: rotate .45s var(--ease), background-color .3s;
}
.chip-api::before { display: none; }
.chip-api b { font-weight: 500; color: var(--accent-ink); }
.chip:hover, .chip.hit { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--ink); }
.chip:hover::before, .chip.hit::before, .chip.settle::before { background: var(--accent); rotate: 0deg; }
.tools-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
@media (max-width: 760px) {
  .tools-groups > .tg, .tools-rest > .tg { display: block; }
  .tg h3 { min-height: 0; margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .tools-body { grid-template-columns: 1fr; gap: 24px; }
  .tools-rails { display: none; }
  .tools-groups:has(.tools-more:not([open])) > .tg:nth-child(4) { display: none; }
  .tools-more > summary {
    display: inline-flex; align-items: center; height: 40px; margin-top: 14px; padding: 0 14px; cursor: pointer; list-style: none;
    border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-mono); font-size: 0.8125rem;
  }
  .tools-more > summary::-webkit-details-marker { display: none; }
  .tools-more[open] > summary { display: none; }
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); font-size: var(--step-1); max-width: 40em; }

/* Use cases */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  padding: 28px; display: grid; gap: 18px; align-content: start;
  transition: border-color .2s, transform .2s;
}
.case:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.case h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.case > p { color: var(--muted); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; font-size: 0.875rem; }
.flow div { position: relative; background: var(--surface); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.flow .dots { position: absolute; top: 12px; right: 12px; display: flex; gap: 2px; }
.dots i { position: relative; width: 7px; height: 4.3px; border-radius: 50%; background: var(--grain); }
.before .dots i:nth-child(1) { top: 3px; rotate: -89deg; }
.before .dots i:nth-child(2) { top: -2px; rotate: -55deg; }
.before .dots i:nth-child(3) { top: 4px; rotate: -34deg; }
.before .dots i:nth-child(4) { top: 0; rotate: -21deg; }
.before .dots i:nth-child(5) { top: 5px; rotate: -13deg; }
.after .dots i:last-child { background: var(--accent); }
.flow .after::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--accent); opacity: 0; pointer-events: none; }
.flow span { display: block; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.flow .after span { color: var(--accent-ink); }
.flow i { align-self: center; font-style: normal; color: var(--muted); }
.flow i svg { width: 44px; height: 12px; overflow: visible; }
.lk-track { stroke: currentColor; stroke-width: 1; stroke-dasharray: 2 3; transform-box: fill-box; transform-origin: left center; }
.lk-head { stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.lk-comet { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: .3 2; stroke-dashoffset: .3; }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .flow { grid-template-columns: 1fr; } .flow i { justify-self: center; transform: rotate(90deg); } }

/* Ecosystem layers */
.layers { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.layer { padding: 28px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.layer + .layer { border-left: 1px solid var(--line); }
.layer .tag { position: relative; z-index: 1; justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding-right: 10px; background: var(--bg); font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-ink); }
.layer .tag::before { content: ""; width: var(--grain-w); height: var(--grain-h); border-radius: 50%; background: var(--accent); }
.layers .rail { position: absolute; top: 39px; left: 31px; right: calc(100% / 3 - 31px); height: 2px; margin-top: -1px; overflow: hidden; }
.layers .rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); transform-origin: left; }
.layers .rail i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(100% - 64px), var(--accent)); transform: translateX(-100%); }
.layer h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
.layer p { color: var(--muted); font-size: 0.9375rem; }
.layer ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.9375rem; }
.layer li { display: flex; gap: 10px; }
.layer li::before { content: ""; flex: 0 0 7px; height: 4.3px; margin-top: 0.68em; border-radius: 50%; background: var(--grain); rotate: var(--grain-tilt); }
@media (max-width: 860px) {
  .layers { grid-template-columns: 1fr; }
  .layer + .layer { border-left: 0; border-top: 1px solid var(--line); }
  .layer { padding-left: 48px; }
  .layer .tag::before { position: absolute; left: -24px; }
  .layers .rail { top: 39px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; margin: 0 0 0 -1px; }
  .layers .rail::before { top: 0; bottom: 0; left: 50%; right: auto; width: 1px; height: auto; transform-origin: top; }
  .layers .rail i { background: linear-gradient(180deg, transparent calc(100% - 64px), var(--accent)); transform: translateY(-100%); }
}

/* Process */
.steps { position: relative; overflow-x: clip; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.step { position: relative; padding: 0 20px 0 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-ink);
}
.step::after { content: ""; position: absolute; top: 34px; left: 0; right: 0; height: 1px; background: var(--line); transform-origin: left; }
.step .node { position: absolute; z-index: 1; top: 31.5px; left: 0; width: var(--grain-w); height: var(--grain-h); border-radius: 50%; background: var(--accent); }
.node::after, .grid-icon i:last-child::after, .beacon::after, .tier.featured::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; pointer-events: none; }
.node::after, .grid-icon i:last-child::after, .beacon::after { background: var(--accent); }
.steps::after { content: ""; position: absolute; top: 33px; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent calc(100% - 80px), var(--accent)); transform: translateX(-100%); pointer-events: none; }
.step h3 { font-size: var(--step-1); letter-spacing: -0.01em; margin-top: 22px; }
.step p { color: var(--muted); font-size: 0.9375rem; }
.step .meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { padding: 0 0 0 56px; }
  .step::before { position: absolute; z-index: 1; left: 0; top: 0; padding: 2px 0 4px; background: var(--bg); }
  .step::after { display: none; }
  .steps::after { display: none; }
  .steps::before { content: ""; position: absolute; top: 30px; bottom: 0; left: 9px; width: 1px; background: var(--line); transform-origin: top; }
  .step .node { top: 32px; left: 5.5px; }
  .step h3 { margin-top: 0; }
}

/* Audience tiers */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tier { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 14px; min-width: 0; }
.tier.featured { background: var(--surface); border-color: transparent; }
.tier.featured::after { inset: -1px; border: 1px solid var(--accent); }
.grid-icon { display: grid; gap: 2px 3px; grid-auto-rows: 8px; height: 50px; align-content: end; justify-content: start; place-items: center; margin-bottom: 4px; }
.grid-icon.g1 { grid-template-columns: 8px; }
.grid-icon.g3 { grid-template-columns: repeat(3, 8px); }
.grid-icon.g5 { grid-template-columns: repeat(5, 8px); }
.grid-icon i { position: relative; width: var(--grain-w); height: var(--grain-h); border-radius: 50%; background: var(--grain); rotate: var(--rot, 0deg); }
.grid-icon i:last-child { background: var(--accent); }
.tier .who { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.tier h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; align-content: start; font-size: 0.9375rem; }
.tier li { display: flex; gap: 10px; }
.tier li::before { content: "✓"; color: var(--accent-ink); font-size: 0.875rem; }
.tier .price { border-top: 1px solid var(--line); padding-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.tier .price strong { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.principle { display: grid; gap: 10px; align-content: start; min-width: 0; }
.principle svg { width: 28px; height: 28px; color: var(--ink); overflow: visible; }
.principle svg [pathLength] { stroke-dasharray: 1; }
.principle .dot { fill: var(--accent); stroke: none; transform-box: fill-box; transform-origin: center; }
.principle h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
.principle p { color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); }
.faq-grid .section-head { margin-bottom: 0; align-self: start; }
.faq { border-top: 1px solid var(--line); min-width: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 500; font-size: var(--step-1); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 6.2px; margin-top: -3.1px;
  border-radius: 50%; background: var(--muted); rotate: var(--grain-tilt); transition: rotate .45s var(--ease), background-color .3s;
}
.faq details[open] summary::after { background: var(--accent); rotate: 0deg; }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* CTA */
.cta { padding-block: clamp(24px, 4vw, 48px) clamp(64px, 9vw, 120px); }
.cta-box {
  border-radius: 24px; background: var(--btn-bg); color: var(--btn-fg);
  padding: clamp(32px, 6vw, 72px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: end;
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--btn-fg) 30%, transparent) 1.2px, transparent 1.7px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%); mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
}
.cta-box > div { position: relative; }
.beacon { position: absolute; top: clamp(20px, 3vw, 32px); right: clamp(20px, 3vw, 32px); width: 10px; height: 6.2px; border-radius: 50%; background: var(--accent); }
.cta-box h2 { font-size: var(--step-3); }
.cta-box p { opacity: .72; margin-top: 14px; max-width: 34em; }
.cta-actions { display: grid; gap: 12px; justify-items: start; }
.cta-box .btn-primary { background: var(--accent); color: #15181b; }
.mail { font-family: var(--font-mono); font-size: 0.9375rem; opacity: .8; user-select: all; }
.copy { background: none; border: 0; color: inherit; font: inherit; font-family: var(--font-mono); font-size: 0.8125rem; opacity: .6; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.copy:hover { opacity: 1; }
@media (max-width: 760px) { .cta-box { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; font-size: 0.875rem; color: var(--muted); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 10px; font-size: 0.8125rem; font-weight: 500; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .brand { color: var(--ink); margin-bottom: 12px; }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 0.8125rem; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* Legal pages */
.doc { max-width: 720px; padding-block: 64px 96px; }
.doc h1 { font-size: var(--step-3); margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: var(--step--1); font-family: var(--font-mono); margin-bottom: 40px; }
.doc h2 { font-size: var(--step-1); margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; display: grid; gap: 6px; }
.doc a { color: var(--ink); }

/* Motion: one language across the page (grain, rail, comet, pulse).
   Hidden starting states apply only with JS and without reduced motion;
   [data-anim] gets .is-in once on screen and .is-live while it stays there. */
@keyframes rise { from { transform: translateY(10px); opacity: .001; } to { transform: none; opacity: 1; } }
@keyframes halo { from { transform: scale(1); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }
@keyframes halo-loop { 0% { transform: scale(1); opacity: .55; } 30%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes flash { 0%, 100% { opacity: 0; } 30% { opacity: .9; } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-y { from { transform: scaleY(0); } }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 35% { transform: scale(1.8); opacity: 1; } 70%, 100% { transform: scale(1); opacity: 1; } }
@keyframes lk-comet { to { stroke-dashoffset: -1; } }
@keyframes lk-comet-again { to { stroke-dashoffset: -1; } }
@keyframes jitter { to { transform: translate(1px, -1.5px); } }
@keyframes eco-run-x { 0% { transform: translateX(-100%); } 48% { transform: translateX(0); } 54% { transform: translateX(72px); } 54.1%, 100% { transform: translateX(-100%); } }
@keyframes eco-run-y { 0% { transform: translateY(-100%); } 48% { transform: translateY(0); } 54% { transform: translateY(72px); } 54.1%, 100% { transform: translateY(-100%); } }
@keyframes node-1 { 0%, 4%, 100% { transform: scale(1); } 1% { transform: scale(1.7); } }
@keyframes node-2 { 0%, 24%, 28%, 100% { transform: scale(1); } 25% { transform: scale(1.7); } }
@keyframes node-3 { 0%, 48%, 52%, 100% { transform: scale(1); } 49% { transform: scale(1.7); } }
@keyframes bullet-2 { 0%, 20%, 46%, 100% { background-color: var(--grain); rotate: var(--grain-tilt); } 26%, 38% { background-color: var(--accent); rotate: 0deg; } }
@keyframes bullet-3 { 0%, 44%, 70%, 100% { background-color: var(--grain); rotate: var(--grain-tilt); } 50%, 62% { background-color: var(--accent); rotate: 0deg; } }
@keyframes steps-run { 0% { transform: translateX(-100%); } 30% { transform: translateX(0); } 34% { transform: translateX(90px); } 34.1%, 100% { transform: translateX(-100%); } }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .rise.d1 { animation-delay: .06s; }
  .rise.d2 { animation-delay: .12s; }
  .rise.d3 { animation-delay: .18s; }

  .site-header .brand .pulse { animation: halo .9s var(--ease-out) .6s; }
  .site-footer.is-in .brand .pulse { animation: halo .9s var(--ease-out) .3s; }
  .grain-box { cursor: pointer; }
  .grain-legend b.blink { animation: pop .9s var(--ease-out); }

  /* section heads */
  html.js [data-anim]:not(.is-in) :is(.section-head, .tools-head) > * { opacity: 0; }
  .is-in :is(.section-head, .tools-head) > * { animation: rise var(--dur) var(--ease-out) both; }
  .is-in :is(.section-head, .tools-head) > :nth-child(2) { animation-delay: var(--stagger); }
  .is-in :is(.section-head, .tools-head) > :nth-child(3) { animation-delay: calc(2 * var(--stagger)); }

  /* tools: chips appear row by row */
  .tg:nth-child(2) { --g: 1; } .tg:nth-child(3) { --g: 2; } .tg:nth-child(4) { --g: 3; }
  .tools-rest .tg:nth-child(1) { --g: 4; } .tools-rest .tg:nth-child(2) { --g: 5; } .tools-rest .tg:nth-child(3) { --g: 6; } .tools-rest .tg:nth-child(4) { --g: 7; }
  .chip:first-child { --c: 0; } .chip:nth-child(2) { --c: 1; } .chip:nth-child(3) { --c: 2; } .chip:nth-child(4) { --c: 3; } .chip:nth-child(5) { --c: 4; }
  .chip:nth-child(6) { --c: 5; } .chip:nth-child(7) { --c: 6; } .chip:nth-child(8) { --c: 7; } .chip:nth-child(9) { --c: 8; }
  html.js .tools:not(.is-in) :is(.chip, .tg h3, .tools-hub) { opacity: 0; }
  .tools.is-in :is(.chip, .tg h3) { animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--g, 0) * 60ms + var(--c, -1) * 25ms + 175ms); }
  .tools.is-in .tools-hub { animation: rise .5s var(--ease-out) both; }
  .tools-hub.fire .pulse { animation: halo .7s var(--ease-out); }

  /* solutions: rail draws in, a comet runs along it, "with AI" flashes gold */
  .case:nth-child(2) { --d: 90ms; } .case:nth-child(3) { --d: 180ms; } .case:nth-child(4) { --d: 270ms; }
  html.js [data-anim]:not(.is-in) .case { opacity: 0; }
  .is-in .case { animation: rise var(--dur) var(--ease-out) both; animation-delay: var(--d, 0ms); }
  html.js [data-anim]:not(.is-in) .lk-track { transform: scaleX(0); }
  .is-in .lk-track { animation: draw-x .6s var(--ease) both; animation-delay: calc(var(--d, 0ms) + 400ms); }
  .is-in .lk-comet { animation: lk-comet .7s var(--ease) both; animation-delay: calc(var(--d, 0ms) + 1000ms); }
  .is-in .case:hover .lk-comet { animation: lk-comet-again .7s var(--ease) both; }
  .is-in .flow .after::after { animation: flash .9s ease both; animation-delay: calc(var(--d, 0ms) + 1600ms); }
  .is-live .before .dots i { animation: jitter 1.4s ease-in-out infinite alternate; }
  .is-live .before .dots i:nth-child(2n) { animation-duration: 1.1s; animation-delay: -.4s; }
  .is-live .before .dots i:nth-child(3n) { animation-direction: alternate-reverse; }

  /* ecosystem: the rail draws in, nodes turn gold, then a comet loops through */
  html.js [data-anim]:not(.is-in) .layers .rail::before { transform: scaleX(0); }
  .is-in .layers .rail::before { animation: draw-x 1.1s var(--ease) both .2s; }
  html.js [data-anim]:not(.is-in) .layer .tag::before { background: var(--grain); }
  .layer .tag::before { transition: background-color .4s; }
  .layer:nth-child(3) .tag::before { transition-delay: .5s; }
  .layer:nth-child(4) .tag::before { transition-delay: 1s; }
  .is-live .layers .rail i { animation: eco-run-x 5s linear 1.4s infinite; }
  .is-live .layer:nth-child(2) .tag::before { animation: node-1 5s linear 1.4s infinite; }
  .is-live .layer:nth-child(3) .tag::before { animation: node-2 5s linear 1.4s infinite; }
  .is-live .layer:nth-child(4) .tag::before { animation: node-3 5s linear 1.4s infinite; }
  .is-live .layer:nth-child(3) li::before { animation: bullet-2 5s linear 1.4s infinite; }
  .is-live .layer:nth-child(4) li::before { animation: bullet-3 5s linear 1.4s infinite; }
  .is-live .layer li:nth-child(2)::before { animation-delay: 1.55s; }
  .is-live .layer li:nth-child(3)::before { animation-delay: 1.7s; }

  /* process: the line draws step by step, each node lights up as it arrives */
  .step:nth-child(2) { --d: 350ms; } .step:nth-child(3) { --d: 700ms; } .step:nth-child(4) { --d: 1050ms; } .step:nth-child(5) { --d: 1400ms; }
  html.js [data-anim]:not(.is-in) .step::after { transform: scaleX(0); }
  .is-in .step::after { animation: draw-x .35s linear both; animation-delay: var(--d, 0ms); }
  html.js [data-anim]:not(.is-in) .step > :not(.node),
  html.js [data-anim]:not(.is-in) .step::before { opacity: 0; }
  html.js [data-anim]:not(.is-in) .step .node { background: var(--grain); rotate: var(--grain-tilt); }
  .step .node { transition: rotate .45s var(--ease), background-color .3s; transition-delay: var(--d, 0ms); }
  .is-in .step .node::after { animation: halo .9s var(--ease-out); animation-delay: calc(var(--d, 0ms) + 150ms); }
  .is-in .step > :not(.node), .is-in .step::before { animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 100ms); }
  .is-live .steps::after { animation: steps-run 6s linear 2.4s infinite; }

  /* audience: grains gather into the grid, the gold one blinks */
  html.js [data-anim]:not(.is-in) .grid-icon i { transform: translate(var(--dx), var(--dy)); rotate: var(--r0, 0deg); opacity: 0; }
  .grid-icon i { transition: transform .8s var(--ease-out), rotate 1s var(--ease-out), opacity .4s; transition-delay: calc(var(--k, 0) * 20ms + 200ms); }
  .is-in .grid-icon i:last-child::after { animation: halo .9s var(--ease-out) 1.3s; }
  .is-live .grid-icon.g1 i::after { animation: halo-loop 3s var(--ease-out) 1.3s infinite; }
  .is-in .tier.featured::after { animation: flash 1.2s ease 1.4s; }

  /* principles: strokes draw, then a gold grain pops in */
  .principle:nth-child(2) { --d: 120ms; } .principle:nth-child(3) { --d: 240ms; } .principle:nth-child(4) { --d: 360ms; }
  html.js [data-anim]:not(.is-in) .principle svg [pathLength] { stroke-dashoffset: 1; }
  .principle svg [pathLength] { transition: stroke-dashoffset .9s var(--ease); transition-delay: var(--d, 0ms); }
  html.js [data-anim]:not(.is-in) .principle .dot { opacity: 0; }
  .is-in .principle .dot { animation: pop .8s var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 850ms); }

  /* faq: answers unfold smoothly where supported */
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }

  /* contact: dot grid slides in, a beacon pulses while it is on screen */
  html.js [data-anim]:not(.is-in) .cta-box::before { opacity: 0; transform: translateX(-24px); }
  .cta-box::before { transition: opacity 1.2s ease, transform 1.2s var(--ease-out); }
  .is-live .beacon::after { animation: halo-loop 3s var(--ease-out) infinite; }

  @media (max-width: 860px) {
    .is-live .layers .rail i { animation-name: eco-run-y; }
    html.js [data-anim]:not(.is-in) .layers .rail::before { transform: scaleY(0); }
    .is-in .layers .rail::before { animation-name: draw-y; }
  }
  @media (max-width: 960px) {
    html.js [data-anim]:not(.is-in) .steps::before { transform: scaleY(0); }
    .is-in .steps::before { animation: draw-y 1.75s linear both; }
  }
}
