/* base.css — reset + typography + utility primitives */

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

html {
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.55;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Subtle film grain — adds matte texture without an image asset.
   Pure CSS / SVG noise via background-image. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

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

ul[role='list'], ol[role='list'] {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.08;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 68ch;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

a, button, [role='button'], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.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;
}

/* ============================================================
   FONT LOADING — Fraunces + Inter + JetBrains Mono via Google Fonts
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   PRIMITIVES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}

.container--wide {
  max-width: var(--content-wide);
}

.container--narrow {
  max-width: var(--content-narrow);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.eyebrow--accent {
  color: var(--color-accent);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--color-divider), transparent);
  border: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 6px 18px rgba(0,0,0,0.25);
}
.btn--primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }
.btn--primary:active { background: var(--color-accent-active); transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-text-muted); background: var(--color-surface); }

.btn--link {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-strong);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn--link:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* ============================================================
   GLOSSY PANEL — the signature treatment.
   Applied to cards, the player chrome, hero plates.
   ============================================================ */

.panel {
  position: relative;
  background-color: var(--color-surface);
  background-image: var(--panel-gradient);
  border: var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), var(--panel-highlight);
  overflow: hidden;
}

.panel::before {
  /* Top spec-highlight — the "gloss" */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 50%;
  background: linear-gradient(180deg,
    var(--gloss-top) 0%,
    transparent 100%);
  pointer-events: none;
  opacity: 0.7;
}

.panel::after {
  /* Side-light sheen — subtle */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 0% 0%,
    var(--gloss-inner) 0%,
    transparent 50%);
  pointer-events: none;
  opacity: 0.5;
}

.panel > * { position: relative; z-index: 1; }

.panel--matte {
  background-image: none;
  background-color: var(--color-surface);
}

.panel--matte::before,
.panel--matte::after { display: none; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */

.field {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.field:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-tint);
}

.field--textarea { resize: vertical; min-height: 140px; }

.label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}
