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

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
  }

  body {
    overflow-x: hidden;
  }

  /* Scroll reveal — progressive enhancement, only applies when JS is enabled */
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      transform: translateY(24px);
      transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Fallback: ensure content is visible even without JS */
  .reveal {
    opacity: 1;
    transform: none;
  }

  /* Navbar transitions */
  #navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  }

  #navbar.scrolled .font-serif {
    color: #40382f !important;
  }

  /* Mobile menu animation */
  #mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  #mobile-menu.open {
    max-height: 400px;
  }

  /* Subtle image hover */
  .group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
  }

  /* Selection color */
  ::selection {
    background-color: #7B2D3B;
    color: #FDF8F5;
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #FDF8F5;
  }
  ::-webkit-scrollbar-thumb {
    background: #c8b8a4;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #9a8868;
  }

  /* Focus visible styles */
  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
    border-radius: 4px;
  }
