/* ══════════════════════════════════════════
   Thornton Radiator Repair Shop — Custom Styles
   ══════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(161, 31, 58, 0.5);
  color: #f9d0d9;
}

/* ─── Navbar Scroll State ─── */
#navbar.scrolled {
  background: rgba(10, 10, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

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

#mobile-menu.open .mobile-link {
  animation: fadeSlideDown 0.3s ease forwards;
}

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

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Hamburger Animation ─── */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.25rem;
}

/* ─── Service Cards ─── */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0), transparent);
  transition: background 0.5s ease;
}

.service-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.6), transparent);
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s 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; }
}

/* ─── Gallery Scroll Animation ─── */
@keyframes scrollGallery {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-scroll {
  animation: scrollGallery 30s linear infinite;
}

.animate-scroll:hover {
  animation-play-state: paused;
}

/* ─── Gold Gradient Text Utility ─── */
.text-gold-gradient {
  background: linear-gradient(135deg, #f5d68a 0%, #d4a843 50%, #e8c460 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Button Focus Styles ─── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(212, 168, 67, 0.6);
  outline-offset: 2px;
}

/* ─── Input Autofill ─── */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #1a1a1f inset !important;
  -webkit-text-fill-color: #f3f4f6 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0e;
}
::-webkit-scrollbar-thumb {
  background: #3b0a14;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6c1a2e;
}
