/* ============================================================
 * Axion base — reset, typography, utilities
 * ============================================================ */

/* Local @font-face rules for Geist + Geist Mono. The woff2 files are
 * vendored from @fontsource-variable/{geist,geist-mono} via
 * scripts/vendor-fonts.mjs into public/fonts/. Three subsets each
 * (Latin / Latin-Ext / Cyrillic); the browser only downloads what
 * matches the page's content per the unicode-range declarations.
 *
 * Same `Geist Variable` / `Geist Mono Variable` family names the SPA
 * uses (via the npm package's @font-face), so tokens.css references
 * resolve consistently between marketing pages and the in-app UI.
 */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-mono-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-mono-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

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

html, body { margin: 0; padding: 0; }

html {
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--ui-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  font-feature-settings: "ss01" 1, "cv01" 1, "cv11" 1;
}

::selection { background: var(--accent-glow); color: var(--fg-0); }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

button {
  font: inherit; color: inherit;
  background: none; border: none; padding: 0; cursor: pointer;
}

/* ---------- Type scale ---------- */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--fg-0);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -0.03em; font-weight: 500; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
h4 { font-size: 1.125rem; letter-spacing: -0.01em; font-weight: 500; }

p { margin: 0; text-wrap: pretty; }

.mono {
  font-family: var(--mono-font);
  font-feature-settings: "ss01" 1, "ss02" 1;
}

.eyebrow {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}

.lede {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--fg-2);
  line-height: 1.55;
  max-width: 56ch;
}

/* ---------- Layout helpers ---------- */

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.container-tight {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.container-reading {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

.stack-xs > * + * { margin-top: 8px; }
.stack-sm > * + * { margin-top: 16px; }
.stack    > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 40px; }
.stack-xl > * + * { margin-top: 72px; }

.muted { color: var(--fg-2); }
.dim   { color: var(--fg-3); }

.hr-soft {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

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