/* ==========================================================================
   Brotato Online Play — "Crash Zone" Warm Comic-Arcade Design Tokens
   Dusty alien soil & obsidian surfaces, hand-inked borders, potato-gold & slime-green
   ========================================================================== */

:root {
  /* ---- Core Palette: Warm Crash Zone Obsidian & Dusty Soil ---- */
  --bg-void: #120f14;
  --bg-obsidian: #1b161d;
  --bg-surface: #251f27;
  --bg-elevated: #312934;
  --bg-card: #1f1a22;
  --bg-panel: rgba(27, 22, 29, 0.9);
  --bg-glass: rgba(18, 15, 20, 0.84);

  /* ---- Signal & Brotato Character Accents ---- */
  --accent-spud: #f2e2c4;
  --accent-gold: #f5c542;
  --accent-gold-deep: #d49b1a;
  --accent-gold-soft: rgba(245, 197, 66, 0.14);
  --accent-gold-glow: rgba(245, 197, 66, 0.36);

  --accent-slime: #7ce85b;
  --accent-slime-deep: #4cb82f;
  --accent-slime-soft: rgba(124, 232, 91, 0.14);
  --accent-slime-glow: rgba(124, 232, 91, 0.34);

  --accent-crimson: #ff4d5e;
  --accent-crimson-deep: #cf2638;
  --accent-crimson-soft: rgba(255, 77, 94, 0.15);
  --accent-crimson-glow: rgba(255, 77, 94, 0.34);

  --accent-cyan: #4ce6c8;
  --accent-cyan-deep: #1eb89b;
  --accent-cyan-soft: rgba(76, 230, 200, 0.14);
  --accent-cyan-glow: rgba(76, 230, 200, 0.32);

  --accent-violet: #a77bff;
  --accent-orange: #ff8a3d;

  /* ---- Semantic Latency Color Scale (Green -> Yellow -> Orange-Red -> Crimson) ---- */
  --lat-good: #7ce85b;
  --lat-good-glow: rgba(124, 232, 91, 0.34);
  --lat-mid: #f5c542;
  --lat-mid-glow: rgba(245, 197, 66, 0.34);
  --lat-high: #ff7a45;
  --lat-high-glow: rgba(255, 122, 69, 0.34);
  --lat-poor: #ff4d5e;
  --lat-poor-glow: rgba(255, 77, 94, 0.36);

  /* ---- High-Contrast Typography Colors ---- */
  --text-cream: #f5efe6;
  --text-secondary: #d0c6d4;
  --text-muted: #9e92a6;
  --text-ink: #120f14;

  /* ---- Hand-Inked Comic Borders ---- */
  --ink-black: #000000;
  --border-ink: 2px solid #000000;
  --border-ink-thick: 3px solid #000000;
  --border-rim: 1px solid rgba(245, 239, 230, 0.13);
  --border-rim-strong: 2px solid rgba(245, 239, 230, 0.24);
  --border-gold: 2px solid var(--accent-gold);
  --border-cyan: 2px solid var(--accent-cyan);
  --border-slime: 2px solid var(--accent-slime);
  --border-crimson: 2px solid var(--accent-crimson);

  /* ---- Comic Offset Shadows & Warm Glows ---- */
  --shadow-comic-xs: 2px 2px 0 #000000;
  --shadow-comic-sm: 3px 3px 0 #000000;
  --shadow-comic: 4px 4px 0 #000000;
  --shadow-comic-lg: 6px 6px 0 #000000;
  --shadow-deep: 0 20px 50px rgba(0, 0, 0, 0.65);
  --shadow-glow-gold: 0 0 24px rgba(245, 197, 66, 0.28);
  --shadow-glow-cyan: 0 0 24px rgba(76, 230, 200, 0.26);
  --shadow-glow-slime: 0 0 24px rgba(124, 232, 91, 0.24);

  /* ---- Typography Families ---- */
  --font-display: 'Bungee', 'Noto Sans SC', 'Noto Sans TC', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Noto Sans SC', 'Noto Sans TC', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Noto Sans SC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* ---- Fluid Type Scale ---- */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.35rem;
  --text-2xl: clamp(1.5rem, 2.5vw, 2rem);
  --text-3xl: clamp(2rem, 3.8vw, 2.9rem);
  --text-hero: clamp(2.45rem, 5.8vw, 4.65rem);

  /* ---- Layout & Spacing ---- */
  --container-max: 1220px;
  --container-pad: clamp(1rem, 3vw, 2rem);
  --nav-height: 70px;
  --section-gap: clamp(4.25rem, 7.5vw, 7rem);

  /* ---- Radii (Crisp Tactical Comic Geometry) ---- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease-snappy: cubic-bezier(0.2, 0.9, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur-med: 240ms;
  --dur-slow: 480ms;

  /* ---- Z-Index Layers ---- */
  --z-bg: 0;
  --z-content: 10;
  --z-noise: 40;
  --z-nav: 100;
  --z-modal: 300;
}

/* ---- Shared Keyframe Animations ---- */
@keyframes gold-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-gold-glow);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(245, 197, 66, 0);
  }
}

@keyframes slime-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-slime-glow);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(124, 232, 91, 0);
  }
}

@keyframes signal-dash {
  to {
    stroke-dashoffset: -48;
  }
}

@keyframes pulse-soft {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur-med: 1ms;
    --dur-slow: 1ms;
  }
}
