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

/* ── Nav Scroll State ── */
.nav-scrolled {
  background: rgba(7, 14, 30, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2dd4bf;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Mobile Menu ── */
#mobileMenu.open { opacity: 1 !important; pointer-events: all !important; }
#mobileMenu:not(.open) { opacity: 0; pointer-events: none; }
.mobile-menu-link { transition: opacity 0.3s ease, transform 0.3s ease; }
#mobileMenu.open .mobile-menu-link { opacity: 1; transform: translateY(0); }
#mobileMenu:not(.open) .mobile-menu-link { opacity: 0; transform: translateY(10px); }

.menu-line { transition: all 0.3s ease; }
#menuToggle.active .menu-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
#menuToggle.active .menu-line:nth-child(2) { opacity: 0; }
#menuToggle.active .menu-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); width: 6px; }

/* ── Floating Cards Animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes float-delayed {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 5s ease-in-out infinite 1s; }

/* ── Reveal on Scroll (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Fallback: always visible when reduced motion or JS disabled */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #070e1e; }
::-webkit-scrollbar-thumb { background: #1a3563; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #234578; }

/* ── Input Autofill ── */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0f1f3d inset !important;
  -webkit-text-fill-color: #fff !important;
}
