/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #030F1E;
}
::-webkit-scrollbar-thumb {
  background: #1A3F5C;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2D5A7E;
}

/* ===== NAV SCROLLED STATE ===== */
#nav.scrolled {
  background: rgba(3, 15, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 63, 92, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(26, 63, 92, 0.3);
}
.mobile-link:last-child {
  border-bottom: none;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4FD1C5, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover::before {
  opacity: 1;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    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-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; }
  .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Fallback: ensure content is visible without JS */
.reveal {
  opacity: 1;
  transform: none;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(79, 209, 177, 0.3);
  color: #F0F4F8;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid #4FD1C5;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== RESPONSIVE TYPE ===== */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.1;
  }
}
