/* ============================================
   Precision Auto Detailing — Stylesheet
   Palette: Terracotta + Sand
   ============================================ */

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

:root {
  --terracotta: #B85D3F;
  --terracotta-dark: #9A4B30;
  --terracotta-light: #D4845F;
  --sand: #F5EDE3;
  --sand-light: #FAF6F1;
  --sand-dark: #E8DDD0;
  --charcoal: #2A2420;
  --charcoal-light: #4A3F38;
  --warm-gray: #7A6E66;
  --white: #FFFFFF;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--sand-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--charcoal);
  margin-bottom: 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.btn-primary:hover {
  background: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 93, 63, 0.3);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--charcoal);
  border-color: var(--white);
}

.btn-full {
  width: 100%;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 93, 63, 0.1);
  transition: box-shadow 0.3s var(--ease-out);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(42, 36, 32, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--charcoal);
}

.logo svg {
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a:not(.nav-cta) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--charcoal-light);
  position: relative;
  transition: color 0.2s;
}

.main-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.3s var(--ease-out);
}

.main-nav a:not(.nav-cta):hover {
  color: var(--terracotta);
}

.main-nav a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white) !important;
  background: var(--terracotta);
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.2s var(--ease-out);
}

.nav-cta:hover {
  background: var(--terracotta-dark);
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--charcoal);
  overflow: hidden;
}

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

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

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(42, 36, 32, 0.85) 0%,
    rgba(42, 36, 32, 0.6) 50%,
    rgba(184, 93, 63, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 120px 24px 80px;
  max-width: 760px;
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin-bottom: 24px;
}

.hero-headline {
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.08;
}

.hero-headline em {
  font-style: italic;
  color: var(--terracotta-light);
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll svg {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --- Services --- */
.services {
  padding: 120px 0;
  background: var(--sand-light);
}

.services .section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px 32px;
  border: 1px solid var(--sand-dark);
  transition: all 0.35s var(--ease-out);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(184, 93, 63, 0.1);
  border-color: var(--terracotta-light);
}

.service-icon {
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 1.375rem;
  margin-bottom: 12px;
  color: var(--charcoal);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--warm-gray);
  line-height: 1.7;
}

/* --- About --- */
.about {
  padding: 120px 0;
  background: var(--sand);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 6/7;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content .section-title {
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1rem;
  color: var(--charcoal-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--sand-dark);
}

.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--warm-gray);
  line-height: 1.4;
}

/* --- CTA Banner --- */
.cta-banner {
  padding: 100px 0;
  background: var(--charcoal);
  text-align: center;
}

.cta-banner .section-eyebrow {
  color: var(--terracotta-light);
  margin-bottom: 16px;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 20px;
}

.cta-text {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Gallery --- */
.gallery {
  padding: 120px 0;
  background: var(--sand-light);
}

.gallery .section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 5/4;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* --- Contact --- */
.contact {
  padding: 120px 0;
  background: var(--sand);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-intro {
  font-size: 1rem;
  color: var(--charcoal-light);
  line-height: 1.7;
  margin-bottom: 40px;
}

.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.contact-item dd {
  padding-left: 30px;
  font-size: 0.9375rem;
  color: var(--warm-gray);
  line-height: 1.6;
}

.contact-item a {
  color: var(--terracotta);
  transition: color 0.2s;
}

.contact-item a:hover {
  color: var(--terracotta-dark);
  text-decoration: underline;
}

/* --- Form --- */
.contact-form-wrap {
  background: var(--white);
  border-radius: 16px;
  padding: 48px;
  border: 1px solid var(--sand-dark);
}

.form-title {
  font-size: 1.5rem;
  margin-bottom: 32px;
  color: var(--charcoal);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal-light);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--charcoal);
  background: var(--sand-light);
  border: 1.5px solid var(--sand-dark);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(184, 93, 63, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--warm-gray);
  opacity: 0.6;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  margin-top: 16px;
  padding: 14px 20px;
  background: #E8F5E9;
  color: #2E7D32;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* --- Footer --- */
.site-footer {
  background: var(--charcoal);
  padding: 64px 0 40px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top .logo {
  color: var(--white);
}

.footer-tagline {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  max-width: 360px;
  padding-top: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
  color: var(--terracotta-light);
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--white);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: 48px;
  }

  .contact-grid {
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(250, 246, 241, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out), padding 0.3s var(--ease-out);
    border-bottom: 1px solid transparent;
  }

  .main-nav.open {
    max-height: 400px;
    padding: 24px 0;
    border-bottom: 1px solid var(--sand-dark);
  }

  .main-nav a:not(.nav-cta) {
    padding: 14px 32px;
    width: 100%;
  }

  .main-nav a:not(.nav-cta)::after {
    display: none;
  }

  .nav-cta {
    margin: 8px 32px 16px;
    text-align: center;
    display: block;
  }

  .hero-content {
    padding: 140px 24px 100px;
  }

  .hero-scroll {
    display: none;
  }

  .services {
    padding: 80px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 32px 28px;
  }

  .about {
    padding: 80px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    aspect-ratio: 4/3;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .cta-banner {
    padding: 80px 0;
  }

  .gallery {
    padding: 80px 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .contact {
    padding: 80px 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-form-wrap {
    padding: 32px 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 16px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
