/* ================================================================
   CHILL STUDIO — MAIN STYLESHEET
   ================================================================
   Table of Contents:
     1.  Custom Properties (Design Tokens)
     2.  Reset & Base
     3.  Typography
     4.  Layout Utilities
     5.  Buttons
     6.  Film Grain Canvas
     7.  Site Header & Navigation
     8.  Mobile Menu
     9.  Hero Section
    10.  Award Marquee Banner
    11.  Game Feature Section
    12.  Mechanic Section
    13.  Screenshots / Media Gallery
    14.  About Section
    15.  CTA Section
    16.  Site Footer
    17.  Scroll Reveal Animations
    18.  Responsive / Mobile Overrides
   ================================================================ */


/* ----------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
   TO UPDATE: Adjust color palette, spacing, or font stack here
              and changes propagate everywhere.
   ---------------------------------------------------------------- */
:root {
  /* Core palette */
  --clr-void:       #060608;
  --clr-abyss:      #0a0a0e;
  --clr-dark:       #111116;
  --clr-surface:    #18181e;
  --clr-surface-2:  #22222a;
  --clr-border:     #2c2c36;

  /* Text */
  --clr-text:       #e8e8de;
  --clr-text-dim:   #8a8a7e;
  --clr-text-muted: #44443e;

  /* Echolocation accent — cold desaturated teal */
  --clr-echo:       #ffffff;
  --clr-echo-dim:   #ffffff;
  --clr-echo-glow:  hsla(0, 0%, 100%, 0.12);
  --clr-echo-faint: rgba(91, 191, 200, 0.06);

  /* Horror accent — deep crimson */
  --clr-crimson:    #7a1f1f;
  --clr-crimson-hi: #a83030;

  /* Award gold */
  --clr-gold:       #c8a84a;
  --clr-gold-dim:   #7a6428;

  /* Typography */
  --font-serif:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'Space Mono', 'Courier New', monospace;

  /* Spacing scale (multiples of 8px) */
  --sp-1:  0.5rem;
  --sp-2:  1rem;
  --sp-3:  1.5rem;
  --sp-4:  2rem;
  --sp-6:  3rem;
  --sp-8:  4rem;
  --sp-12: 6rem;
  --sp-16: 8rem;
  --sp-24: 12rem;

  /* Layout */
  --max-w:      1360px;
  --nav-h:      80px;
  --section-px: clamp(1.5rem, 5vw, 5rem);

  /* Animation */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast:   0.18s;
  --dur-mid:    0.4s;
  --dur-slow:   0.8s;
}


/* ----------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--clr-void);
  color: var(--clr-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion: disable all animations globally */
@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;
  }
}


/* ----------------------------------------------------------------
   3. TYPOGRAPHY
   ---------------------------------------------------------------- */

/* Section label chip (e.g. "01 — The Game") */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-echo);
  margin-bottom: var(--sp-3);
}

.section-label--light .section-label-line,
.section-label--light {
  color: rgba(255,255,255,0.5);
}

.section-label--light .section-label-line {
  background-color: rgba(255,255,255,0.3);
}

.section-label-line {
  display: block;
  width: 2.5rem;
  height: 1px;
  background-color: var(--clr-echo-dim);
  flex-shrink: 0;
}

/* Section headings */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--clr-text);
}

.section-title em,
h2 em {
  font-style: italic;
  color: var(--clr-echo);
}


/* ----------------------------------------------------------------
   4. LAYOUT UTILITIES
   ---------------------------------------------------------------- */

/* Standard padded section */
.section-padding {
  padding: var(--sp-16) var(--section-px);
}

.section-header {
  margin-bottom: var(--sp-8);
}


/* ----------------------------------------------------------------
   5. BUTTONS
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 2em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition:
    background-color var(--dur-mid) var(--ease-out-expo),
    color           var(--dur-mid) var(--ease-out-expo),
    border-color    var(--dur-mid) var(--ease-out-expo),
    box-shadow      var(--dur-mid) var(--ease-out-expo),
    transform       var(--dur-fast) ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

/* Primary: muted teal-glow with subtle fill */
.btn--primary {
  background-color: var(--clr-echo-faint);
  border-color: var(--clr-echo-dim);
  color: var(--clr-echo);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--clr-echo-glow);
  border-color: var(--clr-echo);
  color: #fff;
  box-shadow: 0 0 28px var(--clr-echo-glow), inset 0 0 20px var(--clr-echo-faint);
}

/* Ghost: transparent outline */
.btn--ghost {
  background-color: transparent;
  border-color: var(--clr-border);
  color: var(--clr-text-dim);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--clr-text-dim);
  color: var(--clr-text);
}

/* Large variant */
.btn--large {
  padding: 1.1em 3em;
  font-size: 0.8rem;
}

/* Icon inside button */
.btn-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* Focus ring */
.btn:focus-visible {
  outline: 2px solid var(--clr-echo);
  outline-offset: 3px;
}


/* ----------------------------------------------------------------
   6. FILM GRAIN CANVAS
   Fixed overlay rendered by main.js — subtle animated noise texture.
   ---------------------------------------------------------------- */
#grain-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.038;
  mix-blend-mode: overlay;
}


/* ----------------------------------------------------------------
   7. SITE HEADER & NAVIGATION
   ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background-color var(--dur-mid) ease,
              box-shadow        var(--dur-mid) ease;
}

/* Solid dark state after scrolling past hero */
.site-header.is-scrolled {
  background-color: rgba(6, 6, 8, 0.92);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 1px 0 var(--clr-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--section-px);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity var(--dur-fast) ease;
}
.nav-logo:hover { opacity: 0.7; }

.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-logo-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  color: var(--clr-text);
}

.nav-logo-text strong {
  font-weight: 700;
  color: var(--clr-echo);
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--dur-fast) ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--clr-echo);
  transition: width var(--dur-mid) var(--ease-out-expo);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--clr-text);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

/* Steam CTA nav link */
.nav-link--cta {
  color: var(--clr-echo);
  border: 1px solid var(--clr-echo-dim);
  padding: 0.5em 1.2em;
  transition: background-color var(--dur-fast) ease,
              color             var(--dur-fast) ease,
              border-color      var(--dur-fast) ease;
}

.nav-link--cta::after { display: none; }

.nav-link--cta:hover,
.nav-link--cta:focus-visible {
  background-color: var(--clr-echo-faint);
  border-color: var(--clr-echo);
  color: #fff;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1px;
  background-color: var(--clr-text);
  transform-origin: center;
  transition: transform var(--dur-mid) var(--ease-out-expo),
              opacity   var(--dur-mid) ease,
              width     var(--dur-mid) var(--ease-out-expo);
}

/* Animate bars into an X when menu is open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}


/* ----------------------------------------------------------------
   8. MOBILE MENU
   ---------------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
}

.mobile-menu[hidden] { display: none; }

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-mid) ease;
}

.mobile-menu.is-open .mobile-menu-backdrop {
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(360px, 90vw);
  background-color: var(--clr-dark);
  border-left: 1px solid var(--clr-border);
  padding: calc(var(--nav-h) + var(--sp-4)) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-4);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.mobile-menu-close span {
  position: absolute;
  width: 20px;
  height: 1px;
  background-color: var(--clr-text-dim);
}

.mobile-menu-close span:first-child { transform: rotate(45deg); }
.mobile-menu-close span:last-child  { transform: rotate(-45deg); }

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-6);
}

.mobile-nav-link {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--clr-text-dim);
  padding: var(--sp-1) 0;
  border-bottom: 1px solid var(--clr-border);
  transition: color var(--dur-fast) ease,
              padding-left var(--dur-mid) var(--ease-out-expo);
}

.mobile-nav-link:hover {
  color: var(--clr-text);
  padding-left: var(--sp-2);
}

.mobile-cta {
  margin-top: auto;
  text-align: center;
  justify-content: center;
}


/* ----------------------------------------------------------------
   9. HERO SECTION
   ---------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

/* Parallax background layer */
.hero-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center 30%;
  will-change: transform;
  transform-origin: center center;
}

/* Bottom-heavy gradient for text legibility */
.hero-overlay--gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6,6,8,0.98) 0%,
    rgba(6,6,8,0.75) 30%,
    rgba(6,6,8,0.3)  60%,
    rgba(6,6,8,0.1)  100%
  );
}

/* Cinematic vignette around edges */
.hero-overlay--vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0,0,0,0.7) 100%
  );
}

/* ── Echolocation Ring Animation ── */
.echo-container {
  position: absolute;
  right: 25%;
  top: 50%;
  transform: translateY(-50%);
  width: 560px;
  height: 560px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.echo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--clr-echo-dim);
  opacity: 0;
  animation: echoRipple 4s var(--ease-in-out) infinite;
}

.echo-ring--1 { width: 110px; height: 110px; animation-delay: 0.0s; }
.echo-ring--2 { width: 224px; height: 224px; animation-delay: 0.5s; }
.echo-ring--3 { width: 378px; height: 378px; animation-delay: 1.0s; }
.echo-ring--4 { width: 560px; height: 560px; animation-delay: 1.5s; }

@keyframes echoRipple {
  0%   { opacity: 0;    transform: scale(0.6); }
  20%  { opacity: 0.35; }
  100% { opacity: 0;    transform: scale(1);   }
}

.echo-origin {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--clr-echo);
  box-shadow: 0 0 12px 4px var(--clr-echo-glow);
  animation: echoCorePulse 2s ease-in-out infinite;
}

@keyframes echoCorePulse {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 12px 4px var(--clr-echo-glow); }
  50%       { opacity: 1;   box-shadow: 0 0 24px 8px var(--clr-echo-glow); }
}

/* Hero text content — bottom-left placement */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--section-px) clamp(3rem, 8vh, 6rem);
  max-width: min(800px, 62vw);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-echo);
  margin-bottom: var(--sp-3);
}

.eyebrow-line {
  display: block;
  width: 2rem;
  height: 1px;
  background-color: var(--clr-echo-dim);
  flex-shrink: 0;
}

/* Title rendered as Title_Logo.png — flex wrapper kept for reveal animation */
.hero-title {
  display: flex;
  margin-bottom: var(--sp-4);
}

.hero-title-logo {
  display: block;
  max-width: min(640px, 80vw);
  height: auto;
  filter: drop-shadow(0 4px 32px rgba(0,0,0,0.8));
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--clr-text-dim);
  margin-bottom: var(--sp-6);
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Scroll cue — bottom-right of hero */
.scroll-cue {
  position: absolute;
  bottom: var(--sp-6);
  right: var(--section-px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  z-index: 2;
}

.scroll-cue-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--clr-echo-dim));
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(0.6); opacity: 0.8; }
}

.scroll-cue-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--clr-text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}


/* ----------------------------------------------------------------
   10. AWARD MARQUEE BANNER
   ---------------------------------------------------------------- */
.award-marquee {
  background-color: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  overflow: hidden;
  padding: 0.6rem 0;
}

.award-marquee-track {
  display: flex;
  width: fit-content;
  animation: marqueeScroll 28s linear infinite;
}

.award-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.award-marquee-set {
  display: flex;
  flex-shrink: 0;
}

.award-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  white-space: nowrap;
  padding-right: var(--sp-4);
}

.award-star {
  color: var(--clr-gold);
  font-size: 0.8rem;
}


/* ----------------------------------------------------------------
   11. GAME FEATURE SECTION
   ---------------------------------------------------------------- */
.game-section {
  padding: var(--sp-16) 0;
  overflow: hidden;
  background-color: var(--clr-abyss);
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Visual column bleeds to the left edge */
.game-visual-col {
  position: relative;
  padding-right: var(--sp-8);
}

.game-visual-wrapper {
  position: relative;
  overflow: hidden;
}

.game-visual-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  box-shadow: inset -60px 0 80px var(--clr-abyss);
  pointer-events: none;
}

.game-key-art {
  width: 100%;
  height: clamp(400px, 60vh, 700px);
  object-fit: cover;
  object-position: center;
  filter: saturate(0.7) brightness(0.85);
  transition: filter var(--dur-slow) ease;
  display: block;
}

.game-visual-wrapper:hover .game-key-art {
  filter: saturate(0.85) brightness(0.95);
}

/* Gradient overlay on image right side */
.game-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 50%,
    var(--clr-abyss) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Rotated vertical label */
.game-vertical-label {
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

/* Content column */
.game-content-col {
  padding: var(--sp-8) var(--section-px) var(--sp-8) var(--sp-6);
}

.game-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  margin-bottom: var(--sp-2);
}

.game-title em {
  font-style: italic;
  color: var(--clr-echo);
}

.game-genre {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-4);
}

.game-description {
  color: var(--clr-text-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--sp-6);
}

.game-description p + p {
  margin-top: var(--sp-2);
}

.game-description em {
  color: var(--clr-text);
  font-style: italic;
}

/* Award badge — angular card inset */
.award-badge {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--clr-gold-dim);
  background-color: rgba(200, 168, 74, 0.04);
  margin-bottom: var(--sp-6);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.award-badge-icon {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.15em;
}

.award-badge-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--clr-gold);
}

.award-badge-text {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.award-badge-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--clr-gold);
}

.award-badge-category {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--clr-text);
}

.award-badge-event {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}

/* Nomination image replaces the SVG badge icon */
.award-badge-img {
  display: block;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
  transition: filter var(--dur-mid) ease;
}

.award-badge:hover .award-badge-img {
  filter: drop-shadow(0 4px 20px rgba(200,168,74,0.3));
}

/* Simplify badge container when using an image */
.award-badge:has(.award-badge-img) {
  border: none;
  background: none;
  clip-path: none;
  padding: 0;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}


/* ----------------------------------------------------------------
   12. MECHANIC SECTION
   ---------------------------------------------------------------- */
.mechanic-section {
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.mechanic-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  filter: brightness(0.2) saturate(0.5);
}

/* Heavy dark overlay for readability */
.mechanic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(6,6,8,0.95) 0%,
    rgba(6,6,8,0.75) 50%,
    rgba(6,6,8,0.9)  100%
  );
}

.mechanic-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-16) var(--section-px);
  width: 100%;
}

/* ── Sonar / Pulse visualization ── */
.sonar {
  flex-shrink: 0;
  position: relative;
  width: 280px;
  height: 280px;
  display: grid;
  place-items: center;
}

.sonar-pulse {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--clr-echo);
  opacity: 0;
  animation: sonarPulse 3.6s ease-out infinite;
}

.sonar-pulse--1 { width:  60px; height:  60px; animation-delay: 0.0s; }
.sonar-pulse--2 { width: 130px; height: 130px; animation-delay: 0.6s; }
.sonar-pulse--3 { width: 210px; height: 210px; animation-delay: 1.2s; }
.sonar-pulse--4 { width: 280px; height: 280px; animation-delay: 1.8s; }

@keyframes sonarPulse {
  0%   { opacity: 0;    transform: scale(0.5); border-color: var(--clr-echo); }
  25%  { opacity: 0.6; }
  100% { opacity: 0;    transform: scale(1);   border-color: var(--clr-echo-dim); }
}

.sonar-core {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--clr-echo);
  display: grid;
  place-items: center;
}

.sonar-core-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--clr-echo);
  box-shadow: 0 0 8px var(--clr-echo);
  animation: echoCorePulse 2s ease-in-out infinite;
}

/* Mechanic text column */
.mechanic-text {
  flex: 1;
}

.mechanic-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  margin-bottom: var(--sp-4);
}

.mechanic-title em {
  font-style: italic;
  color: var(--clr-echo);
}

.mechanic-body {
  font-size: 0.95rem;
  color: var(--clr-text-dim);
  line-height: 1.8;
  margin-bottom: var(--sp-6);
  max-width: 54ch;
}

.mechanic-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.mechanic-features li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: 0.88rem;
  color: var(--clr-text-dim);
  line-height: 1.6;
}

.feature-dash {
  color: var(--clr-echo);
  flex-shrink: 0;
  font-family: var(--font-mono);
}


/* ----------------------------------------------------------------
   13. SCREENSHOTS / MEDIA GALLERY
   ---------------------------------------------------------------- */
.media-section {
  padding: var(--sp-16) var(--section-px);
  background-color: var(--clr-void);
}

.media-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Uniform 2x2 grid */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.shot {
  position: relative;
  overflow: hidden;
  background-color: var(--clr-surface);
  cursor: pointer;
  aspect-ratio: 16 / 9; /* Adjust this if your screenshots are 4:3 or another ratio */
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65) brightness(0.8);
  transition: filter     var(--dur-slow) ease,
              transform  var(--dur-slow) var(--ease-out-expo);
  display: block;
}

.shot:hover img {
  filter: saturate(0.9) brightness(0.95);
  transform: scale(1.03);
}

.shot figcaption {
  position: absolute;
  bottom: var(--sp-2);
  left: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity  var(--dur-mid) ease,
              transform var(--dur-mid) ease;
  z-index: 2;
  pointer-events: none;
}

.shot:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Grid areas */
.shot--wide   { grid-area: wide;   height: 380px; }
.shot--tall   { grid-area: tall;   height: 380px; }
.shot--small:first-of-type  { grid-area: small1; height: 240px; }
.shot--small:last-of-type   { grid-area: small2; height: 240px; }

/* Fallback: use nth-child for specificity */
.shot--small:nth-child(3)  { grid-area: small1; }
.shot--small:nth-child(4)  { grid-area: small2; }


/* ----------------------------------------------------------------
   14. ABOUT SECTION
   ---------------------------------------------------------------- */
.about-section {
  padding: var(--sp-16) 0;
  background-color: var(--clr-abyss);
  overflow: hidden;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Visual column */
.about-visual-col {
  position: relative;
}

.about-image-wrapper {
  position: relative;
  overflow: hidden;
}

.about-image {
  width: 100%;
  height: clamp(400px, 60vh, 650px);
  object-fit: cover;
  filter: saturate(0.5) brightness(0.75);
  display: block;
}

.about-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 60%,
    var(--clr-abyss) 100%
  );
  pointer-events: none;
}

/* Giant decorative letter */
.about-deco-letter {
  position: absolute;
  top: 50%;
  right: -0.15em;
  transform: translateY(-55%);
  font-family: var(--font-serif);
  font-size: clamp(12rem, 22vw, 22rem);
  font-weight: 600;
  line-height: 1;
  color: var(--clr-surface-2);
  pointer-events: none;
  user-select: none;
  z-index: 3;
  letter-spacing: -0.1em;
}

/* Content column */
.about-content-col {
  padding: var(--sp-8) var(--section-px) var(--sp-8) var(--sp-6);
  z-index: 2;
  position: relative;
}

.about-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  margin-bottom: var(--sp-4);
}

.about-title em {
  font-style: italic;
  color: var(--clr-echo);
}

.about-body {
  color: var(--clr-text-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--sp-8);
}

.about-body p + p {
  margin-top: var(--sp-2);
}

.about-body em {
  font-style: italic;
  color: var(--clr-text);
}

/* Stats row */
.about-stats {
  display: flex;
  align-items: stretch;
  gap: var(--sp-6);
}

.about-stat {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.about-stat-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--clr-echo);
  line-height: 1;
}

.about-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.about-stat-divider {
  width: 1px;
  background-color: var(--clr-border);
  align-self: stretch;
  flex-shrink: 0;
}


/* ----------------------------------------------------------------
   15. CTA SECTION
   ---------------------------------------------------------------- */
.cta-section {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cta-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  filter: brightness(0.15) saturate(0.4);
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(6,6,8,0.5) 0%,
    rgba(6,6,8,0.92) 100%
  );
}

.cta-content {
  position: relative;
  z-index: 2;
  padding: var(--sp-16) var(--section-px);
}

.cta-pre {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--clr-echo);
  margin-bottom: var(--sp-2);
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  margin-bottom: var(--sp-3);
}

.cta-title em {
  font-style: italic;
  color: var(--clr-echo);
}

.cta-sub {
  font-size: 0.95rem;
  color: var(--clr-text-dim);
  margin-bottom: var(--sp-6);
}

.cta-actions {
  display: flex;
  justify-content: center;
}


/* ----------------------------------------------------------------
   16. SITE FOOTER
   ---------------------------------------------------------------- */
.site-footer {
  background-color: var(--clr-dark);
  border-top: 1px solid var(--clr-border);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-8) var(--section-px);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--sp-3);
  transition: opacity var(--dur-fast) ease;
}
.footer-logo:hover { opacity: 0.6; }

.footer-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-logo-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  color: var(--clr-text-dim);
}

.footer-logo-text strong {
  font-weight: 700;
  color: var(--clr-echo);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-style: italic;
  font-family: var(--font-serif);
}

.footer-nav-heading {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-3);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.footer-nav-link {
  font-size: 0.85rem;
  color: var(--clr-text-dim);
  transition: color var(--dur-fast) ease;
}
.footer-nav-link:hover { color: var(--clr-text); }

.footer-social {
  display: flex;
  gap: var(--sp-2);
}

.social-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-dim);
  transition: border-color var(--dur-fast) ease,
              color         var(--dur-fast) ease,
              background-color var(--dur-fast) ease;
}

.social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: var(--clr-echo-dim);
  color: var(--clr-echo);
  background-color: var(--clr-echo-faint);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--section-px);
  border-top: 1px solid var(--clr-border);
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-legal {
  font-size: 0.72rem;
  color: var(--clr-text-muted);
}

.footer-steam-cta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--clr-echo);
  transition: color var(--dur-fast) ease;
}
.footer-steam-cta:hover { color: #fff; }


/* ----------------------------------------------------------------
   17. SCROLL REVEAL ANIMATIONS
   Elements start invisible; JS adds .is-visible via IntersectionObserver.
   ---------------------------------------------------------------- */

/* ── Fade in ── */
.reveal-fade {
  opacity: 0;
  transition:
    opacity   var(--dur-slow) var(--ease-out-expo),
    transform var(--dur-slow) var(--ease-out-expo);
}

.reveal-fade.is-visible {
  opacity: 1;
}

/* ── Slide up ── */
.reveal-slide {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   var(--dur-slow) var(--ease-out-expo),
    transform var(--dur-slow) var(--ease-out-expo);
}

.reveal-slide.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero elements have their own dedicated initial fade (triggered by JS on load) */
.reveal-fade[data-hero],
.reveal-slide[data-hero] {
  transition-duration: 1.2s;
}


/* ----------------------------------------------------------------
   18. RESPONSIVE / MOBILE OVERRIDES
   ---------------------------------------------------------------- */

/* ── Tablet (≤ 960px) ── */
@media (max-width: 960px) {
  :root { --nav-h: 68px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  /* Game section — stack vertically */
  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-visual-col {
    padding-right: 0;
  }

  .game-key-art {
    height: 320px;
  }

  .game-img-overlay {
    background: linear-gradient(
      to bottom,
      transparent 70%,
      var(--clr-abyss) 100%
    );
  }

  .game-vertical-label { display: none; }

  .game-content-col {
    padding: var(--sp-8) var(--section-px);
  }

  /* Mechanic section — stack */
  .mechanic-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-8);
  }

  .mechanic-body { max-width: none; }

  .mechanic-features { text-align: left; }

  /* About section — stack */
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-image-overlay {
    background: linear-gradient(
      to bottom,
      transparent 70%,
      var(--clr-abyss) 100%
    );
  }

  .about-deco-letter {
    font-size: 12rem;
    right: -0.1em;
    top: auto;
    bottom: -0.3em;
    transform: none;
  }

  .about-content-col {
    padding: var(--sp-8) var(--section-px);
  }

  /* Footer top — 2 cols */
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {
  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  /* Echolocation rings — hide on small screens */
  .echo-container {
    display: none;
  }

  /* Screenshots grid — single column */
  .screenshots-grid {
    grid-template-columns: 1fr;
  }

  .shot--wide,
  .shot--tall   { height: 240px; }
  .shot--small:nth-child(n) { height: 180px; }

  /* Footer — single column */
  .footer-top {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: column;
    gap: var(--sp-4);
  }

  .about-stat-divider { display: none; }

  .scroll-cue { display: none; }

  /* CTA title */
  .cta-title {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }
}


/* ----------------------------------------------------------------
   19. CLICK ECHO RINGS
   ---------------------------------------------------------------- */
.click-echo {
  position: absolute;
  width: 560px;
  height: 560px;
  pointer-events: none;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.click-echo__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--clr-echo-dim);
  opacity: 0;
  animation: echoRipple 4s var(--ease-in-out) forwards;
}

.click-echo__ring--1 { width: 110px; height: 110px; animation-delay: 0.0s; }
.click-echo__ring--2 { width: 224px; height: 224px; animation-delay: 0.5s; }
.click-echo__ring--3 { width: 378px; height: 378px; animation-delay: 1.0s; }
.click-echo__ring--4 { width: 560px; height: 560px; animation-delay: 1.5s; }
