/* ==========================================================================
   100 CR — SPATIAL 3D & CAMERA SCROLL ENGINE
   Scroll-Driven 3D Video Scrubbing, Dynamic Camera Angles,
   Holographic Glass HUDs & Mobile-Responsive Viewports
   ========================================================================== */

:root {
  --cr-emerald: #10b981;
  --cr-emerald-glow: rgba(16, 185, 129, 0.45);
  --cr-emerald-dark: #059669;
  --cr-amber: #f59e0b;
  --cr-amber-glow: rgba(245, 158, 11, 0.4);
  --cr-cyan: #06b6d4;
  --cr-stage-bg: #070a12;
  --cr-glass-bg: rgba(11, 15, 25, 0.78);
  --cr-glass-border: rgba(16, 185, 129, 0.22);
  --cr-glass-hover: rgba(16, 185, 129, 0.38);
}

/* ==========================================================================
   1. TIMELINE PROGRESS BAR (BELOW NAVBAR)
   ========================================================================== */
.scrolly-timeline-bar {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 990;
  pointer-events: none;
}

.timeline-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #f59e0b 100%);
  box-shadow: 0 0 12px var(--cr-emerald-glow);
  transition: width 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. 3D VIDEO SCROLL WRAPPER & STICKY STAGE
   ========================================================================== */
.video-scroll-wrapper {
  position: relative;
  width: 100%;
  height: 480vh; /* Deliberate, comfortable multi-scene scroll journey */
  background: var(--cr-stage-bg);
  box-sizing: border-box;
}

.video-sticky-stage {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  perspective: 1300px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  background: var(--cr-stage-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#bgJourneyCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
  filter: contrast(1.05) saturate(1.04) brightness(1.02);
}

/* Cinematic Edge Vignette & Scrim (Deep bottom onyx mask) */
.cinematic-scrim {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at center, transparent 36%, rgba(7, 10, 18, 0.45) 72%, rgba(7, 10, 18, 0.96) 100%),
    linear-gradient(180deg, rgba(7, 10, 18, 0.75) 0%, transparent 14%, transparent 68%, rgba(7, 10, 18, 0.88) 86%, #070a12 100%);
  pointer-events: none;
  z-index: 2;
}

/* Floating 3D Scene Indicator Dots (Desktop & Tablet) */
.spatial-scene-dots {
  position: absolute;
  right: clamp(16px, 2.2vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  z-index: 25;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem 0.6rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.spatial-dot {
  background: transparent;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  outline: none;
}

.spatial-dot .dot-ring {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
}

.spatial-dot:hover .dot-ring {
  background: #34d399;
  transform: scale(1.3);
}

.spatial-dot.active .dot-ring {
  background: #10b981;
  transform: scale(1.4);
  box-shadow: 0 0 14px #10b981, 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.spatial-dot .dot-label {
  position: absolute;
  right: 28px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.spatial-dot:hover .dot-label {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 899px) {
  .spatial-scene-dots {
    display: none !important;
  }
}

/* Scroll Explore Prompt Cue in Scene 1 */
.scroll-explore-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.45rem 1rem 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  z-index: 25;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.scroll-explore-cue.is-hidden {
  opacity: 0;
  transform: translate(-50%, 15px);
}

.mouse-icon {
  width: 14px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  position: relative;
  display: flex;
  justify-content: center;
}

.mouse-wheel {
  width: 2px;
  height: 5px;
  background: #34d399;
  border-radius: 1px;
  margin-top: 3px;
  animation: mouseWheelBob 1.6s ease-in-out infinite;
}

@keyframes mouseWheelBob {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(7px); opacity: 0; }
}


/* ==========================================================================
   3. HOLOGRAPHIC OVERLAY SCENES (SCROLLED WITH VIDEO)
   ========================================================================== */
.video-overlay-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: clamp(16px, 4vw, 48px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.video-overlay-layer.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   SCENE 1: HERO DUAL-PLATFORM INTRO (Login Screen Milestone)
   -------------------------------------------------------------------------- */
#vScene1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
}

.hero-cluster {
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 5;
}

.hero-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #34d399;
  backdrop-filter: blur(12px);
  width: fit-content;
}

.pulse-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseBeacon 2s infinite ease-in-out;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero-gradient-title {
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-gradient-title .text-emerald-glow {
  background: linear-gradient(135deg, #a7f3d0 0%, #34d399 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(16, 185, 129, 0.4));
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-actions-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-emerald-glow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1.75rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-emerald-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.55);
}

.btn-glass-stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.9rem 1.5rem;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9 !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.btn-glass-stage:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.scroll-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
}

.scroll-indicator-pill svg {
  animation: bounceDown 1.8s infinite ease-in-out;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* Scene 1 Right Glass HUD */
.hero-hud-card {
  width: clamp(280px, 24vw, 360px);
  background: var(--cr-glass-bg);
  border: 1px solid var(--cr-glass-border);
  border-top: 1.5px solid rgba(52, 211, 153, 0.5);
  border-radius: 1.25rem;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.hud-chip-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hud-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
  text-decoration: none;
  color: #f1f5f9;
}

.hud-chip:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateX(4px);
}

.hud-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  flex-shrink: 0;
}

.hud-chip-info strong {
  display: block;
  font-size: 0.9rem;
  color: #ffffff;
}

.hud-chip-info span {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   SCENES 2, 3, 4: PANORAMIC SECTOR STAGES (Retail, IT Office, GPS Attendance)
   -------------------------------------------------------------------------- */
.scenic-dock-stage {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.scenic-dock-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scenic-dock-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow-amber {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.eyebrow-cyan {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
}

.eyebrow-emerald {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.scenic-dock-title {
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
}

.scenic-dock-pillbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
}

.scenic-dock-chip {
  flex: 1 1 240px;
  max-width: 320px;
  background: var(--cr-glass-bg);
  border: 1px solid var(--cr-glass-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scenic-dock-chip:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.2);
}

.scenic-dock-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scenic-dock-info .label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.scenic-dock-info .desc {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   SCENE 5: FINALE DUAL-WING COMMAND STAGE (Download & Demo)
   -------------------------------------------------------------------------- */
#vScene5 {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.split-wing-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2rem;
}

.wing-card {
  flex: 1 1 360px;
  max-width: 420px;
  background: var(--cr-glass-bg);
  border: 1px solid var(--cr-glass-border);
  border-radius: 1.5rem;
  padding: 2rem;
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(16, 185, 129, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wing-spacer-clear {
  flex: 1 1 200px;
  min-width: 100px;
  pointer-events: none;
}

.wing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #34d399;
}

.wing-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.wing-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.6;
}

.store-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.store-link-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.store-link-pill:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

/* Scene 5 Mobile Switcher Tabs */
.scene5-mobile-tabs {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
  width: 100%;
}

.scene5-tab-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.scene5-tab-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

/* ==========================================================================
   4. INTERACTIVE 3D HOLOGRAPHIC TILT (Awwwards Style)
   ========================================================================== */
.tilt-card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  will-change: transform, box-shadow;
  transition: transform 0.15s ease-out, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tilt-card-3d::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle 350px at var(--mouse-x, 50%) var(--mouse-y, 50%),
              rgba(16, 185, 129, 0.35) 0%,
              rgba(245, 158, 11, 0.12) 40%,
              transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
  z-index: 5;
}

.tilt-card-3d:hover::after {
  opacity: 1;
}

/* ==========================================================================
   5. MOBILE RESPONSIVENESS (< 900px and < 640px)
   ========================================================================== */
@media (max-width: 899px) {
  .video-scroll-wrapper {
    height: 380vh; /* slightly shorter scroll for mobile thumbs */
  }

  .video-sticky-stage {
    perspective: 900px !important;
  }

  /* Scene 1 Mobile Layout */
  #vScene1 {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    padding-top: 80px;
  }

  .hero-cluster {
    align-items: center;
    max-width: 100%;
  }

  .hero-gradient-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-actions-row {
    justify-content: center;
  }

  .hero-hud-card {
    display: none; /* keep center phone visible on mobile */
  }

  /* Scenes 2, 3, 4 Mobile Layout */
  .scenic-dock-stage {
    gap: 1rem;
    padding: 0 10px;
  }

  .scenic-dock-title {
    font-size: 1.5rem;
  }

  .scenic-dock-pillbox {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .scenic-dock-chip {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 1rem;
  }

  /* Scene 5 Split Wing Mobile Switcher */
  .scene5-mobile-tabs {
    display: flex;
  }

  .split-wing-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .wing-spacer-clear {
    display: none;
  }

  .wing-card {
    display: none;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
  }

  .wing-card.mobile-tab-active {
    display: flex;
  }

  .tilt-card-3d {
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .video-overlay-layer {
    padding: 12px;
  }

  .hero-gradient-title {
    font-size: 1.75rem;
  }

  .btn-emerald-glow,
  .btn-glass-stage {
    width: 100%;
    justify-content: center;
  }
}
