/* ---------------------------------------------------------------------------
   D1 — Tokens
   Lifted from the design canvas before any screen was converted, so nothing
   drifts. Every value below appears in D1: the type ramp, the eight greys, the
   single accent, the spacing rhythm, the two rule weights.

   Rules D3 enforces, encoded here:
     • Radius is 0 everywhere. The only rounded thing in the design was the
       phone shell, which is canvas furniture and is not shipped.
     • The accent is applied to primary CTAs, timer bars, active nav and filled
       badges ONLY. Never to body text, never to a rule.
     • No hit target under 44px.
--------------------------------------------------------------------------- */

/* Self-hosted, Latin subset, swap. Loading these from Google's CDN costs an
   extra DNS lookup and a round trip, which is exactly what loses a buyer on a
   slow connection. If public/fonts/ is empty the stacks below fall back to
   system faces and the page still renders correctly. */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Anton';
  src: url('/fonts/anton-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Type families ---------------------------------------------------- */
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Anton', 'Archivo Black', Impact, system-ui, sans-serif;
  --font-editorial: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /* --- Greys (D1, left to right) ---------------------------------------- */
  --ink: #000000;
  --ink-2: #3a3a3a;
  --ink-3: #6a6a6a;
  --ink-4: #8a8a8a;
  --line-3: #c9c9c9;
  --line-2: #d5d5d5;
  --line: #e5e5e5;
  --wash: #f5f5f4;
  --wash-2: #fafafa;
  --paper: #ffffff;

  /* --- Accent (one token) ------------------------------------------------ */
  --ac: #000000;
  --acf: #ffffff;

  /* --- Rules ------------------------------------------------------------- */
  --hair: 1px solid var(--line);
  --structural: 1px solid var(--ink);
  --structural-2: 2px solid var(--ink);

  /* --- Spacing rhythm: 6 / 10 / 14 / 18 / 22 / 30 ------------------------ */
  --s1: 6px;
  --s2: 10px;
  --s3: 14px;
  --s4: 18px;
  --s5: 22px;
  --s6: 30px;
  --s7: 44px;

  /* Section padding: 18–22 phone, 26–44 desktop */
  --pad-x: 20px;
  --pad-y: 30px;

  /* --- Type ramp --------------------------------------------------------- */
  --t-display: 40px;
  --t-display-sm: 30px;
  --t-h1: 31px;
  --t-h2: 22px;
  --t-h3: 16px;
  --t-body: 14.5px;
  --t-body-sm: 13.5px;
  --t-meta: 10.5px;

  --lh-display: 0.98;
  --lh-heading: 1.1;
  --lh-body: 1.6;

  /* --- Everything else ---------------------------------------------------- */
  --radius: 0;
  --hit: 44px;
  --cta-height: 56px;
  --max-w: 720px;
  --max-w-wide: 1180px;
}

@media (min-width: 720px) {
  :root {
    --pad-x: 44px;
    --pad-y: 44px;
    --t-display: 64px;
    --t-h1: 40px;
    --t-h2: 28px;
  }
}

/* --- Reset ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Every interactive element clears 44px. Not negotiable on a phone. */
button,
[role='button'],
a.btn,
input[type='submit'] {
  min-height: var(--hit);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Type utilities ------------------------------------------------------- */

.t-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display);
  line-height: var(--lh-display);
  text-transform: uppercase;
  text-wrap: balance;
}

.t-h1 {
  font-weight: 900;
  font-size: var(--t-h1);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.t-h2 {
  font-weight: 900;
  font-size: var(--t-h2);
  line-height: 1.15;
}

.t-h3 {
  font-weight: 800;
  font-size: var(--t-h3);
  line-height: 1.3;
}

.t-editorial {
  font-family: var(--font-editorial);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}

.t-body {
  font-weight: 500;
  font-size: var(--t-body);
  line-height: var(--lh-body);
}

.t-body-2 {
  font-weight: 500;
  font-size: var(--t-body-sm);
  line-height: 1.55;
  color: var(--ink-2);
}

.t-meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--t-meta);
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.t-mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11.5px;
  line-height: 1.6;
}

.muted {
  color: var(--ink-3);
}
.dim {
  color: var(--ink-4);
}
.strike {
  text-decoration: line-through;
  color: var(--ink-4);
}

.u-hide {
  display: none !important;
}

.u-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
