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

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(13, 148, 136, 0.15);
  color: #0f766e;
}

/* ── Navbar scroll state ── */
.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-logo-text {
  color: #1e293b !important;
}

.nav-scrolled .nav-link {
  color: #475569 !important;
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

/* ── Hero entrance animations ── */
@media (prefers-reduced-motion: no-preference) {
  .hero-subtitle {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  }
  .hero-title {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
  }
  .hero-desc {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
  }
  .hero-cta {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile menu transitions ── */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* ── Menu item hover ── */
#menu li {
  transition: padding-left 0.25s ease;
}

#menu li:hover {
  padding-left: 8px;
}

/* ── Button focus states ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
  border-radius: 9999px;
}

/* ── Smooth image loading ── */
img {
  opacity: 1;
  transition: opacity 0.4s ease;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}
