/* ============================================================
   Base — reset, typography, @font-face
   Loads after tokens.css.
   ============================================================ */

/* ---- Fonts ---- */
@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/PressStart2P-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: var(--sp-5); }

/* ---- Page ---- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + var(--sp-4)); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 var(--sp-4) 0;
}
h1 { font-size: var(--fs-xxl); color: var(--primary); }
h2 { font-size: var(--fs-xl); color: var(--primary); }
h3 { font-size: var(--fs-lg); color: var(--jackpot); }
h4 { font-size: var(--fs-md); color: var(--signal); }

p { margin: 0 0 var(--sp-4) 0; }
strong { color: var(--text); font-weight: 700; }
em { color: var(--jackpot); font-style: italic; }

a.inline-link {
  color: var(--primary);
  border-bottom: 1px dotted var(--primary);
}
a.inline-link:hover { color: var(--jackpot); border-bottom-color: var(--jackpot); }

/* Pixel art should never be blurred */
img.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---- Layout primitive ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
