/* =========================================================
   Trench Run Immersion — site theme
   Palette pulled from the actual in-game canyon/ship/rock art:
   deep navy void, blue canyon-wall glow, violet crystal/engine light.
   ========================================================= */

:root {
  --void: #07091a;
  --panel: #0b0e22;
  --panel-alt: #0e1130;
  --wall-dark: #12172d;
  --wall-lit: #31468a;
  --wall-hi: #5670bd;
  --purple: #a26ee6;
  --purple-soft: #a26ee633;
  --purple-hot: #d6b2fa;
  --white: #eef0f7;
  --text: #c7cbe6;
  --text-dim: #8a8fb5;
  --border: #262c52;

  --font-display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Exo 2', 'Segoe UI', system-ui, sans-serif;

  --container-w: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--purple-soft); color: var(--white); }

/* ---------- reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- layout helpers ---------- */
.section-container, .nav-container, .hero-container, .footer-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

.section { position: relative; padding: 110px 0; }
.section.about        { background: var(--panel); }
.section.gameplay      { background: var(--void); overflow: hidden; }
.section.screenshots   { background: var(--panel); }
.section.trailer       { background: var(--void); }
.section.download      { background: var(--panel); }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 56px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  letter-spacing: 0.06em;
  color: var(--white);
  margin: 0 0 12px;
  text-shadow: 0 0 24px var(--purple-soft);
}

.section-subtitle {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin: 0;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 9, 26, 0.35);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.navbar.is-scrolled {
  background: rgba(7, 9, 26, 0.85);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  color: var(--white);
}
.nav-logo-ship {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 0 6px var(--purple-soft));
}

.nav-menu {
  display: flex;
  gap: 34px;
}
.nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--wall-hi));
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--white); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.hamburger .bar {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.is-open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open .bar:nth-child(2) { opacity: 0; }
.hamburger.is-open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 60px;
  background:
    radial-gradient(ellipse 900px 560px at 78% 8%, rgba(86,112,189,0.28), transparent 60%),
    radial-gradient(ellipse 700px 500px at 12% 100%, rgba(162,110,230,0.16), transparent 60%),
    linear-gradient(180deg, #0a0d24 0%, #07091a 55%, #050612 100%);
  overflow: hidden;
}

.hero-starfield {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 25% 65%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 15%, #cfd4ff, transparent),
    radial-gradient(1px 1px at 60% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 75% 35%, #fff, transparent),
    radial-gradient(1px 1px at 88% 60%, #cfd4ff, transparent),
    radial-gradient(1.5px 1.5px at 95% 12%, #fff, transparent),
    radial-gradient(1px 1px at 50% 45%, #fff, transparent);
  opacity: 0.55;
  pointer-events: none;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(7,9,26,0.4) 75%, var(--void) 100%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--purple-hot);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 0 0 20px;
  text-shadow: 0 0 40px rgba(162,110,230,0.45), 0 0 80px rgba(86,112,189,0.25);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto 44px;
}

.hero-image-placeholder { margin: 0 auto 40px; max-width: 880px; }

.hero-shot-frame {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(162,110,230,0.08);
}
.hero-shot-image { width: 100%; }

.frame-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 2px solid var(--purple-hot);
  opacity: 0.85;
  z-index: 2;
}
.frame-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.frame-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.platform-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}
.badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-icon { font-size: 1.1rem; line-height: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #7c5cd6);
  color: var(--white);
  box-shadow: 0 10px 30px -8px rgba(162,110,230,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -6px rgba(162,110,230,0.7); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--wall-hi);
}
.btn-secondary:hover { background: rgba(86,112,189,0.14); transform: translateY(-2px); }

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 3px;
  margin: 0 auto;
}
.scroll-indicator span {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
.scroll-indicator span:nth-child(2) { animation-delay: 0.2s; }
.scroll-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-indicator span { animation: none; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-content { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.about-text { color: var(--text); font-size: 1.05rem; }
.about-text-highlight {
  color: var(--white);
  font-size: 1.05rem;
  background: linear-gradient(90deg, rgba(162,110,230,0.12), transparent);
  border-left: 3px solid var(--purple);
  padding: 14px 22px;
  border-radius: 4px;
  text-align: left;
  margin: 24px 0;
}

.focus-mechanic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.focus-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 34px 26px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.focus-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-soft);
  box-shadow: 0 16px 40px -16px rgba(162,110,230,0.35);
}
.focus-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 10px var(--purple-soft));
}
.focus-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  letter-spacing: 0.03em;
  margin: 0 0 10px;
}
.focus-description { color: var(--text-dim); font-size: 0.94rem; margin: 0; }

/* =========================================================
   GAMEPLAY
   ========================================================= */
.gameplay { position: relative; }
.rock-watermark {
  position: absolute;
  right: -60px;
  bottom: -40px;
  width: 420px;
  height: 520px;
  background: url('assets/rock-watermark.png') no-repeat center / contain;
  opacity: 0.08;
  pointer-events: none;
}

.gameplay-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.phone-frame {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,0.65), 0 0 0 1px rgba(86,112,189,0.12);
  max-width: 320px;
  margin: 0 auto;
}
.gameplay-img { width: 100%; }

.gameplay-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  margin: 0 0 18px;
}
.gameplay-description { color: var(--text); margin: 0 0 16px; }

.feature-list { margin-top: 26px; display: grid; gap: 12px; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.98rem;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-hot);
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* =========================================================
   SCREENSHOTS
   ========================================================= */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.screenshot-slot {
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed var(--border);
  background:
    repeating-linear-gradient(135deg, rgba(86,112,189,0.05) 0 2px, transparent 2px 14px),
    var(--panel-alt);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.screenshot-slot:hover { border-color: var(--purple-soft); transform: translateY(-3px); }
.screenshot-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.screenshot-icon { font-size: 1.6rem; opacity: 0.5; }
.screenshot-slot img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   TRAILER
   ========================================================= */
.trailer-video {
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at center, rgba(86,112,189,0.14), var(--panel) 70%);
}
.video-iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.video-play-button {
  width: 74px; height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple), #7c5cd6);
  color: var(--white);
  font-size: 1.4rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 20px 50px -14px rgba(162,110,230,0.6);
  margin-bottom: 8px;
}
.video-placeholder-text { color: var(--text); margin: 0; }
.video-placeholder-subtext { color: var(--text-dim); font-size: 0.85rem; margin: 0; }

/* =========================================================
   DOWNLOAD
   ========================================================= */
.download-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.btn-download {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px 22px;
}
.btn-download:hover { border-color: var(--purple-soft); transform: translateY(-2px); }
.btn-text-group { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.btn-label { font-size: 0.68rem; color: var(--text-dim); }
.btn-platform { font-size: 0.98rem; font-weight: 700; }

.beta-text { text-align: center; color: var(--text-dim); font-size: 0.95rem; }
.beta-link { color: var(--purple-hot); border-bottom: 1px solid var(--purple-soft); }
.beta-link:hover { color: var(--white); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--void);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-ship { height: 30px; filter: drop-shadow(0 0 6px var(--purple-soft)); }
.footer-logo-text { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.logo-text { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; color: var(--white); font-size: 0.95rem; }
.logo-tagline { font-size: 0.68rem; letter-spacing: 0.14em; color: var(--purple-hot); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; }
.footer-links a:hover { color: var(--white); }

.social-links { display: flex; gap: 14px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.social-link:hover { border-color: var(--purple-soft); transform: translateY(-2px); }

.footer-copy p { color: var(--text-dim); font-size: 0.8rem; margin: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .gameplay-grid { grid-template-columns: 1fr; gap: 44px; }
  .focus-mechanic { grid-template-columns: 1fr; }
  .screenshot-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-menu {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--void);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 12px 0 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-menu.is-open { transform: translateY(0); opacity: 1; }
  .nav-menu li { width: 100%; text-align: center; }
  .nav-link { display: block; padding: 14px 0; }
  .hamburger { display: flex; }

  .section { padding: 76px 0; }
  .hero { padding-top: 120px; }
}

@media (max-width: 480px) {
  .screenshot-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .download-buttons { flex-direction: column; align-items: stretch; }
}
