/* ============================================================
   base.css — Design tokens, reset, typography
   Visual system: FIFA-inspired × Swiss Grid
     Primary palette  : #000000 / #ffffff / #e3000b
     Typography       : Inter (900/700/600/400)
     Border radius    : 0px (sharp corners throughout)
     Elevation        : flat — borders only, no box-shadow
     Border width     : 2px solid black
   ============================================================ */

/* ── Google Fonts fallback stack ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

:root {
  /* ── Brand tokens (Swiss Grid light mode) ─────────────── */
  --text:            #000000;
  --text-muted:      #666666;
  --accent:          #e3000b;
  --accent-hover:    #b8000a;
  --accent-contrast: #ffffff;
  --bg:              #ffffff;
  --surface:         #ffffff;
  --surface-alt:     #f4f4f4;
  --border-color:    #000000;
  --border-light:    #cccccc;

  /* ── Typography ────────────────────────────────────────── */
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --fw-regular: 400;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-black:   900;

  /* Type scale (×1.25 ratio, 16px base) */
  --text-xs:   0.64rem;   /* 10.24px */
  --text-sm:   0.8rem;    /* 12.8px  */
  --text-base: 1rem;      /* 16px    */
  --text-lg:   1.25rem;   /* 20px    */
  --text-xl:   1.5625rem; /* 25px    */
  --text-2xl:  1.953rem;  /* 31.25px */
  --text-3xl:  2.441rem;  /* 39px    */

  /* ── Spacing (8px unit) ─────────────────────────────────── */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* ── Radius (Swiss Grid: sharp) ─────────────────────────── */
  --radius:     0px;
  --radius-sm:  0px;
  --radius-md:  0px;
  --radius-lg:  4px;
  --radius-pill:9999px;   /* kept only for toggles */

  /* ── Borders ────────────────────────────────────────────── */
  --border:      2px solid var(--border-color);
  --border-thin: 1px solid var(--border-light);

  /* ── Transitions ────────────────────────────────────────── */
  --transition: 0.15s ease;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

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

.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

/* ── High contrast ───────────────────────────────────────────── */
.high-contrast {
  --accent:       #cc0000;
  --text-muted:   #333333;
  --border-light: #888888;
}

/* ── Mobile / small-screen redirect ─────────────────────────── */
#mobile-redirect {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
  gap: var(--space-lg);
  border-top: 6px solid var(--accent);
}

@media (max-width: 900px), (max-height: 500px) {
  #mobile-redirect { display: flex; }
}

#mobile-redirect .ball-icon { font-size: 56px; }

#mobile-redirect h1 {
  font-size: var(--text-2xl);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
}

#mobile-redirect h1 span { color: var(--accent); }

#mobile-redirect p {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}
