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

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

  body {
    overflow-x: hidden;
  }

  ::selection {
    background-color: rgba(27, 67, 50, 0.15);
    color: #1B4332;
  }

  /* Scroll reveal base — always visible by default */
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      transform: translateY(30px);
    }
    .reveal.revealed {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Hero animations — only when JS is available */
  @media (prefers-reduced-motion: no-preference) {
    .hero-title,
    .hero-subtitle,
    .hero-desc,
    .hero-cta {
      opacity: 0;
    }
    .hero-title.hero-animated,
    .hero-subtitle.hero-animated,
    .hero-desc.hero-animated,
    .hero-cta.hero-animated {
      opacity: 1;
      transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
  }

  /* Navbar scroll state */
  #navbar.scrolled {
    background-color: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #FAF8F4;
  }
  ::-webkit-scrollbar-thumb {
    background: #b8d0bf;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #8fb596;
  }

  /* Menu item hover line animation */
  .group h4 {
    position: relative;
    display: inline-block;
  }

  /* Smooth image loading */
  img {
    opacity: 1;
    transition: opacity 0.3s ease;
  }
  img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
  }
  img[loading="lazy"].loaded {
    opacity: 1;
  }

  /* Mobile menu transitions */
  #mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease;
  }

  .mobile-link {
    position: relative;
  }
  .mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #D4A843;
    transition: width 0.3s ease;
  }
  .mobile-link:hover::after {
    width: 100%;
  }
