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

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

  body {
    overflow-x: hidden;
  }

  /* Scroll reveal — progressive enhancement, only when JS runs */
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.is-hidden {
      opacity: 0;
      transform: translateY(32px);
    }
    .scroll-reveal.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Navbar scroll state */
  #navbar.scrolled {
    background: rgba(250, 248, 246, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(42, 44, 49, 0.06), 0 4px 24px rgba(42, 44, 49, 0.06);
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #f5f0eb;
  }
  ::-webkit-scrollbar-thumb {
    background: #d4c9bc;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #b5321a;
  }

  /* Selection color */
  ::selection {
    background: #ffd5c8;
    color: #2a2c31;
  }

  /* Form select arrow */
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b808a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
  }
