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

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

body {
  margin: 0;
  background-color: #0a1628;
  color: #ffffff;
}

::selection {
  background-color: rgba(52, 212, 168, 0.3);
  color: #ffffff;
}

/* ========== NAVBAR SCROLL STATE ========== */
#navbar.scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .text-white\/70 {
  color: rgba(255, 255, 255, 0.8);
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ========== REVEAL ANIMATIONS (below-fold only) ========== */
@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);
  }

  .reveal:nth-child(2) { transition-delay: 0.08s; }
  .reveal:nth-child(3) { transition-delay: 0.16s; }
  .reveal:nth-child(4) { transition-delay: 0.24s; }
  .reveal:nth-child(5) { transition-delay: 0.32s; }
  .reveal:nth-child(6) { transition-delay: 0.40s; }
}

/* Service cards hover glow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(52, 212, 168, 0), rgba(52, 212, 168, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: background 0.4s ease;
}

.service-card:hover::before {
  background: linear-gradient(135deg, rgba(52, 212, 168, 0.3), rgba(52, 212, 168, 0.05));
}

/* ========== FORM FOCUS STATES ========== */
input:focus, textarea:focus {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: rgba(52, 212, 168, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(52, 212, 168, 0.5);
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 640px) {
  h1 {
    font-size: 2.75rem !important;
  }
  .font-serif {
    line-height: 1.15;
  }
}
