/* ===== LANDING PAGE MAIN STYLES ===== */
/* Google Fonts loaded via <link> in index.html — do NOT @import here */

:root {
  --color-primary: #667eea;
  --color-primary-dark: #764ba2;
  --color-accent: #667eea;
  --color-success: #48bb78;
  --color-error: #f56565;
  --color-info: #4299e1;

  --bg-dark: #1a202c;
  --bg-dark-secondary: #2d3748;
  --bg-light: #f7fafc;
  --bg-light-secondary: #edf2f7;

  --text-dark: #2d3748;
  --text-muted: #4a5568;
  --text-light: rgba(255, 255, 255, 0.9);
  --text-light-muted: rgba(255, 255, 255, 0.7);

  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  --gradient-cta-overlay: linear-gradient(135deg, rgba(26, 32, 44, 0.9), rgba(44, 82, 130, 0.8));

  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
  --shadow-btn: 0 4px 15px rgba(102, 126, 234, 0.3);

  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-display: var(--font-primary);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --section-padding: 100px;
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --color-primary-rgb: 102, 126, 234;
}

[data-theme='bronze-age'] {
  --color-primary: #b87333;
  --color-primary-dark: #8b5e3c;
  --color-accent: #4a8c6f;
  --color-success: #5a8c4a;
  --color-error: #a04030;
  --color-info: #5a7a8c;

  --bg-dark: #1a1714;
  --bg-dark-secondary: #2b2420;
  --bg-light: #f2e8d5;
  --bg-light-secondary: #e8dcc8;

  --text-dark: #2a2118;
  --text-muted: #7a6b5a;
  --text-light: #f2e8d5;
  --text-light-muted: rgba(242, 232, 213, 0.7);

  --gradient-primary: linear-gradient(135deg, #b87333 0%, #8b5e3c 100%);
  --gradient-cta-overlay: linear-gradient(135deg, rgba(26, 23, 20, 0.92), rgba(184, 115, 51, 0.6));

  --shadow-card: 0 10px 40px rgba(26, 23, 20, 0.15);
  --shadow-card-hover: 0 20px 60px rgba(184, 115, 51, 0.12);
  --shadow-btn: 0 4px 15px rgba(184, 115, 51, 0.35);

  --font-primary: 'EB Garamond', Georgia, serif;
  --font-display: 'Cinzel', Georgia, serif;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --color-primary-rgb: 184, 115, 51;
}

/* CSS Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
  background: var(--bg-light);
  transition: background-color 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  min-width: 120px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(1px);
  box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
  min-width: 160px;
}

/* Navigation */
.landing-nav {
  --nav-sweep-duration: 7s;
  --nav-sweep-opacity: 0.6;
  --nav-pulse-duration: 0.38s;
  --nav-pulse-scale: 1.01;
  --nav-indicator-height: 3px;
  --nav-indicator-glow: 0 0 14px rgba(var(--color-primary-rgb), 0.34);
  --nav-btn-transition-duration: 0.18s;
  --nav-magnet-transition-duration: 0.08s;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 23, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(184, 115, 51, 0.22);
  box-shadow: 0 10px 30px rgba(12, 10, 8, 0.16);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.landing-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 230, 190, 0.11) 48%, transparent 100%);
  transform: translateX(-130%);
  animation: navSweep var(--nav-sweep-duration) ease-in-out infinite;
  pointer-events: none;
  opacity: var(--nav-sweep-opacity);
}

.landing-nav.nav-scrolled {
  background: rgba(20, 17, 14, 0.96);
  box-shadow: 0 14px 36px rgba(8, 7, 6, 0.24);
  border-color: rgba(184, 115, 51, 0.34);
}

.landing-nav.nav-hit .nav-container {
  animation: navPulse var(--nav-pulse-duration) cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-nav[data-nav-intensity='subtle'] {
  --nav-sweep-duration: 9.5s;
  --nav-sweep-opacity: 0.38;
  --nav-pulse-duration: 0.30s;
  --nav-pulse-scale: 1.006;
  --nav-indicator-height: 2px;
  --nav-indicator-glow: 0 0 10px rgba(var(--color-primary-rgb), 0.25);
  --nav-btn-transition-duration: 0.22s;
  --nav-magnet-transition-duration: 0.12s;
}

.landing-nav[data-nav-intensity='arcade'] {
  --nav-sweep-duration: 5.4s;
  --nav-sweep-opacity: 0.78;
  --nav-pulse-duration: 0.46s;
  --nav-pulse-scale: 1.016;
  --nav-indicator-height: 4px;
  --nav-indicator-glow: 0 0 18px rgba(var(--color-primary-rgb), 0.44);
  --nav-btn-transition-duration: 0.14s;
  --nav-magnet-transition-duration: 0.06s;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border: 1px solid rgba(212, 165, 116, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(56, 45, 37, 0.42), rgba(23, 19, 16, 0.58));
  --nav-tilt-x: 0deg;
  --nav-tilt-y: 0deg;
  --nav-light-x: 50%;
  --nav-light-y: 0%;
  transform: perspective(900px) rotateY(var(--nav-tilt-x)) rotateX(var(--nav-tilt-y));
  transition: padding 0.25s ease, transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.nav-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--nav-light-x) var(--nav-light-y), rgba(245, 211, 163, 0.16) 0%, transparent 52%);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.25s ease;
}

.nav-container::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 206, 0.48), transparent);
  pointer-events: none;
}

.landing-nav.nav-scrolled .nav-container {
  padding: 0.72rem 18px;
  border-color: rgba(212, 165, 116, 0.34);
  background: linear-gradient(145deg, rgba(56, 45, 37, 0.52), rgba(23, 19, 16, 0.74));
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;
}

.logo:hover .logo-img {
  transform: rotate(-8deg) scale(1.06);
  filter: drop-shadow(0 0 8px rgba(184, 115, 51, 0.46));
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(180deg, #d4a574 0%, var(--color-primary) 55%, var(--color-primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-actions {
  display: flex;
  gap: 12px;
  position: relative;
}

.nav-actions .btn {
  position: relative;
  transition: transform var(--nav-btn-transition-duration) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease,
              background-color 0.2s ease;
  will-change: transform;
}

.nav-actions .btn.nav-magnetized {
  transition-duration: var(--nav-magnet-transition-duration);
}

.nav-actions .btn::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.nav-actions .btn:hover::after,
.nav-actions .btn:focus-visible::after,
.nav-actions .btn.is-active::after {
  opacity: 1;
  transform: translateX(120%);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.nav-actions .btn.is-active {
  box-shadow: 0 10px 24px rgba(var(--color-primary-rgb), 0.26);
  border-color: rgba(255, 233, 201, 0.58);
}

/* Hero Section */
.hero {
  position: relative;
  height: min(96vh, 960px);
  min-height: 760px;
  display: flex;
  align-items: center;
  overflow: hidden;
  contain: layout style paint; /* CSS containment for performance */
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04) 0px,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
  opacity: 0.2;
  animation: scanlineSweep 8s linear infinite;
  pointer-events: none;
  z-index: 2;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(var(--color-primary-rgb), 0.2), transparent 62%);
  opacity: 0;
  animation: heroEnergyPulse 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

/* ============================================================
   HERO DEPTH LAYER SYSTEM  (v2)
   Three stacked images drift at different parallax speeds.
   Opacity cycles layer-by-layer on a shared 22 s timeline:
     0–18 %  → background only (mountains / sky)
     18–55 % → midground fades in (harbor / port)
     42–86 % → foreground fades in (Âu Lạc scene)
   Layers recede in reverse order for a breathing loop.
 ============================================================ */

.hero-depth-layer {
  position: absolute;
  /* oversized so parallax shift has headroom without gaps */
  top: -6%;
  left: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  object-position: center;
  will-change: opacity, transform;
  pointer-events: none;
  user-select: none;
}

/* --- Background: always visible, slowest drift --- */
.hero-depth-bg {
  /* DOM order + no explicit z-index → lowest layer */
  opacity: 1;
  filter: saturate(0.88) brightness(0.83) contrast(1.04);
  animation: depthBgDrift 22s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* --- Midground: medium drift, delayed opacity cycle --- */
.hero-depth-mid {
  opacity: 0;
  filter: saturate(1.06) brightness(0.93) contrast(1.06);
  mix-blend-mode: soft-light;
  animation:
    depthMidDrift   14s cubic-bezier(0.45, 0, 0.55, 1) infinite,
    depthMidReveal  22s ease-in-out                     infinite;
}

/* --- Foreground: fastest drift, latest emergence --- */
.hero-depth-fg {
  opacity: 0;
  filter: saturate(1.10) brightness(0.98) contrast(1.06);
  mix-blend-mode: overlay;
  animation:
    depthFgDrift    9s  cubic-bezier(0.45, 0, 0.55, 1) infinite,
    depthFgReveal   22s ease-in-out                     infinite;
}

/* --- Parallax drift: each layer moves proportionally faster --- */
/* BG: ±1.1 % translate — barely moves (distant) */
@keyframes depthBgDrift {
  0%   { transform: scale(1.04) translate(0%,     0%);    }
  30%  { transform: scale(1.06) translate(-1.1%, -0.55%); }
  70%  { transform: scale(1.05) translate( 1.1%,  0.55%); }
  100% { transform: scale(1.04) translate(0%,     0%);    }
}

/* Mid: ±2.4 % translate — noticeable drift (midground) */
@keyframes depthMidDrift {
  0%   { transform: scale(1.04) translate(0%,     0%);    }
  30%  { transform: scale(1.08) translate(-2.4%, -1.1%);  }
  70%  { transform: scale(1.07) translate( 2.4%,  1.1%);  }
  100% { transform: scale(1.04) translate(0%,     0%);    }
}

/* FG: ±3.8 % translate — strong movement (closest) */
@keyframes depthFgDrift {
  0%   { transform: scale(1.04) translate(0%,     0%);    }
  30%  { transform: scale(1.10) translate(-3.8%, -1.8%);  }
  70%  { transform: scale(1.09) translate( 3.8%,  1.8%);  }
  100% { transform: scale(1.04) translate(0%,     0%);    }
}

/* --- Opacity reveal cycles (staggered in the shared 22 s loop) --- */
/* Midground: emerges ~t=4 s, peaks t=7–12 s, recedes t=16 s */
@keyframes depthMidReveal {
  0%, 18%, 100% { opacity: 0;    }
  32%           { opacity: 0.62; }
  55%           { opacity: 0.62; }
  73%           { opacity: 0;    }
}

/* Foreground: emerges ~t=9 s, peaks t=12–17 s, recedes t=19 s */
@keyframes depthFgReveal {
  0%, 42%, 100% { opacity: 0;    }
  56%           { opacity: 0.52; }
  74%           { opacity: 0.52; }
  88%           { opacity: 0;    }
}

/* Carousel Controls */
.hero-carousel-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero:hover .hero-carousel-controls,
.hero-carousel-controls:hover {
  opacity: 1;
}

.hero-control-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.hero-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
  transform: scale(1.1);
}

.hero-control-btn:active {
  transform: scale(0.95);
}

.play-pause-btn {
  font-size: 14px;
  margin: 0 5px;
}

.prev-btn, .next-btn {
  font-size: 24px;
  font-weight: bold;
}

/* Indicator Dots */
.hero-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  transform: scale(0);
  transition: transform 0.3s ease;
  border-radius: 50%;
}

.hero-indicator.active::before {
  transform: scale(1);
}

.hero-indicator:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

/* Progress Animation for Active Indicator */
.hero-indicator.active {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .hero-carousel-controls {
    bottom: 20px;
    padding: 10px 15px;
    gap: 12px;
  }
  
  .hero-control-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .prev-btn, .next-btn {
    font-size: 20px;
  }
  
  .hero-indicator {
    width: 8px;
    height: 8px;
  }
  
  .hero-carousel-controls {
    opacity: 0.8; /* More visible on mobile */
  }
}

@media (max-width: 480px) {
  .hero-carousel-controls {
    bottom: 15px;
    padding: 8px 12px;
    gap: 10px;
  }
  
  .hero-control-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .prev-btn, .next-btn {
    font-size: 18px;
  }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .hero-carousel-controls {
    opacity: 0.9;
    padding: 12px 18px;
  }
  
  .hero-control-btn {
    width: 40px;
    height: 40px;
    padding: 10px;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(184, 115, 51, 0.12) 0, transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(74, 140, 111, 0.08) 0, transparent 40%),
    linear-gradient(160deg, rgba(26, 23, 20, 0.55) 0%, rgba(26, 23, 20, 0.32) 100%);
  z-index: 1;
}

@keyframes heroEnergyPulse {
  0%,
  100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.32;
  }
}

@keyframes scanlineSweep {
  0% {
    transform: translateY(-8%);
  }
  100% {
    transform: translateY(8%);
  }
}

@keyframes heroFrameJitter {
  0%,
  90%,
  100% {
    transform: scale(1.03) translate3d(0, 0, 0);
  }
  91% {
    transform: scale(1.03) translate3d(0.7px, -0.5px, 0);
  }
  92% {
    transform: scale(1.03) translate3d(-0.6px, 0.4px, 0);
  }
  93% {
    transform: scale(1.03) translate3d(0.4px, 0.3px, 0);
  }
}

/* Scale recession should happen from the top edge so the section top stays
   anchored while the bottom recedes — keeps the shaped SVG edge aligned. */
.hero,
.features,
.gameplay {
  transform-origin: center top;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero-text {
  max-width: 600px;
  transition: transform 0.12s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.hero-title {
  color: var(--text-light);
  font-size: 4.4rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 20px rgba(26, 23, 20, 0.55);
}

.hero-subtitle {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: white;
  text-align: center;
  opacity: 0.8;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: white;
  margin: 10px auto;
  position: relative;
  animation: scrollBounce 2s infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid white;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* Features Section */
.features {
  --feature-lantern-x: 50%;
  --feature-lantern-y: 28%;
  --feature-lantern-opacity: 0;
  position: relative;
  z-index: 1;
  margin-top: -90px;
  scroll-margin-top: 90px;
  /* bottom: extra 90px so last card never enters the 55px gameplay overlap zone
     even at peak scroll-driven translateY displacement (~50px) */
  padding: calc(var(--section-padding) + 90px) 0 calc(var(--section-padding) + 90px);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(184, 115, 51, 0.16) 0%, transparent 42%),
    linear-gradient(180deg, rgba(20, 17, 14, 0.98) 0%, rgba(29, 24, 20, 0.96) 48%, rgba(18, 15, 13, 0.99) 100%);
}

.features::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(220px circle at var(--feature-lantern-x) var(--feature-lantern-y), rgba(255, 222, 164, calc(var(--feature-lantern-opacity) * 0.14)) 0%, rgba(184, 115, 51, calc(var(--feature-lantern-opacity) * 0.08)) 32%, transparent 72%);
  z-index: 0;
}

.features .container {
  position: relative;
  z-index: 1;
}

.features .section-title {
  --feature-title-light: 0;
  color: rgba(242, 232, 213, calc(0.06 + var(--feature-title-light) * 0.92));
  text-shadow: 0 0 calc(4px + var(--feature-title-light) * 16px) rgba(255, 213, 145, calc(var(--feature-title-light) * 0.18));
  transition: color 0.14s linear, text-shadow 0.14s linear;
}

.section-title {
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.feature-card {
  --feature-text-light: 0;
  --feature-card-light: 0;
  --feature-card-spot-x: 50%;
  --feature-card-spot-y: 35%;
  --chip-top-left: 2%;
  --chip-top-right: 2%;
  --chip-right-upper: 3%;
  --chip-right-lower: 2%;
  --chip-bottom-right: 3%;
  --chip-bottom-left: 2%;
  --chip-left-lower: 2%;
  --chip-left-upper: 3%;
  --chip-shift-top-left: 0%;
  --chip-shift-top-right: 0%;
  --chip-shift-right-upper: 0%;
  --chip-shift-right-lower: 0%;
  --chip-shift-bottom-right: 0%;
  --chip-shift-bottom-left: 0%;
  --chip-shift-left-lower: 0%;
  --chip-shift-left-upper: 0%;
  background:
    linear-gradient(165deg, rgba(116, 98, 84, 0.18) 0 16%, transparent 30%),
    radial-gradient(160% 120% at 84% 12%, rgba(166, 106, 68, 0.2) 0%, transparent 36%),
    linear-gradient(180deg, rgba(60, 53, 47, 0.98) 0%, rgba(44, 39, 35, 0.99) 58%, rgba(33, 29, 26, 0.99) 100%);
  padding: 40px 30px;
  border-radius: 14px;
  text-align: center;
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(210, 198, 180, 0.16),
    inset 0 -22px 26px rgba(21, 18, 16, 0.42),
    inset 0 0 0 1px rgba(127, 108, 90, 0.32);
  transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease, clip-path 0.22s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(133, 112, 92, 0.56);
  border-left: 4px solid rgba(140, 84, 50, 0.9);
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  overflow: hidden;
  clip-path: polygon(
    calc(var(--chip-top-left) + var(--chip-shift-top-left)) 0,
    calc(100% - (var(--chip-top-right) + var(--chip-shift-top-right))) 0,
    100% calc(var(--chip-right-upper) + var(--chip-shift-right-upper)),
    100% calc(100% - (var(--chip-right-lower) + var(--chip-shift-right-lower))),
    calc(100% - (var(--chip-bottom-right) + var(--chip-shift-bottom-right))) 100%,
    calc(var(--chip-bottom-left) + var(--chip-shift-bottom-left)) 100%,
    0 calc(100% - (var(--chip-left-lower) + var(--chip-shift-left-lower))),
    0 calc(var(--chip-left-upper) + var(--chip-shift-left-upper))
  );
  backdrop-filter: blur(6px);
}

.feature-card:nth-child(1) {
  --chip-top-left: 2.2%;
  --chip-top-right: 1.4%;
  --chip-right-upper: 3.2%;
  --chip-right-lower: 2.5%;
  --chip-bottom-right: 2.8%;
  --chip-bottom-left: 1.8%;
  --chip-left-lower: 2.4%;
  --chip-left-upper: 3.1%;
}

.feature-card:nth-child(2) {
  --chip-top-left: 1.5%;
  --chip-top-right: 2.6%;
  --chip-right-upper: 2.6%;
  --chip-right-lower: 3.3%;
  --chip-bottom-right: 3.6%;
  --chip-bottom-left: 2.1%;
  --chip-left-lower: 2%;
  --chip-left-upper: 2.7%;
}

.feature-card:nth-child(3) {
  --chip-top-left: 2.8%;
  --chip-top-right: 1.8%;
  --chip-right-upper: 3.5%;
  --chip-right-lower: 2.2%;
  --chip-bottom-right: 2.4%;
  --chip-bottom-left: 2.9%;
  --chip-left-lower: 2.6%;
  --chip-left-upper: 3.4%;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(180px circle at var(--feature-card-spot-x) var(--feature-card-spot-y), rgba(241, 207, 154, calc(var(--feature-card-light) * 0.18)) 0%, rgba(184, 115, 51, calc(var(--feature-card-light) * 0.12)) 34%, transparent 74%);
  z-index: 1;
  opacity: 1;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(18px 8px at 12% 20%, rgba(32, 28, 24, 0.34) 0%, transparent 80%),
    radial-gradient(16px 7px at 76% 28%, rgba(25, 21, 18, 0.3) 0%, transparent 80%),
    radial-gradient(14px 6px at 62% 74%, rgba(31, 27, 23, 0.3) 0%, transparent 80%),
    linear-gradient(112deg, transparent 0 18%, rgba(148, 90, 53, 0.18) 23% 25%, transparent 29% 48%, rgba(168, 104, 62, 0.13) 52% 54%, transparent 58% 100%),
    repeating-linear-gradient(171deg, rgba(84, 74, 65, 0.14) 0 2px, rgba(60, 53, 47, 0.06) 2px 6px, transparent 6px 11px);
  mix-blend-mode: soft-light;
}

.feature-card:hover {
  --chip-shift-top-left: 0.2%;
  --chip-shift-top-right: -0.16%;
  --chip-shift-right-upper: 0.24%;
  --chip-shift-right-lower: -0.14%;
  --chip-shift-bottom-right: 0.18%;
  --chip-shift-bottom-left: -0.12%;
  --chip-shift-left-lower: 0.16%;
  --chip-shift-left-upper: -0.18%;
  box-shadow:
    0 26px 58px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(227, 213, 193, 0.2),
    inset 0 -24px 28px rgba(19, 16, 14, 0.48),
    inset 0 0 0 1px rgba(150, 126, 103, 0.34);
}

.feature-card:nth-child(2):hover {
  --chip-shift-top-left: -0.14%;
  --chip-shift-top-right: 0.22%;
  --chip-shift-right-upper: -0.18%;
  --chip-shift-right-lower: 0.26%;
  --chip-shift-bottom-right: 0.2%;
  --chip-shift-bottom-left: -0.16%;
  --chip-shift-left-lower: 0.12%;
  --chip-shift-left-upper: 0.18%;
}

.feature-card:nth-child(3):hover {
  --chip-shift-top-left: 0.24%;
  --chip-shift-top-right: -0.1%;
  --chip-shift-right-upper: 0.16%;
  --chip-shift-right-lower: -0.2%;
  --chip-shift-bottom-right: -0.12%;
  --chip-shift-bottom-left: 0.22%;
  --chip-shift-left-lower: -0.18%;
  --chip-shift-left-upper: 0.14%;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  background:
    radial-gradient(circle at 32% 28%, rgba(207, 187, 160, 0.16) 0%, transparent 34%),
    radial-gradient(circle at 70% 70%, rgba(133, 83, 51, 0.22) 0%, transparent 50%),
    linear-gradient(180deg, rgba(74, 66, 58, 0.96), rgba(46, 41, 36, 0.98));
  border: 2px solid rgba(159, 133, 109, 0.48);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(214, 199, 181, 0.2),
    inset 0 -10px 14px rgba(29, 24, 20, 0.44),
    0 10px 20px rgba(0, 0, 0, 0.26);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

/* ---- Realistic fire on .feature-icon hover ---- */
@keyframes flame-core {
  0%   { transform: translateX(-50%) scaleX(1)    scaleY(1);    opacity: 0.94; }
  14%  { transform: translateX(-50%) scaleX(0.82) scaleY(1.14); opacity: 1;    }
  30%  { transform: translateX(-50%) scaleX(1.10) scaleY(0.93); opacity: 0.88; }
  48%  { transform: translateX(-50%) scaleX(0.88) scaleY(1.11); opacity: 0.97; }
  66%  { transform: translateX(-50%) scaleX(1.07) scaleY(0.96); opacity: 0.86; }
  84%  { transform: translateX(-50%) scaleX(0.91) scaleY(1.08); opacity: 0.93; }
  100% { transform: translateX(-50%) scaleX(1)    scaleY(1);    opacity: 0.94; }
}

@keyframes flame-outer {
  0%   { transform: translateX(-50%) scaleX(1.10) scaleY(0.90); opacity: 0.58; }
  20%  { transform: translateX(-50%) scaleX(0.88) scaleY(1.16); opacity: 0.76; }
  44%  { transform: translateX(-50%) scaleX(1.14) scaleY(0.86); opacity: 0.52; }
  68%  { transform: translateX(-50%) scaleX(0.90) scaleY(1.12); opacity: 0.70; }
  100% { transform: translateX(-50%) scaleX(1.10) scaleY(0.90); opacity: 0.58; }
}

/* Core flame — bright, tight, contained within card top padding */
.feature-icon::before {
  content: '';
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  width: 16px;
  height: 30px;
  background: radial-gradient(ellipse 50% 100% at 50% 100%,
    #fffde4 0%,
    #ffe040 12%,
    #ff8c00 34%,
    #ff3300 58%,
    #b01200 78%,
    transparent 92%
  );
  border-radius: 50% 50% 34% 34% / 52% 52% 48% 48%;
  filter: url(#fire-turbulence) blur(1.2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 6;
}

/* Outer glow — wider, diffuse amber halo */
.feature-icon::after {
  content: '';
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  width: 32px;
  height: 24px;
  background: radial-gradient(ellipse 58% 88% at 50% 100%,
    rgba(255, 155, 20, 0.88) 0%,
    rgba(255, 65, 0,  0.52) 42%,
    rgba(170, 18, 0,  0.20) 66%,
    transparent 82%
  );
  border-radius: 50% 50% 26% 26% / 44% 44% 56% 56%;
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 5;
}

/* Activate both flames on card hover */
.feature-card:hover .feature-icon::before {
  opacity: 1;
  animation: flame-core 0.54s ease-in-out infinite;
}

.feature-card:hover .feature-icon::after {
  opacity: 1;
  animation: flame-outer 0.70s ease-in-out infinite;
}

/* Icon glows as if lit from above by the fire */
.feature-card:hover .feature-icon {
  border-color: rgba(255, 128, 35, 0.70);
  box-shadow:
    inset 0 1px 0 rgba(214, 199, 181, 0.2),
    inset 0 -10px 14px rgba(29, 24, 20, 0.44),
    0 0 24px rgba(255, 88, 10, 0.48),
    0 0  9px rgba(255, 190, 55, 0.32),
    0 10px 20px rgba(0, 0, 0, 0.26);
}

.feature-card h3 {
  position: relative;
  z-index: 2;
  color: rgba(242, 232, 213, calc(0.08 + var(--feature-text-light) * 0.9));
  margin-bottom: 16px;
  text-shadow: 0 0 calc(2px + var(--feature-text-light) * 14px) rgba(255, 214, 149, calc(var(--feature-text-light) * 0.16));
  transition: color 0.14s linear, text-shadow 0.14s linear;
}

.feature-card p {
  position: relative;
  z-index: 2;
  color: rgba(242, 232, 213, calc(0.05 + var(--feature-text-light) * 0.78));
  line-height: 1.7;
  transition: color 0.14s linear;
}

/* Gameplay Section */
.gameplay {
  position: relative;
  z-index: 2;
  margin-top: -55px;
  scroll-margin-top: 55px;
  padding: calc(var(--section-padding) + 55px) 0 var(--section-padding);
  background: var(--bg-dark);
  color: var(--text-light);
}

.gameplay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(26, 23, 20, 0.05) 30%,
    rgba(26, 23, 20, 0.55) 65%,
    var(--bg-dark) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.gameplay-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.gameplay-text h2 {
  color: white;
  margin-bottom: 24px;
}

.gameplay-text p {
  color: var(--text-light-muted);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 40px;
}

.feature-list li {
  padding: 8px 0;
  position: relative;
  padding-left: 24px;
  color: var(--text-light);
}

.feature-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.gameplay-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gameplay-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.play-button {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(184, 115, 51, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.play-button:hover {
  transform: scale(1.1);
  background: rgba(184, 115, 51, 1);
}

/* CTA Section */
.cta {
  position: relative;
  z-index: 3;
  margin-top: -70px;
  scroll-margin-top: 70px;
  padding: calc(var(--section-padding) + 70px) 0 var(--section-padding);
  text-align: center;
  overflow: hidden;
}

.cta-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.cta-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-cta-overlay);
}

.cta-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 80px);
}

.cta-content h2 {
  font-size: 3rem;
  margin-bottom: 24px;
  color: white;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: var(--text-light);
}

.cta-actions {
  margin-bottom: 24px;
}

.cta-note {
  font-size: 0.9rem;
  color: var(--text-light-muted);
  margin: 0;
}

/* ================================================================
   ORGANIC SECTION BLEED — "layer by layer" transitions
   Sections bite into the one above with shaped organic top edges.
   hero → features  : rolling mountain ridge   (90 px overlap)
   features → gameplay : amber river wave       (55 px overlap)
   gameplay → cta   : mist gradient fade        (70 px overlap)
================================================================ */

/* Shared utility for all section-edge shapes */
.s-edge {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  line-height: 0;
  font-size: 0;
}

.s-edge svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Hero → Features : mountain photo edge ---- */
.s-edge--mountain {
  top: 0;
  height: 350px;
  transform: translateY(-125px);
  z-index: 0;
}

.s-edge--mountain img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  /* Less transparent at top — blends into hero rather than disappearing */
  -webkit-mask-image: linear-gradient(to bottom, rgba(63, 78, 3, 0.4) 0%, rgba(85, 122, 68, 0.88) 68%, black 70%);
  mask-image: linear-gradient(to bottom, rgba(19, 19, 18, 0.212) 15%, rgba(48, 47, 44, 0.88) 68%, black 70%);
  /* Brighter + slightly warmer to match hero tone */
  filter: saturate(0.8) brightness(1.0) contrast(1.0);
  mix-blend-mode: luminosity;
}

/* ---- Features → Gameplay : amber river wave ---- */
.s-edge--wave {
  top: 0;
  height: 62px;
  transform: translateY(-60px);
  z-index: 0;
}

.s-edge--wave svg {
  filter: drop-shadow(0 -2px 8px rgba(184, 115, 51, 0.32));
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 60px 0 30px;
  border-top: 2px solid rgba(184, 115, 51, 0.35);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.footer-logo span {
  font-size: 1.2rem;
  font-weight: 600;
}

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

.footer-link {
  color: var(--text-light-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(184, 115, 51, 0.2);
}

.footer-bottom p {
  color: var(--text-light-muted);
  margin: 0;
}

/* Scroll progress */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 9999;
  transition: width 0.05s linear;
  pointer-events: none;
}

/* Animated lantern cursor */
body.lantern-cursor-enabled,
body.lantern-cursor-enabled * {
  cursor: none !important;
}

.cursor-lantern {
  position: fixed;
  top: 0;
  left: 0;
  width: 68px;
  height: 96px;
  pointer-events: none;
  z-index: 10020;
  opacity: 0;
  --lantern-sway: 0deg;
  --lantern-glow-scale: 1;
  --lantern-flicker-speed: 1.8s;
  transform-origin: 50% 8%;
  will-change: transform, opacity;
  transition: opacity 0.2s ease;
}

.lantern-chain {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(198, 152, 98, 0.1), rgba(198, 152, 98, 0.9));
}

.lantern-frame {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 36px;
  height: 50px;
  transform: translateX(-50%) rotate(var(--lantern-sway));
  border-radius: 12px 12px 10px 10px;
  border: 2px solid rgba(139, 94, 60, 0.94);
  background:
    linear-gradient(to right, rgba(77, 54, 37, 0.92) 0 14%, rgba(214, 169, 111, 0.78) 30%, rgba(255, 222, 166, 0.92) 50%, rgba(214, 169, 111, 0.78) 70%, rgba(77, 54, 37, 0.92) 86% 100%),
    linear-gradient(to bottom, rgba(110, 72, 43, 0.2), rgba(255, 230, 186, 0.36));
  box-shadow:
    inset 0 -10px 12px rgba(81, 55, 35, 0.35),
    inset 0 10px 12px rgba(255, 229, 183, 0.28),
    0 8px 16px rgba(30, 19, 12, 0.28);
}

.lantern-frame::before,
.lantern-frame::after {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: rgba(122, 82, 52, 0.72);
}

.lantern-frame::before {
  left: 9px;
}

.lantern-frame::after {
  right: 9px;
}

.lantern-flame {
  position: absolute;
  left: 50%;
  top: 29px;
  width: 12px;
  height: 20px;
  transform: translateX(-50%) rotate(var(--lantern-sway));
  border-radius: 50% 50% 52% 52%;
  background: radial-gradient(circle at 50% 72%, rgba(255, 245, 218, 0.98) 0 16%, rgba(255, 207, 117, 0.96) 45%, rgba(205, 120, 43, 0.85) 78%, rgba(128, 69, 23, 0.42) 100%);
  filter: blur(0.18px);
  animation: lanternFlicker var(--lantern-flicker-speed) ease-in-out infinite;
}

.lantern-glow {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 88px;
  height: 88px;
  transform: translate(-50%, 0) scale(var(--lantern-glow-scale));
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 195, 121, 0.34) 0%, rgba(207, 136, 67, 0.16) 46%, rgba(118, 71, 34, 0.08) 66%, transparent 76%);
  filter: blur(1.2px);
}

@keyframes lanternFlicker {
  0%,
  100% {
    transform: translateX(-50%) rotate(calc(var(--lantern-sway) * 0.8)) scale(0.96);
    opacity: 0.9;
  }
  35% {
    transform: translateX(-50%) rotate(calc(var(--lantern-sway) * 1.1 + 1deg)) scale(1.07);
    opacity: 1;
  }
  70% {
    transform: translateX(-50%) rotate(calc(var(--lantern-sway) * 0.9 - 0.8deg)) scale(0.93);
    opacity: 0.86;
  }
}

/* Nav hover indicator */
.nav-underline-indicator {
  position: absolute;
  bottom: -6px;
  height: var(--nav-indicator-height);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(242, 232, 213, 0.5), var(--color-primary), rgba(74, 140, 111, 0.65));
  box-shadow: var(--nav-indicator-glow);
  transition: left 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

@keyframes navSweep {
  0%,
  20% {
    transform: translateX(-130%);
  }
  60% {
    transform: translateX(130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@keyframes navPulse {
  0% {
    transform: perspective(900px) rotateY(var(--nav-tilt-x)) rotateX(var(--nav-tilt-y)) scale(1);
    border-color: rgba(212, 165, 116, 0.26);
  }
  50% {
    transform: perspective(900px) rotateY(var(--nav-tilt-x)) rotateX(var(--nav-tilt-y)) scale(var(--nav-pulse-scale));
    border-color: rgba(242, 232, 213, 0.55);
  }
  100% {
    transform: perspective(900px) rotateY(var(--nav-tilt-x)) rotateX(var(--nav-tilt-y)) scale(1);
    border-color: rgba(212, 165, 116, 0.26);
  }
}

/* Gameplay media reveal */
.gameplay-media {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.gameplay-media:hover .gameplay-img {
  transform: scale(1.06);
}

.gameplay-media::after {
  content: '▶  Watch Gameplay';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(26, 23, 20, 0.8), transparent);
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.05em;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gameplay-media:hover::after {
  transform: translateY(0);
}

/* Stats bars */
.stat-bars {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
}

.stat-bar-item {
  display: grid;
  grid-template-columns: minmax(100px, auto) 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--text-light);
}

.stat-label {
  font-weight: 600;
}

.stat-value {
  font-weight: 700;
  color: rgba(242, 232, 213, 0.9);
}

.stat-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.stat-bar-fill.animated {
  width: var(--target-width);
}

/* Counter style */
.count-up {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-right: 18px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #f0d99a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55), 0 0 18px rgba(184, 115, 51, 0.35);
  letter-spacing: 0.03em;
}

/* Word reveal */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.25em;
}

.word-inner {
  display: inline-block;
  opacity: 0;
}

.split-ready.revealed .word-inner {
  animation: wordReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes wordReveal {
  from {
    transform: translateY(110%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Reveal system */
.will-reveal {
  opacity: 0;
}

.will-reveal.revealed {
  animation: var(--reveal-anim, revealUp) 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-revealUp {
  --reveal-anim: revealUp;
}

.reveal-revealLeft {
  --reveal-anim: revealLeft;
}

.reveal-revealRight {
  --reveal-anim: revealRight;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes revealRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Ripple */
.ripple-wave {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: rippleExpand 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes rippleExpand {
  from {
    transform: scale(0);
    opacity: 0.35;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* Feature icon micro interactions */
.feature-card:nth-child(1):hover .feature-icon img {
  animation: compassSpin 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes compassSpin {
  0% { transform: rotate(0deg) scale(1); }
  40% { transform: rotate(25deg) scale(1.1); }
  70% { transform: rotate(-10deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

.feature-card:nth-child(2):hover .feature-icon img {
  animation: pinBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pinBounce {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-12px) scale(1.15); }
  70% { transform: translateY(3px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}

.feature-card:nth-child(3):hover .feature-icon img {
  animation: swordSlash 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes swordSlash {
  0% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(-20deg) scale(1.12) translateX(-4px); }
  100% { transform: rotate(12deg) scale(1) translateX(0); }
}

/* Entry transition */
body.page-loading {
  overflow: hidden;
}

.page-enter-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 99999;
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-enter-overlay.revealed {
  transform: scaleY(0);
}

/* Split text spacing fallback */
.hero-title.split-ready,
.section-title.split-ready {
  line-height: 1.2;
}

@media (prefers-reduced-motion: reduce) {
  .landing-nav::before,
  .hero-background::before,
  .hero-background::after,
  .hero-depth-layer,
  .cursor-lantern,
  .lantern-flame,
  .ripple-wave,
  .word-inner,
  .will-reveal,
  .feature-icon img,
  .gameplay-img,
  .page-enter-overlay,
  .stat-bar-fill,
  .nav-container,
  .nav-actions .btn::after {
    animation: none !important;
    transition: none !important;
  }

  .will-reveal,
  .word-inner {
    opacity: 1 !important;
    transform: none !important;
  }

  .nav-container {
    transform: none !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .nav-container {
    transform: none;
  }

  .nav-actions .btn::after,
  .nav-underline-indicator {
    display: none;
  }

  .landing-nav::before {
    animation-duration: 11s;
    opacity: 0.36;
  }
}