/* StackGentic website. Geist on paper and ink, one mint accent, light and dark by the visitor's setting.
   Shape rule (one system, used everywhere): actions are pills, panels and tiles 24px, screenshots and fields 12-16px,
   the brand mark stays square in the brand's own green. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/GeistVariable-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f0f1ee;
  --surface: #fbfbfa;
  --sunken: #e6e8e3;
  --line: #d6dad3;
  --field: #7b847e;
  --text: #0d1110;
  --muted: #4a524f;
  --accent: #1fd27a;
  --accent-hover: #46de92;
  --accent-ink: #0b7a47;
  --on-accent: #06140d;
  --glow: rgba(31, 210, 122, 0.2);
  --brand: #047857;
  --on-brand: #fbfbfa;
  --danger: #b42318;
  --ph-bg: #fff3bf;
  --ph-text: #5b3a00;
  --ph-line: #b58105;
  --shadow-sm: 0 1px 2px rgba(13, 30, 22, 0.06);
  --shadow: 0 1px 2px rgba(13, 30, 22, 0.06), 0 28px 60px -28px rgba(13, 40, 28, 0.3);
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e0d;
    --surface: #121615;
    --sunken: #181d1b;
    --line: #262d2a;
    --field: #6b746f;
    --text: #edf0ec;
    --muted: #a3aca7;
    --accent: #2ee38a;
    --accent-hover: #5beba4;
    --accent-ink: #4be89b;
    --on-accent: #04110a;
    --glow: rgba(46, 227, 138, 0.14);
    --danger: #f97066;
    --ph-bg: #4a3b00;
    --ph-text: #ffe28a;
    --ph-line: #d4a017;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  font-feature-settings: "calt", "kern";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.wrap { width: min(100% - 32px, 1200px); margin-inline: auto; }
@media (min-width: 700px) { .wrap { width: min(100% - 64px, 1200px); } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 18px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

/* Placeholders: unmistakable on purpose, so that none of them ships unnoticed (node tools/check-placeholders.mjs). */
.ph { background: var(--ph-bg); color: var(--ph-text); outline: 1px dashed var(--ph-line); padding: 0 0.3em; font-weight: 500; font-size: 0.92em; overflow-wrap: anywhere; }

/* Buttons: pills. The primary is the mint fill with ink text; a second action is a plain arrow link. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0 1.6rem; border: 1px solid transparent; border-radius: var(--r-pill);
  font: 500 1rem/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.btn-sm { min-height: 40px; padding: 0 1.1rem; font-size: 0.9375rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-text { padding: 0 0.9rem; color: var(--text); }
.btn-text:hover { color: var(--accent-ink); }
.btn-text span, .more span { display: inline-block; transition: transform 0.25s var(--ease); }
.btn-text:hover span, .more:hover span { transform: translateX(4px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Header: a floating pill that gains an edge once the page has scrolled (.is-scrolled, from site.js). */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--header); padding-top: 12px; margin-bottom: calc(var(--header) * -1); pointer-events: none; }
.bar {
  position: relative; display: flex; align-items: center; justify-content: space-between; height: 56px;
  padding: 0 8px 0 12px; border: 1px solid transparent; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  pointer-events: auto; transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled .bar { border-color: var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-sm); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; background: var(--brand); color: var(--on-brand); }
.brand-name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.menu { display: flex; align-items: center; gap: 0.75rem; }
.menu ul { display: flex; gap: 0.125rem; }
.menu ul a { display: block; padding: 0.5rem 0.9rem; border-radius: var(--r-pill); color: var(--muted); font-size: 0.9375rem; font-weight: 500; text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.menu ul a:hover { color: var(--text); background: var(--sunken); }
/* The section being read (site.js sets aria-current while it crosses the middle of the window). */
.menu ul a[aria-current] { color: var(--text); background: var(--sunken); }
.lang-switch { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; }
.lang-switch > * { display: inline-flex; align-items: center; min-height: 30px; padding: 0 0.65rem; border-radius: var(--r-pill); }
.lang-switch a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.lang-switch a:hover { color: var(--text); }
.lang-switch [aria-current] { background: var(--text); color: var(--bg); }
.menu-toggle { display: none; align-items: center; gap: 0.6rem; min-height: 40px; padding: 0 1rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: 500 0.9375rem var(--font); cursor: pointer; }
.menu-icon, .menu-icon::before { display: block; width: 16px; height: 2px; background: currentColor; transition: transform 0.2s; }
.menu-icon { position: relative; transform: translateY(-3px); }
.menu-icon::before { content: ""; position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { transform: translateY(0) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(-90deg); }

@media (max-width: 820px) {
  .menu { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .menu ul { flex-direction: column; }
  .menu ul a { padding: 0.85rem 1rem; font-size: 1.0625rem; color: var(--text); }
  .menu .btn { width: 100%; }
  .menu .lang-switch { align-self: flex-start; }
}
@media (scripting: enabled) and (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: none; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
  .menu.is-open { display: flex; }
}
@media (max-width: 820px) and (scripting: none) {
  .site-header { position: static; height: auto; margin-bottom: 0; }
  .bar { flex-wrap: wrap; height: auto; padding-block: 12px; border-radius: var(--r-lg); }
  .menu { width: 100%; }
}

/* Type helpers */
.eyebrow { margin-bottom: 1rem; color: var(--accent-ink); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lead { max-width: 34rem; color: var(--muted); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; }
.sub { max-width: 40rem; color: var(--muted); font-size: 1.0625rem; }
.section { padding-block: clamp(5rem, 11vw, 9rem); }
.section-head { max-width: 50rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2, .contact-copy h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); letter-spacing: -0.045em; line-height: 1.02; }
.contact-copy h2 { font-size: clamp(2.125rem, 3.4vw, 3rem); }
.section-head .sub { margin-top: 1.25rem; }
.more { color: var(--text); font-weight: 500; text-decoration: none; transition: color 0.2s; }
.more:hover { color: var(--accent-ink); }

/* Hero (the 404 pages use the plain one; the homepage adds .hero-home) */
.hero { position: relative; padding-top: calc(var(--header) + clamp(2.5rem, 6vw, 4.5rem)); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 85%; background: radial-gradient(42% 60% at 88% 0%, var(--glow), transparent 70%); pointer-events: none; }
.hero-copy { position: relative; }
.hero h1 { max-width: 18ch; font-size: clamp(2.75rem, 6.4vw, 5.25rem); letter-spacing: -0.05em; line-height: 0.98; }
.hero .lead { margin-top: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 2rem; }

.hero-home { padding-bottom: clamp(4rem, 9vw, 7rem); }
.hero-home .wrap { position: relative; }
.hero-home h1 { max-width: 22ch; font-size: clamp(2.625rem, 5.6vw, 4.75rem); }
/* The one emphasis of the page: a marker stroke under the words, in the same font (no second family, no gradient text). */
.hl { padding: 0 0.06em; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--accent) 55%, transparent) 60% 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.5rem clamp(2rem, 5vw, 4.5rem); align-items: start; margin-top: clamp(2rem, 4vw, 3.5rem); }
.hero-side { padding-top: 0.25rem; }
.hero-side .lead { margin-top: 0; }
.hero-stage { position: relative; perspective: 1600px; }
.shot { position: relative; width: calc(100% + 12vw); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); transform-origin: 0 50%; }
.shot img { width: 100%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .shot { width: 100%; }
}
@media (max-width: 700px) {
  .hero-stage { margin-right: -16px; }
  .shot { aspect-ratio: 5 / 4; border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); }
  .shot img { height: 100%; object-fit: cover; object-position: 0 0; width: 220%; max-width: none; }
}

/* Services: a bento of exactly three tiles. CRM is the big one (with a real screen), websites the mint block,
   custom systems a dotted surface. */
.bento { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 0.75rem; min-height: 17rem; padding: clamp(1.5rem, 3vw, 2.25rem); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile > * { position: relative; }
.tile h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.035em; }
.tile p { max-width: 30rem; color: var(--muted); }
.tile .more { margin-top: auto; padding-top: 0.5rem; }
.tile-crm { grid-row: span 2; padding-bottom: 0; }
.tile-crm .more { margin-top: 0; }
.tile-shot { margin: auto calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) 0 0; padding-top: 2rem; }
.tile-shot img { width: 100%; border: 1px solid var(--line); border-right: 0; border-bottom: 0; border-radius: var(--r-sm) 0 0 0; box-shadow: var(--shadow); transform-origin: 0 0; transition: transform 0.6s var(--ease); }
.tile-crm:hover .tile-shot img { transform: scale(1.025); }
.tile-web { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.tile-web p, .tile-web .more, .tile-web .more:hover { color: var(--on-accent); }
.tile-web .more:focus-visible { outline-color: var(--on-accent); }
.tile-custom { background: var(--sunken); }
.tile-custom::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--text) 24%, transparent) 1.2px, transparent 1.7px); background-size: 16px 16px; -webkit-mask-image: radial-gradient(75% 90% at 100% 0%, #000, transparent 72%); mask-image: radial-gradient(75% 90% at 100% 0%, #000, transparent 72%); pointer-events: none; }
@media (max-width: 900px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-crm { grid-row: auto; }
}

/* CRM: each screen scrolls past with its description pinned beside it (no tabs, every screen shown). */
.crm { position: relative; overflow: clip; padding-block: clamp(5rem, 11vw, 9rem); border-block: 1px solid var(--line); background: var(--surface); }
.crm::before { content: ""; position: absolute; inset: 0 0 auto; height: 600px; background: radial-gradient(40% 80% at 10% 0%, var(--glow), transparent 72%); pointer-events: none; }
.crm .wrap { position: relative; }
.story { display: grid; gap: clamp(4rem, 9vw, 7rem); }
.story-item { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.story-text { position: sticky; top: calc(var(--header) + 40px); }
.story-text h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.035em; }
.story-text p { margin-top: 0.75rem; color: var(--muted); }
.frame { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); box-shadow: var(--shadow); }
.frame img { width: 100%; }
.frame:focus-visible { outline-offset: 4px; }
@media (max-width: 900px) {
  .story-item { grid-template-columns: minmax(0, 1fr); }
  .story-text { position: static; }
}
@media (max-width: 760px) { .frame img { width: 900px; max-width: none; } }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: clamp(3.5rem, 7vw, 5rem); }
.facts li { padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); color: var(--muted); font-size: 0.9375rem; }
.fine { margin-top: 1rem; color: var(--muted); font-size: 0.875rem; }
.crm-cta { margin-top: 2.5rem; }

/* Ragio, the second product in the same section: the owner's view of a chat on demand behind the guest's conversation,
   overlapping (one after the other below 900px), then the four points of a chat on demand in two columns. */
.product { margin-top: clamp(5rem, 11vw, 9rem); padding-top: clamp(5rem, 11vw, 9rem); border-top: 1px solid var(--line); }
.ragio-stage { display: grid; }
.ragio-back { width: 68%; }
.ragio-front { position: relative; width: 74%; margin: -14% 0 0 auto; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem clamp(2rem, 5vw, 4rem); margin-top: clamp(3.5rem, 7vw, 5rem); }
.points li { padding-left: 1.25rem; border-left: 2px solid var(--accent); }
.points h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.points p { margin-top: 0.5rem; color: var(--muted); }
@media (max-width: 900px) {
  .ragio-stage { gap: 1rem; }
  .ragio-back, .ragio-front { width: 100%; margin: 0; }
  .ragio-front { order: -1; }
}
@media (max-width: 760px) { .points { grid-template-columns: minmax(0, 1fr); } }

/* Process: a timeline whose accent line draws itself as the steps scroll into view. */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding-top: 3rem; view-timeline-name: --steps; }
.timeline::before, .timeline::after { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline::after { background: var(--accent); transform-origin: 0 50%; }
.timeline li { position: relative; }
.step-no { position: absolute; z-index: 1; top: -3rem; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline h3 { margin-bottom: 0.5rem; font-size: 1.25rem; letter-spacing: -0.02em; }
.timeline p { color: var(--muted); }
@media (max-width: 900px) {
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; padding: 0 0 0 3rem; }
  .timeline::before, .timeline::after { top: 0; bottom: 0; left: 11px; right: auto; width: 2px; height: auto; }
  .timeline::after { transform-origin: 50% 0; }
  .step-no { top: 0; left: -3rem; }
}

/* FAQ: the four answers, always open, in two columns. */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.qa { padding-block: 1.75rem; border-top: 1px solid var(--line); }
.qa h3 { font-size: 1.1875rem; letter-spacing: -0.02em; }
.qa p { margin-top: 0.6rem; color: var(--muted); }
.qa a { color: var(--text); text-underline-offset: 3px; }
.qa a:hover { color: var(--accent-ink); }
@media (max-width: 760px) { .faq { grid-template-columns: minmax(0, 1fr); } }

/* Contact: the closing panel, the copy and the direct lines on the left, the form on the right. */
.contact { padding-block: clamp(1rem, 4vw, 3rem) clamp(5rem, 10vw, 8rem); }
.contact-panel { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(1.5rem, 5vw, 4rem); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.contact-panel::before { content: ""; position: absolute; inset: auto auto -30% -20%; width: 70%; height: 80%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.contact-panel > * { position: relative; }
.contact-copy .sub { margin-top: 1.25rem; }
.direct { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.direct dt { color: var(--muted); font-size: 0.875rem; }
.direct dd { font-size: 1.125rem; font-weight: 500; }
.direct a { text-decoration-color: var(--line); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.direct a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
@media (max-width: 900px) { .contact-panel { grid-template-columns: minmax(0, 1fr); } }

/* Form (its markup and behaviour are the CRM lead capture contract: site.js and README) */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
.field { margin-bottom: 1.15rem; }
label { display: block; margin-bottom: 0.4rem; font-size: 0.9375rem; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; min-height: 50px; padding: 0.75rem 0.9rem; border: 1px solid var(--field); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); font: 400 1rem/1.4 var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; min-height: 140px; }
input:hover, textarea:hover { border-color: var(--text); }
input:focus, textarea:focus { outline: 2px solid var(--accent-ink); outline-offset: 0; border-color: var(--accent-ink); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
[aria-invalid="true"]:focus { outline-color: var(--danger); }
.err { margin-top: 0.35rem; color: var(--danger); font-size: 0.875rem; }
.err:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent-ink); }
.check label { margin: 0; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.check a { color: var(--text); text-underline-offset: 3px; }
.check a:hover { color: var(--accent-ink); }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.status { flex: 1 1 14rem; color: var(--muted); font-size: 0.9375rem; }
.status a { color: inherit; text-underline-offset: 3px; }
.status.is-error { color: var(--danger); }
.ts-slot.is-on { min-height: 65px; }
.ts-note { color: var(--danger); font-size: 0.875rem; }
.ts-note:not(:empty) { margin-top: 0.5rem; }
.ts-note a { color: inherit; text-underline-offset: 3px; }
@media (scripting: none) { #lead-form { display: none; } }
.nojs { color: var(--muted); }
.success[hidden] { display: none; }
.success-mark { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.25rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 1.5rem; font-weight: 600; }
.success h3 { margin-bottom: 0.6rem; font-size: 1.5rem; }
.success h3:focus { outline: none; }
.success p { margin-bottom: 1.5rem; color: var(--muted); }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@media (max-width: 560px) { .row { grid-template-columns: minmax(0, 1fr); } .btn-primary[type="submit"] { width: 100%; } }

/* Policy pages */
.doc-head { padding-block: calc(var(--header) + clamp(2.5rem, 6vw, 4.5rem)) 2.5rem; }
.doc-head h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.05em; line-height: 1; }
.doc-head .meta { max-width: 44rem; margin-top: 1.25rem; color: var(--muted); }
.doc { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 44rem); gap: 4rem; padding-block: 1rem 6rem; }
.doc-toc { position: sticky; top: calc(var(--header) + 24px); align-self: start; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: 0.9375rem; }
.doc-toc ol { display: grid; gap: 0.45rem; }
.doc-toc a { color: var(--muted); text-decoration: none; }
.doc-toc a:hover { color: var(--accent-ink); }
.prose section { padding-top: 2.5rem; }
.prose h2 { margin-bottom: 1rem; font-size: 1.5rem; letter-spacing: -0.03em; }
.prose p, .prose li { color: var(--muted); }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol { margin-top: 1rem; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }
.prose ul { display: grid; gap: 0.5rem; padding-left: 1.25rem; list-style: disc; }
.prose ul li::marker { color: var(--accent-ink); }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose table { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.75rem 0.75rem 0.75rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; }
.prose td { color: var(--muted); }
.table-wrap { overflow-x: auto; }
@media (max-width: 900px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .doc-toc { position: static; } }

/* Footer */
.site-footer { padding-block: clamp(3.5rem, 7vw, 5rem) 2rem; border-top: 1px solid var(--line); background: var(--bg); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 3rem; }
.foot-brand p { max-width: 20rem; margin-top: 1rem; color: var(--muted); }
.foot-brand .lang-switch { margin-top: 1.25rem; }
.foot-title { margin-bottom: 1rem; color: var(--muted); font-size: 0.9375rem; font-weight: 600; }
.site-footer nav li a { display: inline-block; padding: 0.3rem 0; color: var(--text); text-decoration: none; }
.site-footer nav li a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.legal { display: grid; gap: 0.6rem; }
.legal div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; font-size: 0.9375rem; }
.legal dt { color: var(--muted); }
.copy { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; } }
@media (max-width: 420px) { .legal div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; } }

/* Grain: one fixed, click-through layer of faint noise over the whole page (a static tile, never on a scrolling element). */
body::after { content: ""; position: fixed; inset: 0; z-index: 25; background: url("../img/grain.svg") repeat; background-size: 200px; opacity: 0.035; pointer-events: none; }
@media (prefers-color-scheme: dark) { body::after { opacity: 0.05; } }
@media print { body::after { display: none; } }

/* Motion: every animation says something (reading order, the product landing, progress through the steps), all of it
   only where motion is welcome; the reveal only where scripts run, so a stalled script never leaves the page blank. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lift { from { transform: translateY(40px); } to { transform: none; } }
@keyframes settle { from { transform: rotateY(-9deg) rotateX(3deg); } to { transform: none; } }
@keyframes draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes failsafe { to { opacity: 1; transform: none; } }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  /* The hero arrives in reading order: headline, sentence, actions, then the product (moved, never hidden, so it paints first). */
  .hero-home h1, .hero-side > * { animation: rise 0.8s var(--ease) both; }
  .hero-side > :nth-child(1) { animation-delay: 0.1s; }
  .hero-side > :nth-child(2) { animation-delay: 0.18s; }
  .hero-home .hero-stage { animation: lift 1.1s 0.15s var(--ease) both; }
  @supports (animation-timeline: scroll()) {
    /* The board leans in and settles flat over the first 480 px of scrolling. */
    .shot[data-tilt] { animation: settle linear both; animation-timeline: scroll(root); animation-range: 0 480px; }
    /* The process line fills as the steps cross the window. */
    .timeline::after { animation: draw-x linear both; animation-timeline: --steps; animation-range: entry 40% cover 55%; }
    /* The guest's conversation slides up over the owner's view as it enters: two screens, one chat. */
    .ragio-front { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
  @supports (animation-timeline: scroll()) { .timeline::after { animation-name: draw-y; } }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); animation: failsafe 0.01s 3s forwards; }
  [data-reveal].is-in { opacity: 1; transform: none; animation: none; }
  .bento > :nth-child(2), .timeline > :nth-child(2) { transition-delay: 0.08s; }
  .bento > :nth-child(3), .timeline > :nth-child(3) { transition-delay: 0.16s; }
  .timeline > :nth-child(4) { transition-delay: 0.24s; }
  .points > :nth-child(2n) { transition-delay: 0.08s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
