/* ==========================================================================
   DIGESTEP — ANIMATIONS & 3D MOTION SYSTEM
   GSAP Transitions, Pinned Horizon, 3D Tilt & Interactive Hero Moments
   ========================================================================== */

/* ==========================================================================
   Preloader Opening Sequence
   ========================================================================== */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050811;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.6s ease;
  pointer-events: all;
}

.preloader.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.preloader-emblem {
  position: relative;
  width: 90px;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 30px var(--brand-lime-glow));
}

.preloader-spinner-ring {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1.5px solid rgba(141, 198, 63, 0.15);
  border-top-color: var(--brand-lime);
  animation: preloader-spin 1.2s infinite linear;
}

@keyframes preloader-spin {
  to { transform: rotate(360deg); }
}

.preloader-status {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand-lime);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.preloader-bar-wrap {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-lime), var(--accent-cyan));
  box-shadow: 0 0 10px var(--brand-lime);
  transition: width 0.3s ease;
}

/* ==========================================================================
   Hero 3D Stage & Bottle Choreography
   ========================================================================== */

.hero-visual-stage {
  position: relative;
  width: 100%;
  height: clamp(380px, 60vh, 650px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.hero-bottle-3d-wrap {
  position: relative;
  width: auto;
  height: 90%;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bottle-image {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 80px rgba(141, 198, 63, 0.25));
  animation: bottle-float 6s infinite ease-in-out;
  will-change: transform;
}

@keyframes bottle-float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(1.5deg);
  }
}

/* Atmospheric Glowing Bio-Ring Behind Bottle */
.hero-bio-halo {
  position: absolute;
  width: clamp(280px, 45vw, 520px);
  height: clamp(280px, 45vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141, 198, 63, 0.2) 0%, rgba(11, 22, 44, 0.4) 50%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: halo-pulse 8s infinite alternate ease-in-out;
}

@keyframes halo-pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0.95; }
}

/* Floating Nano-Indicators around Hero Bottle */
.bottle-spec-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 22, 44, 0.85);
  border: 1px solid var(--border-lime);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-pure);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}

.bottle-spec-tag.tag-top-left {
  top: 15%;
  left: 5%;
  animation: tag-float-1 5s infinite ease-in-out;
}

.bottle-spec-tag.tag-bottom-right {
  bottom: 20%;
  right: 5%;
  animation: tag-float-2 6s infinite ease-in-out;
}

@keyframes tag-float-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-5px, -8px); }
}

@keyframes tag-float-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, 8px); }
}

/* ==========================================================================
   Scrubbed Manifesto Text Reveal
   ========================================================================== */

.scrub-text-container {
  max-width: 1100px;
  margin: 0 auto;
}

.scrub-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.scrub-word {
  display: inline-block;
  color: rgba(255, 255, 255, 0.15);
  transition: color 0.3s ease;
  will-change: color;
}

.scrub-word.is-active {
  color: #FFFFFF;
}

.scrub-word.is-accent {
  color: var(--brand-lime) !important;
  text-shadow: 0 0 20px rgba(141, 198, 63, 0.4);
}

/* ==========================================================================
   Horizontal Pinned Digestive Odyssey Track
   ========================================================================== */

.horizontal-section-pin {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.horizontal-track {
  display: flex;
  width: fit-content;
  will-change: transform;
}

.horizontal-slide {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 6rem);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.slide-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  max-width: var(--site-max-w);
  height: 100%;
}

@media (min-width: 992px) {
  .slide-content-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
  }
}

.slide-image-stage {
  position: relative;
  height: 100%;
  max-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-bottle-hero {
  max-height: 520px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 70px rgba(141, 198, 63, 0.2));
  transition: transform 0.5s var(--ease-out-expo);
}

.slide-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.slide-product-num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--brand-lime);
  letter-spacing: 0.15em;
}

.slide-product-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  color: var(--text-pure);
}

.slide-product-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-cyan);
}

.slide-product-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Cinematic Split-Screen 3D Anatomy Stage
   ========================================================================== */

.anatomy-stage-pin {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at center, rgba(11, 22, 44, 0.8) 0%, #050811 80%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.anatomy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}

@media (min-width: 992px) {
  .anatomy-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

.anatomy-visual-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(380px, 55vh, 580px);
}

.anatomy-bottle-central {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.85));
  z-index: 2;
  transition: transform 0.4s var(--ease-out-expo);
}

.anatomy-layers-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.anatomy-step-card {
  background: rgba(12, 20, 38, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.anatomy-step-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background-color: var(--brand-lime);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.anatomy-step-card.is-active {
  background: rgba(11, 22, 44, 0.85);
  border-color: var(--border-lime);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateX(10px);
}

.anatomy-step-card.is-active::before {
  transform: scaleY(1);
}

.anatomy-step-card:hover:not(.is-active) {
  background: rgba(12, 20, 38, 0.7);
  border-color: var(--border-medium);
}

.step-card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-lime);
  margin-bottom: 0.25rem;
}

.step-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 0.5rem;
}

.step-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Responsive & Accessibility Adjustments
   ========================================================================== */

@media (max-width: 768px) {
  .horizontal-track {
    flex-direction: column;
    width: 100% !important;
    transform: none !important;
  }

  .horizontal-slide {
    width: 100%;
    height: auto;
    min-height: 90vh;
    padding: 4rem 1.5rem;
  }

  .slide-bottle-hero {
    max-height: 380px;
  }

  .bottle-spec-tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bottle-image {
    animation: none;
  }
}
