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

  html {
    scroll-behavior: smooth;
    font-size: 16px;
  }

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

  /* Scroll reveal — progressive enhancement, only applies when JS adds the class */
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

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

    .reveal.revealed {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Hero animations — only for hero content, always visible by default */
  .hero-anim {
    opacity: 1;
    transform: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-anim {
      opacity: 0;
      transform: translateY(20px);
      animation: heroFadeIn 0.8s ease forwards;
    }

    .hero-anim:nth-child(1) { animation-delay: 0.1s; }
    .hero-anim:nth-child(2) { animation-delay: 0.25s; }
    .hero-anim:nth-child(3) { animation-delay: 0.4s; }
    .hero-anim:nth-child(4) { animation-delay: 0.55s; }
  }

  @keyframes heroFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

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

  #mobile-menu.open .mobile-link {
    animation: linkFade 0.4s ease forwards;
  }

  #mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
  #mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
  #mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
  #mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }

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

  /* Navbar scroll state */
  #nav.scrolled {
    background: rgba(253, 248, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(163, 47, 49, 0.08);
  }

  /* Mobile menu button animation */
  #menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
  }

  #menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
  }

  /* Nav link underline effect */
  .nav-link {
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
  }

  .nav-link:hover::after {
    width: 100%;
  }

  /* Image hover smoothness */
  .group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  /* Focus styles */
  input:focus, textarea:focus, button:focus {
    outline: 2px solid rgba(194, 64, 64, 0.3);
    outline-offset: 2px;
  }

  /* Selection color */
  ::selection {
    background: rgba(194, 64, 64, 0.15);
    color: inherit;
  }

  /* Scrollbar styling */
  ::-webkit-scrollbar {
    width: 6px;
  }

  ::-webkit-scrollbar-track {
    background: #fdf8f7;
  }

  ::-webkit-scrollbar-thumb {
    background: #f5b9b8;
    border-radius: 3px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #dc5f5d;
  }
