/* ─── BASE & RESET ─── */
*, *::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;
}

::selection {
  background: color-mix(in srgb, #0d9488 30%, transparent);
  color: #0f172a;
}

/* ─── NAVBAR ─── */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-logo-text {
  color: #0f172a;
}

#navbar.scrolled .nav-logo-text {
  color: #0f172a;
}

.nav-link {
  position: relative;
}

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

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

/* ─── MOBILE MENU ─── */
.mobile-bar {
  transition: all 0.3s ease;
}

#mobile-toggle.active .mobile-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-toggle.active .mobile-bar:nth-child(2) {
  opacity: 0;
}

#mobile-toggle.active .mobile-bar:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}

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

/* ─── HERO ─── */
.hero-gradient {
  background: linear-gradient(135deg, #134e4a 0%, #0d9488 50%, #2dd4bf 100%);
}

/* ─── SERVICE CARDS ─── */
.service-card {
  transform: translateY(0);
}

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

/* ─── SCROLL REVEAL (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .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; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Fallback: always visible if JS is disabled or reduced-motion */
.reveal {
  opacity: 1;
  transform: none;
}

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

/* ─── BUTTONS ─── */
a, button {
  -webkit-tap-highlight-color: transparent;
}

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

/* ─── MAP ─── */
iframe {
  filter: saturate(0.8) contrast(1.05);
}

/* ─── RESPONSIVE TWEAKS ─── */
@media (max-width: 640px) {
  .font-serif {
    word-spacing: -0.02em;
  }
}

@media (min-width: 768px) {
  /* Subtle parallax feel on hero - pure CSS */
  @supports (background-attachment: fixed) {
    /* Not applying parallax to avoid performance issues; keeping it simple */
  }
}
