/* ============================================================================
   base.css — fonts, reset, element defaults, layout primitives, utilities
   ========================================================================== */

/* ---- Self-hosted fonts (Latin subset, variable, swap) ----------------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2013-2014,
                 U+2018-2019, U+201C-201D, U+2020-2022, U+2026, U+2122;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2013-2014,
                 U+2018-2019, U+201C-201D, U+2020-2022, U+2026, U+2122;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, picture, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-800); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }
p  { text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }

.lead { font-size: var(--fs-500); color: var(--text-muted); line-height: 1.55; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.text-muted { color: var(--text-muted); }
.accent { color: var(--accent); }

/* ---- Layout primitives ------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.band { background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent 60%), var(--bg); }
.band-2 { background: var(--surface-2); border-block: 1px solid var(--border); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stack > * + * { margin-top: var(--sp-4); }

.section-head { max-width: 680px; margin-bottom: var(--sp-7); }
.section-head .lead { margin-top: var(--sp-4); }
.center { text-align: center; }
.center.section-head { margin-inline: auto; }

/* ---- Accessibility helpers ------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--accent); color: #04210f; font-weight: 600;
  padding: 0.6rem 1rem; border-radius: var(--r-sm);
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* faint section divider line with centred glow */
.divider-glow { position: relative; height: 1px; background: var(--border); }
.divider-glow::after {
  content: ""; position: absolute; inset: 0; margin-inline: auto; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}
