/* ============================================================
   BASE — Font faces, reset, body, typography, layout primitives
   Requires: tokens.css
   ============================================================ */

/* ── Font Faces ──────────────────────────────────────────── */
@font-face {
  font-family: "Instrument Sans";
  src: url("InstrumentSans.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("InstrumentSans-Italic.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Dirtyline";
  src: url("Dirtyline.otf") format("opentype");
  font-display: swap;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
  overflow-x: hidden;
}

/* ── Body ─────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-ink);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  cursor: var(--cursor-default);
  padding-bottom: 52px; /* bottom nav clearance */
}

/* ── Interactive cursors ─────────────────────────────────── */
a, button, [role="button"] {
  cursor: var(--cursor-pointer);
}

/* ── Type scale ──────────────────────────────────────────── */
h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-body);
  line-height: var(--leading-tight);
  max-width: 900px;
}

h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-body);
  line-height: var(--leading-tight);
  margin-bottom: 40px;
}

h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-xs);
}

p {
  color: var(--color-muted);
  font-size: var(--text-body);
  max-width: 65ch;
}

/* ── Layout primitives ───────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--section-py) 0;
  border-bottom: var(--border-subtle);
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

/* ── Underline wipe — draws from right on hover-in ──────── */
.underline-wipe {
  position: relative;
  display: inline-block;
}
.underline-wipe::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--dur-slow) var(--ease-out);
}
.underline-wipe:hover::after { transform: scaleX(1); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
  section    { padding: var(--section-py-sm) 0; }
  body       { padding-bottom: 48px; }
}
@media (max-width: 480px) {
  h2         { font-size: 26px; margin-bottom: 28px; }
}
