/* Breakpoint — GitHub Pages Stylesheet */

/* ── CSS Custom Properties ───────────────────────────────────────────── */
:root {
  --bg-deep: #0d0d1a;
  --bg-panel: #1a1a2e;
  --bg-elevated: #2a2a3e;
  --accent: #77ccff;
  --accent-glow: rgba(119, 204, 255, 0.3);
  --accent-dim: rgba(119, 204, 255, 0.08);
  --text-primary: #e0e0e0;
  --text-secondary: #99aabb;
  --text-muted: #667788;
  --border: #334455;
  --error: #ff7777;
  --warning: #ff9933;
  --success: #55aa55;
  --gold: #ffdd66;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", "Liberation Mono", monospace;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(119, 204, 255, 0.015) 2px,
      rgba(119, 204, 255, 0.015) 4px
    );
  pointer-events: none;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("assets/sprites/platformer_bg.png") repeat-x bottom / auto 40%;
  opacity: 0.06;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.wordmark {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-shadow:
    0 0 30px var(--accent-glow),
    0 0 60px rgba(119, 204, 255, 0.15);
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(119, 204, 255, 0.15); }
  50%      { text-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(119, 204, 255, 0.25); }
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-primary);
  margin-top: 1rem;
  font-weight: 400;
}

.hero-sub {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}
.btn-primary:hover {
  background: #99ddff;
  box-shadow: 0 0 20px var(--accent-glow);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 16px rgba(119, 204, 255, 0.12);
  opacity: 1;
}

/* ── Pitch Section ───────────────────────────────────────────────────── */
.pitch-card {
  background: var(--bg-panel);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 2rem 2.25rem;
  max-width: 740px;
}

.pitch-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.pitch-card p:last-child { margin-bottom: 0; }
.pitch-card strong { color: var(--text-primary); }

/* ── Game Showcase ───────────────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(119, 204, 255, 0.08);
}

.game-visual {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}

.game-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-info {
  padding: 1.25rem 1.5rem;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.game-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-players {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(119, 204, 255, 0.15);
}

.badge-hz {
  background: rgba(85, 170, 85, 0.1);
  color: var(--success);
  border: 1px solid rgba(85, 170, 85, 0.2);
}

.game-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.game-mechanic {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── CSS Game Illustrations ──────────────────────────────────────────── */

/* Mini-Golf */
.illustration-golf {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1a0a;
}

.golf-scene {
  position: relative;
  width: 200px;
  height: 140px;
}

.golf-green {
  position: absolute;
  bottom: 20px;
  left: 30px;
  width: 140px;
  height: 80px;
  background: #1a4a1a;
  border-radius: 50%;
  border: 2px solid #2a6a2a;
}

.golf-hole {
  position: absolute;
  top: 50%;
  left: 60%;
  width: 14px;
  height: 14px;
  background: #0a0a0a;
  border-radius: 50%;
  border: 2px solid #333;
  transform: translate(-50%, -50%);
}

.golf-flag {
  position: absolute;
  top: 50%;
  left: 60%;
  width: 2px;
  height: 30px;
  background: #ccc;
  transform: translate(-50%, -100%);
}

.golf-flag::after {
  content: "";
  position: absolute;
  top: 0;
  left: 2px;
  width: 14px;
  height: 10px;
  background: var(--error);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.golf-ball {
  position: absolute;
  bottom: 40px;
  left: 50px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.golf-aim {
  position: absolute;
  bottom: 44px;
  left: 58px;
  width: 50px;
  height: 2px;
  border-top: 2px dashed rgba(119, 204, 255, 0.5);
  transform: rotate(-20deg);
  transform-origin: left center;
}

/* Laser Tag */
.illustration-laser {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a15;
}

.laser-scene {
  position: relative;
  width: 200px;
  height: 140px;
}

.laser-wall {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.laser-wall-1 {
  top: 30px;
  left: 60px;
  width: 80px;
  height: 6px;
  transform: rotate(35deg);
}

.laser-wall-2 {
  top: 70px;
  right: 30px;
  width: 50px;
  height: 6px;
  transform: rotate(-15deg);
}

.laser-beam {
  position: absolute;
  top: 95px;
  left: 20px;
  width: 160px;
  height: 2px;
  background: linear-gradient(90deg, var(--error), var(--error) 40%, transparent 41%, transparent 42%, var(--error) 43%, var(--error));
  box-shadow: 0 0 8px rgba(255, 119, 119, 0.5);
  opacity: 0.9;
}

.laser-player {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid;
}

.laser-player-1 {
  bottom: 30px;
  left: 18px;
  border-color: var(--accent);
  background: rgba(119, 204, 255, 0.2);
  box-shadow: 0 0 8px var(--accent-glow);
}

.laser-player-2 {
  top: 20px;
  right: 25px;
  border-color: var(--error);
  background: rgba(255, 119, 119, 0.2);
  box-shadow: 0 0 8px rgba(255, 119, 119, 0.3);
}

.laser-smoke {
  position: absolute;
  bottom: 15px;
  right: 50px;
  width: 40px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(100, 100, 100, 0.3), transparent 70%);
  border-radius: 50%;
}

/* Tron */
.illustration-tron {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050510;
}

.tron-scene {
  position: relative;
  width: 200px;
  height: 140px;
  background:
    linear-gradient(rgba(119, 204, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 204, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}

.tron-trail {
  position: absolute;
  border-radius: 1px;
}

.tron-trail-cyan {
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.tron-trail-cyan-1 { bottom: 40px; left: 20px; width: 80px; }
.tron-trail-cyan-2 { bottom: 40px; left: 100px; width: 3px; height: 50px; }

.tron-trail-orange {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(255, 153, 51, 0.4);
}

.tron-trail-orange-h { top: 50px; right: 20px; width: 60px; height: 3px; }
.tron-trail-orange-v { top: 50px; right: 80px; width: 3px; height: 40px; }

.tron-head {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.tron-head-cyan {
  top: calc(40px - 50px - 4px);
  left: 97px;
  bottom: auto;
  top: auto;
  bottom: 86px;
  left: 97px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.tron-head-orange {
  top: 86px;
  right: 77px;
  background: var(--warning);
  box-shadow: 0 0 12px var(--warning);
}

/* ── Alert Overlay Section ───────────────────────────────────────────── */
.alert-tiers {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 640px;
}

.alert-tier {
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border-left: 3px solid;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.alert-tier-label {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 70px;
  padding-top: 2px;
}

.alert-tier-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tier-ambient { border-color: var(--success); }
.tier-ambient .alert-tier-label { color: var(--success); }

.tier-notice { border-color: var(--gold); }
.tier-notice .alert-tier-label { color: var(--gold); }

.tier-urgent { border-color: var(--warning); }
.tier-urgent .alert-tier-label { color: var(--warning); }

.tier-critical { border-color: var(--error); }
.tier-critical .alert-tier-label { color: var(--error); }

.alert-details {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.alert-stat {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  text-align: center;
}

.alert-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.alert-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.curl-example {
  margin-top: 2rem;
}

/* ── Code Blocks ─────────────────────────────────────────────────────── */
pre {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.85rem;
}

pre code {
  color: var(--text-secondary);
  font-size: inherit;
}

.code-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Syntax highlighting (CSS classes, no JS) */
.tok-kw { color: #c792ea; }       /* keywords */
.tok-str { color: #c3e88d; }      /* strings */
.tok-url { color: var(--accent); } /* URLs */
.tok-flag { color: var(--gold); }  /* flags */
.tok-comment { color: var(--text-muted); font-style: italic; }
.tok-cmd { color: #82aaff; }      /* commands */

/* ── Architecture Section ────────────────────────────────────────────── */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.arch-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.arch-card-title {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.arch-card ul {
  list-style: none;
  padding: 0;
}

.arch-card li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.2rem 0;
}

.arch-card li::before {
  content: "\203a\00a0";
  color: var(--accent);
  font-weight: 700;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ── Architecture Diagram ────────────────────────────────────────────── */
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.arch-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  text-align: center;
  min-width: 120px;
}

.arch-box-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.arch-box-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.arch-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 300;
}

/* ── Quick Start / Deploy Section ────────────────────────────────────── */
.deploy-options {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.deploy-option h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.deploy-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: var(--bg-deep);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--accent); }

.footer-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.footer-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-badges img {
  display: inline-block;
  height: 20px;
}

/* ── Nav (shared) ────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 26, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

.nav-links a:hover { color: var(--accent); }

/* ── Docs Page ───────────────────────────────────────────────────────── */
.docs-hero {
  padding: 8rem 0 3rem;
  text-align: center;
}

.docs-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.doc-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: border-color 0.2s;
}

.doc-card:hover {
  border-color: var(--accent);
}

.doc-card h2 {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.doc-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.doc-link {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .arch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  section { padding: 3rem 0; }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 90vh;
  }

  .stat-row {
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .arch-diagram {
    flex-direction: column;
  }

  .arch-arrow {
    transform: rotate(90deg);
  }

  .nav-links {
    gap: 1rem;
  }

  .pitch-card {
    padding: 1.5rem;
  }

  .alert-tier {
    flex-direction: column;
    gap: 0.4rem;
  }
}
