/* ── Base & Utilities ── */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero Animations ── */
.hero-element {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s ease forwards;
}

.hero-element:nth-child(1) { animation-delay: 0.1s; }
.hero-element:nth-child(2) { animation-delay: 0.25s; }
.hero-element:nth-child(3) { animation-delay: 0.4s; }
.hero-element:nth-child(4) { animation-delay: 0.55s; }
.hero-element:nth-child(5) { animation-delay: 0.7s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-orb {
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 { animation-delay: -3s; animation-duration: 10s; }
.orb-3 { animation-delay: -5s; animation-duration: 12s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Scroll Reveal (below-the-fold only) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

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

/* Always-visible fallback when JS is disabled */
.no-js .reveal,
.js-enabled .reveal {
  /* handled by JS */
}

/* ── Service Cards ── */
.service-card {
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  box-shadow: 0 20px 60px -30px rgba(251, 191, 36, 0.1);
}

/* ── Navbar ── */
#navbar.scrolled {
  background: rgba(10, 7, 14, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Mobile Menu ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ── Menu Lines Animation ── */
#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.25rem;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #120e18;
}
::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.5);
}

/* ── Selection ── */
::selection {
  background: rgba(251, 191, 36, 0.3);
  color: #fff;
}

/* ── Focus Styles ── */
:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: 2px;
}
