/* Custom styles for Master Tire Shop */

:root {
  --charcoal: #374151;
  --charcoal-dark: #1f2937;
  --coral: #F97583;
  --coral-dark: #e05a6a;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-500: #78716c;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--charcoal);
  background-color: var(--stone-50);
}

/* --- Navigation --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--coral);
  transition: width 0.3s ease;
}

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

/* Transparent nav (hero overlay) */
#navbar.transparent .nav-color-primary {
  color: white;
}
#navbar.transparent .nav-color-secondary {
  color: rgba(249, 117, 131, 0.8);
}
#navbar.transparent .nav-link {
  color: rgba(255, 255, 255, 0.8);
}
#navbar.transparent .mobile-link {
  color: white;
}

/* Solid nav (after scroll) */
#navbar.solid {
  background-color: var(--charcoal);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#navbar.solid .nav-color-primary {
  color: white;
}
#navbar.solid .nav-color-secondary {
  color: rgba(249, 117, 131, 0.8);
}
#navbar.solid .nav-link {
  color: rgba(255, 255, 255, 0.8);
}
#navbar.solid .mobile-link {
  color: white;
}

/* --- Hero --- */
.hero-bg {
  will-change: transform;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-line {
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

/* Hero content animation */
.hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 1s ease forwards 0.3s;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Service Cards --- */
.service-card {
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* --- Why Us Items --- */
.why-us-item {
  transition: padding-left 0.3s ease;
}

.why-us-item:hover {
  padding-left: 12px;
}

/* --- CTA Background --- */
.cta-bg {
  will-change: transform;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  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 --- */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--stone-100);
}
::-webkit-scrollbar-thumb {
  background: var(--charcoal);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--coral);
}

/* --- Selection --- */
::selection {
  background-color: var(--coral);
  color: white;
}

/* --- Focus Styles --- */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-bg img {
    object-position: center 30%;
  }
}
