/* ============================================
   Judkins Excavation & Construction
   Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Selection --- */
::selection {
  background: #93153a;
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f3efe8;
}
::-webkit-scrollbar-thumb {
  background: #c0aa7a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a88c55;
}

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

/* --- Service Cards --- */
.service-card {
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* --- Project Cards --- */
.project-card {
  will-change: transform;
}

/* --- Testimonial Cards --- */
.testimonial-card {
  will-change: transform;
}

.testimonial-card:hover {
  transform: translateY(-2px);
}

/* --- Mobile Menu Animation --- */
.menu-line {
  display: block;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.25rem;
}

/* --- Mobile Links --- */
.mobile-link {
  position: relative;
  display: block;
}
.mobile-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #93153a;
  transition: width 0.2s ease;
}
.mobile-link:hover::after {
  width: 100%;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .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; }
  .reveal-delay-5 { transition-delay: 0.5s; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Reduced Motion --- */
@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;
  }
}

/* --- Header scroll state --- */
#site-header.scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}

/* --- 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 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* --- Input autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #faf8f5 inset !important;
  -webkit-text-fill-color: #1c1917 !important;
}

/* --- Print --- */
@media print {
  header, footer, #contact-form, .project-card, .testimonial-card {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
