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

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

  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  .font-serif {
    font-family: 'Playfair Display', Georgia, serif;
  }

  .font-sans {
    font-family: 'Inter', system-ui, sans-serif;
  }

  /* Header scroll state */
  #site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }

  #site-header.scrolled .menu-line {
    background: #1e293b;
  }

  #site-header:not(.scrolled) .menu-line {
    background: #1e293b;
  }

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

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

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

  /* Hero tag animation */
  .hero-tag {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
  }

  /* Hero headline animation */
  h1 {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.5s;
  }

  /* Hero paragraph */
  h1 + p {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.7s;
  }

  /* Hero buttons */
  h1 + p + div {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.9s;
  }

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

  /* Scroll reveal animations */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    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);
  }

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

  #mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-nav-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  #mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
  }

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

  /* Hamburger animation */
  #menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  #menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }

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

  ::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
  }

  /* Selection color */
  ::selection {
    background: #0d9488;
    color: white;
  }

  /* Focus visible */
  :focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
  }

  /* Input autofill */
  input:-webkit-autofill,
  textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
  }

  /* Subtle pattern overlay for hero */
  section:first-of-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 75%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 75% 25%, rgba(30, 41, 59, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
  }

  /* Service card hover image */
  .group:hover .group-hover\:bg-teal-700 {
    background-color: #0d9488;
  }

  /* Smooth image loading */
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  /* Reduce motion for accessibility */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    html {
      scroll-behavior: auto;
    }
    .reveal {
      opacity: 1;
      transform: none;
    }
  }
