/* M1: smooth cross-document transitions when navigating between pages */
@view-transition {
  navigation: auto;
}

:root {
  /* Warm Daylight Palette */
  --bg: #faf8f3;
  /* Warm cream paper (D3 materiality) */
  --bg-2: #ffffff;
  /* Pure white for panels */
  --panel: #fdfcfb;
  /* Slightly off-white for depth */
  --line: rgba(28, 36, 49, 0.08);
  --line-strong: rgba(28, 36, 49, 0.16);
  --ink: #111827;
  /* Deep navy slate for absolute contrast */
  --ink-dim: #2c3545;
  /* Darker slate grey for highly legible body copy */
  --ink-faint: #4e5b70;

  --accent: #00aaff;
  --brass: #c97a15;
  /* Pop of premium brass */
  --brass-deep: #a86208;
  --cyan: #2b8bb0;
  --sig-green: #299e56;
  --sig-red: #ff4466;
  /* Status green */

  --maxw: 1200px;
  --r: 24px;
  /* Larger border radius for modern feel */

  /* ============ MOTION TOKENS (J1) ============ */
  /* Durations */
  --dur-fast: 0.18s;
  --dur: 0.3s;
  --dur-slow: 0.6s;
  /* Spring with a slight overshoot — the back-out curve used across the site */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Smooth deceleration, no overshoot */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Standard in/out (continuous loops) */
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  /* Bouncier physical spring for new micro-interactions (J2/J3/J4); linear() = real spring */
  --ease-bounce: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968, 0.991, 1.006, 1.013 58.1%, 1.011 63.7%, 1.003 76.2%, 0.999 88%, 1);

  /* ============ FOCUS RING (M5) ============ */
  --ring: var(--brass);

  /* ============ MATERIALITY (D3) ============ */
  /* Brass treated as a lit metal: top highlight → brass → deep shadow */
  --brass-metal: linear-gradient(170deg, #e6ab52 0%, var(--brass) 45%, var(--brass-deep) 100%);

  /* ============ DERIVED TINTS / SHADOWS (M4) ============ */
  /* color-mix keeps these in lockstep with the palette and adapts under night mode */
  --tint-brass: color-mix(in srgb, var(--brass) 12%, transparent);
  --tint-ink: color-mix(in srgb, var(--ink) 6%, transparent);
  --shadow-ink: color-mix(in srgb, var(--ink) 12%, transparent);
  --shadow-ink-soft: color-mix(in srgb, var(--ink) 4%, transparent);

  /* Prep for night mode (D1): the color roles above (--bg, --ink, --brass, …) are the
     themeable layer a [data-theme="dark"] / prefers-color-scheme block will later override. */
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  /* Subtle warm graph-paper texture (D3 materiality) */
  background-image:
    linear-gradient(rgba(169, 98, 8, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 98, 8, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
  color: var(--ink);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 1s ease;
}



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

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

/* The hidden attribute must win over component display rules (e.g. .btn is
   display:inline-flex, which would otherwise override [hidden]'s display:none). */
[hidden] {
  display: none !important;
}

/* ============ FOCUS RINGS (M5) ============ */
/* Keyboard users get a branded brass ring; mouse/touch users don't see it. */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

/* Typography */
.eyebrow {
  font-family: "Poppins", monospace;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brass);
  opacity: 0.6;
}

.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brass);
  opacity: 0.6;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 600;
}

section {
  position: relative;
  /* Remove forced 100vh — let content dictate height. Only .slide gets 100vh. */
}

/* ============ AURORA SECTION BACKGROUNDS ============ */
/* Soft drifting gradient ambiance behind a section's content. Warm/cool variants
   alternate down the page. Compositor-only (transform) animation; clipped to the
   section so it never bleeds into neighbours. Frozen under prefers-reduced-motion. */
.has-aurora {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.has-aurora::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.95;
  will-change: transform;
  animation: aurora-drift 30s ease-in-out infinite alternate;
}

.aurora-warm::before {
  background:
    radial-gradient(52% 58% at 20% 24%, rgba(201, 122, 21, 0.38), transparent 72%),
    radial-gradient(48% 54% at 84% 20%, rgba(255, 68, 102, 0.26), transparent 72%),
    radial-gradient(54% 60% at 55% 92%, rgba(168, 98, 8, 0.32), transparent 72%);
}

.aurora-cool::before {
  background:
    radial-gradient(52% 58% at 22% 24%, rgba(43, 139, 176, 0.34), transparent 72%),
    radial-gradient(48% 54% at 82% 22%, rgba(41, 158, 86, 0.28), transparent 72%),
    radial-gradient(54% 60% at 52% 90%, rgba(0, 170, 255, 0.24), transparent 72%);
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.1) rotate(-3deg);
  }

  100% {
    transform: translate3d(2%, 1%, 0) scale(1.18) rotate(4deg);
  }
}

.slide {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 120px 0;
}

.lede {
  color: var(--ink-dim);
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 500;
  max-width: 64ch;
}

.sec-head {
  max-width: 66ch;
  margin-bottom: 52px;
}

.sec-head.text-left {
  text-align: left;
}

.sec-head h2+p {
  margin-top: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: "Poppins", monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 16px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-spring), background-color 0.5s var(--ease-spring), border-color 0.5s var(--ease-spring), color 0.5s var(--ease-spring);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 8px 24px -8px rgba(28, 36, 49, 0.4);
}

.btn-primary:hover {
  /* --mx/--my are the magnetic offset set by JS (J6); default 0 */
  transform: translate(var(--mx, 0px), var(--my, 0px)) translateY(-4px) scale(1.05);
  box-shadow: 0 16px 32px -10px rgba(41, 158, 86, 0.6);
  background: var(--sig-green);
  border-color: var(--sig-green);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);

}

.btn-ghost:hover {
  border-color: var(--sig-red);
  background: var(--sig-red);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px -10px rgba(28, 36, 49, 0.5);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  color: #fff;
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  border-color: #5865f2;
}

.btn-discord:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 12px 24px -8px rgba(88, 101, 242, 0.5);
}

.btn-steam {
  background: linear-gradient(180deg, #1b2838, #131c26);
  color: #c7d5e0;
  border: 1px solid #66c0f4;
  box-shadow: 0 8px 24px -10px rgba(102, 192, 244, 0.3);
}

.btn-steam:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.15);
  box-shadow: 0 16px 32px -12px rgba(102, 192, 244, 0.5);
}

.btn-steam svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-steam.is-soon {
  background: var(--bg-2);
  color: var(--ink-faint);
  border: 1px dashed var(--line-strong);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.btn-steam.is-soon svg {
  opacity: 0.5;
}

/* Nav */
header.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(248, 248, 248, 0.85);
  border-bottom: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand .mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.brand b {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand small {
  font-family: "Poppins";
  font-size: 12px;
  letter-spacing: 0.18em;
  display: block;
  margin-top: -2px;
  font-weight: 500;
}

.game-logo {
  width: 48px;
  border-radius: 5px;
  border: 2px solid #000;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

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

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-dim);
  transition: 0.2s;
}

.nav-links a:hover {
  color: var(--sig-red);
  transform: translateY(-2px) scale(1.02);
}

.nav-links a.ext::after {
  content: "↗";
  font-size: 11px;
  margin-left: 4px;
  color: var(--ink-faint);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  padding: 8px 11px;
  cursor: pointer;
  font-size: 18px;
}

/* ============ APPLE-STYLE MOTION (Scroll-Timeline) ============ */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal-up linear forwards;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

  @keyframes reveal-up {
    0% {
      opacity: 0;
      transform: translateY(50px) scale(0.98);
    }

    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .parallax-float {
    animation: float-parallax linear forwards;
    animation-timeline: scroll(root);
  }

  @keyframes float-parallax {
    from {
      transform: translateY(0);
    }

    to {
      transform: translateY(-120px);
    }
  }
}

/* Fallback for browsers without scroll-driven animations (Safari, Firefox).
   Gated on `.js`: if JavaScript is disabled the IntersectionObserver can never
   add `.in`, so we must NOT hide the content in that case. main.js adds `.in`
   as elements enter the viewport. */
@supports not (animation-timeline: view()) {
  .js .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.9s var(--ease-spring);
  }

  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* Respect users who prefer reduced motion: show everything, kill animation. */
@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,
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ HERO VIDEO FRAME (Full-viewport click-to-play) ============ */
.hero-video-frame {
  position: relative;
  width: 100%;
  height: calc(100vh - 72px);
  /* Full viewport minus nav height — video sits below the sticky nav */
  min-height: 400px;
  overflow: hidden;
  background: #000;
}

/* Media container fills the entire video frame */
.hero-video-frame .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Cinematic vignette: darkens edges + bleeds into the hero band below.
 * Three layers: subtle all-around vignette, bottom fade for seamless
 * transition into the dark hero band, and side vignettes for cinematic depth. */
.hero-video-frame .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    /* Bottom fade — bleeds seamlessly into the hero-band */
    linear-gradient(to top,
      var(--ink) 0%,
      rgba(17, 24, 39, 0.6) 15%,
      transparent 35%),
    /* Radial vignette — cinematic edge darkening */
    radial-gradient(ellipse at center,
      transparent 50%,
      rgba(0, 0, 0, 0.35) 100%);
}

.hero-video-frame .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Click-to-play facade: thumbnail + play button */
.hero-video-facade {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000;
}

.hero-video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.8s ease, transform 1.8s var(--ease-out);
}

.hero-video-facade:hover img {
  opacity: 1;
  transform: scale(1.03);
}

/* Centered play button — the most important click target on the page */
.hero-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero-play-btn span {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 0 rgba(255, 255, 255, 0.3),
    0 16px 56px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
  animation: play-pulse 2.8s var(--ease-std) infinite;
}

/* Pulsing ring animation to invite interaction */
@keyframes play-pulse {

  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.3),
      0 16px 56px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 1);
  }

  50% {
    box-shadow:
      0 0 0 20px rgba(255, 255, 255, 0),
      0 20px 64px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 1);
  }
}

.hero-video-facade:hover .hero-play-btn span {
  transform: scale(1.15);
  background: #fff;
  box-shadow:
    0 0 0 0 rgba(255, 255, 255, 0),
    0 20px 72px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  animation: none;
}

.hero-play-btn svg {
  width: 40px;
  height: 40px;
  margin-left: 5px;
  fill: var(--ink);
}

/* Once clicked, the facade becomes a video player */
.hero-video-facade.is-playing {
  cursor: default;
}

.hero-video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============ HERO BAND (Copy + CTA below video) ============ */
/* Rich gradient background with a subtle warm radial accent to
 * match the brass brand color. The gradient seamlessly continues
 * from the video frame's bottom fade above. */
.hero-band {
  background:
    radial-gradient(ellipse at 20% 50%,
      rgba(201, 122, 21, 0.08) 0%,
      transparent 60%),
    linear-gradient(180deg,
      var(--ink) 0%,
      #0d1117 100%);
  padding: 72px 0 100px;
  min-height: auto;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  max-width: 100%;
  color: #fff;
}

/* Status chip — glass-morphism with brass accent */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(201, 122, 21, 0.25);
  border-radius: 100px;
  padding: 10px 20px;
  margin-bottom: 36px;
  background: rgba(201, 122, 21, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sig-green);
  box-shadow: 0 0 0 0 rgba(41, 158, 86, 0.5);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(41, 158, 86, 0.5);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(41, 158, 86, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(41, 158, 86, 0);
  }
}

.hero-band h1 {
  font-size: clamp(48px, 6.5vw, 84px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.hero-band h1 em {
  font-style: normal;
  color: var(--brass);
  /* Lit-metal brass; falls back to solid --brass where background-clip:text is unsupported */
  background: var(--brass-metal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(201, 122, 21, 0.25);
}

.hero-band p.sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(19px, 2.2vw, 24px);
  margin: 32px 0 48px;
  max-width: 800px;
  line-height: 1.55;
  font-weight: 400;
}

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

/* ============ SECTION BACKGROUND SYSTEM ============
 * Unified pattern for all sections with video/image backgrounds.
 * Structure: section.has-bg > div.section-bg > video/img
 * Overlay is handled via ::after on .section-bg — no separate overlay divs.
 * Each section can customize via --bg-overlay CSS property.
 */
.has-bg {
  position: relative;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: #000;
}

.section-bg video,
.section-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 100vh;
  /* Full brightness — overlay gradient controls the darkening */
}

/* Single overlay via pseudo-element. Customizable per-section via --bg-overlay. */
.section-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-overlay,
      linear-gradient(180deg, rgba(28, 36, 49, 0.6) 0%, rgba(28, 36, 49, 0.85) 100%));
  z-index: 1;
}

/* Content inside .has-bg sections must sit above the overlay */
.section-content {
  position: relative;
  z-index: 2;
}

/* The Fantasy (Identification) */
.fantasy-band {
  padding: 120px 0 100px;
  text-align: center;
  border-bottom: none;
  /* Richer overlay — darker at edges to frame the content */
  --bg-overlay: linear-gradient(180deg,
      rgba(17, 24, 39, 0.55) 0%,
      rgba(17, 24, 39, 0.8) 100%);
}

.fantasy-band h2 {
  font-size: clamp(36px, 5vw, 56px);
  max-width: 22ch;
  margin: 0 auto;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* What You'll Do (Core Loop) - Horizontal Carousel */
.core-loop-section {
  padding: 120px 0;
  margin-top: 120px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  /* Prevent horizontal scrollbar on body */
}

.section-pad-top {
  padding-top: 0;
}

.core-loop-carousel-wrap {
  margin-top: 48px;
  /* Allows the carousel to bleed to the edge of the screen */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.core-loop-carousel {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(24px, calc((100vw - var(--maxw)) / 2)) 60px;
  scrollbar-width: none;
  /* Firefox */
}

.core-loop-carousel::-webkit-scrollbar {
  display: none;
  /* Safari/Chrome */
}

.core-carousel-card {
  flex: 0 0 calc(50% - 16px);
  max-width: 800px;
  scroll-snap-align: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.core-carousel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.core-carousel-card .card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.core-carousel-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.core-carousel-card:hover .card-media img {
  transform: scale(1.03);
}

.core-carousel-card .card-content {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.core-carousel-card .num {
  font-family: "Poppins", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.core-carousel-card h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}

.core-carousel-card p {
  font-size: 16px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - var(--maxw)) / 2));
  margin-top: 16px;
}

.carousel-nav {
  display: flex;
  gap: 12px;
}

.nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.nav-btn:hover {
  background: var(--bg-2);
  border-color: var(--ink);
}

.nav-btn svg {
  width: 24px;
  height: 24px;
}

.carousel-indicators {
  display: flex;
  gap: 8px;
}

.carousel-indicators .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.carousel-indicators .dot.active {
  background: var(--brass);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 980px) {
  .carousel-controls {
    flex-direction: column-reverse;
    gap: 24px;
    margin-top: 0px;
  }

  .core-loop-carousel {
    gap: 20px;
    padding-bottom: 40px;
  }

  .core-carousel-card {
    flex: 0 0 85vw;
  }

  .core-carousel-card .card-content {
    padding: 24px 20px;
  }
}

/* What Will You Build (Showcase Carousel) */
.showcase-carousel-section {
  padding: 120px 0;
  background: var(--bg);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.showcase-carousel-wrap {
  margin-top: 48px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.showcase-head {
  padding-left: 24px;
}

.showcase-head h2.showcase-title {
  margin-bottom: 24px;
}

.builds-strip-container {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(24px, calc((100vw - var(--maxw)) / 2)) 20px;
  scrollbar-width: none;
}

.builds-strip-container::-webkit-scrollbar {
  display: none;
}

/* J4: drag-to-scroll affordance (mouse only) */
@media (hover: hover) {

  .core-loop-carousel,
  .builds-strip-container {
    cursor: grab;
  }

  .core-loop-carousel.is-grabbing,
  .builds-strip-container.is-grabbing {
    cursor: grabbing;
    scroll-snap-type: none;
  }
}

.build-card {
  flex: 0 0 85vw;
  max-width: 1000px;
  min-width: 300px;
  scroll-snap-align: center;
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--line);
  transition: 0.6s var(--ease-spring);
}

.build-card:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.02) translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.build-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.build-card-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  font-weight: 500;
  font-size: 16px;
}

/* Showcase (Videos + Gallery) */
.feature-video {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
}

.video-facade {
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: 0.6s var(--ease-spring);
}

.video-facade:hover img {
  opacity: 1;
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg) scale(1.03);
}

.video-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.2);
  transition: 0.4s var(--ease-out);
}

.video-facade:hover .play-btn span {
  transform: scale(1.1);
  background: #fff;
}

.play-btn svg {
  width: 32px;
  height: 32px;
  margin-left: 6px;
  fill: var(--ink);
}


.diaries-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 120px 0;
}

/* ===== Railyard Diaries: player + filmstrip ===== */
.diaries-player {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
  margin-bottom: 28px;
}

.diaries-player iframe,
.diaries-player #ytTarget {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.diaries-facade {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  position: relative;
}

.diaries-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.6s var(--ease-spring), opacity 0.6s var(--ease-spring);
}

.diaries-facade:hover img {
  opacity: 1;
  transform: scale(1.03);
}

.diaries-filmstrip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.filmstrip-item {
  flex: 0 0 230px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.fs-thumb {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 2px solid transparent;
  box-shadow: 0 10px 24px var(--shadow-ink-soft, rgba(0, 0, 0, 0.08));
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.fs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fs-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s var(--ease-out);
}

.fs-play svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.filmstrip-item:hover .fs-thumb {
  transform: translateY(-4px);
}

.filmstrip-item:hover .fs-play {
  opacity: 1;
}

.filmstrip-item.is-active .fs-thumb {
  border-color: var(--brass);
}

.filmstrip-item.is-active .fs-play {
  opacity: 1;
  background: transparent;
}

.fs-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fs-tag {
  font-family: "Poppins", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.fs-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.filmstrip-item.is-active .fs-title {
  color: var(--brass-deep);
}

/* ===== Team section closing CTA ===== */
.final-cta {
  text-align: center;
  max-width: 720px;
  margin: 64px auto 0;
  padding: 0 24px;
}

.final-cta-title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.final-cta-desc {
  color: var(--ink-dim);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 54ch;
}

.vid-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
}

.vid-card {
  flex: 0 0 300px;
  cursor: pointer;
}

.vid-card .vthumb {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--line);
}

/* Gallery */
.gallery {
  margin-top: 80px;
}

.gallery-stage {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16/9;
  background: var(--panel);
  cursor: zoom-in;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
  position: relative;
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s;
}

.filmstrip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 16px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.filmstrip::-webkit-scrollbar {
  display: none;
}

.filmstrip .thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  aspect-ratio: 16/9;
  cursor: pointer;
  opacity: 0.5;
  transition: 0.3s;
}

.filmstrip .thumb:hover {
  opacity: 0.9;
}

.filmstrip .thumb.active {
  opacity: 1;
  border-color: var(--brass);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Systems */
.sys-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.sys-grid-dense {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .sys-grid-dense {
    grid-template-columns: repeat(4, 1fr);
  }

  .sys-card.span-2 {
    grid-column: span 2;
  }

  .sys-card.span-3 {
    grid-column: span 3;
  }

  .sys-card.row-2 {
    grid-row: span 2;
  }
}

/* Bento section corner glows */
.bento-section {
  position: relative;
  padding: 120px 0;
  background: radial-gradient(circle at 10% 20%, rgba(0, 170, 255, 0.03) 0%, transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(201, 122, 21, 0.03) 0%, transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}

/* Consolidated Bento, Team & Platform Cards for DRY layout */
.sys,
.team-card,
.platform-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-spring), background-color 0.5s var(--ease-spring), border-color 0.5s var(--ease-spring), color 0.5s var(--ease-spring);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.sys::before,
.team-card::before,
.platform-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--sys-color, var(--brass)), transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

.sys>*,
.team-card>*,
.platform-card>* {
  position: relative;
  z-index: 1;
}

.sys:hover,
.team-card:hover,
.platform-card:hover {
  border-color: var(--sys-color, var(--brass));
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(0, 0, 0, 0.02);
  box-shadow: 0 20px 40px var(--shadow-ink), 0 0 20px var(--shadow-ink-soft);
}

.sys:hover::before,
.team-card:hover::before,
.platform-card:hover::before {
  opacity: 0.08;
}

.sys {
  padding: 28px;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-spring),
    border-color 0.5s var(--ease-spring), opacity 0.4s var(--ease-out), filter 0.4s var(--ease-out);
}

/* M3: focus the hovered bento card by softly receding its siblings. Pure CSS via :has();
   gracefully does nothing in browsers without :has() support. */
@media (hover: hover) {
  .sys-grid-dense:has(.sys:hover) .sys:not(:hover) {
    opacity: 0.5;
    filter: saturate(0.85);
  }
}

.publishers-stat-value:last-child {
  margin-bottom: 0;
}


.sys-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  color: var(--sys-color, var(--brass));
  transition: transform 0.5s var(--ease-spring);
}

.sys-icon svg {
  width: 100%;
  height: 100%;
}

.sys:hover .sys-icon {
  transform: scale(1.15) rotate(5deg);
}

.sys .tag {
  font-family: "Poppins", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sys-color, var(--brass));
  margin-bottom: 12px;
}

.sys h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sys p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 1.6;
}

/* Community */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 36px 28px;
  background: var(--bg-2);
  text-align: center;
}

.stat .n {
  font-size: clamp(32px, 4.5vw, 46px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.stat .l {
  font-size: 15px;
  color: var(--ink-dim);
  margin-top: 8px;
  font-weight: 500;
}


/* ============ REFACTORED INLINE STYLES ============ */
.w-full {
  width: 100%;
}

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

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-nav {
  padding: 10px 16px;
}

/* Compact heart-only CTA used in the nav on mobile (the full-text button overflows). */
.nav-cta-heart {
  display: none;
  padding: 9px 13px;
  font-size: 16px;
  line-height: 1;
}

/* Fantasy — text colors fixed for dark background */
.fantasy-lede {
  margin: 24px auto 36px;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  line-height: 1.6;
}

/* Community — uses unified .has-bg pattern, overlay via --bg-overlay */
.community-section {
  background:
    radial-gradient(ellipse at 20% 50%,
      rgba(201, 122, 21, 0.08) 0%,
      transparent 60%),
    linear-gradient(180deg,
      var(--ink) 0%,
      #0d1117 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  justify-content: space-between;
}

.community-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 24px;
}

.community-top-row .sec-head {
  margin-bottom: 0;
}

.community-bottom-row {
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
}

.community-eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.community-title {
  color: #fff;
}

.community-lede {
  color: rgba(255, 255, 255, 0.8);
  margin: 16px 0 0;
  max-width: 52ch;
}

.community-map-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  z-index: 10;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: grab;
  /* Make it flex so we can center the image if it's smaller, but left align if larger */
  display: flex;
  align-items: center;
}

.community-map-wrapper::-webkit-scrollbar {
  display: none;
}

.community-map-wrapper:active {
  cursor: grabbing;
}

.community-map {
  min-width: 100%;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;

  /* Premium Glassmorphic Frame */
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 60%), rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* Rich Shadows & Glows */
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 60px rgba(41, 158, 86, 0.15);

  /* Floating Animation */
  animation: floatMap 8s ease-in-out infinite;
}

.community-map-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(41, 158, 86, 0.15) 0%, transparent 70%);
  z-index: 1;
  filter: blur(50px);
  pointer-events: none;
}

.community-stats-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 0;
}

.community-stat-glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
}

.community-stat-glass .n {
  color: #fff;
  font-size: 28px;
}

.community-stat-glass .l {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 4px;
}

.community-actions {
  margin-top: 32px;
}

.btn-community-playtest {
  background: #ffffff;
  color: var(--ink);
  border-color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(255, 255, 255, 0.15);
}

.btn-community-playtest:hover {
  background: var(--sig-green);
  color: #ffffff;
  border-color: var(--sig-green);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 32px -10px rgba(41, 158, 86, 0.6);
}


/* Release Platforms Grid */
.platforms-container {
  margin-top: 64px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.platforms-eyebrow {
  margin-bottom: 24px;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
}

.platform-icon {
  width: 64px;
  height: 64px;
  color: var(--sys-color, var(--brass));
  transition: transform 0.5s var(--ease-spring);
}

.platform-icon svg,
.platform-icon i {
  width: 100%;
  height: 100%;
  font-size: 36px;
  line-height: 40px;
}

.platform-card:hover .platform-icon {
  transform: scale(1.2) rotate(-5deg);
}

.platform-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

/* Dark mode styling for platform cards when inside the dark hero-band */
.hero-band .platform-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-band .platform-name {
  color: #fff;
}



/* Play / Form */
.play-section {
  background:
    radial-gradient(circle at 50% 30%, rgba(41, 158, 86, 0.04) 0%, transparent 50%),
    var(--bg);
  padding-top: 100px;
  /* Override .slide's bottom padding so footer has its own spacing */
  padding-bottom: 0;
}

.play-head {
  text-align: center;
  margin: 0 auto 60px;
}

.play-card-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.play-card-desc {
  margin-bottom: 30px;
  color: var(--ink-dim);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  margin-bottom: 12px;
  font-family: inherit;
}

/* Publishers */
.publishers {
  min-height: 50vh;
  padding: 60px 0;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 80% 50%,
      rgba(201, 122, 21, 0.06) 0%,
      transparent 60%),
    linear-gradient(180deg,
      var(--ink) 0%,
      #0d1117 100%);
  color: #fff;
}

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

.publishers-content {
  max-width: 600px;
}

.publishers-eyebrow {
  color: var(--brass);
}

.publishers-title {
  color: #fff;
  margin-bottom: 16px;
}

.publishers-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 18px;
  margin-bottom: 36px;
  line-height: 1.6;
}

.publishers-btn-primary {
  background: #fff;
  color: var(--ink);
}

.publishers-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 10px;
}

.publishers-stats {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 32px;
  border-radius: var(--r);
  min-width: 320px;
  backdrop-filter: blur(8px);
}

.publishers-stat-label {
  font-family: "Poppins", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 4px;
}

.publishers-stat-value {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
}

/* Team Section */
.team-section {
  width: 100%;
  padding: 120px 0;
  background: radial-gradient(circle at 50% 100%, rgba(0, 170, 255, 0.02) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.team-eyebrow {
  margin-bottom: 24px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

.team-pic-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.team-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--panel);
  transition: transform 0.5s var(--ease-spring);
}

.team-card:hover .team-pic {
  transform: scale(1.05);
}

.team-info {
  padding: 24px 16px;
}

.team-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
}

.team-role {
  font-size: 13px;
  color: var(--sys-color, var(--ink-dim));
  margin-top: 6px;
  font-weight: 500;
}

/* Embedded Footer */
.footer-section-embedded {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand-wrap {
  max-width: 340px;
}

.footer-links-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 26px;
}

@media (max-width: 680px) {

  .footer-links-wrap,
  .footer-links-row {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

.footer-desc {
  color: var(--ink-faint);
  font-size: 14px;
  margin-top: 16px;
}

.footer-col-title {
  font-family: monospace;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.footer-col-links {
  display: grid;
  gap: 12px;
}

.footer-link {
  color: var(--ink-dim);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
}

.footer-link:hover {
  color: var(--brass);
}

.footer-tagline {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.footer-locale {
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--brass);
}

.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  font-size: 18px;
  transition: transform 0.3s var(--ease-spring), background-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.social-icon:hover {
  transform: translateY(-3px);
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
}

/* ============ MEDIA LOADING — fade-in (P1) + skeleton shimmer (P2) ============ */
/* A .media-ph wrapper shows a shimmer until its image loads; the image (.fade-in)
   cross-fades in on top. JS adds .is-loaded. Reduced-motion freezes both. */
.media-ph {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-2);
  background-image: linear-gradient(100deg,
      color-mix(in srgb, var(--brass) 5%, var(--bg-2)) 30%,
      color-mix(in srgb, var(--brass) 16%, var(--bg-2)) 50%,
      color-mix(in srgb, var(--brass) 5%, var(--bg-2)) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.media-ph.is-loaded {
  animation: none;
  background-image: none;
}

@keyframes shimmer {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

img.fade-in {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

img.fade-in.is-loaded {
  opacity: 1;
}

/* P3: skip layout/paint for deep below-the-fold sections until near the viewport */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 1000px;
}

/* ============ CONTAINER QUERIES (M2) ============ */
/* Bento cards respond to their own width: the wide (span-2/3) cards get more
   generous icon + type than the narrow ones, regardless of viewport. */
.sys {
  container-type: inline-size;
}

@container (min-width: 260px) {
  .sys-icon {
    width: 48px;
    height: 48px;
  }

  .sys h4 {
    font-size: 20px;
  }

  .sys p {
    font-size: 15.5px;
  }
}

/* ============ CONVERSION (Wave 6) ============ */
/* C1: live like-count social proof */
.hero-socialproof {
  margin: 18px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-socialproof strong {
  color: #fff;
  font-weight: 700;
}

.modal-likecount {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-dim);
}

.modal-likecount strong {
  color: var(--brass);
}

/* C5: consent banner */
.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 20px 50px -16px rgba(17, 24, 49, 0.3);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transform: translateY(160%);
  transition: transform 0.5s var(--ease-spring);
}

.consent-banner.is-in {
  transform: translateY(0);
}

.consent-text {
  margin: 0;
  flex: 1 1 240px;
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.5;
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.consent-btn {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-spring), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.consent-accept {
  background: var(--ink);
  color: #fff;
}

.consent-accept:hover {
  transform: translateY(-2px);
  background: var(--brass);
}

.consent-decline {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--line-strong);
}

.consent-decline:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-family: monospace;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .community-layout {
    max-height: none;
    height: auto;
  }

  .community-top-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .community-top-row .sec-head.text-left {
    text-align: center;
  }

  .community-bottom-row {
    margin-top: 24px;
    padding-top: 0;
  }

  /* Video frame: slightly shorter on tablets */
  .hero-video-frame {
    height: 56vh;
  }

  /* Center the hero copy on mid-width screens */
  .hero-band {
    text-align: center;
    padding: 56px 0 72px;
  }

  .hero-inner {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

  .sys-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .build-card {
    flex: 0 0 80vw;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  section {
    padding: 80px 0;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* Mobile nav CTA: swap the wide text button for a compact heart button so it
     doesn't overlap the brand or push past the viewport. */
  .nav-cta-full {
    display: none;
  }

  .nav-cta-heart {
    display: inline-flex;
  }

  /* Let long CTA labels wrap instead of overflowing the viewport. */
  .btn {
    white-space: normal;
  }

  .sys-grid,
  .vid-grid {
    grid-template-columns: 1fr;
  }

  .pillar {
    flex: 0 0 92%;
  }

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

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-band h1 {
    font-size: 38px;
  }

  .hero-band p.sub {
    font-size: 17px;
    margin: 24px 0 36px;
  }

  .hero-band {
    padding: 48px 0 64px;
  }

  /* Video frame: 16:9 ratio on phones so CTA is visible */
  .hero-video-frame {
    height: 56.25vw;
    min-height: 240px;
  }

  .hero-play-btn span {
    width: 76px;
    height: 76px;
  }

  .hero-play-btn svg {
    width: 30px;
    height: 30px;
  }

  .fantasy-band h2 {
    font-size: 32px;
  }

  .fantasy-lede {
    font-size: 17px;
    margin: 20px auto 28px;
  }

  .bento-section {
    padding: 80px 0;
  }

  .diaries-section {
    padding: 80px 0;
  }

  .publishers-wrap {
    flex-direction: column;
    gap: 40px;
  }

  .publishers-stats {
    min-width: auto;
    width: 100%;
  }

  .team-section {
    padding: 80px 0;
  }

  .stat .n {
    font-size: 32px;
  }
}

/* ============ MOBILE NAV DROPDOWN ============ */
.nav-links.is-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg);
  padding: 20px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
}

/* ============ ROADMAP SECTION ============ */
.roadmap-section {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 30%, rgba(201, 122, 21, 0.02) 0%, transparent 60%);
  padding: 120px 0;
}

.roadmap-section .wrap {
  width: 100%;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
}

.roadmap-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px 32px;
  overflow: hidden;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-spring), background-color 0.5s var(--ease-spring), border-color 0.5s var(--ease-spring), color 0.5s var(--ease-spring);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

/* Colored top border accent per status */
.roadmap-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--roadmap-color, var(--brass));
}

.roadmap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  border-color: var(--roadmap-color, var(--brass));
}

.roadmap-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--roadmap-color, var(--brass));
  margin-bottom: 32px;
}

.roadmap-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--roadmap-color, var(--brass));
}

.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.roadmap-list li {
  font-size: 18px;
  color: var(--ink-dim);
  padding-left: 20px;
  position: relative;
  font-weight: 500;
}

.roadmap-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--roadmap-color, var(--brass));
  font-weight: bold;
}

.roadmap-cta {
  text-align: center;
  margin-top: 48px;
}

@media (max-width: 680px) {
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ "I WANT THIS GAME" CTAs ============ */
.btn-primary.is-liked {
  background: var(--sig-red);
  border-color: var(--sig-red);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
  margin-top: 16px;
}

/* ============ CONVERSION MODAL ============ */
.conversion-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.conversion-modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.conversion-modal {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  max-width: 880px;
  width: 100%;
  padding: 44px 40px 32px;
  box-shadow: 0 40px 120px -20px rgba(17, 24, 39, 0.45);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.45s var(--ease-spring);
  max-height: 92vh;
  overflow-y: auto;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-dim);
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
}

.modal-close:hover {
  background: var(--ink);
  color: #fff;
  transform: rotate(90deg);
}

.conversion-modal-backdrop.is-open .conversion-modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.modal-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--tint-brass, rgba(201, 122, 21, 0.12));
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--brass) 6%, transparent);
}

.modal-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 8px;
}

.modal-header h3 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.modal-sub {
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 46ch;
  margin: 0 auto;
}

.modal-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.modal-channel {
  --ch: var(--brass);
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px 22px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.modal-channel.playtest {
  --ch: var(--sig-red);
}

.modal-channel.newsletter {
  --ch: var(--brass);
}

.modal-channel.discord {
  --ch: #5865f2;
}

.modal-channel:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--ch) 45%, transparent);
  box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--ch) 35%, transparent);
}

.modal-channel.is-featured {
  border-color: color-mix(in srgb, var(--ch) 55%, transparent);
  background: color-mix(in srgb, var(--ch) 5%, var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ch) 35%, transparent);
}

.modal-flag {
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--ch);
  color: #fff;
  font-family: "Poppins", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.modal-channel-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--ch) 14%, transparent);
  color: var(--ch);
}

.modal-channel-title {
  font-family: "Poppins", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.modal-channel-desc {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin-bottom: 22px;
}

.modal-channel-action {
  margin-top: auto;
}

/* Newsletter form inside modal */
.modal-channel .form-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-2);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}

.modal-channel .form-input:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
  border-color: var(--brass);
}

.modal-skip {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 28px;
  padding: 12px;
  color: var(--ink-faint);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s var(--ease-out);
}

.modal-skip:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .modal-channels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .conversion-modal {
    padding: 28px 20px;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
  }

  .conversion-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
}

/* ============ UTILITY & MODIFIER CLASSES ============ */
.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.text-muted {
  color: rgba(255, 255, 255, 0.6);
}

/* Platform Colors */
.platform-steam {
  --sys-color: #66c0f4;
}

.platform-xbox {
  --sys-color: #107c10;
}

.platform-win {
  --sys-color: #0078d7;
}

.platform-mac {
  --sys-color: #a3a3a3;
}

.platform-linux {
  --sys-color: #dd4814;
}

/* System Colors */
.sys-color-brass {
  --sys-color: var(--brass);
}

.sys-color-brass-deep {
  --sys-color: var(--brass-deep);
}

.sys-color-cyan {
  --sys-color: var(--cyan);
}

.sys-color-green {
  --sys-color: var(--sig-green);
}

.sys-color-red {
  --sys-color: var(--sig-red);
}

.sys-color-accent {
  --sys-color: var(--accent);
}

/* Layout Adjustments */
.community-header {
  text-align: center;
  margin-bottom: 24px;
}

.community-header p {
  margin-bottom: 0;
}

.community-top-row.is-aligned {
  align-items: flex-start;
  margin-bottom: 24px;
}

.community-actions.is-centered {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.community-map-wrapper.is-centered {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  min-width: auto;
  width: 100%;
}

.community-map-glow.is-centered {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.community-map.is-constrained {
  width: 100%;
  object-fit: contain;
  opacity: 0.8;
}

.community-middle-row.is-layered {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.team-play-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
}

.team-play-head {
  margin-bottom: 60px;
}

.team-play-lede {
  max-width: 600px;
  margin: 0 auto;
}

.team-grid.is-spaced {
  margin-bottom: 80px;
  width: 100%;
}

.play-card.is-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 4rem 2rem;
}

.play-card-title {
  margin-bottom: 1.5rem;
}

.play-card-desc.is-centered {
  max-width: 600px;
  margin-bottom: 2rem;
}