*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
}

/* Reveal animations — progressive enhancement, only when JS runs */
@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.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal:nth-child(2) { transition-delay: 0.08s; }
  .reveal:nth-child(3) { transition-delay: 0.16s; }
  .reveal:nth-child(4) { transition-delay: 0.24s; }
}

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

#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

#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; }

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

/* Hamburger animation */
body.menu-open #menu-btn .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.menu-open #menu-btn .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
body.menu-open #menu-btn .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 5px;
}

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

/* Selection */
::selection {
  background: #EAD9CC;
  color: #3D1A0D;
}

/* Subtle scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #FDFCFA;
}
::-webkit-scrollbar-thumb {
  background: #E8D5B0;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #DDB8A3;
}
