/* ============================================================
   KEVINGUYER.COM — Design Tokens
   1982 Tron era. Pure black, ENCOM cyan, white edge highlights.
   ============================================================ */

:root {
  /* ---------- Color ---------- */
  --c-void:      #000000;        /* absolute black, page bg */
  --c-grid-deep: #02060a;        /* slightly lifted black for cards */
  --c-grid-line: #0a1820;        /* horizon grid lines, dim */
  --c-cyan:      #00d8ff;        /* primary glow — discs, light trails */
  --c-cyan-dim:  #0a8fa8;        /* cyan at 60% energy */
  --c-cyan-deep: #003848;        /* cyan plasma backwash */
  --c-edge:      #e8fbff;        /* near-white inner edge of glow */
  --c-white:     #ffffff;
  --c-amber:     #ff9d3a;        /* opponent / warning (sparingly) */
  --c-red:       #ff2b2b;        /* MCP / fail state (sparingly) */

  /* ---------- Glow ---------- */
  --glow-sm: 0 0 4px var(--c-cyan), 0 0 8px rgba(0,216,255,0.6);
  --glow-md: 0 0 6px var(--c-cyan), 0 0 14px rgba(0,216,255,0.7), 0 0 28px rgba(0,216,255,0.35);
  --glow-lg: 0 0 8px var(--c-edge), 0 0 18px var(--c-cyan), 0 0 40px rgba(0,216,255,0.5), 0 0 80px rgba(0,216,255,0.25);
  --glow-text-sm: 0 0 2px var(--c-edge), 0 0 6px var(--c-cyan);
  --glow-text-md: 0 0 1px var(--c-edge), 0 0 8px var(--c-cyan), 0 0 22px rgba(0,216,255,0.6);

  /* ---------- Typography ---------- */
  --font-display: "Orbitron", "Eurostile", "ITC Eurostile", "Bank Gothic",
                  ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "Space Mono", "IBM Plex Mono",
                  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-body:    "Orbitron", "Eurostile", ui-sans-serif, system-ui, sans-serif;

  --fs-logo-d: clamp(72px, 12vw, 180px);
  --fs-logo-m: clamp(44px, 14vw, 72px);
  --fs-sub:    clamp(11px, 1.1vw, 14px);
  --fs-game:   clamp(13px, 1.2vw, 16px);
  --fs-meta:   clamp(10px, 0.9vw, 12px);

  /* ---------- Spacing / radius ---------- */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --pad-page: clamp(16px, 3vw, 40px);
  --gap-grid: clamp(12px, 1.6vw, 20px);

  /* ---------- Motion ---------- */
  --ease-out:  cubic-bezier(.22,.61,.36,1);
  --ease-snap: cubic-bezier(.2,.8,.2,1);
  --t-fast: 140ms;
  --t-med:  280ms;
  --t-slow: 600ms;
}

/* ============================================================
   Resets / page chrome
   ============================================================ */

*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--c-void);
  color: var(--c-edge);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
  min-height: 100vh;
}

button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   Atomic primitives
   ============================================================ */

.hairline {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--c-cyan) 50%,
    transparent 100%);
  opacity: 0.4;
}

.hairline-v {
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--c-cyan) 50%,
    transparent 100%);
  opacity: 0.4;
}

.panel {
  position: relative;
  background:
    linear-gradient(180deg,
      rgba(0,216,255,0.04) 0%,
      rgba(0,216,255,0.01) 50%,
      rgba(0,216,255,0.04) 100%),
    var(--c-grid-deep);
  border: 1px solid rgba(0,216,255,0.35);
  box-shadow:
    0 0 0 1px rgba(0,216,255,0.06),
    inset 0 0 24px rgba(0,216,255,0.06),
    0 0 28px rgba(0,216,255,0.10);
}

/* Notched corners — pure 1982 ENCOM panel */
.panel--notched {
  clip-path: polygon(
    12px 0, calc(100% - 12px) 0, 100% 12px,
    100% calc(100% - 12px), calc(100% - 12px) 100%,
    12px 100%, 0 calc(100% - 12px), 0 12px
  );
}

.panel__corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--c-cyan);
  pointer-events: none;
  filter: drop-shadow(0 0 4px var(--c-cyan));
}
.panel__corner--tl { top: -1px; left: -1px;  border-right: none; border-bottom: none; }
.panel__corner--tr { top: -1px; right: -1px; border-left: none;  border-bottom: none; }
.panel__corner--bl { bottom: -1px; left: -1px;  border-right: none; border-top: none; }
.panel__corner--br { bottom: -1px; right: -1px; border-left: none;  border-top: none; }

/* ============================================================
   Background ambience: horizon grid + scanlines + faint hex pulse
   ============================================================ */

.bg-horizon {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-horizon__sky {
  position: absolute;
  inset: 0 0 50% 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 100%,
      rgba(0,216,255,0.18) 0%,
      rgba(0,216,255,0.06) 30%,
      transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%,
      rgba(0,216,255,0.35) 0%,
      transparent 70%);
}

.bg-horizon__floor {
  position: absolute;
  inset: 50% 0 0 0;
  perspective: 600px;
  perspective-origin: 50% 0%;
  overflow: hidden;
}

.bg-horizon__grid {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0%;
  transform: rotateX(70deg);
  background-image:
    linear-gradient(to right, rgba(0,216,255,0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,216,255,0.55) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-drift 6s linear infinite;
  filter: drop-shadow(0 0 4px rgba(0,216,255,0.6));
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to   { background-position: 0 60px; }
}

.bg-horizon__line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent, var(--c-edge) 30%, var(--c-edge) 70%, transparent);
  box-shadow: var(--glow-md);
}

.bg-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 3px);
  mix-blend-mode: overlay;
  opacity: 0.6;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 98;
  background: radial-gradient(ellipse 100% 80% at 50% 50%,
    transparent 50%,
    rgba(0,0,0,0.7) 100%);
}

/* ============================================================
   Boot sequence — flickers in on load
   ============================================================ */

@keyframes boot-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes boot-flicker {
  0%, 100% { opacity: 1; }
  10% { opacity: 0.4; }
  12% { opacity: 1; }
  20% { opacity: 0.7; }
  22% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .logo, .subhead, .links, .arcade { animation: none !important; opacity: 1 !important; filter: none !important; }
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 6px var(--c-cyan)) drop-shadow(0 0 12px rgba(0,216,255,0.4)); }
  50%      { filter: drop-shadow(0 0 10px var(--c-cyan)) drop-shadow(0 0 24px rgba(0,216,255,0.7)); }
}
