/* ==========================================================================
   Palmetto Auto Detail LLC — Design Tokens
   ========================================================================== */
:root {
  /* Brand colors, pulled from the logo (black / electric blue / white) */
  --black: #07080b;
  --ink: #0d0f16;
  --ink-2: #14171f;
  --ink-border: #232733;

  --blue-500: #2f5fff;   /* primary electric blue */
  --blue-600: #2148d6;
  --blue-700: #1a37a8;   /* deeper blue, for text on white (contrast-safe) */
  --blue-400: #7c9bff;   /* lighter tint, for small text on black/ink (contrast-safe) */
  --blue-100: #e7edff;
  --blue-glow: rgba(47, 95, 255, 0.35);

  --white: #ffffff;
  --offwhite: #f6f7fb;
  --surface: #ffffff;
  --gray-900: #12141b;
  --gray-700: #3d4250;
  --gray-600: #565c6d;
  --gray-400: #9aa0b0;
  --gray-200: #e3e5ec;
  --gray-100: #eef0f5;

  --success: #14834f;   /* WCAG AA (4.5:1) against white */
  --danger: #c23a3a;    /* WCAG AA (4.5:1) against white */

  /* Typography */
  --font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  /* Spacing (4/8pt rhythm) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(10, 12, 20, 0.06), 0 1px 1px rgba(10,12,20,0.04);
  --shadow-md: 0 8px 24px rgba(10, 12, 20, 0.10);
  --shadow-lg: 0 20px 48px rgba(10, 12, 20, 0.16);
  --shadow-blue: 0 10px 28px rgba(47, 95, 255, 0.35);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med: 260ms;

  --header-h: 76px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--surface);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; color: var(--gray-900); }
h1 { font-size: clamp(2.25rem, 4.2vw + 1rem, 3.75rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 2.2vw + 1rem, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.125rem; color: var(--gray-600); max-width: 60ch; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--blue-500); color: var(--white); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: var(--space-3); top: var(--space-3); }

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.section { padding: var(--space-8) 0; }
.section-alt { background: var(--offwhite); }
.section-head { max-width: 720px; margin: 0 auto var(--space-6); text-align: center; }
.section-head .lead { margin: var(--space-3) auto 0; text-align: center; }
.section-note { text-align: center; margin-top: var(--space-5); color: var(--gray-600); }
.section-note a { color: var(--blue-700); font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-700);
  margin-bottom: var(--space-2);
}
.eyebrow-light { color: var(--blue-400); }

.text-accent { color: var(--blue-500); }

.grid { display: grid; gap: var(--space-4); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 13px 24px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  border: 2px solid transparent;
  white-space: nowrap;
  min-height: 44px;
}
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--blue-500); color: var(--white); box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(47,95,255,0.42); }
.btn-primary:active { transform: translateY(0); }

.btn-outline { border-color: var(--gray-200); color: var(--gray-900); background: var(--white); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-700); }

.btn-outline-light { border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-ghost { color: var(--gray-900); }
.btn-ghost:hover { color: var(--blue-700); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  /* No filter/backdrop-filter/transform on this element: any of those would
     establish a new containing block for position:fixed descendants (like
     .main-nav below), breaking its full-viewport mobile overlay. The blur
     lives on ::before instead. */
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--header-h);
  display: flex; align-items: center;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(7, 8, 11, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background var(--dur-med) var(--ease-out);
}
.site-header.is-solid::before { background: rgba(7, 8, 11, 0.92); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }

.brand { display: flex; align-items: center; gap: var(--space-2); }
.brand-mark { border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.brand-word {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--white);
  display: flex; flex-direction: column; line-height: 1.15;
}
.brand-word-sub { font-family: var(--font-body); font-weight: 500; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-100); opacity: 0.8; }

.main-nav ul { display: flex; align-items: center; gap: var(--space-5); }
.main-nav a { color: rgba(255,255,255,0.85); font-weight: 500; font-size: 0.95rem; transition: color var(--dur-fast) var(--ease-out); position: relative; }
.main-nav a:hover { color: var(--white); }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--blue-500); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.header-call { color: rgba(255,255,255,0.9); }
.header-call span { font-size: 0.9rem; }
.nav-toggle { display: none; padding: var(--space-1); color: var(--white); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--space-7));
  padding-bottom: var(--space-8);
  background: radial-gradient(120% 100% at 85% 0%, #101635 0%, var(--black) 55%), var(--black);
  color: var(--white);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.palm-decor {
  position: absolute; top: -40px; right: -60px; width: 420px; height: 520px;
  color: var(--blue-500); opacity: 0.16;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-7);
  align-items: center; position: relative; z-index: 1;
}
.hero-copy h1 { color: var(--white); margin: var(--space-3) 0 var(--space-4); }
.hero-sub { color: rgba(255,255,255,0.72); font-size: 1.1rem; max-width: 52ch; margin-bottom: var(--space-5); }
.hero-ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }

.trust-row { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-5); }
.trust-row li { display: flex; align-items: center; gap: var(--space-2); color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 500; }
.trust-row svg { color: var(--blue-500); flex-shrink: 0; }

.hero-media { position: relative; }
.hero-photo-frame {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.1);
  position: relative;
}
.hero-photo-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,8,11,0) 55%, rgba(7,8,11,0.55) 100%);
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }
.hero-badge {
  position: absolute; bottom: -28px; left: -28px; width: 96px; height: 96px;
  border-radius: 50%; background: var(--black); border: 3px solid var(--blue-500);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
}
.hero-badge img { border-radius: 50%; object-fit: cover; width: 100%; height: 100%; }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-7); align-items: center; }
.about-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/5; object-fit: cover; }
.about-copy h2 { margin-bottom: var(--space-3); }
.about-copy .lead { margin-bottom: var(--space-5); }

.feature-list { display: flex; flex-direction: column; gap: var(--space-4); }
.feature-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.feature-list svg { color: var(--white); flex-shrink: 0; background: var(--blue-500); border-radius: 50%; padding: 8px; width: 36px; height: 36px; box-sizing: border-box; }
.feature-list strong { display: block; font-family: var(--font-heading); font-size: 1rem; margin-bottom: 2px; }
.feature-list span { color: var(--gray-600); font-size: 0.95rem; }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  padding: var(--space-4); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gray-200); }
.service-card.featured { background: var(--gray-900); border-color: var(--gray-900); }
.service-card.featured h3, .service-card.featured p { color: var(--white); }
.service-card.featured p { color: rgba(255,255,255,0.7); }
.service-card.featured .card-icon { background: var(--blue-500); color: var(--white); }

.card-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--blue-100); color: var(--blue-700);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-3);
}
.service-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.service-card p { color: var(--gray-600); font-size: 0.92rem; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.price-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: var(--space-5); display: flex; flex-direction: column; position: relative;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured { border-color: var(--blue-500); box-shadow: var(--shadow-blue); background: var(--gray-900); }
.price-card.featured h3, .price-card.featured .price-tag { color: var(--white); }
.price-card.featured .check-list li { color: rgba(255,255,255,0.82); }
.price-card.featured .check-list svg { color: var(--blue-500); }

.price-flag {
  position: absolute; top: -14px; left: var(--space-5);
  background: var(--blue-500); color: var(--white); font-family: var(--font-heading);
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--radius-full);
}
.price-card h3 { margin-bottom: var(--space-1); }
.price-tag { font-family: var(--font-heading); font-weight: 600; color: var(--blue-700); margin-bottom: var(--space-4); }
.check-list { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-5); flex-grow: 1; }
.check-list li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: 0.92rem; color: var(--gray-700); }
.check-list svg { color: var(--blue-500); flex-shrink: 0; margin-top: 2px; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.gallery-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 3/4;
  display: block; width: 100%; box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-med) var(--ease-out); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-3);
  background: linear-gradient(180deg, transparent, rgba(7,8,11,0.85));
  color: var(--white); font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem;
  text-align: left;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-grid { grid-template-columns: repeat(3, 1fr); }
.testimonial-card {
  background: var(--offwhite); border-radius: var(--radius-md); padding: var(--space-5);
  border: 1px solid var(--gray-200);
}
.stars { display: flex; gap: 3px; color: #ffb400; margin-bottom: var(--space-3); }
.testimonial-card blockquote { font-size: 1rem; color: var(--gray-700); margin-bottom: var(--space-4); }
.testimonial-card figcaption { font-family: var(--font-heading); font-weight: 600; font-size: 0.88rem; color: var(--gray-900); }

/* ==========================================================================
   Service Area
   ========================================================================== */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.area-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-5) 0; }
.area-chips li {
  background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-700);
  padding: 8px 16px; border-radius: var(--radius-full); font-size: 0.9rem; font-weight: 500;
}
.map-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); }
.map-frame-link {
  position: absolute; bottom: var(--space-2); right: var(--space-2);
  background: var(--white); color: var(--blue-700); font-family: var(--font-heading);
  font-weight: 600; font-size: 0.78rem; padding: 6px 12px; border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}
.map-frame-link:hover { background: var(--blue-100); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-section { background: var(--black); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-7); align-items: start; }
.contact-info h2 { color: var(--white); margin: var(--space-3) 0 var(--space-3); }
.contact-list { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-6); }
.contact-list li { display: flex; align-items: center; gap: var(--space-3); font-size: 1.02rem; }
.contact-list svg { color: var(--blue-500); flex-shrink: 0; }
.contact-list a:hover { color: var(--blue-500); }

.contact-form {
  background: var(--white); color: var(--gray-900); border-radius: var(--radius-lg);
  padding: var(--space-5); box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.form-field { margin-bottom: var(--space-3); }
.form-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 0.95rem; background: var(--white); min-height: 44px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-glow); outline: none;
}
.form-field .is-invalid { border-color: var(--danger); }
.form-field .is-invalid:focus { box-shadow: 0 0 0 4px rgba(194, 58, 58, 0.18); }
.form-helper { font-size: 0.82rem; color: var(--gray-600); margin-bottom: var(--space-3); }
.form-status { margin-top: var(--space-3); font-size: 0.9rem; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--black); color: rgba(255,255,255,0.7); padding-top: var(--space-7); border-top: 1px solid rgba(255,255,255,0.08); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-5); padding-bottom: var(--space-6); }
.footer-brand p { margin-top: var(--space-3); font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-heading); color: var(--white); font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--space-3); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-2); font-size: 0.92rem; }
.footer-col a:hover { color: var(--blue-500); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: var(--space-4) var(--space-4); font-size: 0.82rem; text-align: center; color: rgba(255,255,255,0.5); }

/* ==========================================================================
   Mobile Call FAB
   ========================================================================== */
.mobile-call-fab {
  display: none; position: fixed; bottom: var(--space-4); right: var(--space-4); z-index: 400;
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue-500); color: var(--white);
  align-items: center; justify-content: center; box-shadow: var(--shadow-blue);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 900; background: rgba(7,8,11,0.94);
  display: flex; align-items: center; justify-content: center; padding: var(--space-5);
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 900px; width: 100%; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: var(--radius-md); }
.lightbox figcaption { color: var(--white); text-align: center; margin-top: var(--space-3); font-family: var(--font-heading); }
.lightbox-close { position: absolute; top: var(--space-4); right: var(--space-4); color: var(--white); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: rgba(7,8,11,0.98); backdrop-filter: blur(10px);
    transform: translateX(100%); transition: transform var(--dur-med) var(--ease-out);
    padding: var(--space-6) var(--space-5);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .main-nav a { font-size: 1.25rem; }
  .header-call span { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-call-fab { display: flex; }
  .header-cta { display: none; }
}

@media (max-width: 720px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .price-card.featured { order: -1; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-badge { display: none; }
  :root { --space-8: 64px; --space-7: 40px; }
}
