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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: color-mix(in srgb, #95d9ab 40%, transparent);
  color: #1a2647;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f2faf4;
}
::-webkit-scrollbar-thumb {
  background: #b8c7ef;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8fa9e6;
}

/* ── Navbar scroll state ── */
#siteHeader {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#siteHeader.scrolled {
  background: rgba(242, 250, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 38, 71, 0.08);
}

/* ── Mobile Menu ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ── Hero animations ── */
.reveal-hero {
  opacity: 0;
  transform: translateY(24px);
  animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-hero:nth-child(1) { animation-delay: 0.1s; }
.reveal-hero:nth-child(2) { animation-delay: 0.25s; }
.reveal-hero:nth-child(3) { animation-delay: 0.4s; }
.reveal-hero:nth-child(4) { animation-delay: 0.55s; }
.reveal-hero:nth-child(5) { animation-delay: 0.7s; }

.reveal-img-top {
  opacity: 0;
  transform: translateX(40px) scale(0.96);
  animation: heroImgReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.reveal-img-bottom {
  opacity: 0;
  transform: translateX(-30px) scale(0.96);
  animation: heroImgReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.reveal-badge {
  opacity: 0;
  transform: translateX(-20px);
  animation: badgeReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroImgReveal {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes badgeReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal.visible:nth-of-type(2) { transition-delay: 0.1s; }
  .reveal.visible:nth-of-type(3) { transition-delay: 0.2s; }
}

/* When JS is disabled, all content is visible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ── Marquee ── */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

/* ── Scroll indicator ── */
@keyframes scrollIndicator {
  0% { top: -50%; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 150%; opacity: 0; }
}

.animate-scroll-indicator {
  animation: scrollIndicator 1.8s ease-in-out infinite;
}

/* ── Utility ── */
.h-18 {
  height: 4.5rem;
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #95d9ab;
  outline-offset: 4px;
  border-radius: 4px;
}

/* ── Smooth image loading ── */
img {
  background: linear-gradient(135deg, #e1f5e8 0%, #dce3f7 100%);
}
