*, *::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;
}

::selection {
  background: #FF6F5E;
  color: #FAF8F6;
}

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

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

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

/* Nav hamburger animation */
#menuBtn.open .nav-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.open .nav-line:nth-child(2) {
  transform: rotate(-45deg) translate(0px, 0px);
}

/* Scroll reveal — progressive enhancement, only when JS runs and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

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

  /* Stagger children */
  .reveal.stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

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

  .reveal.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
  .reveal.stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
  .reveal.stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
  .reveal.stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
  .reveal.stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
  .reveal.stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #FF6F5E;
  outline-offset: 2px;
}

/* Subtle image hover */
img {
  display: block;
  max-width: 100%;
}
