/* ============================================================
   TRIPLE THRONE · MIDNIGHT TRACK
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --void:    #06080f;
  --deep:    #0c1020;
  --surface: #111828;
  --gold:    #e9b74e;
  --gold-b:  #f5cc72;
  --gold-d:  rgba(233, 183, 78, 0.15);
  --gold-m:  rgba(233, 183, 78, 0.28);
  --cream:   #f4f0e8;
  --muted:   rgba(244, 240, 232, 0.62);
  --dim:     rgba(244, 240, 232, 0.38);
  --shadow:  0 28px 90px rgba(0, 0, 0, 0.65);
  --max:     1120px;
  --hdr:     70px;
}

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

img  { display: block; max-width: 100%; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a      { color: inherit; }
button { font: inherit; }
ul     { list-style: none; }

/* --- Skip link -------------------------------------------- */
.skip-link {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 300;
  transform: translateY(-200%);
  transition: transform 180ms;
  background: var(--gold);
  color: var(--void);
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* --- Global typography ------------------------------------ */
h1, h2, h3 {
  font-family: Oswald, Impact, "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.0;
  color: var(--cream);
}

h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.9rem); margin-bottom: 20px; }
h3 { font-size: 1.05rem; letter-spacing: 0.1em; margin-bottom: 10px; }

.gold { color: var(--gold); }

.eyebrow {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.body-copy {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* --- Layout utilities ------------------------------------- */
.section-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 52px);
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header h2 { margin-bottom: 0; }

/* --- Reveal animation ------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 650ms ease, transform 650ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Store badges ----------------------------------------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  transition: transform 180ms ease, filter 180ms ease;
}
.badge-link:hover,
.badge-link:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.12);
}
.badge-link img       { height: 48px; width: auto; }
.play-link img        { height: 70px; margin: -11px 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--hdr);
  padding: 0 clamp(16px, 4vw, 52px);
  background: rgba(6, 8, 15, 0.96);
  border-bottom: 1px solid var(--gold-d);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
/* Slightly more opaque + stronger border when scrolled */
.site-header.scrolled {
  background: rgba(4, 5, 10, 0.99);
  border-bottom-color: var(--gold-m);
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 44px;
  justify-self: start;
  transition: opacity 150ms;
}
.brand:hover { opacity: 0.85; }
.brand img   { height: 100%; width: auto; }

.nav-desktop {
  display: flex;
  gap: clamp(18px, 3vw, 38px);
  justify-self: center;
}
.nav-desktop a {
  text-decoration: none;
  color: var(--muted);
  font-family: Oswald, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 150ms;
}
.nav-desktop a:hover,
.nav-desktop a:focus-visible { color: var(--gold); }

.header-cta {
  justify-self: end;
  text-decoration: none;
  background: var(--gold);
  color: var(--void);
  font-family: Oswald, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 3px;
  transition: background 150ms, transform 150ms;
}
.header-cta:hover,
.header-cta:focus-visible {
  background: var(--gold-b);
  transform: translateY(-1px);
}

/* Hamburger button */
.menu-toggle {
  display: none;
  justify-self: end;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 230ms ease, opacity 230ms ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-menu {
  position: fixed;
  inset: var(--hdr) 0 auto;
  z-index: 99;
  display: flex;
  flex-direction: column;
  background: rgba(6, 8, 15, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--gold-d);
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.mobile-menu.open { max-height: 320px; }

.mobile-link,
.mobile-cta {
  display: block;
  padding: 17px clamp(16px, 4vw, 52px);
  text-decoration: none;
  font-family: Oswald, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold-d);
  transition: color 150ms, background 150ms;
}
.mobile-link { color: var(--cream); }
.mobile-link:hover { color: var(--gold); }
.mobile-cta {
  color: var(--gold);
  background: rgba(233, 183, 78, 0.06);
}
.mobile-cta:hover { background: rgba(233, 183, 78, 0.13); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--hdr) + 24px) clamp(16px, 4vw, 52px) 96px;
  isolation: isolate;
}

/* Ken Burns background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: heroZoom 22s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* Layered overlay: base dark + gold radial glow */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 42%, rgba(233, 183, 78, 0.07), transparent),
    linear-gradient(180deg,
      rgba(6, 8, 15, 0.38) 0%,
      rgba(6, 8, 15, 0.72) 55%,
      var(--void) 100%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
  position: relative;
}

/* Eyebrow with side rules */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.eyebrow-bar {
  flex: 1;
  max-width: 56px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}
.eyebrow-text {
  font-family: Oswald, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-logo {
  width: min(380px, 86%);
  margin-bottom: 22px;
  filter:
    drop-shadow(0 0 48px rgba(233, 183, 78, 0.2))
    drop-shadow(0 16px 32px rgba(0, 0, 0, 0.55));
}

.hero h1        { margin-bottom: 16px; }

.hero-copy {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  font-weight: 500;
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 30px;
}

.hero-badges { justify-content: center; }

.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 8px 18px;
  border: 1px solid var(--gold-d);
  border-radius: 4px;
  background: rgba(233, 183, 78, 0.06);
  font-size: 0.9rem;
  font-weight: 700;
}
.stars {
  color: var(--gold);
  letter-spacing: 1px;
}

/* Scroll chevron */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-chevron {
  width: 22px;
  height: 22px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0.5;
  animation: chevronBounce 2.2s ease-in-out infinite;
}
@keyframes chevronBounce {
  0%, 100% { opacity: 0.45; transform: rotate(45deg) translate(0, 0); }
  50%       { opacity: 0.8;  transform: rotate(45deg) translate(3px, 3px); }
}

/* ============================================================
   GAME OVERVIEW
   ============================================================ */
.game-section {
  padding: clamp(80px, 9vw, 120px) 0;
  background: var(--deep);
  border-top: 1px solid var(--gold-d);
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.game-text .eyebrow { margin-bottom: 14px; }
.game-text h2       { margin-bottom: 18px; }
.game-text .body-copy { margin-bottom: 30px; }

.game-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.game-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}
.hl-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 7px;
  box-shadow: 0 0 10px rgba(233, 183, 78, 0.6);
}

/* Screenshot frame in game section */
.screen-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gold-m);
  box-shadow:
    0 36px 88px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(233, 183, 78, 0.08),
    inset 0 0 0 1px rgba(233, 183, 78, 0.05);
}
.screen-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.screen-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 110%, rgba(233, 183, 78, 0.08), transparent 65%);
  pointer-events: none;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-section {
  padding: clamp(80px, 9vw, 120px) 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(233, 183, 78, 0.025) 0 1px,
      transparent 1px 80px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(233, 183, 78, 0.025) 0 1px,
      transparent 1px 80px
    ),
    var(--void);
  border-top: 1px solid var(--gold-d);
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 32px 22px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--gold-d);
  border-top: 2px solid var(--gold);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: background 230ms, box-shadow 230ms, transform 230ms;
}
/* Gold radial highlight at top of card */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: radial-gradient(ellipse at 50% 0%, rgba(233, 183, 78, 0.08), transparent);
  pointer-events: none;
}
.feature-card:hover {
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    0 0 0 1px rgba(233, 183, 78, 0.4),
    0 24px 64px rgba(0, 0, 0, 0.45);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 16px;
}
.feature-card h3    { color: var(--cream); }
.feature-card p     { color: var(--muted); font-size: 0.9rem; line-height: 1.62; }

/* ============================================================
   SCREENSHOTS
   ============================================================ */
.screenshots-section {
  padding: clamp(80px, 9vw, 120px) 0;
  background: var(--deep);
  border-top: 1px solid var(--gold-d);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.shot {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid rgba(233, 183, 78, 0.18);
  padding: 0;
  transition: border-color 220ms, box-shadow 220ms;
}
.shot:hover,
.shot:focus-visible {
  border-color: var(--gold-m);
  box-shadow: 0 0 0 1px rgba(233, 183, 78, 0.35), 0 20px 56px rgba(0, 0, 0, 0.5);
  outline: none;
}

.shot img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 260ms ease;
}
.shot:hover img,
.shot:focus-visible img { transform: scale(1.05); }

/* Hero shot spans 2 cols and 2 rows */
.shot.large {
  grid-column: span 2;
  grid-row: span 2;
}
.shot.large img { aspect-ratio: 16 / 9; }

/* Hover overlay with "View" pill */
.shot-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 15, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 220ms;
}
.shot:hover .shot-overlay,
.shot:focus-visible .shot-overlay { opacity: 1; }
.shot-overlay span {
  font-family: Oswald, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(233, 183, 78, 0.55);
  padding: 8px 20px;
  border-radius: 3px;
  background: rgba(6, 8, 15, 0.4);
}

/* ============================================================
   DOWNLOAD CTA
   ============================================================ */
.download-section {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 8vw, 108px) 0;
}

.download-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.download-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(6, 8, 15, 0.96) 30%, rgba(6, 8, 15, 0.75) 100%),
    rgba(6, 8, 15, 0.4);
}

.download-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(110px, 210px) 1fr auto;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

.download-logo {
  width: 100%;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
}

.download-text .eyebrow { margin-bottom: 8px; }
.download-text h2       { margin-bottom: 0; }

.download-badges { justify-content: flex-end; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #040608;
  padding: 44px 0;
  border-top: 1px solid var(--gold-d);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 14px 36px;
  align-items: center;
}

/* Brand logo — spans both rows */
.footer-brand              { grid-column: 1; grid-row: 1 / 3; align-self: center; }
.footer-brand img          { width: 110px; }

/* Nav links — row 1, col 2 */
.footer-nav                { grid-column: 2; grid-row: 1; display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-family: Oswald, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 150ms;
}
.footer-nav a:hover { color: var(--gold); }

/* Social icons — spans both rows */
.footer-social             { grid-column: 3; grid-row: 1 / 3; align-self: center; display: flex; gap: 16px; align-items: center; }
.footer-social a {
  display: inline-flex;
  opacity: 0.7;
  transition: opacity 150ms, transform 150ms;
}
.footer-social a:hover { opacity: 1; transform: translateY(-2px); }
.footer-social img { width: 26px; height: 26px; object-fit: contain; }

/* Copyright — row 2, col 2 */
.footer-copy {
  grid-column: 2;
  grid-row: 2;
  color: var(--dim);
  font-size: 0.82rem;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  border: 1px solid rgba(233, 183, 78, 0.25);
  border-radius: 8px;
  padding: 12px;
  background: #06080f;
  box-shadow: 0 48px 140px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(233, 183, 78, 0.08);
  max-width: min(1080px, calc(100vw - 28px));
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
}

.lightbox-close {
  display: block;
  margin: 0 0 10px auto;
  background: rgba(244, 240, 232, 0.07);
  border: 1px solid rgba(233, 183, 78, 0.2);
  color: var(--cream);
  border-radius: 4px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: Oswald, sans-serif;
  text-transform: uppercase;
  transition: background 150ms;
}
.lightbox-close:hover { background: rgba(244, 240, 232, 0.14); }

.lightbox-img {
  display: block;
  max-height: min(78vh, 740px);
  border-radius: 4px;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal       { opacity: 1; transform: none; }
  .hero-bg      { animation: none; }
}

/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — 900px (tablet)
   ============================================================ */
@media (max-width: 900px) {
  /* Swap desktop nav for hamburger */
  .nav-desktop,
  .header-cta  { display: none; }
  .menu-toggle { display: flex; }

  /* Game section stacks */
  .game-grid           { grid-template-columns: 1fr; }
  .game-visual         { order: -1; }

  /* Download section stacks */
  .download-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .download-logo            { max-width: 180px; margin: 0 auto; }
  .download-badges          { justify-content: center; }

  /* Footer collapses */
  .footer-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    text-align: center;
    gap: 20px;
  }
  .footer-brand              { grid-column: 1; grid-row: auto; }
  .footer-brand img          { margin: 0 auto; }
  .footer-nav                { grid-column: 1; grid-row: auto; justify-content: center; }
  .footer-social             { grid-column: 1; grid-row: auto; justify-content: center; }
  .footer-copy               { grid-column: 1; grid-row: auto; text-align: center; }
}

/* ============================================================
   RESPONSIVE — 680px (mobile)
   ============================================================ */
@media (max-width: 680px) {
  /* Hero adjustments */
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 72px;
  }
  .eyebrow-bar  { display: none; }
  .eyebrow-text { white-space: normal; text-align: center; }
  .hero-logo    { width: min(300px, 84%); }
  .hero-badges  { flex-direction: column; align-items: center; }
  .hero-rating  { flex-direction: column; gap: 4px; text-align: center; }

  /* Screenshots: single column */
  .screenshot-grid        { grid-template-columns: 1fr; grid-template-rows: auto; }
  .shot.large             { grid-column: 1; grid-row: auto; }
  .shot img,
  .shot.large img         { aspect-ratio: 16 / 9; }

  /* Features: 1 per row on small phones */
  .feature-cards          { grid-template-columns: 1fr; }
}
