/* Ember Quest Website — game-styled dark theme
   Colors extracted from game UI: dark navy #1a1f2e, teal panels,
   orange #f5a623 accents, green #3fb950, cyan #58d4ff */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;600;700&display=swap');

:root {
  --bg: #0e1118;
  --bg-panel: rgba(18, 24, 38, 0.85);
  --bg-card: rgba(22, 30, 48, 0.9);
  --border: rgba(88, 212, 255, 0.15);
  --border-glow: rgba(88, 212, 255, 0.3);
  --text: #e0e8f0;
  --text-muted: #8899aa;
  --orange: #f5a623;
  --orange-glow: rgba(245, 166, 35, 0.3);
  --green: #3fb950;
  --cyan: #58d4ff;
  --red: #ff6b6b;
  --yellow: #ffd93d;
  --purple: #c084fc;
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  position: relative;
}

/* Fixed gameplay screenshot background — low opacity parallax */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../img/gameplay-bg.png') center center / cover no-repeat;
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Hero ─── */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center top, rgba(245,166,35,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-pixel);
  font-size: 2.4rem;
  color: var(--orange);
  text-shadow: 0 0 40px var(--orange-glow), 0 2px 0 #b37a1a;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}
.tagline {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}
.subtitle .inline-link { color: var(--cyan); text-decoration: none; }
.subtitle .inline-link:hover { text-decoration: underline; }
.hero-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-pixel);
  letter-spacing: 0.5px;
}

/* ─── Sections ─── */
section {
  padding: 3.5rem 0;
  position: relative;
}
section + section::before {
  content: '';
  display: block;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
h2 {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--orange);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.section-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ─── Cards ─── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(88, 212, 255, 0.05);
}
.card h3 { color: var(--text); font-size: 0.95rem; }
.card p { color: var(--text-muted); font-size: 0.85rem; }
.card-meta {
  font-family: var(--font-pixel);
  color: var(--text-muted);
  font-size: 0.55rem;
  margin-top: 0.75rem;
  letter-spacing: 0.5px;
}
.card-badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}
.badge-wip { background: rgba(255, 217, 61, 0.1); color: var(--yellow); border-color: rgba(255, 217, 61, 0.3); }
.badge-future { background: rgba(192, 132, 252, 0.1); color: var(--purple); border-color: rgba(192, 132, 252, 0.3); }

/* ─── Two column ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.col ul { list-style: none; }
.col li {
  padding: 0.35rem 0 0.35rem 1.2rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.col li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-size: 0.8rem;
}

/* ─── Insight grid ─── */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}
.insight {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.insight-icon { font-size: 1.3rem; flex-shrink: 0; }
.insight-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--orange);
  color: #000;
  border-radius: 3px;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  font-weight: 700;
  flex-shrink: 0;
}
.insight p { color: var(--text-muted); font-size: 0.85rem; margin: 0; line-height: 1.5; }
.insight p strong { color: var(--text); }
.highlight-insight {
  border-color: var(--orange);
  background: rgba(245, 166, 35, 0.05);
  margin-bottom: 1rem;
}

/* ─── Architecture diagram ─── */
.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ─── Tables ─── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
}
.spec-table th {
  text-align: left;
  padding: 0.7rem 0.75rem;
  background: rgba(88, 212, 255, 0.05);
  border-bottom: 1px solid var(--border-glow);
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.spec-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.spec-table tr:last-child td { border-bottom: none; }

code {
  background: rgba(88, 212, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.8em;
  color: var(--cyan);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ─── Video ─── */
.video-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(88, 212, 255, 0.05);
}
.video-wrapper video { width: 100%; display: block; }

/* ─── Download row ─── */
.download-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.5px;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
  text-transform: uppercase;
  background: var(--orange);
  color: #000;
  border: 2px solid var(--orange);
}
.btn:hover {
  background: transparent;
  color: var(--orange);
  box-shadow: 0 0 15px var(--orange-glow);
}
.btn-secondary {
  background: transparent;
  border: 2px solid var(--border-glow);
  color: var(--cyan);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(88, 212, 255, 0.15);
  background: transparent;
  color: var(--cyan);
}

/* ─── Hero character sprite ─── */
.hero-character {
  width: 192px;
  height: 192px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 20px var(--orange-glow)) drop-shadow(0 0 40px rgba(88, 212, 255, 0.15));
}

/* ─── Screenshot showcase ─── */
.screenshot-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
.screenshot-row.screenshot-single {
  grid-template-columns: 1fr;
  max-width: 700px;
}
.screenshot {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.screenshot img {
  width: 100%;
  display: block;
  transition: opacity 0.3s;
}
.screenshot:hover img { opacity: 0.9; }
.screenshot figcaption {
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.3px;
  line-height: 1.5;
}

/* ─── Download note ─── */
.download-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 217, 61, 0.05);
  border: 1px solid rgba(255, 217, 61, 0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── References ─── */
.ref-list { list-style: none; }
.ref-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.ref-list li:last-child { border-bottom: none; }
.ref-list a { color: var(--cyan); text-decoration: none; }
.ref-list a:hover { text-decoration: underline; }

/* ─── Footer ─── */
footer {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
footer a { color: var(--orange); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .hero h1 { font-size: 1.5rem; }
  .tagline { font-size: 0.55rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero-character { width: 128px; height: 128px; }
  section { padding: 2.5rem 0; }
  .two-col { grid-template-columns: 1fr; }
  .download-row { flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .screenshot-row { grid-template-columns: 1fr; }
}
