/* ==========================================
   Ucdavis — Professional Services
   Custom styles & animations
   ========================================== */

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(255, 90, 48, 0.2);
  color: #ffaa90;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #2d2d2d;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #404040;
}

/* Reveal animations — progressive enhancement, only when JS is available */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Mobile menu open state */
body.menu-open {
  overflow: hidden;
}

/* Nav glass effect */
nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(45, 45, 45, 0.5);
}

/* Custom 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='%23737373' 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;
}

/* Hover line animation for links */
a.hover-line {
  position: relative;
}
a.hover-line::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #ff7a56;
  transition: width 0.3s ease;
}
a.hover-line:hover::after {
  width: 100%;
}

/* Image hover zoom */
img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Mobile menu transitions */
#mobileMenu {
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

/* Bar animations */
body.menu-open #bar1 {
  transform: translateY(5px) rotate(45deg);
}
body.menu-open #bar2 {
  opacity: 0;
}
body.menu-open #bar3 {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.5rem;
}

/* Service card hover */
.group:hover .group-hover\:text-coral-400 {
  color: #ffaa90;
}
