/* ==========================================================================
   BASE — Reset, typography, and foundational styles
   ========================================================================== */

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

/* ── HTML & Body ──────────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
  transition: background-color var(--t-slow), color var(--t-slow);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--c-text);
}

h1 { font-size: var(--fs-6xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

@media (max-width: 768px) {
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-3xl); }
  h3 { font-size: var(--fs-xl); }
}

p {
  color: var(--c-text-2);
  line-height: 1.72;
  max-width: 68ch;
}

/* ── Links ────────────────────────────────────────────────────────────────── */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

a:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Lists ────────────────────────────────────────────────────────────────── */
ul, ol { list-style: none; }

/* ── Media ────────────────────────────────────────────────────────────────── */
img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Code ─────────────────────────────────────────────────────────────────── */
code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ── Selection ────────────────────────────────────────────────────────────── */
::selection {
  background-color: var(--c-gold-glow);
  color: var(--c-text);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar          { width: 6px; height: 6px; }
::-webkit-scrollbar-track    { background: var(--c-bg); }
::-webkit-scrollbar-thumb    { background: var(--c-surface-3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--c-gold-3); }

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

.text-gold  { color: var(--c-gold); }
.text-muted { color: var(--c-text-2); }
.text-mono  { font-family: var(--font-mono); }
.text-center { text-align: center; }

/* ── Button reset ─────────────────────────────────────────────────────────── */
button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
