/* ============================================================
   SPLIT — base reset + typography primitives
   Phase 2 / Step 2.0.1 — Space Grotesk headings
   ============================================================ */

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

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

html {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease);
}
a:hover { color: var(--accent-hover); }

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

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

::selection {
  background: var(--accent-glow);
  color: var(--text-strong);
}

/* ── scrollbar ─────────────────────────────────────────── */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  transition: background var(--d-med) var(--ease);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* ============================================================
   Typography primitives — composable, not page-specific
   Space Grotesk is upright-only (no italic); we lean on weight +
   negative tracking for display impact.
   ============================================================ */

.t-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
  text-transform: none;
}

.t-heading {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.02em;
}

.t-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1;
}

.t-label {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.t-body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--lh-normal);
}

.t-num {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* modifiers */
.t-muted   { color: var(--text-muted); }
.t-subtle  { color: var(--text-subtle); }
.t-strong  { color: var(--text-strong); }
.t-accent  { color: var(--accent); }
.t-success { color: var(--success); }
.t-danger  { color: var(--danger); }
.t-warning { color: var(--warning); }
.t-info    { color: var(--info); }

/* ============================================================
   Layout utilities — minimal, composable
   ============================================================ */

.stack   > * + * { margin-top: var(--s-4); }
.stack-2 > * + * { margin-top: var(--s-2); }
.stack-3 > * + * { margin-top: var(--s-3); }
.stack-6 > * + * { margin-top: var(--s-6); }
.stack-8 > * + * { margin-top: var(--s-8); }
.stack-12 > * + * { margin-top: var(--s-12); }

.row        { display: flex; align-items: center; }
.row-baseline { display: flex; align-items: baseline; }
.row-end    { display: flex; align-items: center; justify-content: flex-end; }
.row-spread { display: flex; align-items: center; justify-content: space-between; }
.row-gap-2  { gap: var(--s-2); }
.row-gap-3  { gap: var(--s-3); }
.row-gap-4  { gap: var(--s-4); }
.row-gap-6  { gap: var(--s-6); }
.row-gap-8  { gap: var(--s-8); }

.grid        { display: grid; gap: var(--s-4); }
.grid-gap-0  { gap: 0; }
.grid-gap-1  { gap: 1px; }
.grid-gap-6  { gap: var(--s-6); }

.flex-1     { flex: 1; }
.min-w-0    { min-width: 0; }

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