/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; }
img, video { max-width: 100%; height: auto; display: block; }

/* ── Scroll Reveal (progressive enhancement) ────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal:nth-child(2) { transition-delay: 0.08s; }
  .reveal:nth-child(3) { transition-delay: 0.16s; }
  .reveal:nth-child(4) { transition-delay: 0.24s; }
}

/* ── Navbar ─────────────────────────────────────── */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(15, 26, 46, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Mobile Menu ────────────────────────────────── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu.open .mobile-link {
  animation: fadeDown 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* ── Mobile hamburger animation ─────────────────── */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Selection ──────────────────────────────────── */
::selection {
  background: rgba(230, 85, 34, 0.2);
  color: inherit;
}

/* ── Smooth focus outlines ──────────────────────── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #e65522;
  outline-offset: 3px;
  border-radius: 4px;
}
