/* Veydan landing page. One stylesheet, no framework. Colours are tokens on
   :root, redefined for dark mode; main.js reads the same tokens to draw the
   dot fields, so a colour changes in one place. */

@font-face {
  font-family: "Host Grotesk";
  src: url("fonts/host-grotesk-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/dm-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/dm-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fcfcfd;
  --bg-alt: #f4f5f8;
  --surface: #ffffff;
  --ink: #0b0c10;
  --text: #1b1d23;
  --muted: #5b6170;
  --faint: #8b91a0;
  --line: #e6e8ee;
  --line-strong: #d4d8e0;
  --dot: #e0e3ea;
  /* The grey of the dot pictures. In light mode it is a soft slate, not the
     text colour, so the purple leads the way it does in dark mode. */
  --dot-ink: #6f7684;
  --accent: #6a3df0;
  --accent-text: #5a2fd6;
  --accent-soft: #efeafe;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
  --btn-bg: #0c0d10;
  --btn-text: #ffffff;
  --header-bg: rgb(252 252 253 / 82%);

  --sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: 24px;
  --strip-height: 74px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f12;
    --bg-alt: #121519;
    --surface: #15181d;
    --ink: #f1efea;
    --text: #e3e1dc;
    --muted: #a3a6ad;
    --faint: #6c7079;
    --line: #22262c;
    --line-strong: #30353d;
    --dot: #252930;
    --dot-ink: #f1efea;
    --accent: #9b7bff;
    --accent-text: #b59dff;
    --accent-soft: rgb(155 123 255 / 13%);
    --warn: #f0b25a;
    --warn-soft: rgb(240 178 90 / 12%);
    --btn-bg: #f1efea;
    --btn-text: #0d0f12;
    --header-bg: rgb(13 15 18 / 80%);
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f12;
  --bg-alt: #121519;
  --surface: #15181d;
  --ink: #f1efea;
  --text: #e3e1dc;
  --muted: #a3a6ad;
  --faint: #6c7079;
  --line: #22262c;
  --line-strong: #30353d;
  --dot: #252930;
  --dot-ink: #f1efea;
  --accent: #9b7bff;
  --accent-text: #b59dff;
  --accent-soft: rgb(155 123 255 / 13%);
  --warn: #f0b25a;
  --warn-soft: rgb(240 178 90 / 12%);
  --btn-bg: #f1efea;
  --btn-text: #0d0f12;
  --header-bg: rgb(13 15 18 / 80%);
}

/* Native scrollbars and controls follow the theme the visitor chose. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* A thin scrollbar in the page's own colours. */
html { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 500; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; }
.nowrap { white-space: nowrap; }
.accent { color: var(--accent-text); }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-text);
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-text);
  font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  border: 1px solid var(--btn-bg);
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn-small { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.arrow { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: none; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--ink); cursor: pointer; transition: border-color .2s, transform .25s var(--ease);
}
.js .theme-toggle { display: inline-grid; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 23px; font-weight: 500; letter-spacing: -.03em; }
.brand-mark { width: 26px; height: 26px; }
/* Menu links: mono capitals, large enough and dark enough to read at a glance. */
.nav { display: flex; gap: 34px; }
.nav a { font-family: var(--mono); font-size: 13.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text); opacity: .86; transition: opacity .2s, color .2s; }
.nav a:hover { color: var(--ink); opacity: 1; }

/* The menu on narrow screens. The button's two lines turn into a cross; the
   panel unrolls from the top and its links rise in one after another. */
.menu-toggle {
  display: none; position: relative; width: 40px; height: 40px; padding: 0; flex: none;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--ink); cursor: pointer; transition: border-color .2s;
}
.menu-toggle:hover { border-color: var(--ink); }
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: top .4s var(--ease), transform .4s var(--ease);
}
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 23px; }
.menu-open .menu-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { top: 19px; transform: rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: space-between;
  padding: 112px var(--gutter) 32px; background: var(--bg); overflow-y: auto;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .6s var(--ease), visibility 0s .6s;
}
.menu-open .mobile-menu { clip-path: inset(0); visibility: visible; transition: clip-path .6s var(--ease), visibility 0s; }
.menu-open .site-header { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mobile-menu-links { display: grid; }
.mobile-menu-links a {
  display: flex; align-items: baseline; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font-size: clamp(34px, 9vw, 52px); font-weight: 500; line-height: 1.1; letter-spacing: -.04em;
}
.mobile-menu-links .mono { color: var(--accent-text); font-size: 11px; letter-spacing: .12em; }
.mobile-menu-links li, .mobile-menu-foot { opacity: 0; transform: translateY(18px); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.menu-open .mobile-menu-links li, .menu-open .mobile-menu-foot { opacity: 1; transform: none; }
.menu-open .mobile-menu-links li:nth-child(1) { transition-delay: .12s; }
.menu-open .mobile-menu-links li:nth-child(2) { transition-delay: .18s; }
.menu-open .mobile-menu-links li:nth-child(3) { transition-delay: .24s; }
.menu-open .mobile-menu-links li:nth-child(4) { transition-delay: .3s; }
.menu-open .mobile-menu-links li:nth-child(5) { transition-delay: .36s; }
.menu-open .mobile-menu-foot { transition-delay: .44s; }
.mobile-menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; }
.mobile-menu-mail { color: var(--muted); }

/* The source names at the start of the hero's lanes, placed by main.js. */
.hero-sources { display: none; position: absolute; inset: 0; pointer-events: none; }
.js .hero-sources { display: block; }
.hero-source { position: absolute; top: 0; left: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .6s; }
.hero-source.is-swapping { opacity: 0 !important; transition-duration: .3s; }

/* Dot fields */
.field { width: 100%; height: 100%; }

/* Hero */
.hero { --hero-dot-step: 9px; --hero-dot-offset: 4px; position: relative; display: flex; overflow: hidden; isolation: isolate; background-image: radial-gradient(var(--dot) 1px, transparent 1.3px); background-size: var(--hero-dot-step) var(--hero-dot-step); background-position: var(--hero-dot-offset) var(--hero-dot-offset); }
.hero-cursor-glow {
  --glow-left: 0px; --glow-top: 0px;
  position: absolute; top: 0; left: 0; z-index: -1; pointer-events: none;
  transform: translate(var(--glow-left), var(--glow-top));
}
.hero-field { position: absolute; inset: 0; pointer-events: none; }
/* Copy and artwork share a row on desktop. Intrinsic row sizes let short
   windows scroll without squeezing the headline or radar. */
.hero-inner {
  min-height: calc(100svh - var(--strip-height));
  display: grid; grid-template-rows: auto 1fr; row-gap: 32px;
  padding-top: 96px; padding-bottom: 40px;
}
.hero-content { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); align-items: center; gap: 32px; }
.hero-art { position: relative; width: 100%; max-width: calc(max(320px, 100svh - var(--strip-height) - 204px) / .78); aspect-ratio: 1 / .78; justify-self: center; pointer-events: none; }
.hero-meta { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); }
.hero-audience { color: var(--accent-text); font-size: 11px; letter-spacing: .1em; }
.hero-meta-right { text-align: right; margin-left: auto; }
.hero-main { display: grid; gap: 28px; }
.hero h1 {
  font-size: clamp(42px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -.058em;
  margin-left: -.05em;
}
.hero h1 .line { display: block; }
/* The tight tracking pulls the full stop into the foot of the final t. */
.hero h1 .stop { margin-left: .07em; }
.hero-side { display: grid; gap: 20px; max-width: 470px; }
.hero-side p { color: var(--muted); font-size: 17px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-inner { display: flex; align-items: center; gap: 48px; height: calc(var(--strip-height) - 2px); }
.strip-label { color: var(--muted); white-space: nowrap; flex: none; }
.marquee {
  position: relative; display: flex; overflow: hidden; flex: 1; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; flex: none; gap: 44px; padding-right: 44px; animation: marquee 48s linear infinite; }
.marquee-track li { font-size: 17px; color: var(--muted); white-space: nowrap; letter-spacing: -.01em; display: flex; align-items: center; gap: 44px; }
.marquee-track li::after { content: ""; width: 4px; height: 4px; background: var(--faint); opacity: .6; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Sections */
.section { padding: 104px 0; }
.section-tight { padding-top: 24px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.label { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.label .num { color: var(--faint); }
.sq { display: inline-block; width: 7px; height: 7px; background: var(--accent); flex: none; }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
.statement { font-size: clamp(26px, 3.15vw, 44px); line-height: 1.16; letter-spacing: -.028em; color: var(--ink); font-weight: 500; }
.statement .w, .rule blockquote .w { transition: opacity .35s linear; }

.section-head { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: end; margin: 28px 0 64px; }
h2 { font-size: clamp(36px, 4.5vw, 62px); line-height: 1.06; letter-spacing: -.048em; }
.lede { color: var(--muted); font-size: 17px; line-height: 1.6; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 110px; border-top: 1px solid var(--line); }
.fact { padding: 28px 28px 0 0; display: grid; align-content: start; gap: 6px; }
.fact + .fact { padding-left: 28px; border-left: 1px solid var(--line); }
.fact dt { color: var(--muted); }
.fact-num { font-size: clamp(48px, 5.4vw, 72px); line-height: 1.05; letter-spacing: -.05em; color: var(--ink); font-weight: 500; margin-top: 12px; font-variant-numeric: tabular-nums; }
.fact-text { color: var(--muted); font-size: 15px; max-width: 26ch; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); }
.card { display: flex; flex-direction: column; }
.card + .card { border-left: 1px solid var(--line); }
.card-art { position: relative; aspect-ratio: 1 / .78; border-bottom: 1px solid var(--line); }
.card-index { position: absolute; top: 14px; left: 16px; color: var(--faint); z-index: 1; }
.card-body { padding: 28px 24px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-size: 22px; letter-spacing: -.025em; line-height: 1.2; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 20px; }
.tags li { font-size: 10.5px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }

/* Answer illustration */
#use-cases .wrap { max-width: calc(960px + 2 * var(--gutter)); }
.answer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 28px; }
.answer-copy { display: grid; gap: 20px; max-width: 880px; }
.answer-copy .lede { max-width: 680px; }
.answer-points { display: grid; gap: 14px; margin-top: 8px; }
.answer-points li { display: flex; gap: 14px; align-items: baseline; color: var(--text); font-size: 16px; }
.pt { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); letter-spacing: 0; font-size: 11px; }
.answer {
  position: relative; margin: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  padding: 20px; display: grid; gap: 16px;
  box-shadow: 0 1px 0 rgb(0 0 0 / 2%), 0 30px 60px -30px rgb(20 10 60 / 18%);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 14px 14px;
  background-position: -7px -7px;
}
.answer > * { position: relative; }
.example-instruction { display: none; color: var(--muted); font-size: 14px; }
.js .example-instruction { display: block; }

/* Without JS the examples stack. With it, only the selected conversation
   takes up space, so shorter answers do not leave a tall empty panel. */
.usecase-tabs { display: none; }
.js .usecase-tabs {
  display: flex; gap: 4px; justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.usecase-tabs::-webkit-scrollbar { display: none; }
.usecase-tab {
  position: relative; flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: 500 13px/1 var(--sans); letter-spacing: -.01em;
  cursor: pointer; overflow: hidden; transition: background-color .25s, color .25s;
}
.usecase-tab:hover { color: var(--ink); }
.usecase-tab[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-text); }
.usecase-panels { display: grid; gap: 16px; }
.usecase-panel { display: grid; gap: 16px; align-content: start; }
.js .usecase-panels > .usecase-panel { display: none; }
.js .usecase-panels > .usecase-panel.is-active { display: grid; }
.answer-q, .answer-a { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.answer-q { margin-left: auto; width: min(100%, 600px); background: var(--bg-alt); transition: transform .4s var(--ease), border-color .4s; }
.answer-a { position: relative; min-width: 0; margin-right: clamp(16px, 5vw, 64px); }
.answer-q p, .answer-a p { color: var(--text); font-size: 15.5px; line-height: 1.55; }
.answer-q b { font-weight: 500; color: var(--ink); }
.answer-tag { color: var(--muted); font-size: 10.5px; }
.answer-q > .answer-tag, .answer-a > .answer-tag {
  justify-self: start; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px;
  color: var(--ink); background: var(--surface); font: 600 13px/1.2 var(--sans);
  letter-spacing: .01em; text-transform: none;
}
.answer-a > .answer-tag { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.chips-aligned { display: grid; grid-template-columns: 22px minmax(0, 1fr); }
.chips-aligned > .mark { grid-column: 1; grid-row: 1; }
.chips-aligned > .chip { grid-column: 2; justify-self: start; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: normal; max-width: 100%; text-align: left;
  font-family: var(--sans); font-size: 12.5px; line-height: 1.3; padding: 8px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--bg);
}
.js .chip { cursor: pointer; transition: border-color .2s, background-color .2s; }
.js .chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip-open { display: none; color: var(--accent-text); flex: none; }
.js .chip-open { display: inline; }
.chip-src { font-style: normal; color: var(--muted); }
.chip em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); padding: 3px 6px; border-radius: 4px; }
.chip-warn em { color: var(--warn); background: var(--warn-soft); }
.mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 10px; letter-spacing: 0; margin-right: 2px; flex: none; }
.answer-gap { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.answer-gap .answer-tag { color: var(--warn); }
.answer figcaption { color: var(--muted); font-size: 10.5px; text-align: left; letter-spacing: .06em; }

/* Native dialog keeps source inspection keyboard accessible and traps focus. */
.evidence-dialog {
  width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  padding: 28px; border: 1px solid var(--line-strong); border-radius: 20px;
  background: var(--surface); color: var(--text); overflow: auto;
  box-shadow: 0 24px 100px rgb(0 0 0 / 30%);
}
.evidence-dialog::backdrop { background: rgb(0 0 0 / 58%); backdrop-filter: blur(4px); }
.evidence-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.evidence-close {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--ink);
  font: 400 28px/1 var(--sans); cursor: pointer;
}
.evidence-close:hover { border-color: var(--accent); }
.evidence-dialog h2 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; overflow-wrap: anywhere; }
.evidence-meta { color: var(--muted); font-size: 14px; margin-top: 12px; }
.evidence-fields { margin: 24px 0; display: grid; }
.evidence-fields > div { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.evidence-fields dt { color: var(--muted); font-size: 14px; }
.evidence-fields dd { font-size: 15px; overflow-wrap: anywhere; }
.evidence-context { padding: 20px; border-radius: 12px; background: var(--accent-soft); display: grid; gap: 8px; }
.evidence-context h3 { font-size: 17px; }
.evidence-context p { font-size: 15px; }
.evidence-disclaimer { color: var(--muted); font-size: 13px; margin-top: 20px; }

/* The rule */
.rule { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 130px 0; }
.rule-inner { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 96px; align-items: center; }
.rule-art { aspect-ratio: 1; border: 1px solid var(--line); background: var(--surface); }
.rule-quote { margin: 0; display: grid; gap: 28px; }
/* The quotation marks sit on the text lines, in purple. The opening one hangs
   just outside the text's left edge, so the first letters still line up. */
.quote-open, .quote-close { color: var(--accent); font-style: italic; }
.quote-open { display: inline-block; margin-left: -.56em; width: .56em; }
.quote-close { margin-left: .04em; }
.rule blockquote { margin: 0; font-size: clamp(32px, 4.3vw, 58px); line-height: 1.08; letter-spacing: -.035em; color: var(--ink); font-weight: 500; }
.rule figcaption { display: flex; align-items: center; gap: 10px; color: var(--muted); padding-top: 22px; border-top: 1px solid var(--line); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; position: relative; padding-top: 40px; counter-reset: none; }
.steps::before, .steps::after { content: ""; position: absolute; top: 4px; left: 0; height: 1px; }
.steps::before { right: 0; background: var(--line); }
.steps::after { width: 0; background: var(--accent); transition: width 2.2s var(--ease) .2s; }
.steps.in::after { width: 100%; }
.step { position: relative; display: grid; gap: 12px; align-content: start; }
.step::before { content: ""; position: absolute; top: -40px; left: 0; width: 9px; height: 9px; border: 1px solid var(--line-strong); background: var(--bg); transition: background-color .4s, border-color .4s; }
.steps.in .step::before { background: var(--accent); border-color: var(--accent); }
.steps.in .step:nth-child(2)::before { transition-delay: .7s; }
.steps.in .step:nth-child(3)::before { transition-delay: 1.2s; }
.steps.in .step:nth-child(4)::before { transition-delay: 1.7s; }
.step-top { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 11px; }
.step h3 { font-size: 26px; letter-spacing: -.03em; margin-top: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-strong); }
.principle { padding: 26px 28px 0 0; display: grid; gap: 12px; align-content: start; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--line-strong); }
.principle .num { color: var(--accent-text); }
.principle h3 { font-size: 21px; letter-spacing: -.025em; line-height: 1.2; }
.principle p { color: var(--muted); font-size: 15px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: center; margin-top: 28px; }
.contact-side { display: grid; gap: 28px; }
.contact-note { color: var(--muted); font-size: 13px; }
.contact-mail { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.03em; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line-strong); padding-bottom: 14px; transition: border-color .2s; }
.contact-mail:hover { border-color: var(--accent); }
.contact-mail svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 32px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) 180px 220px; gap: 48px; }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand p { color: var(--muted); max-width: 34ch; }
.footer-col { display: grid; gap: 14px; align-content: start; }
.footer-col .mono { color: var(--faint); }
.footer-col ul { display: grid; gap: 8px; }
.footer-col a { color: var(--text); transition: color .2s; }
.footer-col a:hover { color: var(--accent-text); }
.footer-base { position: relative; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 72px; padding-top: 24px; color: var(--faint); font-size: 11px; }
.footer-base::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }

/* Reveal animations: only when JS has run, so the page is whole without it. */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .cards [data-reveal]:nth-child(2), .js .facts [data-reveal]:nth-child(2), .js .principles [data-reveal]:nth-child(2) { transition-delay: .08s; }
.js .cards [data-reveal]:nth-child(3), .js .facts [data-reveal]:nth-child(3), .js .principles [data-reveal]:nth-child(3) { transition-delay: .16s; }
.js .cards [data-reveal]:nth-child(4), .js .facts [data-reveal]:nth-child(4), .js .principles [data-reveal]:nth-child(4) { transition-delay: .24s; }
/* Each word rises inside its own clipping box. The tight letter-spacing lets a
   word's last glyph overhang its advance, so the box is padded on every side
   (and the padding cancelled by margins), and the clip is lifted once the word
   has arrived. */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .14em .16em; margin: -.1em -.14em -.16em; }
.split-done .split-word { overflow: visible; }
.split-word > span { display: inline-block; }
.js [data-split] .split-word > span { transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.js [data-split].in .split-word > span { transform: none; }

/* Responsive */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3) { border-left: 0; }
  .card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts, .principles { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3), .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3), .principle:nth-child(n+3) { margin-top: 32px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
  .steps::before, .steps::after { display: none; }
  .step::before { display: none; }
  .answer-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .rule-inner { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
}

@media (min-width: 1101px) {
  .mobile-menu { display: none; }
}

/* Below this the five menu links (561px) no longer fit between the logo and
   the buttons with room to spare; the menu button takes their place. */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle { display: inline-block; }
  .header-inner { grid-template-columns: 1fr auto; }
}

@media (max-width: 900px) {
  .hero-meta-right { display: none; }
  .hero-content { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-main { max-width: 620px; gap: 24px; }
  .hero-art { max-width: 640px; justify-self: center; }
  .hero-side { max-width: 520px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --strip-height: 62px; }
  .hero { --hero-dot-step: 7px; --hero-dot-offset: 3px; }
  .header-inner { height: 64px; }
  /* The header's button moves into the menu panel to make room. */
  .header-cta { display: none; }
  .hero-source { font-size: 9.5px; }
  .mobile-menu { padding-top: 96px; }
  .hero-inner { padding-top: 92px; padding-bottom: 32px; row-gap: 24px; }
  .hero h1 { font-size: clamp(34px, 9.2vw, 58px); }
  .hero-side p { font-size: 16px; }
  .hero-side .btn { font-size: 14px; padding: 0 16px; }
  .strip-inner { gap: 20px; }
  .strip-label { display: none; }
  .section { padding: 72px 0; }
  .section-tight { padding-top: 24px; }
  .split, .section-head, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .section-head { margin-bottom: 40px; }
  .facts, .principles, .cards, .steps { grid-template-columns: minmax(0, 1fr); }
  .facts { margin-top: 64px; }
  .fact, .fact + .fact, .principle, .principle + .principle { padding: 24px 0 0; border-left: 0; margin-top: 0; }
  .fact + .fact, .principle + .principle { border-top: 1px solid var(--line); margin-top: 24px; }
  .card + .card { border-left: 0; border-top: 1px solid var(--line); }
  .answer { padding: 12px; border-radius: 14px; gap: 14px; }
  .answer-q, .answer-a { padding: 14px; }
  .js .usecase-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-self: stretch; border-radius: 16px; }
  .usecase-tab { padding: 8px 6px; font-size: 12px; border-radius: 12px; min-height: 44px; line-height: 1.25; }
  .answer-q { width: calc(100% - 24px); }
  .chip { font-size: 11.5px; gap: 5px; padding: 8px; }
  /* On the narrowest screens a long chip may wrap rather than push the page wider. */
  .chip { flex-wrap: wrap; white-space: normal; max-width: 100%; line-height: 1.3; }
  .rule { padding: 96px 0; }
  .rule-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rule-art { max-width: 220px; }
  /* No room to hang the opening mark in the margin: it sits inline instead. */
  .quote-open { margin-left: 0; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .evidence-dialog { padding: 20px; }
  .evidence-fields > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .js [data-reveal], .js [data-split] .split-word > span { transition: none; opacity: 1; transform: none; }
  .js .usecase-panels > .usecase-panel { transition: none; transform: none; }
  .mobile-menu, .mobile-menu-links li, .mobile-menu-foot, .menu-toggle span { transition: none; }
  .steps::after, .step::before { transition: none; }
}

/* The conversation keeps its complete layout while the story plays, so
   typing and source reveals never push the visitor's reading position. */
.example-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.example-replay { display: none; flex: none; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: 500 13px var(--sans); cursor: pointer; }
.js .example-replay { display: inline-block; }
.example-replay:hover { border-color: var(--accent); }
.usecase-panel[data-phase="typing"] .answer-q { border-color: var(--accent); }
.question-text { position: relative; }
.question-reserve { visibility: hidden; }
.question-typed { position: absolute; inset: 0; }
.usecase-panel[data-phase="typing"] .question-typed::after { content: ""; display: inline-block; width: 2px; height: 1em; background: var(--accent); margin-left: 3px; vertical-align: -.1em; animation: caret .75s step-end infinite; }
.reply-piece { opacity: 0; visibility: hidden; transform: translateY(5px); transition: opacity .35s, transform .35s; }
.reply-piece.is-shown { opacity: 1; visibility: visible; transform: none; }
.conversation-status { position: absolute; inset: 50px 20px auto; display: grid; gap: 24px; color: var(--muted); font-size: 15px; }
.conversation-status[hidden] { display: none; }
.thinking-line { display: flex; align-items: center; gap: 12px; }
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; animation: thinking 1s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
.conversation-placeholder { display: grid; gap: 12px; }
.conversation-placeholder i { height: 8px; width: 72%; max-width: 470px; border-radius: 4px; background: var(--line); }
.conversation-placeholder i:nth-child(2) { width: 57%; }
.conversation-placeholder i:nth-child(3) { width: 64%; }
.candidate { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.candidate p b { color: var(--ink); font-weight: 500; }
.candidate-state { color: var(--warn); font-size: 10px; }
@keyframes thinking { 50% { opacity: .25; transform: translateY(-3px); } }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 520px) { .example-toolbar { align-items: flex-start; } .example-instruction { font-size: 12px; } .example-replay { padding: 8px 10px; } .candidate { padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .reply-piece, .answer-q { transition: none; } .thinking-dots i, .question-typed::after { animation: none; } }

.question-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
