:root {
  --bg-color: #030a05;
  --text-main: #f0f0f0;
  --accent: #d4af37;
  --forest: #0a2510;
  --fire-red: #cc0000;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  overscroll-behavior: none;
}

h1, h2, h3, .loader-text, .hero-title, .gigantic-text, .tracking-title {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
}

/* Loader */
.loader {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: var(--bg-color);
  z-index: 9999;
  display: flex; justify-content: center; align-items: center;
}

.loader-text {
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--accent);
  letter-spacing: 12px;
}

/* Base text classes */
.huge-text {
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 1;
  margin-bottom: 2rem;
}

.outline-display {
  color: transparent;
  -webkit-text-stroke: 2px white;
}

.panel-desc {
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.8;
  font-weight: 300;
}

/* Hero Section */
.hero-section {
  position: relative; width: 100vw; height: 100vh;
  display: flex; justify-content: center; align-items: center;
  overflow: hidden;
}

.hero-text-container {
  position: absolute; z-index: 3;
  text-align: center; pointer-events: none;
}

.hero-title {
  font-size: clamp(3rem, 15vw, 12rem);
  line-height: 0.9;
  color: var(--text-main);
  mix-blend-mode: overlay; 
  font-weight: 900;
}

.hero-subtitle {
  font-size: clamp(0.8rem, 3vw, 2.5rem);
  letter-spacing: 10px;
  color: var(--accent);
  margin-top: 1rem;
}

/* 3D Hero Effect multi-image */
.hero-3d-wrapper {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60vmin; height: 80vmin;
  perspective: 1500px; z-index: 2;
}

.hero-3d-card {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out; 
  border-radius: 20px;
  box-shadow: 0 50px 100px rgba(0,0,0,0.8);
  position: relative;
}

.hero-3d-img {
  position: absolute; top: 0; left: 0;
  width: 110%; height: 110%;
  object-fit: cover;
  transform: translateZ(-50px) scale(1.1); /* Inner depth */
}

/* Hide images initially for crossfade logic */
#hero-img-1 { z-index: 3; opacity: 1; }
#hero-img-2 { z-index: 2; opacity: 1; }
#hero-img-3 { z-index: 1; opacity: 1; }

.scroll-down {
  position: absolute; bottom: 5%;
  font-family: 'Montserrat';
  text-transform: uppercase;
  letter-spacing: 4px; font-size: 0.8rem;
  z-index: 4;
}

/* Vertical Panels */
.vertical-panel {
  position: relative; width: 100vw; height: 100vh;
  display: flex; align-items: center;
  overflow: hidden; padding: 0 10vw;
}

.v-panel-bg-wrapper {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1; overflow: hidden;
}

.v-panel-bg {
  width: 100%; height: 130%; 
  object-fit: cover; opacity: 0.6;
}

.v-panel-content {
  position: relative; z-index: 2; max-width: 600px;
}

.right-align {
  margin-left: auto; text-align: right;
}

.munnar-panel { background: #0b1a0f; }
.backwaters-panel { background: #1a1006; }

/* Parallax Section */
.parallax-section {
  position: relative; width: 100vw; padding: 15vh 5vw;
  display: flex; align-items: center; justify-content: space-around;
  background-color: #010603; gap: 2rem;
}

.parallax-image-container {
  width: 40vw; height: 70vh;
  overflow: hidden; border-radius: 8px;
}

.parallax-img {
  width: 100%; height: 140%; object-fit: cover;
}

.parallax-content {
  width: 40vw; padding: 2rem;
}

.split-text {
  font-size: clamp(3rem, 6vw, 6rem);
  color: var(--accent); margin-bottom: 2rem;
}

/* Wildlife Section */
.wildlife-section {
  position: relative; width: 100vw; height: 120vh;
  background: var(--bg-color);
  display: flex; align-items: center; overflow: hidden;
}

.wildlife-bg-wrapper {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; z-index: 1;
}

.wildlife-img {
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.6;
}

.wildlife-text {
  position: relative; z-index: 2;
  margin-left: 10vw; max-width: 600px;
}

/* Cuisine Section */
.cuisine-section {
  position: relative; width: 100vw; padding: 15vh 10vw;
  background: #1c1510;
  display: flex; align-items: center; justify-content: space-between; gap: 5vw;
}

.cuisine-content { flex: 1; max-width: 500px; }
.cuisine-image-container {
  flex: 1.5; height: 70vh; border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8);
}
.cuisine-img { width: 100%; height: 100%; object-fit: cover; }

/* PREMIUM PARALLAX REVEAL (Boat Race) */
.premium-parallax {
  position: relative; width: 100vw; min-height: 120vh; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000;
}

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

.pp-img {
  width: 100%; height: 140%; /* Space for parallax movement */
  object-fit: cover; opacity: 0.85; filter: blur(5px); transform: scale(1.1);
}

.pp-text-wrapper {
  position: relative; z-index: 2; text-align: center; max-width: 900px; padding: 2rem;
}

/* Theyyam Section */
.theyyam-section {
  position: relative; width: 100vw; height: 100vh;
  display: flex; justify-content: center; align-items: center;
  background: #000; overflow: hidden;
}

.theyyam-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; opacity: 0.8;
}

.theyyam-overlay {
  position: absolute; bottom: 0; width: 100%; height: 60vh;
  background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(204,0,0,0.4) 50%, transparent 100%); z-index: 2;
}

.theyyam-content {
  position: relative; z-index: 3; text-align: center; margin-top: 20vh; padding: 0 20px;
}

.gigantic-text {
  font-size: clamp(3rem, 15vw, 12rem);
  line-height: 0.9; color: var(--fire-red);
  text-shadow: 0 20px 50px rgba(0,0,0,0.9);
}

.footer {
  width: 100vw; height: 30vh; display: flex; justify-content: center; align-items: center;
  background-color: #000; text-align: center; position: relative; z-index: 10;
}

.footer h2 {
  font-size: clamp(1.5rem, 4vw, 3rem); color: var(--accent); letter-spacing: 12px;
}

/* =========================================
   MOBILE OPTIMIZATION
   ========================================= */
@media (max-width: 768px) {
  /* Prevent horizontal overflow strictly */
  body, html { max-width: 100vw; overflow-x: hidden; }

  .hero-3d-wrapper { width: 90vmin; height: 110vmin; }
  .hero-subtitle { letter-spacing: 4px; font-size: 1rem; }
  .hero-title { font-size: 4rem; }
  
  .gigantic-text { font-size: 5rem; }
  .huge-text, .split-text, .tracking-title { font-size: 3rem; }

  .v-panel-content {
    max-width: 100%; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px); padding: 1.5rem; border-radius: 12px;
  }
  .right-align { text-align: left; }

  /* Parallax Section Flex to Column */
  .parallax-section {
    flex-direction: column; padding: 10vh 5vw; text-align: center;
  }
  .parallax-image-container { width: 90vw; height: 50vh; margin-bottom: 2rem;}
  .parallax-content { width: 90vw; padding: 0;}

  /* Cuisine Section Flex to Column */
  .cuisine-section {
    flex-direction: column-reverse; padding: 10vh 5vw; text-align: center;
  }
  .cuisine-image-container { width: 100%; height: 40vh; margin-bottom: 2rem;}
  .cuisine-content { max-width: 100%; }

  .wildlife-text { margin-left: 5vw; margin-right: 5vw; }
}
