/* ── Base & Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(52, 211, 153, 0.3);
  color: #fff;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
  background: rgba(6, 15, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #060F1C;
}

::-webkit-scrollbar-thumb {
  background: #132240;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #34D399;
}

/* ── Map filter override for light mode ── */
.map-light iframe {
  filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1) !important;
}

/* ── Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* ── Mobile menu transitions ── */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Focus styles for accessibility ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #34D399;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Print styles ── */
@media print {
  nav, #mobile-menu, .reveal { display: none !important; }
  body { background: white; color: black; }
  section { padding: 20px 0; }
}
