/* ============================================
   Erica's Car Freshies — Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* --- Utility: sr-only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link:focus {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* --- Navbar --- */
.site-header {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 251, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #7B2D3B;
  transition: width 0.2s ease;
}

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

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

.mobile-nav-link {
  position: relative;
}

/* --- Buttons --- */
.btn-burgundy {
  background: #7B2D3B;
  color: #fff;
  border: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-burgundy:hover {
  background: #8c3d50;
  box-shadow: 0 8px 30px rgba(123, 45, 59, 0.3);
}

.btn-hero-primary {
  background: #7B2D3B;
  color: #fff;
  border: none;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.btn-hero-primary:hover {
  background: #8c3d50;
}

/* --- Hero --- */
.hero {
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(61, 19, 26, 0.82) 0%,
    rgba(123, 45, 59, 0.72) 50%,
    rgba(92, 31, 44, 0.85) 100%
  );
}

.hero-content {
  padding-top: 80px;
  padding-bottom: 100px;
}

.hero-title {
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-weight: 300;
}

.hero-scroll-indicator {
  opacity: 0.7;
}

/* --- Section Labels --- */
.section-label {
  letter-spacing: 0.12em;
}

.section-label-light {
  letter-spacing: 0.12em;
}

/* --- Product Cards --- */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card-img {
  transition: transform 0.5s ease;
}

/* --- Feature Cards (dark section) --- */
.feature-card-dark {
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

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

/* --- Custom Section --- */
.custom-floating-card {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- About Stats --- */
.about-stat {
  text-align: left;
}

.about-img-grid img {
  transition: transform 0.5s ease;
}

.about-img-grid img:hover {
  transform: scale(1.03);
}

/* --- Contact --- */
.contact-info-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-info-card:hover {
  transform: translateX(4px);
}

/* --- Form Inputs --- */
.input-field {
  background: #FFFBF5;
}

.input-field:focus {
  background: #fff;
  border-color: #7B2D3B;
}

.input-field::placeholder {
  color: #f3d0d8;
}

/* --- Scroll Reveal (progressive enhancement) --- */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animations when JS is enabled and user prefers motion */
.js-enabled @media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
  }

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

/* If JS is disabled, content is already visible (above) */

/* --- Responsive --- */
@media (max-width: 767px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-title br {
    display: none;
  }

  .hero-content {
    padding-top: 60px;
    padding-bottom: 80px;
  }

  .hero-badge {
    font-size: 0.75rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

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

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }

  .custom-floating-card {
    animation: none;
  }
}
