/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }

/* ── Nav link hover underline ───────────────────────────────────────────── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 0.2s, transform 0.2s;
}
.nav-link:hover::after { opacity: 0.3; transform: scaleX(1); }

/* ── Mobile nav ─────────────────────────────────────────────────────────── */
.mobile-nav-link { display: block; }

/* ── Card hover ─────────────────────────────────────────────────────────── */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(5, 150, 105, 0.12);
}

/* ── Floating blobs ─────────────────────────────────────────────────────── */
.hero-blob {
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 { animation-delay: 0s; }
.blob-2 { animation-delay: -3s; }
.blob-3 { animation-delay: -5s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Scroll reveal (progressive enhancement) ────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  /* Stagger children */
  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure content is visible even without JS */
.no-js .reveal,
.js-enabled .reveal { /* JS adds .revealed class */ }

/* ── Form select arrow ──────────────────────────────────────────────────── */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23059669' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}

/* ── Back to top ────────────────────────────────────────────────────────── */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Header scroll state ────────────────────────────────────────────────── */
#site-header.scrolled {
  background: rgba(254, 253, 248, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(5, 150, 105, 0.1);
  box-shadow: 0 1px 12px rgba(5, 150, 105, 0.06);
}

/* ── Selection color ────────────────────────────────────────────────────── */
::selection {
  background: rgba(5, 150, 105, 0.2);
  color: #064e3b;
}
