/* ============================================================
   base.css — reset, typography, layout primitives
   Loaded after tokens.css. Reads tokens, never hex.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sacramento&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--dur-slow) var(--ease),
              color var(--dur-slow) var(--ease);
}

/* === typography hierarchy ================================== */

/* wordmark — Sacramento. Never letter-spaced; ligatures matter. */
.wordmark {
  font-family: 'Sacramento', cursive;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: normal;
  line-height: 1;
  padding-bottom: 0.15em;  /* room for descenders */
}
.wordmark-xl {
  font-family: 'Sacramento', cursive;
  font-size: clamp(96px, 14vw, 168px);
  color: var(--ink);
  line-height: 1;
  letter-spacing: normal;
  padding-bottom: 0.15em;
  display: inline-block;
  transform-origin: left center;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.012); }
}

/* headlines + body — Fraunces */
h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}
h1 { font-size: clamp(40px, 5vw, 56px); }
h2 { font-size: 32px; font-variation-settings: "opsz" 60; }
h3 { font-size: 20px; font-variation-settings: "opsz" 24; font-weight: 500; letter-spacing: -0.01em; }

/* eyebrows + utility text */
.eyebrow {
  font-family: 'Inter';
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
}
.muted  { color: var(--text-muted); }
.faint  { color: var(--text-faint); }
.tnum   { font-variant-numeric: tabular-nums; }

/* italic accents (Fraunces in body context) */
em.serif, .frau-italic {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--text);
}

/* === layout primitives ===================================== */

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 40px 80px;
}

section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { margin-top: 8px; }
.section-head em { font-style: italic; color: var(--text-muted); font-family: 'Fraunces', serif; }

/* grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* keyboard hint */
kbd {
  font-family: 'Inter';
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* links */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* selection */
::selection { background: var(--accent-soft); color: var(--accent); }