/* ============================================
   STORYBOOK INTERACTIVE — Design System v3
   Premium, playful, perfectly responsive
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --gold: #FFC857;
  --gold-dim: rgba(255, 200, 87, 0.15);
  --coral: #FF6B5C;
  --coral-dim: rgba(255, 107, 92, 0.12);
  --blue: #5B8CFF;
  --blue-dim: rgba(91, 140, 255, 0.12);
  --mint: #69D6B1;
  --mint-dim: rgba(105, 214, 177, 0.12);

  --font-display: 'Nunito', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --nav-height: 64px;
  --section-gap: clamp(80px, 10vh, 140px);
  --container: 1100px;
  --pad: clamp(20px, 4vw, 40px);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t-fast: 0.2s var(--ease);
  --t-normal: 0.35s var(--ease);
  --t-slow: 0.5s var(--ease);
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
  --bg: #FDFCFA;
  --bg-card: #FFFFFF;
  --bg-elevated: #F7F5F2;
  --bg-nav: rgba(253, 252, 250, 0.85);
  --text: #1a1a2e;
  --text-secondary: #5a5a72;
  --text-dim: #9999aa;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  --gradient-hero: linear-gradient(135deg, #FFF8EE 0%, #F0EAFF 50%, #E8F4FD 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(255, 200, 87, 0.08), rgba(91, 140, 255, 0.06));
  --noise-opacity: 0.03;
  --star-color: var(--gold);
  --grid-color: rgba(0, 0, 0, 0.04);
  --canvas-particle: rgba(255, 200, 87, 0.25);
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
  --bg: #0c0e18;
  --bg-card: #14172a;
  --bg-elevated: #1a1d32;
  --bg-nav: rgba(12, 14, 24, 0.88);
  --text: #eeeef0;
  --text-secondary: #9999b0;
  --text-dim: #666680;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.3);
  --gradient-hero: linear-gradient(135deg, #0c0e18 0%, #121530 50%, #0e1225 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(255, 200, 87, 0.05), rgba(91, 140, 255, 0.04));
  --noise-opacity: 0.04;
  --star-color: var(--gold);
  --grid-color: rgba(255, 255, 255, 0.03);
  --canvas-particle: rgba(255, 200, 87, 0.15);
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.5s, color 0.5s;
}

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

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

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

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--gold);
  color: #1a1a2e;
}

/* Custom scrollbar (webkit) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

/* ---------- Lenis ---------- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ---------- Background Layers ---------- */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
}

.stars-container,
.aesthetic-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  opacity: 0;
  color: var(--star-color);
  user-select: none;
}

.star.small {
  font-size: 0.6rem;
}

.star.medium {
  font-size: 0.9rem;
}

.star.large {
  font-size: 1.2rem;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.8);
  }

  50% {
    opacity: 0.6;
    transform: scale(1);
  }
}

.shape {
  position: absolute;
  opacity: 0.5;
  user-select: none;
}

.shape.cross {
  width: 16px;
  height: 16px;
}

.shape.cross::before,
.shape.cross::after {
  content: '';
  position: absolute;
  background: var(--coral-dim);
  border-radius: 1px;
}

.shape.cross::before {
  top: 0;
  bottom: 0;
  left: 6px;
  right: 6px;
}

.shape.cross::after {
  left: 0;
  right: 0;
  top: 6px;
  bottom: 6px;
}

.shape.square {
  width: 14px;
  height: 14px;
  border: 2px solid var(--blue-dim);
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}

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

.text-center p,
.text-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 580px;
  margin-top: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--t-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold);
  color: #1a1a2e;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 200, 87, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 var(--pad);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: all var(--t-normal);
}

.site-header.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color var(--t-fast);
  z-index: 1001;
}

.site-logo:hover {
  color: var(--gold);
}

.site-logo span {
  color: var(--gold);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--t-normal);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--gold);
}

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

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--gold);
  transform: rotate(15deg) scale(1.1);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: var(--r-full);
  transition: all var(--t-normal);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  transition: color var(--t-fast);
}

.mobile-menu a:hover {
  color: var(--gold);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) var(--pad) 60px;
  position: relative;
  text-align: center;
  overflow: hidden;
  background: var(--gradient-hero);
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
}

.hero-greeting {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title .play-text {
  color: var(--coral);
  position: relative;
  display: inline-block;
}

.hero-bio {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 auto 36px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating 3D Objects */
.hero-floaters {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  perspective: 800px;
}

.hero-float-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  will-change: transform;
}

.float-3d-card {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  transition: box-shadow var(--t-normal), border-color var(--t-normal);
  cursor: default;
  pointer-events: auto;
}

.float-3d-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--gold);
}

.float-3d-card.accent-coral {
  border-color: var(--coral-dim);
}

.float-3d-card.accent-coral:hover {
  border-color: var(--coral);
}

.float-3d-card.accent-blue {
  border-color: var(--blue-dim);
}

.float-3d-card.accent-blue:hover {
  border-color: var(--blue);
}

.float-3d-card.accent-mint {
  border-color: var(--mint-dim);
}

.float-3d-card.accent-mint:hover {
  border-color: var(--mint);
}

.float-3d-card.accent-gold {
  border-color: var(--gold-dim);
}

.float-3d-card.accent-gold:hover {
  border-color: var(--gold);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 2;
}


/* Sparkling Text Properties */
.sparkle-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff6969;
  text-transform: Capitalize;
  letter-spacing: 4px;
  /* Ties the glow animation to this class */
  animation: sparkle 1.5s ease-in-out infinite alternate;
}

/* Sparkle Animation Keyframes */
@keyframes sparkle {
  0% {
    text-shadow:
      0 0 4px #0065c3,
      0 0 10px #fff,
      0 0 20px #ffaa00,
      0 0 30px #ff9100,
      0 0 40px #ffde39;
  }

  100% {
    text-shadow:
      0 0 2px #fff,
      0 0 5px #fff,
      0 0 10px #00ffff,
      0 0 15px #00ffff,
      0 0 20px #00ffff;
  }
}

.section-header {
  margin-bottom: 48px;
}

/* ============================================
   GAME CARDS
   ============================================ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 28px;
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--t-normal);
  will-change: transform;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

.game-card-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.window-buttons {
  display: flex;
  gap: 6px;
}

.window-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-btn.close {
  background: #ff5f57;
}

.window-btn.minimize {
  background: #ffbd2e;
}

.window-btn.maximize {
  background: #28ca42;
}

.window-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.game-card-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.game-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.game-card:hover .game-card-image {
  transform: scale(1.06);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t-normal);
}

.game-card:hover .game-card-overlay {
  opacity: 1;
}

.game-card-overlay .btn {
  font-size: 0.85rem;
  padding: 10px 24px;
}

.game-card-content {
  padding: 20px;
}

.game-card-content h3 {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.game-status {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--gold-dim);
  color: var(--gold);
}

.game-status--dev {
  background: var(--coral-dim);
  color: var(--coral);
}

.game-card-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.game-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.game-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-elevated);
  padding: 4px 12px;
  border-radius: var(--r-full);
}

/* ============================================
   MISSION
   ============================================ */
.mission-content {
  max-width: 680px;
  margin: 0 auto;
}

.mission-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.mission-content p:last-child {
  margin-bottom: 0;
}

.mission-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--t-normal);
  will-change: transform;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

.value-card .value-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
}

.value-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   FOUNDER
   ============================================ */
.founder-grid {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 700px;
  margin: 0 auto;
}

.founder-interactive-portrait {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: var(--r-full);
  background: var(--bg-card);
  border: 4px dashed var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all var(--t-normal);
}

.founder-interactive-portrait:hover {
  transform: scale(1.08) rotate(5deg);
  border-color: var(--coral);
  box-shadow: 0 8px 30px var(--gold-dim);
}

.founder-svg {
  width: 88%;
  height: 88%;
}

.founder-skin {
  fill: var(--gold);
}

.founder-inner-ear {
  fill: var(--coral);
}

.founder-snout {
  fill: var(--bg);
}

.founder-nose {
  fill: var(--text);
}

.founder-mouth {
  color: var(--text);
}

.founder-info h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.founder-role {
  color: var(--gold);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.founder-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-wrapper {
  max-width: 560px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--t-fast);
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-dim);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-submit {
  align-self: center;
  width: auto;
  min-width: 200px;
}

.form-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}

.contact-email {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-email a {
  color: var(--gold);
  font-weight: 600;
  transition: color var(--t-fast);
}

.contact-email a:hover {
  color: var(--coral);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.footer-brand span {
  color: var(--gold);
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color var(--t-fast);
}

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

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-book {
  width: 50px;
  height: 60px;
  position: relative;
}

.loader-page {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--gold);
  transform-origin: left center;
  animation: page-flip 1.5s ease-in-out infinite;
}

.loader-page:nth-child(1) {
  animation-delay: 0s;
  opacity: 0.4;
}

.loader-page:nth-child(2) {
  animation-delay: 0.15s;
  opacity: 0.6;
}

.loader-page:nth-child(3) {
  animation-delay: 0.3s;
  opacity: 0.8;
}

@keyframes page-flip {

  0%,
  100% {
    transform: rotateY(0deg);
  }

  50% {
    transform: rotateY(-180deg);
  }
}

.loader-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-text span {
  color: var(--gold);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-float-item {
    transform: scale(0.8);
  }

  .float-3d-card {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 30px);
  }

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

  .hero-bio {
    font-size: 1rem;
  }

  .hero-floaters {
    display: none;
  }

  .game-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
  }

  .mission-values {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 48px auto 0;
  }

  .founder-grid {
    flex-direction: column;
    text-align: center;
    max-width: 420px;
  }

  .footer-links {
    gap: 14px;
  }
}

@media (max-width: 480px) {
  :root {
    --pad: 16px;
    --section-gap: 64px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 260px;
  }

  .founder-interactive-portrait {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.5rem;
  }

  .hero-greeting {
    font-size: 0.75rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .star,
  .shape {
    display: none;
  }

  #heroCanvas {
    display: none;
  }
}