/* ── Base & Utilities ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(78, 205, 196, 0.2);
  color: #0d1b2a;
}

/* ── Nav ── */
#nav {
  height: 72px;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #4ecdc4;
  transition: width 0.3s ease;
}

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

/* Mobile menu animation */
#mobileMenu.open .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

#mobileMenu.open .menu-line:nth-child(2) {
  opacity: 0;
}

#mobileMenu.open .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 24px;
}

/* ── Hero Animations ── */
.hero-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Default state is visible (progressive enhancement) */
.reveal:not(.revealed) {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Service Cards ── */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(13, 27, 42, 0.08);
}

/* ── Approach Steps ── */
.approach-step {
  transition: transform 0.3s ease;
}

.approach-step:hover {
  transform: translateY(-4px);
}

.approach-step .rounded-full {
  transition: border-color 0.3s ease, background 0.3s ease;
}

.approach-step:hover .rounded-full {
  border-color: rgba(78, 205, 196, 0.6);
  background: rgba(78, 205, 196, 0.08);
}

/* ── Form ── */
input:focus,
textarea:focus {
  outline: none;
}

/* ── Smooth scroll offset for fixed nav ── */
section[id] {
  scroll-margin-top: 80px;
}

/* ── Focus visible for accessibility ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #4ecdc4;
  outline-offset: 2px;
  border-radius: 4px;
}
