/* ── Custom Styles ── */

/* Scroll dot animation */
@keyframes scrollDot {
  0% { top: -12px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 44px; opacity: 0; }
}
.scroll-dot {
  animation: scrollDot 2s ease-in-out infinite;
}

/* ── Reveal Animations (progressive enhancement) ── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-state="hidden"] {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal[data-state="visible"] {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Hero Subtitle Animation ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
  animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

/* ── Header Scroll State ── */
header.scrolled {
  background: rgba(253, 249, 243, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

/* ── Mobile Menu ── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu.open .mobile-link {
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }

/* ── Menu Button Animation ── */
.menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
  width: 6px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Smooth image loading ── */
img {
  background-color: #F5EDDA;
}

/* ── Selection ── */
::selection {
  background: #D1FAE5;
  color: #064E3B;
}
