/* style.css &mdash; Premium Styling for Vertigo Narrative Parallax */

:root {
  --font-heading: 'Syncopate', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --color-bg: #030306;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-panel-bg: rgba(5, 5, 10, 0.7);
  --color-glass-border: rgba(255, 255, 255, 0.1);
  --color-accent: #ff3366;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Force body styling for Lenis integration */
html.lenis, html.lenis body {
  height: auto;
}

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

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

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

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

/* Body & Scroll setup */
body {
  width: 100%;
  background-color: var(--color-bg);
  color: #ffffff;
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #030306;
}
::-webkit-scrollbar-thumb {
  background: #1e1b4b;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #312e81;
}

/* Virtual scroll driver height */
.scroll-container {
  height: 500vh;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

/* Background Glow for Desktop */
.desktop-bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 15%, rgba(49, 46, 129, 0.25) 0%, rgba(3, 3, 6, 0.95) 70%),
    radial-gradient(circle at 85% 85%, rgba(88, 28, 135, 0.2) 0%, rgba(3, 3, 6, 0.95) 75%);
  z-index: 2;
  pointer-events: none;
}

/* Desktop Information Panels */
.desktop-panel {
  display: none; /* hidden on mobile */
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  z-index: 30;
  pointer-events: auto;
}

.left-panel {
  left: calc(50% - 460px);
  text-align: left;
}

.right-panel {
  right: calc(50% - 460px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Display desktop panels only on larger screens with width to accommodate them */
@media (min-width: 1280px) {
  .desktop-panel {
    display: block;
  }
}

.panel-inner {
  display: flex;
  flex-direction: column;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.5em;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.divider {
  width: 35px;
  height: 1px;
  background: var(--color-accent);
  margin: 15px 0 25px 0;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  line-height: 1.35;
  margin-bottom: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(156, 163, 175, 0.6);
  font-weight: 300;
  margin-bottom: 35px;
}

/* Navigation inside Left Panel */
.zone-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zone-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 5px 0;
  font-family: var(--font-body);
  outline: none;
}

.zone-item:hover {
  color: rgba(255, 255, 255, 0.8);
}

.zone-item.active {
  color: #ffffff;
  transform: translateX(5px);
}

.zone-num {
  font-size: 0.7rem;
  font-family: var(--font-heading);
  color: var(--color-accent);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.zone-item.active .zone-num {
  opacity: 1;
  text-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
}

.zone-name {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-weight: 400;
}

/* Right Panel Elements */
.control-guide {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 40px;
}

.mouse-icon {
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  position: relative;
  margin-bottom: 12px;
}

.mouse-icon .wheel {
  width: 3px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 1.5px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.6s infinite ease-in-out;
}

@keyframes scrollWheel {
  0% { top: 6px; opacity: 1; }
  60% { top: 18px; opacity: 0; }
  100% { top: 6px; opacity: 0; }
}

.guide-text {
  font-size: 0.75rem;
  color: rgba(156, 163, 175, 0.5);
  text-align: right;
  line-height: 1.5;
  font-weight: 300;
  max-width: 160px;
}

.tech-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.tech-stack span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(156, 163, 175, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.01);
}

/* Phone Frame Mockup Container */
.phone-frame-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: none; /* Let clicks fall through to body */
}

/* Responsive Viewport */
.viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000;
  pointer-events: auto; /* Active triggers */
  box-shadow: none;
  border: none;
  border-radius: 0;
}

/* Mobile Aspect Ratio framing on Desktop screens */
@media (min-width: 768px) {
  .viewport {
    width: 390px;
    height: 844px;
    max-height: 90vh;
    aspect-ratio: 9/16;
    border-radius: 40px;
    border: 12px solid #1a1a24;
    box-shadow: 
      0 25px 65px -15px rgba(0, 0, 0, 0.95),
      inset 0 0 15px rgba(0, 0, 0, 0.9);
  }

  /* Simulate sleek modern phone speaker notch */
  .viewport::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 26px;
    background: #1a1a24;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 150;
    pointer-events: none;
  }
}

@media (min-width: 768px) and (max-height: 900px) {
  .viewport {
    height: 84vh;
    width: auto;
    aspect-ratio: 9/16;
  }
}

/* Zones styling */
.zone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Z-Indexes mapping */
#zone-1 { z-index: 1; }
#zone-2 { z-index: 2; }
#zone-3 { z-index: 3; }
#zone-4 { z-index: 4; }

/* Image layers */
.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  will-change: transform;
}

/* Specific offsets/scaling for natural parallax effect */
.layer-sky { z-index: 10; }
.layer-mountain { z-index: 20; }
.layer-birds { z-index: 30; }
.layer-tree { z-index: 40; }
.petals-container { z-index: 45; }
.layer-deer { z-index: 50; }

.layer-soil { z-index: 10; }
.layer-root { z-index: 20; }

.layer-magma { z-index: 10; }

.layer-star { z-index: 10; }
.layer-earth { 
  z-index: 20; 
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keep Earth perfect circle shape */
}

/* Black Overlay for Zone 3 -> Zone 4 transition */
.black-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 35; /* sits on top of magma zone 3 but behind star/earth zone 4 */
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* Viewport Ambient Gradient Vignette for Text Readability */
.viewport::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(3, 3, 6, 0.85) 0%, rgba(3, 3, 6, 0.4) 50%, rgba(3, 3, 6, 0) 100%);
  z-index: 90; /* sits behind text overlay (z-index 110) but above zones (z-index 1-4) */
  pointer-events: none;
}

/* TYPOGRAPHY OVERLAY CONTAINER */
.text-overlay {
  position: absolute;
  bottom: 10%;
  left: 8%;
  width: 84%;
  z-index: 110;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 180px; /* Keep container fixed so cards stack correctly */
}

/* Text Card Styling - Transparent, Borderless & Premium */
.text-card {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  padding: 0;
  border-radius: 0;
  opacity: 0;
  transform: translateY(25px);
  will-change: transform, opacity;
  box-shadow: none;
}

.zone-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--accent-color, var(--color-accent));
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.zone-desc {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.55;
  color: #f3f4f6;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

/* Viewport Scroll Dot Progress */
.viewport-dots {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 120;
  pointer-events: auto;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}

.dot.active {
  background: #ffffff;
  transform: scale(1.35);
  box-shadow: 
    0 0 0 3px rgba(255, 255, 255, 0.15),
    0 0 12px rgba(255, 255, 255, 0.5);
}

/* Mobile Scroll Prompt */
.scroll-prompt-container {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.prompt-text {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
}

.prompt-arrow {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  position: relative;
  overflow: hidden;
}

.prompt-arrow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: translateY(-100%);
  animation: arrowGlow 2.2s infinite ease-in-out;
}

@keyframes arrowGlow {
  0% { transform: translateY(-100%); }
  70% { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* Particle Container & Petal styling (Bonus Effect) */
.petals-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  pointer-events: none;
  transform-origin: center;
  border-radius: 50% 0% 50% 50%; /* Tear drop shape */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  filter: drop-shadow(0 2px 3px rgba(244, 63, 94, 0.3));
}
