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

:root {
  /* Warm fantasy palette */
  --gold: #d4a853;
  --gold-light: #f0d58c;
  --gold-dark: #b8860b;
  --parchment: #faf3e0;
  --parchment-dark: #e8dcc8;
  --brown: #5c3d2e;
  --brown-light: #8b6b4a;
  --brown-dark: #3a2318;
  --forest: #2d5016;
  --forest-light: #4a7c28;
  --sky: #87ceeb;
  --flame: #e85d26;
  --flame-glow: #ff9a3c;
  --night: #0f1b2d;
  --night-light: #1a2d4a;
  --gargoyle-yellow: #d4c24a;
  --text: #2c1810;
  --text-light: #6b5344;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: "Cinzel", var(--font-display);

  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 8rem);
  --container: min(1200px, 90vw);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--parchment);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--brown-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ===== LOADING SCREEN ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--brown-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.8s var(--ease-out-expo),
    visibility 0.8s;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-sword {
  width: 4px;
  height: 60px;
  background: var(--gold);
  border-radius: 2px;
  position: relative;
  animation: swordPulse 1.2s ease-in-out infinite;
}
.loader-sword::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--gold-light);
  border-radius: 50%;
}
.loader-sword::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
}
.loader-text {
  color: var(--gold);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 2rem;
  opacity: 0.7;
}

@keyframes swordPulse {
  0%,
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
  50% {
    transform: scaleY(1.3);
    opacity: 0.6;
  }
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s var(--ease-out-expo);
}
.nav.scrolled {
  background: rgba(58, 35, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.nav-logo {
  font-family: var(--font-accent);
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(212, 168, 83, 0.3);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out-expo);
}
.nav-links a:hover {
  color: var(--gold);
}
.nav-links a:hover::after {
  width: 100%;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: all 0.3s;
  display: block;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(58, 35, 24, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out-expo);
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1.2rem;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--brown-dark) 0%,
    var(--night) 50%,
    var(--forest) 100%
  );
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(212, 168, 83, 0.15) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 30%,
      rgba(45, 80, 22, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 90%,
      rgba(232, 93, 38, 0.1) 0%,
      transparent 40%
    );
}
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s infinite;
}
.particle:nth-child(odd) {
  background: var(--gold-light);
  width: 3px;
  height: 3px;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(1);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.5rem 1.5rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s 0.5s var(--ease-out-expo) forwards;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 6rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1.2s 0.8s var(--ease-out-expo) forwards;
}
.hero-title .accent {
  color: var(--gold);
  display: block;
  font-style: italic;
  text-shadow: 0 0 40px rgba(212, 168, 83, 0.4);
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s 1.2s var(--ease-out-expo) forwards;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--gold);
  color: var(--brown-dark);
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s 1.5s var(--ease-out-expo) forwards;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.hero-cta:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 40px rgba(212, 168, 83, 0.4);
}
.hero-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.hero-cta:hover::before {
  transform: translateX(100%);
}
.hero-cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}
.hero-cta:hover svg {
  transform: translateX(4px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeInUp 1s 2s var(--ease-out-expo) forwards;
}
.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.5);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SECTION COMMONS ===== */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}
.container {
  width: var(--container);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-label {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--brown-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1.5rem auto 0;
  border-radius: 2px;
}
.section-desc {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 1.5rem auto 0;
  line-height: 1.8;
}

/* ===== STORY INTRO ===== */
.story-intro {
  background: var(--white);
  position: relative;
}
.story-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, var(--brown-dark), transparent);
  pointer-events: none;
}
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.story-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}
.story-image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 6s var(--ease-out-expo);
}
.story-image:hover img {
  transform: scale(1.05);
}
.story-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  border-radius: 20px;
  opacity: 0.3;
  pointer-events: none;
}
.story-text {
  padding: 2rem 0;
}
.story-quote {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.8;
  color: var(--brown);
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--gold);
}
.story-quote::before {
  content: "\201E";
  font-size: 4rem;
  color: var(--gold);
  position: absolute;
  top: -1.5rem;
  left: 0.5rem;
  font-family: var(--font-display);
  line-height: 1;
  opacity: 0.3;
}
.story-author {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

@media (max-width: 768px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ===== CHARACTERS ===== */
.characters {
  background: linear-gradient(
    180deg,
    var(--parchment) 0%,
    var(--parchment-dark) 100%
  );
  position: relative;
  overflow: hidden;
}
.characters::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.1), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.char-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo);
  cursor: pointer;
  group: char;
}
.char-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.char-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.char-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}
.char-card:hover .char-card-image img {
  transform: scale(1.08);
}
.char-card-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(58, 35, 24, 0.9), transparent);
  pointer-events: none;
}
.char-card-label {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  z-index: 2;
  color: var(--white);
}
.char-card-label h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.char-card-label .char-role {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}
.char-card-body {
  padding: 1.5rem;
}
.char-card-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.char-card-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  background: rgba(212, 168, 83, 0.1);
  border-radius: 100px;
}

/* ===== FEATURED CHARACTER (Teo large card) ===== */
.char-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--brown-dark);
  margin-bottom: 3rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}
.char-featured-image {
  position: relative;
  overflow: hidden;
  min-height: 500px;
}
.char-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s var(--ease-out-expo);
}
.char-featured:hover .char-featured-image img {
  transform: scale(1.05);
}
.char-featured-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
}
.char-featured-content .char-role {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.char-featured-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.char-featured-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}
.char-featured-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.trait {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 1rem;
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 100px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .char-featured {
    grid-template-columns: 1fr;
  }
  .char-featured-image {
    min-height: 300px;
  }
  .char-featured-content {
    padding: 2rem;
  }
}

/* ===== SCENES / GALLERY ===== */
.scenes {
  background: var(--night);
  color: var(--white);
  overflow: hidden;
}
.scenes .section-label {
  color: var(--gold);
}
.scenes .section-title {
  color: var(--white);
}
.scenes .section-desc {
  color: rgba(255, 255, 255, 0.6);
}

.scene-timeline {
  position: relative;
  padding: 2rem 0;
}
.scene-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--gold),
    var(--gold),
    transparent
  );
  transform: translateX(-50%);
}

.scene-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 6rem;
  position: relative;
  align-items: center;
}
.scene-item:nth-child(even) {
  direction: rtl;
}
.scene-item:nth-child(even) > * {
  direction: ltr;
}
.scene-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: var(--gold);
  border: 3px solid var(--night);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 20px rgba(212, 168, 83, 0.5);
}

.scene-image {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.scene-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}
.scene-image:hover img {
  transform: scale(1.05);
}
.scene-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 16px;
  z-index: 1;
  pointer-events: none;
}

.scene-content {
  padding: 1rem;
}
.scene-number {
  font-family: var(--font-accent);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}
.scene-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}
.scene-content p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
}

@media (max-width: 900px) {
  .scene-timeline::before {
    display: none;
  }
  .scene-item::before {
    display: none;
  }
  .scene-item,
  .scene-item:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    direction: ltr;
    margin-bottom: 4rem;
  }
}

/* ===== CHAPTER EXCERPT ===== */
.excerpt {
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.excerpt::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(212, 168, 83, 0.08),
    transparent 70%
  );
  pointer-events: none;
}
.excerpt-content {
  max-width: 750px;
  margin: 0 auto;
  position: relative;
}
.excerpt-text {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 2;
  color: var(--brown);
  text-align: justify;
  hyphens: auto;
  position: relative;
}
.excerpt-text p {
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s var(--ease-out-expo);
}
.excerpt-text p.visible {
  opacity: 1;
  transform: translateY(0);
}
.excerpt-text .dialog {
  color: var(--brown-light);
  font-style: italic;
}
.excerpt-chapter-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.excerpt-chapter-label .line {
  width: 40px;
  height: 2px;
  background: var(--gold);
}
.excerpt-chapter-label span {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
}
.excerpt-drop-cap::first-letter {
  font-family: var(--font-display);
  font-size: 4em;
  float: left;
  line-height: 0.85;
  margin-right: 0.1em;
  margin-top: 0.05em;
  color: var(--gold-dark);
  font-weight: 700;
}

/* ===== QUESTIONS / MYSTERY ===== */
.mystery {
  background: linear-gradient(
    180deg,
    var(--parchment-dark) 0%,
    var(--brown-dark) 100%
  );
  text-align: center;
  overflow: hidden;
}
.mystery .section-title {
  color: var(--white);
}
.mystery .section-label {
  color: var(--gold);
}
.mystery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.mystery-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  transition: all 0.4s var(--ease-out-expo);
  backdrop-filter: blur(10px);
}
.mystery-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 168, 83, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}
.mystery-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
.mystery-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}
.mystery-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--brown-dark);
  padding: 3rem 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}
.footer-logo {
  font-family: var(--font-accent);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}
.footer a {
  color: var(--gold);
  transition: opacity 0.3s;
}
.footer a:hover {
  opacity: 0.7;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 {
  transition-delay: 0.1s;
}
.stagger-2 {
  transition-delay: 0.2s;
}
.stagger-3 {
  transition-delay: 0.3s;
}
.stagger-4 {
  transition-delay: 0.4s;
}
.stagger-5 {
  transition-delay: 0.5s;
}
.stagger-6 {
  transition-delay: 0.6s;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out-expo);
  cursor: pointer;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.4s var(--ease-out-expo);
}
.lightbox.active img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== AMBIENT FX ===== */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 20s ease-in-out infinite;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(30px, -40px);
  }
  50% {
    transform: translate(-20px, 20px);
  }
  75% {
    transform: translate(40px, 30px);
  }
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 480px) {
  :root {
    --section-pad: 3rem;
  }
  .char-grid {
    grid-template-columns: 1fr;
  }
  .mystery-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== JOURNEY MAP ===== */
.journey {
  background: var(--night);
  color: var(--white);
  overflow: hidden;
}
.journey .section-label {
  color: var(--gold);
}
.journey .section-title {
  color: var(--white);
}
.journey .section-desc {
  color: rgba(255, 255, 255, 0.6);
}
.journey-map {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.journey-svg {
  width: 100%;
  height: auto;
}
.journey-path {
  transition: stroke-dashoffset 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.journey-path.animate {
  stroke-dashoffset: 0 !important;
}
.journey-marker {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out-expo);
}
.journey-marker.visible {
  opacity: 1;
}
.journey-marker circle:first-child {
  animation: markerPulse 2s ease-in-out infinite;
}
@keyframes markerPulse {
  0%,
  100% {
    r: 12;
    opacity: 0.3;
  }
  50% {
    r: 18;
    opacity: 0.1;
  }
}
.journey-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(212, 168, 83, 0.15);
}
.journey-stat {
  text-align: center;
}
.journey-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
}
.journey-stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== MEMORY GAME ===== */
.memory-game-section {
  background: linear-gradient(
    180deg,
    var(--parchment-dark) 0%,
    var(--parchment) 100%
  );
}
.memory-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.memory-stat {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  color: var(--brown);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.memory-stat-icon {
  font-size: 1.2rem;
}
.memory-stat span:last-child {
  font-weight: 700;
  color: var(--gold-dark);
  min-width: 2ch;
}
.memory-reset {
  background: var(--brown-dark);
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
}
.memory-reset:hover {
  background: var(--gold);
  color: var(--brown-dark);
}
.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
  perspective: 1000px;
}
@media (max-width: 600px) {
  .memory-board {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }
}
.memory-card {
  aspect-ratio: 3/4;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out-back);
  border-radius: 12px;
}
.memory-card.flipped {
  transform: rotateY(180deg);
}
.memory-card.matched {
  transform: rotateY(180deg);
  pointer-events: none;
}
.memory-card.matched .memory-card-front {
  box-shadow: 0 0 30px rgba(212, 168, 83, 0.5);
  border-color: var(--gold);
}
.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.memory-card-front {
  transform: rotateY(180deg);
  background: var(--white);
  border: 2px solid var(--parchment-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.memory-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.memory-card-front .memory-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(58, 35, 24, 0.9), transparent);
  padding: 1.5rem 0.5rem 0.5rem;
  text-align: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  font-weight: 700;
}
.memory-card-back {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  gap: 0.5rem;
}
.memory-card-back::before {
  content: "⚔";
  font-size: 2rem;
  opacity: 0.6;
}
.memory-card-back::after {
  content: "?";
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
}
.memory-card.peek {
  animation: cardPeek 0.3s ease-in-out;
}
@keyframes cardPeek {
  0%,
  100% {
    transform: rotateY(180deg) scale(1);
  }
  50% {
    transform: rotateY(180deg) scale(1.05);
  }
}

/* Memory win overlay */
.memory-win {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(58, 35, 24, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--ease-out-expo);
}
.memory-win.active {
  opacity: 1;
  visibility: visible;
}
.memory-win-content {
  text-align: center;
  color: var(--white);
  transform: scale(0.8);
  transition: transform 0.5s var(--ease-out-back);
}
.memory-win.active .memory-win-content {
  transform: scale(1);
}
.memory-win-icon {
  font-size: 5rem;
  display: block;
  margin-bottom: 1rem;
  animation: trophyBounce 1s ease-in-out infinite;
}
@keyframes trophyBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.memory-win h3 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--gold);
}
.memory-win p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}
.memory-win .hero-cta {
  margin-top: 1.5rem;
  opacity: 1;
  transform: none;
  animation: none;
  display: inline-flex;
}

/* ===== MAGIC CURSOR ===== */
.magic-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
}
.magic-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  pointer-events: none;
  z-index: 9998;
  opacity: 1;
  transition: none;
  animation: magicFade 0.8s ease-out forwards;
}
.magic-particle:nth-child(odd) {
  background: var(--gold-light);
  width: 4px;
  height: 4px;
}
.magic-particle:nth-child(3n) {
  background: var(--flame-glow);
  width: 5px;
  height: 5px;
}
@keyframes magicFade {
  0% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(0) translate(var(--dx, 20px), var(--dy, -30px));
  }
}

/* Hide magic cursor on mobile/touch */
@media (hover: none) {
  .magic-cursor,
  .magic-particle {
    display: none !important;
  }
}

/* ===== PRINT ===== */
@media print {
  .nav,
  .hero-particles,
  .loader,
  .lightbox {
    display: none !important;
  }
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
}
