/* ─────────────────────────────────────────────────────────────────────────────
   SteelStacks: styles.css
   Design system grounded in the game's actual art:
   dark navy sky, blue-grey tile palette, pixel grid lines
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Core palette: pulled from the game screenshots */
  --bg-main:       #080c18;
  --bg-card:       rgba(12, 18, 36, 0.65);
  --sky-mid:       #0e1629;
  --tile-blue:     #4a7fa8;       /* platform tile colour */
  --tile-glow:     #5291d0;       /* brighter tile/neon accent */
  --tile-dark:     #1a2d44;

  /* Accent colours */
  --neon-blue:     #5bb8f5;       /* softer tone: matches game HUD */
  --neon-yellow:   #c8e047;       /* character antenna / highlight */
  --neon-purple:   #7c5cbf;

  /* Text */
  --text-main:     #d6e4f0;
  --text-muted:    #6e8faa;
  --text-dim:      #3d5470;

  /* Glass / borders */
  --glass-border:  rgba(91, 184, 245, 0.14);
  --glass-bg:      rgba(10, 16, 32, 0.55);

  /* Shadows & glows */
  --glow-sm:       0 0 12px rgba(91, 184, 245, 0.3);
  --glow-md:       0 0 28px rgba(91, 184, 245, 0.25);
  --shadow-card:   0 16px 40px rgba(0, 0, 0, 0.5);

  /* Pixel grid unit */
  --px:            32px;

  /* Fonts */
  --font-display:  'Outfit', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body.dark-theme {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ── Background ────────────────────────────────────────────────────────────── */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Pixel / tile grid: matches 32px in-game tile size */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 184, 245, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 184, 245, 0.04) 1px, transparent 1px);
  background-size: var(--px) var(--px);
}

/* City silhouette: a soft gradient layer that reads as a horizon */
.city-silhouette {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background: linear-gradient(
    to top,
    rgba(10, 20, 40, 0.8) 0%,
    transparent 100%
  );
}

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--tile-glow) 0%, var(--neon-blue) 60%, #a8d8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
  position: relative;
}

.bg-card {
  background: var(--bg-card);
  border-top:    1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

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

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 1000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 12, 24, 0.85);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
}

.logo-text {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: #fff;
}

.logo-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-blue);
  letter-spacing: 1px;
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.nav-links a:hover { color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

/* Primary: solid tile-blue with glow */
.btn-primary {
  background: linear-gradient(135deg, #153a6b 0%, #1a5090 100%);
  border: 1px solid var(--neon-blue);
  color: #fff;
  box-shadow: var(--glow-sm);
  position: relative;
  overflow: hidden;
  flex-direction: column;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.4s ease;
}

.btn-primary:hover::after { left: 100%; }

.btn-primary:hover {
  box-shadow: var(--glow-md);
  transform: translateY(-2px);
}

.btn.lg {
  flex-direction: row;
  gap: 10px;
  padding: 14px 32px;
  font-size: 16px;
}

/* Ghost: transparent with border */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  flex-direction: row;
}

.btn-ghost:hover {
  border-color: var(--neon-blue);
  background: rgba(91, 184, 245, 0.08);
  color: #fff;
}

/* Outline: for nav */
.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 7px 18px;
  font-size: 13.5px;
}

.btn-outline:hover {
  border-color: var(--neon-blue);
  background: rgba(91, 184, 245, 0.08);
}

.btn-text    { font-weight: 700; }
.btn-subtext {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--neon-blue);
  font-weight: 400;
  margin-top: 2px;
}

/* ── Glass panels ───────────────────────────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.glass-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
}

/* ── Eyebrow / Pill ─────────────────────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--neon-blue);
  margin-bottom: 12px;
}

.pill {
  display: inline-block;
  background: rgba(124, 92, 191, 0.3);
  border: 1px solid rgba(124, 92, 191, 0.5);
  color: #c4b5fd;
  padding: 3px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Badge (hero PRE-ALPHA indicator) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(91, 184, 245, 0.08);
  border: 1px solid rgba(91, 184, 245, 0.25);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-blue);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.pulse {
  width: 7px;
  height: 7px;
  background: var(--neon-blue);
  border-radius: 50%;
  animation: pulsing 2s infinite;
  flex-shrink: 0;
}

@keyframes pulsing {
  0%   { box-shadow: 0 0 0 0 rgba(91,184,245,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(91,184,245,0); }
  100% { box-shadow: 0 0 0 0 rgba(91,184,245,0); }
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero-section {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  margin: 16px 0 18px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.platform-note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.hero-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.mode-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-blue);
  background: rgba(91, 184, 245, 0.08);
  border: 1px solid rgba(91, 184, 245, 0.18);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Hero image wrapper: pixel border glow */
.image-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-md), var(--shadow-card);
}

.image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 70%,
    rgba(8, 12, 24, 0.7) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.game-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* Scanlines overlay */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.img-label {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-blue);
  opacity: 0.85;
  z-index: 3;
  letter-spacing: 0.5px;
}

/* Hero video (when video file is added) */
.hero-video {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* ── About / Intro ───────────────────────────────────────────────────────────── */
.intro-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: 52px;
}

.section-header p {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 1.05rem;
}

.intro-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.quote-box {
  margin-top: 28px;
  padding: 18px 22px;
  border-left: 3px solid var(--tile-blue);
  background: rgba(91, 184, 245, 0.04);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-main);
  font-style: italic;
}

.play-modes-callout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.play-mode-item {
  padding: 12px 14px;
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid rgba(91, 184, 245, 0.12);
  border-left: 2px solid var(--neon-blue);
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.play-mode-item strong {
  display: block;
  color: #fff;
  font-size: 0.92rem;
  margin-bottom: 3px;
}

/* ── Mechanics Grid ──────────────────────────────────────────────────────────── */
.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 20px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
}

.mechanic-card {
  display: flex;
  gap: 20px;
  padding: 32px 28px;
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid rgba(91, 184, 245, 0.06);
  transition: background 0.25s ease;
}

.mechanic-card:hover {
  background: rgba(18, 30, 56, 0.8);
}

.mechanic-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-blue);
  opacity: 0.6;
  letter-spacing: 1px;
  flex-shrink: 0;
  padding-top: 4px;
}

.mechanic-body h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.mechanic-body p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ── Gallery ────────────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 8px;
  margin-top: 36px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--tile-dark);
  cursor: pointer;
}

.gallery-item--wide {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-blue);
  letter-spacing: 0.5px;
  background: linear-gradient(to top, rgba(8,12,24,0.85) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption { opacity: 1; }

/* ── Download Section ────────────────────────────────────────────────────────── */
.cta-section .section-title {
  font-size: clamp(2.2rem, 3.8vw, 3rem);
}

.cta-section > .container > p {
  color: var(--text-muted);
  margin-top: 10px;
}

.download-box {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 22px 36px;
  margin-top: 36px;
}

.dl-filename {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.dl-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.download-disclaimer {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.download-disclaimer a {
  color: var(--neon-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Changelog / Updates ─────────────────────────────────────────────────────── */
.update-card { padding: 40px; }

.update-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 20px;
}

.update-header h3 {
  font-size: 1.45rem;
  margin-top: 10px;
  color: #fff;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.lead {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 24px;
  line-height: 1.7;
}

.changelog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.full-width { grid-column: 1 / -1; }

.changelog-col h4 {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--neon-blue);
  margin-bottom: 12px;
}

.changelog-col ul { list-style: none; }

.changelog-col li {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.changelog-col li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--tile-blue);
  font-weight: 700;
}

.alert-box {
  margin-top: 32px;
  padding: 16px 20px;
  background: rgba(239, 68, 68, 0.07);
  border-left: 3px solid rgba(239, 68, 68, 0.5);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.alert-box strong { color: #fca5a5; }

.alert-box a {
  color: var(--neon-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Unified Resources Hub (Community + Support) ────────────────────────────── */
.resources-section {
  padding: 60px 0 0;
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.resource-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.resource-card h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 8px;
}

.resource-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.resource-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 36px 0;
  margin-top: 80px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-family: var(--font-mono);
  transition: color 0.2s;
}

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

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* ── Mobile Nav ──────────────────────────────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  position: relative;
  width: 26px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  display: block;
  transition: all 0.25s ease;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(8, 12, 24, 0.98);
  z-index: 999;
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}

.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-nav a {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.mobile-nav a:hover,
.mobile-nav-dl { color: var(--neon-blue) !important; }

/* ── Scroll animations ───────────────────────────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-subtitle  { max-width: 100%; }
  .hero-actions   { justify-content: center; }
  .hero-modes     { justify-content: center; }
  .platform-note  { text-align: center; }

  .intro-container { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .quote-box       { text-align: left; }
  .play-modes-callout { grid-template-columns: 1fr; text-align: left; }

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

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

@media (max-width: 768px) {
  .nav-links       { display: none; }
  .mobile-menu-btn { display: flex; }

  .section         { padding: 64px 0; }

  .gallery-grid    { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: 1; }

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

  .download-box    { flex-direction: column; gap: 20px; }

  .footer-content  { flex-direction: column; text-align: center; gap: 20px; }
  .footer-links    { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2.5rem; }
  .update-card     { padding: 24px 20px; }
  .resource-card   { padding: 24px 20px; }
  .download-box    { padding: 20px; }
}