*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

/* NAV */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(52, 211, 153, 0.6);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* NAV SCROLLED STATE */
nav.scrolled {
  background: rgba(3, 7, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* MOBILE MENU */
.mobile-link {
  transition: opacity 0.3s ease;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

/* HERO FLOATING CARDS */
.floating-card {
  will-change: transform;
}

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

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

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

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

.card-1 { animation: float-1 6s ease-in-out infinite; }
.card-2 { animation: float-2 5s ease-in-out infinite 0.5s; }
.card-3 { animation: float-3 7s ease-in-out infinite 1s; }
.card-4 { animation: float-4 5.5s ease-in-out infinite 0.3s; }

/* SERVICE CARDS */
.service-card {
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* WHY CARDS */
.why-card {
  will-change: transform;
}

.why-card:hover {
  transform: translateY(-3px);
}

/* SCROLL REVEAL — BELOW THE FOLD ONLY */
@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-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

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

/* FOCUS */
a:focus-visible, button:focus-visible {
  outline: 1px solid rgba(52, 211, 153, 0.5);
  outline-offset: 2px;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #03070e;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
