/* ─── Base & Utilities ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal[data-reveal-state="hidden"] {
  opacity: 0;
  transform: translateY(30px);
}

/* ─── Header Scroll State ─── */
#site-header.scrolled {
  background: rgba(4, 10, 22, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 168, 0, 0.08);
  box-shadow: 0 4px 40px rgba(0,0,0,0.3);
}
#site-header.scrolled .menu-line { background: #fff; }
#site-header.scrolled .menu-line:last-child { background: #e5a800; }

/* ─── Mobile Menu ─── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s 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 fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── 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;
  transform: scaleX(0);
}
#menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 24px;
  margin-right: 0;
}

/* ─── Stat Cards Float ─── */
.stat-card {
  animation: float 6s ease-in-out infinite;
}
.stat-card:nth-child(2) { animation-delay: -2s; animation-duration: 7s; }
.stat-card:nth-child(3) { animation-delay: -4s; animation-duration: 5.5s; }

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

/* ─── Service Card Glow ─── */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e5a800, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.service-card:hover::after {
  opacity: 1;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #040e16; }
::-webkit-scrollbar-thumb { background: #1e5e93; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #e5a800; }

/* ─── Selection ─── */
::selection { background: rgba(229, 168, 0, 0.3); color: #fff; }

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .stat-card { animation: none; }
  html { scroll-behavior: auto; }
  .service-card::after { transition: none; }
}
