:root {
  --navy-deep: #0B1520;
  --navy: #0F1E2E;
  --navy-mid: #152A3E;
  --navy-light: #1C3450;
  --purple: #8B3A8B;
  --magenta: #A64D9A;
  --blue-accent: #2E6DB4;
  --gradient-start: #A64D9A;
  --gradient-mid: #6B3F9E;
  --gradient-end: #1E5BA6;
  --text-primary: #E8EDF3;
  --text-secondary: #8A9BB5;
  --text-muted: #5A6F8A;
  --white: #F5F5F7;
  --border: rgba(138,155,181,0.12);
}

* { margin:0; padding:0; box-sizing:border-box; }

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--navy-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════ NAV ═══════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}

nav.scrolled {
  background: rgba(11,21,32,0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

nav .nav-logo {
  height: 34px;
  opacity: 0.95;
  transition: opacity 0.3s;
}

nav .nav-logo:hover { opacity: 1; }

/* ═══════ HERO ═══════ */
.hero {
  position: relative;
  min-height: 70vh;
  padding: 10rem 3rem 12rem;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(ellipse, rgba(166,77,154,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
}

.hero-left {
  flex: 1;
  max-width: 620px;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-label::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--magenta);
}

.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
  font-weight: 300;
}

.hero-right {
  flex: 0 0 320px;
  padding-top: 1rem;
}

.hero-subtitle {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-meta-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-meta-item span {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════ VIDEO OVERLAP ═══════ */
.video-section {
  position: relative;
  max-width: 1100px;
  margin: -7rem auto 0;
  padding: 0 3rem;
  z-index: 10;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.05);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.2s ease;
}

.video-wrapper video.fading {
  opacity: 0;
}

.video-wrapper video#welcomeVideo2 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.5s ease;
}

.video-quote {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  padding: 2rem 4rem;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
  opacity: 1;
  transition: opacity 1s ease;
  pointer-events: none;
}

.video-quote.hidden { opacity: 0; }

/* Interactive last-frame */
.interactive-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  z-index: 2;
}

.interactive-frame.active {
  opacity: 1;
  pointer-events: auto;
}

.interactive-frame .frame-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interactive-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.frame-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.frame-hint.hidden {
  opacity: 0;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(166,77,154,0.15) 0%, rgba(30,91,166,0.15) 100%),
    var(--navy);
}

.play-btn {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
}

.play-btn:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
  transform: scale(1.08);
}

.play-btn svg {
  width: 24px; height: 24px;
  fill: var(--white);
  margin-left: 3px;
}

/* ═══════ ROOTS / STATS ═══════ */
.roots-section {
  padding: 8rem 3rem 6rem;
  max-width: 1280px;
  margin: 0 auto;
}

.roots-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
}

.roots-left {
  flex: 1;
  max-width: 580px;
}

.roots-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: 1.25rem;
}

.roots-text {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-primary);
}

.roots-right {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
}

.stat-item {}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--white);
}

.divider {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.divider-line {
  height: 1px;
  background: var(--border);
}

/* ═══════ CAROUSEL ═══════ */
.carousel-section {
  padding: 6rem 0 7rem;
  position: relative;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 3rem 0;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 2.4/1;
  min-height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--navy);
  cursor: pointer;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.slide-overlay canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  padding: 3.5rem 4rem;
  align-items: flex-end;
  justify-content: space-between;
}

.slide-left {
  max-width: 480px;
  background: rgba(11,21,32,0.35);
  backdrop-filter: blur(6px);
  padding: 1.5rem 1.8rem;
  border-radius: 8px;
}

.slide-category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 1rem;
}

.slide-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1rem;
}

.slide-right {
  max-width: 360px;
  text-align: left;
  background: rgba(11,21,32,0.35);
  backdrop-filter: blur(6px);
  padding: 1.5rem 1.8rem;
  border-radius: 8px;
}

.slide-right-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.slide-right-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.learn-more-btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s, border-color 0.4s;
  background: none;
  z-index: 1;
}

.learn-more-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  z-index: -1;
}

.learn-more-btn:hover {
  border-color: transparent;
}

.learn-more-btn:hover::before {
  transform: scaleX(1);
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.carousel-dots {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: var(--white);
  transform: scale(1.1);
}

.carousel-dot:hover:not(.active) {
  background: rgba(255,255,255,0.35);
}

.carousel-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.carousel-progress-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 2px;
  transition: none;
}

.carousel-progress-bar.animating {
  transition: width 24s linear;
  width: 100%;
}

.carousel-hint {
  position: absolute;
  top: -2.5rem;
  left: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.carousel-hint.hidden { opacity: 0; }

.carousel-reset {
  position: absolute;
  top: -2.5rem;
  right: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  padding: 0.3rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s, border-color 0.3s;
}

.carousel-reset:hover {
  color: var(--white);
  border-color: var(--text-secondary);
}

.game-control-hint {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  background: rgba(11,21,32,0.65);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
  display: none;
}

.game-control-hint.visible { display: block; }

/* ═══════ FOOTER ═══════ */
footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 3rem 2.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  height: 22px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.footer-logo:hover { opacity: 0.85; }

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.3s;
  font-weight: 400;
}

.footer-links a:hover { color: var(--text-secondary); }

.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 800px;
  font-weight: 300;
}

.footer-contact a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.3s;
  white-space: nowrap;
}

.footer-contact a:hover { color: var(--magenta); }

/* ═══════ ANIMATIONS ═══════ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .hero { padding: 8rem 1.5rem 10rem; }
  .hero-content { flex-direction: column; gap: 2rem; }
  .hero-right { flex: none; }
  .video-section { padding: 0 1.5rem; margin-top: -5rem; }
  .roots-section { padding: 6rem 1.5rem 4rem; }
  .roots-inner { flex-direction: column; gap: 3rem; }
  .roots-right { gap: 1.5rem 3rem; }
  .carousel-container { padding: 0 1.5rem; }
  .slide-content { flex-direction: column; align-items: flex-start; padding: 2.5rem; gap: 1.5rem; }
  .slide-right { max-width: 100%; }
  footer { padding: 2.5rem 1.5rem 2rem; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 600px) {
  .hero { padding: 7rem 1.25rem 8rem; }
  .hero-title { font-size: 2.2rem; }
  .roots-right { grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
  .stat-value { font-size: 2rem; }
  .carousel-viewport { aspect-ratio: auto; min-height: 500px; }
  .footer-links { gap: 1rem; }
}

/* ═══════ LIGHT THEME (INNER PAGES) ═══════ */
body.theme-light {
  background: #F4F5F7;
  color: #1A1E2A;
}

body.theme-light nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

body.theme-light nav.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

body.theme-light .page-header {
  padding: 9rem 3rem 3.5rem;
  background: #fff;
  border-bottom: 1px solid #E4E6EB;
}

.page-header-inner {
  max-width: 860px;
  margin: 0 auto;
}

body.theme-light .page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  color: #1A1E2A;
  margin-bottom: 0.5rem;
}

body.theme-light .page-header .page-updated {
  font-size: 0.8rem;
  color: #8A8F9E;
  font-weight: 400;
}

/* Content card */
body.theme-light .page-body {
  max-width: 860px;
  margin: -1.5rem auto 4rem;
  padding: 0 3rem;
}

.page-card {
  background: #fff;
  border: 1px solid #E4E6EB;
  border-radius: 12px;
  padding: 3rem 3.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.page-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: #1A1E2A;
  margin: 2.5rem 0 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid #ECEDF0;
}

.page-card h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.page-card p {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #4A4F5E;
  font-weight: 300;
  margin-bottom: 1rem;
}

.page-card ul {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
}

.page-card li {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #4A4F5E;
  font-weight: 300;
  margin-bottom: 0.4rem;
}

.page-card a {
  color: var(--magenta);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s;
}

.page-card a:hover { color: var(--purple); }

/* Light footer */
body.theme-light footer {
  background: #fff;
  border-top: 1px solid #E4E6EB;
}

body.theme-light .footer-links a {
  color: #8A8F9E;
}

body.theme-light .footer-links a:hover { color: #4A4F5E; }

body.theme-light .footer-disclaimer {
  color: #8A8F9E;
}

body.theme-light .footer-contact a {
  color: #4A4F5E;
}

body.theme-light .footer-contact a:hover { color: var(--magenta); }

@media (max-width: 900px) {
  body.theme-light .page-header { padding: 7.5rem 1.5rem 2.5rem; }
  body.theme-light .page-body { padding: 0 1.5rem; margin-bottom: 3rem; }
  .page-card { padding: 2rem 1.75rem; }
}

.stat-value-sm {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.5;
}
