/* ==========================================================================
   ZEROA DRAFT — BASE
   Reset, self-hosted faces, type scale, band + grid primitives.
   ========================================================================== */

/* --- FONTS: self-hosted, latin subset, zero third-party origins ---------- */
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-latin-var.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* --- RESET -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--t-16);
  line-height: 1.6;
  color: var(--body-on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }

/* --- TYPE --------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: var(--track-display);
  line-height: 1.06;
  color: var(--head-on-light);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.4375rem, 6.2vw, var(--t-95)); letter-spacing: -0.034em; }
h2 { font-size: clamp(1.9375rem, 4.2vw, var(--t-61)); letter-spacing: -0.03em; }
h3 { font-size: var(--t-25); letter-spacing: -0.02em; }
h4 { font-size: var(--t-20); letter-spacing: -0.015em; }
p  { margin: 0; max-width: 68ch; }

a { color: var(--accent-on-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.mono, .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Eyebrow — surface-paired. Never hard-code --ink-300 here: it is 2.34:1
   on cream, which would have put a contrast failure on every section. */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-13);
  font-weight: 500;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--label-on-light);
  margin: 0 0 20px;
}

.lede { font-size: var(--t-20); line-height: 1.5; color: var(--body-on-light); max-width: 60ch; }
@media (min-width: 1440px) {
  body  { font-size: var(--t-17); }
  .lede { font-size: var(--t-25); line-height: 1.46; }
}

/* --- FOCUS -------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent-fill);
  outline-offset: 3px;
  border-radius: 2px;
}
.band-proof :focus-visible { outline-color: var(--accent-on-dark); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink-900); color: var(--paper);
  padding: 12px 18px; border-radius: 4px; text-decoration: none;
  transition: top 120ms var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- LAYOUT PRIMITIVES -------------------------------------------------- */
/* Dark bands are full-bleed to the viewport; the 1280 grid sits inside them,
   so the band rhythm still reads at 1920. */
.band { padding: var(--band-y) 0; }
.band--tight { padding-top: 0; }

.band-story { background: var(--paper); }
.band-story--warm { background: var(--paper-2); }

.band-proof {
  background: var(--ink-900);
  color: var(--body-on-dark);
}
.band-proof h1, .band-proof h2, .band-proof h3, .band-proof h4 { color: var(--head-on-dark); }
.band-proof .eyebrow { color: var(--label-on-dark); }
.band-proof .lede { color: var(--body-on-dark); }
.band-proof a:not(.btn) { color: var(--accent-on-dark); }
/* Buttons carry their own foreground/background pair — the band must not
   recolour them, or the primary CTA becomes teal text on a teal fill. */

.wrap {
  width: 100%;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
/* Showcase bands: hero, product proof, exchange hero. */
.wrap--wide { max-width: var(--grid-wide); }

@media (min-width: 1024px) { :root { --gutter: 40px; } }
@media (min-width: 1440px) { :root { --gutter: 56px; } }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.rule { height: 1px; background: var(--rule-on-light); border: 0; margin: 0; }
.band-proof .rule { background: var(--rule-on-dark); }

/* --- REVEAL ------------------------------------------------------------- */
/* Content is visible by default. motion.js sets .js-motion on <html> BEFORE
   anything is hidden, so a script error can never ship a blank page. */
.js-motion .reveal { opacity: 0; transform: translateY(60px); }
@media (prefers-reduced-motion: reduce) {
  .js-motion .reveal { opacity: 1; transform: none; }
}
