/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero Animations (above the fold — always visible) ── */
.hero-anim {
  opacity: 1;
  animation: heroFadeUp 0.7s ease both;
}
.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }

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

/* ── Scroll Reveal (below the fold only, progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: if JS doesn't run, reveal elements are still visible */
.no-js .reveal,
.js .reveal {
  opacity: 1;
  transform: none;
}

/* ── Scroll indicator dot ── */
.scroll-dot {
  animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.4; }
}

/* ── Navbar scroll state ── */
.navbar-scrolled {
  background: rgba(254, 253, 248, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(6, 79, 70, 0.08);
}

/* ── Service card shimmer on hover ── */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service-card:hover::after {
  opacity: 1;
}

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

/* ── Mobile menu transition ── */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* ── Utility ── */
html {
  scroll-padding-top: 80px;
}
</style>
