/* ============================================================
   PROTON.IM DESIGN SYSTEM TOKENS
   Cyberpunk Neon Edition — dark navy + cyan/purple neon
   Import this file first in every page stylesheet.
   ============================================================ */

:root {
  /* === CANVAS & SURFACES === */
  --canvas:        #0a0e1a;  /* Deep space navy (primary dark) */
  --canvas-deep:   #050810;  /* Deepest surface (footer, launcher chrome) */
  --canvas-soft:   #0f1424;  /* Subtle elevation (cards, topbar) */
  --canvas-mid:    #0c1120;  /* Between canvas and canvas-soft */
  --surface:       #151d30;  /* Secondary card background */
  --image-frame:   #1e2840;  /* 1px border for inline imagery */
  --white:         #ffffff;
  --black:         #000000;

  /* === BRAND === */
  --brand:         #d92977;  /* Logo pink — primary brand color */
  --brand-dim:     #a01054;  /* Dimmed pink */
  --brand-deep:    #6b0a36;  /* Deep pink */
  --brand-glow:    rgba(217, 41, 119, 0.15);

  /* === ACCENTS (legacy "neon-cyan" names — repointed to brand) === */
  --neon-cyan:      var(--brand);
  --neon-cyan-dim:  var(--brand-dim);
  --neon-cyan-glow: var(--brand-glow);
  --neon-magenta:   #ff00aa;  /* Secondary neon (magenta/pink) */
  --neon-purple:    #bf00ff;  /* Accent purple */
  --neon-blue:      #0080ff;  /* Electric blue */

  /* === LEGACY HAZARD ALIASES ===
     Map old "hazard" tokens to brand. ~150 references across CSS files. */
  --hazard:        var(--brand);
  --hazard-light:  var(--brand-dim);
  --hazard-deep:   var(--brand-deep);

  /* === SECONDARY NEON ACCENTS === */
  --tile-yellow:   #ffe600;
  --tile-green:    #00ff88;
  --tile-orange:   #ff6b35;
  --tile-pink:     #ff00aa;
  --tile-purple:   #bf00ff;

  /* === SOCIAL BRAND COLORS === */
  --brand-tg:      #2aabee;
  --brand-dc:      #5865f2;
  --brand-win-close: #e81123;

  /* === GAME MODE THEMES === */
  /* Deathmatch (DM) — red neon */
  --mode-dm:           #ff1744;
  --mode-dm-text:      #ff6b7a;
  --mode-dm-muted:     #ff8590;
  --mode-dm-deep:      #8b0000;
  --mode-dm-bg-1:      #1a0810;
  --mode-dm-bg-2:      #120408;
  --mode-dm-bg-3:      #0e0306;

  /* Role-play (RP) — gold/yellow neon */
  --mode-rp:           #ffd600;
  --mode-rp-text:      #ffee55;
  --mode-rp-muted:     #e6c200;
  --mode-rp-deep:      #cc9900;
  --mode-rp-ink:       #1a1406;
  --mode-rp-bg-1:      #1a1506;
  --mode-rp-bg-2:      #120e04;
  --mode-rp-bg-3:      #0e0b03;

  /* Murder Mystery (MM) — green neon */
  --mode-mm:           #00ff88;
  --mode-mm-text:      #4fd68e;
  --mode-mm-muted:     #86e5b1;
  --mode-mm-ink:       #061410;
  --mode-mm-bg-1:      #0c1f14;
  --mode-mm-bg-2:      #0a1410;
  --mode-mm-bg-3:      #080f0c;

  /* === TEXT === */
  --text:          #e0e8ff;  /* Primary headline + body (slightly blue-tinted white) */
  --text-muted:    #8899bb;  /* Secondary text */
  --text-meta:     #556688;  /* Timestamps, bylines, secondary */
  --text-invert:   #0a0e1a;  /* Text on bright surfaces */

  /* === INTERACTIVE === */
  --link-hover:    var(--brand);
  --focus-ring:    var(--brand);
  --pressed:       rgba(217, 41, 119, 0.3);
  --overlay-ring:  rgba(0, 0, 0, 0.33);

  /* === TYPOGRAPHY — Cyrillic-capable === */
  --font-display:  'Unbounded', 'Archivo Black', Impact, Helvetica, sans-serif;
  --font-body:     'Inter', 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:     'JetBrains Mono', 'Space Mono', 'Courier New', monospace;
  --font-serif:    'Newsreader', Georgia, serif;

  /* === BORDER RADII === */
  --r-2:  2px;
  --r-3:  3px;
  --r-4:  4px;
  --r-20: 20px;
  --r-24: 24px;
  --r-30: 30px;
  --r-40: 40px;

  /* === SPACING (8px base) === */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* === LAYOUT === */
  --container: 1280px;
  --nav-h: 72px;

  /* === MOTION === */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t-fast: 150ms;
  --t-med:  180ms;
}

/* ============================================================
   RESET + BASE
   ============================================================ */

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

html {
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.60;
  color: var(--text);
  background: var(--canvas);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === CYBERPUNK SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan); border-radius: 3px; }
::selection { background: var(--neon-cyan); color: var(--black); }

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 100001;
  padding: 12px 24px;
  background: var(--neon-cyan); color: var(--black);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  border-radius: 0 0 4px 4px;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

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

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */

.t-display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.69rem);
  font-weight: 900;
  line-height: .85;
  letter-spacing: 1.07px;
  text-transform: uppercase;
}
.t-display-lg {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.63rem);
  font-weight: 900;
  line-height: .85;
  text-transform: uppercase;
}
.t-display-md {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: .9;
  text-transform: uppercase;
}

.t-whisper {
  font-family: var(--font-body);
  font-size: 1.19rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 1.9px;
  text-transform: uppercase;
}

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

/* Primary — gradient brand pill with shimmer + glow */
.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 16px 36px; min-height: 52px;
  background: linear-gradient(135deg, #ff3b91 0%, var(--brand) 45%, #b01e62 100%);
  background-size: 200% 100%;
  background-position: 0% 50%;
  color: var(--white);
  font-family: var(--font-mono); font-size: .82rem; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  border: none; border-radius: var(--r-40);
  text-decoration: none; white-space: nowrap;
  box-shadow:
    0 6px 24px -6px rgba(217,41,119,.55),
    0 0 0 1px rgba(255,255,255,.06),
    inset 0 1px 0 rgba(255,255,255,.22);
  transition:
    background-position .5s var(--ease),
    box-shadow .3s var(--ease),
    transform .2s var(--ease),
    text-shadow .3s var(--ease);
}
.btn-primary > svg { transition: transform .35s var(--ease); }
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255,255,255,.18) 40%,
    rgba(255,255,255,.32) 50%,
    rgba(255,255,255,.18) 60%,
    transparent 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left .7s var(--ease);
}
.btn-primary:hover {
  background-position: 100% 50%;
  color: var(--white);
  box-shadow:
    0 10px 32px -4px rgba(217,41,119,.85),
    0 0 56px -12px rgba(217,41,119,.55),
    inset 0 1px 0 rgba(255,255,255,.32);
  text-shadow: 0 0 12px rgba(255,255,255,.45);
  transform: translateY(-2px);
}
.btn-primary:hover > svg { transform: translateY(-2px); }
.btn-primary:hover::before { left: 160%; }
.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 3px 12px -2px rgba(217,41,119,.5),
    inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--canvas),
    0 0 0 4px var(--brand),
    0 8px 28px -6px rgba(217,41,119,.65);
}

/* Outline — glass pill with brand border, glow + shimmer on hover */
.btn-outline {
  position: relative;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 30px; min-height: 50px;
  background: rgba(217,41,119,.04);
  color: var(--brand);
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  border: 1px solid var(--brand); border-radius: var(--r-40);
  text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  transition:
    background var(--t-med) var(--ease),
    color var(--t-med) var(--ease),
    box-shadow .3s var(--ease),
    transform .2s var(--ease),
    text-shadow .3s var(--ease);
}
.btn-outline > svg { transition: transform .35s var(--ease); }
.btn-outline::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(217,41,119,.18) 40%,
    rgba(217,41,119,.32) 50%,
    rgba(217,41,119,.18) 60%,
    transparent 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left .7s var(--ease);
}
.btn-outline:hover {
  background: var(--brand);
  color: var(--white);
  box-shadow:
    0 8px 26px -6px rgba(217,41,119,.7),
    0 0 48px -14px rgba(217,41,119,.5),
    inset 0 1px 0 rgba(255,255,255,.25);
  text-shadow: 0 0 10px rgba(255,255,255,.4);
  transform: translateY(-2px);
}
.btn-outline:hover > svg { transform: translateX(2px); }
.btn-outline:hover::before { left: 160%; }
.btn-outline:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px -2px rgba(217,41,119,.45);
}
.btn-outline:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--canvas),
    0 0 0 4px var(--brand);
}

/* Pill tag (non-interactive) */
.pill-tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  background: var(--neon-cyan); color: var(--black);
  font-family: var(--font-mono); font-size: .69rem; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  border-radius: var(--r-20);
}

/* ============================================================
   LINKS
   ============================================================ */
a { color: var(--text); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--neon-cyan); }

/* ============================================================
   CONTAINERS & TILES
   ============================================================ */

.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container { padding: 0 32px; }
}
@media (min-width: 1180px) {
  .container { padding: 0 48px; }
}

.tile {
  background: var(--canvas);
  border: 1px solid var(--neon-cyan);
  border-radius: var(--r-20);
  padding: var(--s-8);
  transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tile:hover {
  box-shadow: 0 0 20px var(--neon-cyan-glow), inset 0 0 20px var(--neon-cyan-glow);
  border-color: var(--neon-cyan);
}
.tile--feature { border-radius: var(--r-24); padding: var(--s-10); }

/* Hover: glow effect on links in tiles */
.tile a:hover h2, .tile a:hover h3 { color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan-glow); }

/* ============================================================
   FORMS
   ============================================================ */

.input {
  display: block; width: 100%;
  padding: 12px 14px;
  background: var(--canvas); color: var(--text);
  font-family: var(--font-body); font-size: 15px;
  border: 1px solid var(--neon-cyan); border-radius: var(--r-2);
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder { color: var(--text-meta); }
.input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}
.input.is-error { border-color: var(--neon-magenta); }

.form-label {
  display: block;
  font-family: var(--font-mono); font-size: .69rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

/* ============================================================
   ICON UTILITIES
   ============================================================ */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--icon-url, none) no-repeat center / contain;
          mask: var(--icon-url, none) no-repeat center / contain;
  vertical-align: -0.15em;
}
.icon-arrow-left { --icon-url: url('../images/icons/arrow-left.svg'); }
.icon--16 { width: 16px; height: 16px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
