/* ── Base & Typography ── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
}

::selection {
  background: #2d5a2d;
  color: #fafaf6;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5ee;
}
::-webkit-scrollbar-thumb {
  background: #88887a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6a6a5c;
}

/* ── Navbar scroll state ── */
.navbar-scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

/* ── Floating stat cards animation ── */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes float-4 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: no-preference) {
  .stat-card-1 { animation: float-1 4s ease-in-out infinite; }
  .stat-card-2 { animation: float-2 5s ease-in-out infinite; }
  .stat-card-3 { animation: float-3 4.5s ease-in-out infinite; }
  .stat-card-4 { animation: float-4 5.5s ease-in-out infinite; }
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .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);
  }
  .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; }
}

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

/* ── Form select arrow ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a6a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Focus visible for accessibility ── */
:focus-visible {
  outline: 2px solid #2d5a2d;
  outline-offset: 2px;
}

/* ── Utility ── */
.no-underline {
  text-decoration: none;
}
