/* ============================================
   Sweet Fairies Creations — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::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;
}

/* --- Hero Overlay --- */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(9, 21, 14, 0.35) 0%,
    rgba(9, 21, 14, 0.55) 50%,
    rgba(9, 21, 14, 0.85) 100%
  );
}

/* --- Hero Animations --- */
.hero-eyebrow {
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-eyebrow,
.hero-eyebrow ~ h1,
.hero-eyebrow ~ h1 ~ p,
.hero-eyebrow ~ h1 ~ p ~ div {
  animation: heroFadeUp 0.8s ease forwards;
}

.hero-eyebrow ~ h1 {
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-eyebrow ~ h1 ~ p {
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-eyebrow ~ h1 ~ p ~ div {
  animation-delay: 0.8s;
  opacity: 0;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Scroll Reveal (progressive enhancement) --- */
.js-scroll .reveal-left,
.js-scroll .reveal-right,
.js-scroll .reveal-bottom {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-scroll .reveal-left {
  transform: translateX(-32px);
}

.js-scroll .reveal-right {
  transform: translateX(32px);
}

.js-scroll .reveal-bottom {
  transform: translateY(32px);
}

.js-scroll .reveal-left.revealed,
.js-scroll .reveal-right.revealed,
.js-scroll .reveal-bottom.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger children */
.js-scroll .reveal-bottom:nth-child(2) { transition-delay: 0.1s; }
.js-scroll .reveal-bottom:nth-child(3) { transition-delay: 0.2s; }
.js-scroll .reveal-bottom:nth-child(4) { transition-delay: 0.3s; }

/* --- Nav --- */
#site-header.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(26, 60, 42, 0.08);
}

#site-header.scrolled .font-serif {
  color: #1a3c2a !important;
}

#site-header.scrolled .text-forest-700 {
  color: #1a3c2a !important;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

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

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

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

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

/* --- Menu Lines Animation --- */
.menu-line {
  transform-origin: center;
}

.menu-open .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.5rem;
}

/* --- Image Hover --- */
.aspect-square img,
.aspect-\[4\/5\] img,
.aspect-\[4\/3\] img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Focus Styles --- */
input:focus,
textarea:focus,
button:focus {
  outline: none;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .js-scroll .reveal-left,
  .js-scroll .reveal-right,
  .js-scroll .reveal-bottom {
    opacity: 1;
    transform: none;
  }
}

/* --- Selection --- */
::selection {
  background: rgba(26, 60, 42, 0.15);
  color: #1a3c2a;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #faf9f6;
}

::-webkit-scrollbar-thumb {
  background: #c5d8c8;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #96ba98;
}
