/* Base: reset, type, layout, buttons, nav, footer. Tokens only — no raw colours. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 100px; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--t-body); line-height: 1.6; letter-spacing: var(--track-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 0;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--red-wash); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------- Type ---------- */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display); font-optical-sizing: auto; letter-spacing: var(--track-display);
  color: var(--ink); text-wrap: balance;
}
.h1 { font-size: var(--t-hero); line-height: .94; font-weight: var(--w-h1); }
.h2 { font-size: var(--t-h2); line-height: .98; font-weight: var(--w-h2); }
.h3 { font-size: var(--t-h3); line-height: 1.06; font-weight: var(--w-h3); letter-spacing: -0.03em; }
.h1 em, .h2 em, .h3 em { font-style: var(--em-style); color: inherit; font-weight: inherit; background: linear-gradient(transparent 62%, var(--amber-field) 62%, var(--amber-field) 92%, transparent 92%); padding: 0 .04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; max-width: 40em; }
.body { color: var(--ink-2); text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }
.num { font-variant-numeric: lining-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.label {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px; line-height: 1;
  letter-spacing: var(--track-label); color: var(--amber-ink);
}
.label::before { content: ""; width: 8px; height: 8px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 0 4px var(--amber-soft); }
.label--plain::before { display: none; }
.ink-2 { color: var(--ink-2); } .ink-3 { color: var(--ink-3); } .red { color: var(--red-ink); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.section-head { display: grid; gap: 20px; max-width: 820px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.rule-top { border-top: 1px solid var(--rule); }
.grid-paper {
  background-image:
    linear-gradient(var(--scrim) 1px, transparent 1px),
    linear-gradient(90deg, var(--scrim) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.theme-dark { background: var(--paper); color: var(--ink); }
.theme-amber { background: var(--paper); color: var(--ink); }
.sm-only { display: none; }
@media (max-width: 600px) { .lg-only { display: none; } .sm-only { display: inline; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px; border-radius: var(--r-btn);
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap; letter-spacing: -0.01em;
  transition: background-color var(--dur-instant) var(--ease-out), transform var(--dur-instant) var(--ease-out), box-shadow var(--dur-instant);
}
.btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.btn:active { transform: translateY(1px); }
.btn .arr { width: 14px; height: 14px; transition: transform var(--dur-quick) var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.btn--amber { background: var(--amber-field); color: #111214; }
.btn--amber:hover { background: #FFC955; }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link { color: var(--ink); background: linear-gradient(var(--amber), var(--amber)) 0 100% / 100% 2px no-repeat; padding-bottom: 2px; transition: background-size var(--dur-quick) var(--ease-out); }
.link:hover { background-size: 100% 2px; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.link-arrow svg { width: 14px; height: 14px; transition: transform var(--dur-quick) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; letter-spacing: 0;
  background: var(--paper-2); color: var(--ink-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip--plain::before { display: none; }
.chip--new { background: var(--amber-soft); color: var(--amber-ink); }
.chip--sent { background: var(--blue-wash); color: var(--blue-ink); }
.chip--won { background: var(--green-wash); color: var(--green-ink); }
.chip--ok { background: var(--green-wash); color: var(--green-ink); }

/* ---------- Reveal (triggered on enter, played once) ---------- */
/* Entrances: blur-rise, short. Content is visible by default: an element is hidden only when
   views/partials/site/reveal-gate.ejs marked it .rv-wait (motion mode, below the fold at load), and story.js
   adds .in when its top is 10% into the viewport. Crawlers, tall viewports, reduced motion and anything
   already on screen or above it at load never wait (motion-gate.ejs, Oct 2026). */
.rv { transition: opacity 240ms cubic-bezier(.16, 1, .3, 1), transform 260ms cubic-bezier(.16, 1, .3, 1), filter 240ms cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(min(var(--i, 0), 4) * 35ms); }
.h1.rv, .h2.rv, .h3.rv { transition-duration: 320ms; }
.rv-wait:not(.in) { opacity: 0; transform: translateY(12px); filter: blur(2px); }
.h1.rv-wait:not(.in), .h2.rv-wait:not(.in), .h3.rv-wait:not(.in) { transform: translateY(.14em); filter: blur(6px); }
.rv.instant, .pw-static .rv { transition: none !important; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.input, .select {
  height: 46px; width: 100%; padding: 0 14px; border-radius: var(--r-md); background: var(--sheet);
  border: 1px solid var(--rule-2); font-size: 15px; transition: border-color var(--dur-instant), box-shadow var(--dur-instant);
}
.input::placeholder { color: var(--ink-3); }
.input:focus, .select:focus { outline: none; border-color: var(--red); box-shadow: var(--focus); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%237E838C' stroke-width='1.5'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
