/* HexTyrant — hextyrant.com
   Palette + type from the in-game design system (nova_ui_design_system.md) */

:root {
  --void: #060912;
  --bg-1: #0a0e27;
  --bg-2: #11152e;
  --bg-3: #0a0e1f;
  --accent: #4a9eff;
  --accent-hi: #7cbcff;
  --teal: #4affb8;
  --amber: #f8d84a;
  --red: #ff4a4a;
  --text: #e2e8f0;
  --text-dim: #93a4c0;
  --text-faint: #62748e;
  --glass: rgba(17, 21, 46, 0.55);
  --glass-edge: rgba(74, 158, 255, 0.18);
  --display: "Orbitron", sans-serif;
  --body: "Exo 2", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--void);
  overflow-x: hidden;
  line-height: 1.6;
}

.mono { font-family: var(--mono); }

/* ---- backdrop ---- */
#starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
}
.nebula {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 15% 20%, rgba(74, 158, 255, 0.10), transparent 60%),
    linear-gradient(150deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%),
    radial-gradient(50rem 35rem at 85% 70%, rgba(168, 85, 247, 0.07), transparent 60%),
    radial-gradient(40rem 30rem at 60% 10%, rgba(74, 255, 184, 0.04), transparent 60%);
}

/* ---- layout ---- */
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 46rem; }
.center { text-align: center; }
.section { padding: 5rem 0; }

/* ---- hero ---- */
.hero {
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; text-align: center;
  padding: 4rem 1rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 8vw, 4.6rem);
  letter-spacing: 0.22em;
  margin-right: -0.22em; /* optically recenter tracked caps */
  color: #ffffff;
  text-shadow:
    0 0 18px rgba(124, 188, 255, 0.55),
    0 0 60px rgba(74, 158, 255, 0.35);
}
.scanline {
  height: 1px; width: min(34rem, 80%);
  margin: 1.1rem auto 1.2rem;
  background: linear-gradient(90deg, transparent, rgba(124, 188, 255, 0.7), transparent);
}
.subtitle {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1rem, 3.4vw, 1.9rem);
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  color: #7e9fd8;
}
.pitch-line {
  margin-top: 1.6rem;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-dim);
}
.cta-row {
  margin-top: 2.2rem;
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.stat-chips {
  margin-top: 2.6rem;
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
}
.chip {
  font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--text-dim);
  border: 1px solid var(--glass-edge);
  background: rgba(10, 14, 39, 0.5);
  padding: 0.4rem 0.85rem; border-radius: 999px;
}
.hero { min-height: 82vh; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none;
  padding: 0.9rem 1.7rem; border-radius: 6px;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-primary {
  color: #061018;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 22px rgba(74, 158, 255, 0.45);
}
.btn-primary:hover { box-shadow: 0 0 34px rgba(124, 188, 255, 0.65); transform: translateY(-1px); }
.btn-disabled {
  cursor: default; opacity: 0.75;
}
.btn-disabled:hover { transform: none; box-shadow: 0 0 22px rgba(74, 158, 255, 0.45); }
.btn-ghost {
  color: var(--accent-hi);
  border: 1px solid var(--glass-edge);
  background: rgba(10, 14, 39, 0.4);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(74, 158, 255, 0.08); }
.btn-icon { width: 1.2rem; height: 1.2rem; }
.status-line {
  margin-top: 1.4rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; letter-spacing: 0.16em;
  color: var(--text-faint);
}
.status-icon { width: 0.9rem; height: 0.9rem; opacity: 0.8; }
#join .status-line { margin-top: 1.6rem; }
#join .cta-row { margin-top: 1.8rem; }
.footer-links { display: flex; gap: 1.4rem; }

/* ---- section headers (in-game accent-bar style) ---- */
.section-head {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  letter-spacing: 0.22em;
  color: var(--text);
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 2.4rem;
}
.accent-bar {
  display: inline-block; width: 0.35rem; height: 1.6em;
  background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 12px rgba(74, 158, 255, 0.8);
}

/* ---- glass panels ---- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- core-loop cards ---- */
.cards-3 {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.card { overflow: hidden; display: flex; flex-direction: column; }
.card img {
  width: 100%; aspect-ratio: 16/9.5; object-fit: cover; object-position: top;
  border-bottom: 1px solid var(--glass-edge);
}
.card-body { padding: 1.4rem 1.5rem 1.6rem; }
.card-title {
  font-family: var(--display); font-weight: 600;
  font-size: 1rem; letter-spacing: 0.24em;
  color: var(--tint, var(--accent));
  text-shadow: 0 0 14px color-mix(in srgb, var(--tint, var(--accent)) 55%, transparent);
  margin-bottom: 0.7rem;
}
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* ---- lead / pitch ---- */
.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-dim); }
.lead strong { color: var(--text); }

/* ---- feature grid ---- */
.feature-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.feature { padding: 1.4rem 1.5rem; }
.feature h3 {
  font-family: var(--body); font-weight: 700;
  font-size: 1.02rem; color: var(--text);
  margin-bottom: 0.5rem;
}
.feature p { color: var(--text-dim); font-size: 0.92rem; }

/* ---- showcase (the galaxy) ---- */
.showcase { padding-top: 0; margin-top: -3rem; }
.frame {
  padding: 0.55rem; overflow: hidden;
  box-shadow: 0 0 60px rgba(74, 158, 255, 0.18), 0 30px 80px rgba(0, 0, 0, 0.5);
}
.frame img { width: 100%; display: block; border-radius: 6px; }
.frame .zoom { display: block; cursor: zoom-in; }
.frame figcaption {
  display: flex; gap: 1.2rem; align-items: baseline; flex-wrap: wrap;
  padding: 0.9rem 0.8rem 0.5rem;
}
.cap-tag { font-size: 0.7rem; letter-spacing: 0.14em; color: var(--accent-hi); white-space: nowrap; }
.cap-text { font-size: 0.9rem; color: var(--text-dim); }
.showcase-copy { max-width: 50rem; margin: 3rem auto 0; text-align: center; }

/* ---- split section (damage model) ---- */
.split {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.split .section-head { margin-bottom: 1.4rem; }
.split-copy p { color: var(--text-dim); margin-bottom: 1rem; }
p.small { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-faint); }
#damage .frame img { aspect-ratio: 4/3; object-fit: cover; object-position: left center; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.who { margin-top: 2.4rem; max-width: 36rem; margin-left: auto; margin-right: auto; line-height: 1.7; }
.who em { color: var(--text-dim); font-style: italic; }

/* ---- gallery ---- */
.gallery-note {
  font-size: 0.7rem; letter-spacing: 0.14em;
  color: var(--text-faint); margin: -1.6rem 0 1.6rem;
}
.gallery {
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.gallery a {
  display: block; position: relative; overflow: hidden;
  border: 1px solid var(--glass-edge); border-radius: 8px;
  cursor: zoom-in; transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.gallery img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; display: block;
}
.gallery a span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.5rem 0.7rem; font-size: 0.62rem; letter-spacing: 0.14em;
  color: var(--text-dim);
  background: linear-gradient(0deg, rgba(6, 9, 18, 0.9), transparent);
}
.gallery a:hover {
  transform: scale(1.02);
  box-shadow: 0 0 24px rgba(74, 158, 255, 0.35);
}
.card .zoom { display: block; cursor: zoom-in; }

/* ---- closing CTA ---- */
.closing-head {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 4vw, 2.1rem);
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px rgba(124, 188, 255, 0.4);
  margin-bottom: 1.2rem;
}
#join .btn { margin-top: 1.8rem; }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--glass-edge);
  background: rgba(6, 9, 18, 0.7);
  padding: 2rem 0;
}
.footer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-brand { letter-spacing: 0.2em; font-size: 0.8rem; color: var(--text-dim); }
.footer-legal { font-size: 0.75rem; color: var(--text-faint); max-width: 34rem; }
.footer-links a {
  color: var(--accent-hi); text-decoration: none;
  font-size: 0.75rem; letter-spacing: 0.12em;
}
.footer-links a:hover { color: var(--accent); }

/* ---- lightbox ---- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 6, 12, 0.92);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 2rem;
}
.lightbox { flex-direction: column; gap: 0.8rem; }
.lightbox img {
  max-width: 100%; max-height: calc(100% - 2.5rem);
  border: 1px solid var(--glass-edge); border-radius: 8px;
  box-shadow: 0 0 60px rgba(74, 158, 255, 0.25);
}
.lb-caption { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--text-dim); text-align: center; }

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
