/* ─── Base & Utilities ─── */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s 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; }
}

/* ─── Floating animations ─── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes float-delay {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-float-delay { animation: float-delay 5s ease-in-out infinite 1s; }
.animate-float-slow { animation: float-slow 6s ease-in-out infinite 2s; }

/* ─── Navbar scroll state ─── */
#site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#site-header.scrolled {
  background-color: rgba(255, 251, 245, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 12px rgba(74, 32, 74, 0.08);
}

/* ─── Nav links ─── */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #f59e0b;
  border-radius: 1px;
  transition: width 0.2s ease, left 0.2s ease;
}
.nav-link:hover::after {
  width: 60%;
  left: 20%;
}

/* ─── Mobile nav transitions ─── */
#mobile-nav {
  max-height: 0;
  opacity: 0;
}
#mobile-nav.open {
  max-height: 400px;
  opacity: 1;
}

.mobile-link {
  display: block;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f9f1fb;
}
::-webkit-scrollbar-thumb {
  background: #d79dd7;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c06ec0;
}

/* ─── Selection ─── */
::selection {
  background: #e8c5eb;
  color: #4a204a;
}

/* ─── Image aspect ratios ─── */
img {
  max-width: 100%;
  height: auto;
}
