@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-onyx: #0c0c0e;
  --color-charcoal: #18181c;
  --color-gold: #D4AF37;
  --color-gold-rgb: 212, 175, 55;
  --color-border: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Manrope', sans-serif;
  background-color: var(--color-onyx);
  color: #f3f4f6;
  overflow-x: hidden;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-onyx);
}
::-webkit-scrollbar-thumb {
  background: #2a2a35;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(24, 24, 28, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
}

.glass-panel-hover:hover {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.1);
  transform: translateY(-2px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Text and Underline Animations */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-gold);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-gold);
}

/* Premium Gold Glow button */
.gold-btn {
  background: var(--color-gold);
  color: #000000;
  font-weight: 600;
  transition: all 0.3s ease;
}
.gold-btn:hover {
  background: #c39e2f;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Secondary Gold Border button */
.gold-outline-btn {
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  transition: all 0.3s ease;
}
.gold-outline-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* GPS Path styling */
.active-route-path {
  stroke: var(--color-gold);
  stroke-dasharray: 8;
  animation: routeDash 30s linear infinite;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
}

@keyframes routeDash {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Pulse animation for SOS and active nodes */
.pulse-gold {
  box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

.pulse-red {
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Shimmer overlay for loaders and premium elements */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* =============================================================
   APPLE-STYLE SCROLL ANIMATIONS (JB Transport)
   GPU composited: only opacity + transform animated (60fps)
============================================================= */

/* 1. Smooth scrolling on the HTML root */
html { scroll-behavior: smooth; }

/* 2. Hidden state BEFORE element enters viewport */
[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal='up']    { transform: translateY(42px); }
[data-reveal='down']  { transform: translateY(-30px); }
[data-reveal='left']  { transform: translateX(-42px); }
[data-reveal='right'] { transform: translateX(42px); }
[data-reveal='scale'] { transform: scale(0.92); }
[data-reveal='fade']  { transform: none; }

/* 3. Revealed state - IntersectionObserver adds is-visible */
[data-reveal].is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* 4. Stagger groups - children cascade in sequence */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(32px);
  will-change: opacity, transform;
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal-stagger].is-visible > *:nth-child(1) { opacity:1; transform:none; transition-delay:0.00s; }
[data-reveal-stagger].is-visible > *:nth-child(2) { opacity:1; transform:none; transition-delay:0.12s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { opacity:1; transform:none; transition-delay:0.24s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { opacity:1; transform:none; transition-delay:0.36s; }
[data-reveal-stagger].is-visible > *:nth-child(5) { opacity:1; transform:none; transition-delay:0.48s; }
[data-reveal-stagger].is-visible > *:nth-child(6) { opacity:1; transform:none; transition-delay:0.60s; }

/* 5. Sticky heading for Protocol section */
.sticky-heading { position: sticky; top: 90px; align-self: flex-start; }

/* 6. Parallax image - translateY driven by JS rAF */
.parallax-img { will-change: transform; }

/* 7. Header elevation on scroll */
header.scrolled {
  background: rgba(10, 10, 12, 0.97) !important;
  border-bottom-color: rgba(212, 175, 55, 0.18) !important;
  box-shadow: 0 2px 48px rgba(0, 0, 0, 0.7);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* 8. Reduced-motion safeguard */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

/* 9. Google Maps Places Autocomplete Dark Theme */
.pac-container {
  background-color: #18181c !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
  font-family: 'Manrope', sans-serif !important;
  z-index: 10000 !important;
}
.pac-item {
  background-color: #18181c !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #e5e7eb !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
}
.pac-item:hover {
  background-color: rgba(212, 175, 55, 0.1) !important;
}
.pac-item-selected,
.pac-item-selected:hover {
  background-color: rgba(212, 175, 55, 0.15) !important;
}
.pac-item-query {
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}
.pac-matched {
  color: #D4AF37 !important;
  font-weight: 700 !important;
}
.pac-icon {
  filter: invert(1) brightness(0.7) !important;
}
.pac-logo::after {
  display: none !important;
}
