/* Base & Utilities */
html {
  scroll-behavior: smooth;
}

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

/* Scroll Reveal — progressive enhancement, only active when JS runs and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Mobile menu open state */
#mobile-menu.open {
  translate: 0;
  opacity: 1;
  pointer-events: auto;
}

/* Menu icon animation */
#menu-icon.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#menu-icon.active span:nth-child(2) {
  opacity: 0;
}
#menu-icon.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* Custom select styling */
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='%2394a3b8' 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;
}

/* Subtle selection color */
::selection {
  background: color-mix(in srgb, #0d9488 30%, transparent);
  color: #0f172a;
}

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