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

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

  body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Scroll reveal — progressive enhancement, hidden by default */
  @media (prefers-reduced-motion: no-preference) {
    .scroll-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);
    }
    .scroll-reveal.revealed {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Nav active state */
  #nav.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #1C1C1E;
  }
  ::-webkit-scrollbar-thumb {
    background: #3F3F46;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #FF6B4A;
  }

  /* Selection */
  ::selection {
    background: rgba(255, 107, 74, 0.3);
    color: #fff;
  }

  /* Mobile menu animation */
  #mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Back to top */
  #backToTop.visible {
    opacity: 1;
    pointer-events: auto;
  }

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

  /* 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='%2371717A' 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;
  }

  @media (max-width: 767px) {
    html {
      scroll-padding-top: 64px;
    }
  }
