/* ==========================================================================
   Chrissy's Mobile Detailing + Boss Babe Mobile Tinting
   Shared design system. Palette/type roughly carried over from the Lovable-
   built chrissysmobiledetailtint.com site per client direction; everything
   else (copy, pricing, reviews, hours) is real client/GBP data — see
   /data/pricing.json and /data/business.json.
   ========================================================================== */

:root {
  /* Base palette (HSL channel triples, consumed via hsl(var(--x))) */
  --pink: 340 75% 55%;
  --pink-dark: 340 80% 45%;
  --pink-light: 340 70% 82%;
  --lavender: 280 40% 90%;
  --lavender-deep: 280 45% 42%;
  --lavender-dark: 280 50% 32%;
  --cream: 40 30% 97%;
  --blush: 330 40% 94%;
  --blush-light: 330 30% 97%;
  --ink: 330 40% 15%;
  --muted-ink: 330 20% 45%;
  --white: 0 0% 100%;
  --gold: 42 60% 55%;

  /* Default accent = warm pink (used on homepage) */
  --accent: var(--pink);
  --accent-dark: var(--pink-dark);
  --accent-light: var(--pink-light);
  --accent-soft: var(--blush);

  --radius-sm: .5rem;
  --radius: .9rem;
  --radius-lg: 1.5rem;
  --shadow-soft: 0 10px 30px hsl(330 40% 50% / .10);
  --shadow-elegant: 0 20px 60px hsl(330 40% 50% / .14);
  --container: 1180px;

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* Brand accent overrides */
[data-brand="detailing"] {
  --accent: var(--pink);
  --accent-dark: var(--pink-dark);
  --accent-light: var(--pink-light);
  --accent-soft: var(--blush);
}
[data-brand="tinting"] {
  --accent: var(--lavender-deep);
  --accent-dark: var(--lavender-dark);
  --accent-light: var(--lavender);
  --accent-soft: 280 35% 95%;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--blush-light));
  color: hsl(var(--ink));
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: hsl(var(--ink));
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3vw + 1rem, 2.8rem); }
h3 { font-size: clamp(1.3rem, 1vw + 1rem, 1.6rem); }
p { margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: hsl(var(--accent-dark));
  margin-bottom: .75rem;
}
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: hsl(var(--muted-ink)); font-size: 1.1rem; }
.section--alt { background: hsl(var(--white)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: hsl(var(--accent));
  color: hsl(var(--white));
  box-shadow: 0 10px 25px hsl(var(--accent) / .35);
}
.btn-primary:hover { background: hsl(var(--accent-dark)); }
.btn-outline {
  background: transparent;
  border-color: hsl(var(--accent));
  color: hsl(var(--accent-dark));
}
.btn-outline:hover { background: hsl(var(--accent) / .08); }
.btn-ghost {
  background: hsl(var(--white) / .15);
  border-color: hsl(var(--white) / .5);
  color: hsl(var(--white));
}
.btn-ghost:hover { background: hsl(var(--white) / .25); }
.btn-lg { padding: 1.1rem 2.25rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: hsl(var(--white) / .9);
  color: hsl(var(--ink));
  font-size: .8rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: hsl(var(--white));
  border-radius: 999px;
  padding: .6rem 1.1rem;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}
.rating-pill .stars { color: hsl(var(--gold)); letter-spacing: 1px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(var(--blush-light) / .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--ink) / .06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: hsl(var(--ink));
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand img { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; }
.nav-brand .nav-brand-logos { display: flex; align-items: center; flex-shrink: 0; }
.nav-brand .nav-brand-logos img {
  height: 34px;
  width: 34px;
  border: 2px solid hsl(var(--blush-light));
  box-shadow: 0 1px 4px hsl(var(--ink) / .15);
}
.nav-brand .nav-brand-logos img + img { margin-left: -12px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-weight: 500;
  font-size: .95rem;
  color: hsl(var(--ink) / .8);
  transition: color .15s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: hsl(var(--accent-dark)); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-cta > a.btn-primary { flex-shrink: 0; }
.nav-phone {
  font-weight: 600;
  font-size: .9rem;
  display: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: hsl(var(--ink));
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid hsl(var(--ink) / .08);
}
.mobile-menu a { font-weight: 500; padding: .4rem 0; }
.mobile-menu.is-open { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, hsl(var(--accent-soft)), hsl(var(--blush-light)));
}
.hero--home::before {
  background: linear-gradient(135deg, hsl(var(--blush)), hsl(var(--lavender)) 65%, hsl(var(--blush-light)));
}

/* ---------- Full-bleed video hero ---------- */
.hero--video {
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  padding-block: 6rem;
}
.hero--video::before { content: none; }
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsl(330 45% 8% / .6), hsl(330 45% 8% / .35) 45%, hsl(330 45% 8% / .72));
  z-index: 1;
}
.hero-video-content { position: relative; z-index: 2; max-width: 640px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.5rem 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* ---------- Cards ---------- */
.card {
  background: hsl(var(--white));
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.grid {
  display: grid;
  gap: 1.75rem;
}
/* Auto-fit fluid grids: columns reflow continuously from the measured
   minimum card width down to a single column — no manual breakpoints
   needed for most sections. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Brand hub cards on homepage */
.brand-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
  color: hsl(var(--white));
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}
.brand-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.brand-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, hsl(var(--ink) / .78), hsl(var(--ink) / .1) 60%);
  z-index: 1;
}
.brand-card-content { position: relative; z-index: 2; padding: 2.25rem; width: 100%; }
.brand-card-content .eyebrow { color: hsl(var(--white) / .85); }
.brand-card-content h3 { color: hsl(var(--white)); font-size: 2rem; }
.brand-card-content p { color: hsl(var(--white) / .9); }

/* ---------- Pricing ---------- */
.price-card {
  background: hsl(var(--white));
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid hsl(var(--ink) / .06);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.price-card.is-featured {
  border-color: hsl(var(--accent));
  box-shadow: var(--shadow-elegant);
}
.price-card-badge {
  align-self: flex-start;
  background: hsl(var(--accent));
  color: hsl(var(--white));
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 999px;
}
.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.price-table td { padding: .35rem 0; border-bottom: 1px dashed hsl(var(--ink) / .12); }
.price-table td:last-child { text-align: right; font-weight: 700; color: hsl(var(--accent-dark)); }
.price-card ul { display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; color: hsl(var(--muted-ink)); }
.price-card ul li::before { content: "✓ "; color: hsl(var(--accent-dark)); font-weight: 700; }
.price-note { font-size: .85rem; color: hsl(var(--muted-ink)); font-style: italic; }

/* ---------- Reviews ---------- */
.review-card {
  background: hsl(var(--white));
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}
.review-card .stars { color: hsl(var(--gold)); margin-bottom: .75rem; display: block; }
.review-author { font-weight: 700; margin-top: 1rem; }
.review-when { font-size: .8rem; color: hsl(var(--muted-ink)); }
.review-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: hsl(var(--accent-dark));
}
.review-link:hover { text-decoration: underline; }

/* ---------- Why-us / feature grid ---------- */
.feature {
  text-align: left;
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: hsl(var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* ---------- Gallery ---------- */
.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.gallery-item img { aspect-ratio: 1/1; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* ---------- Before / After ----------
   Dedicated grid instead of the shared auto-fit .grid-3 — with only 3
   cards, auto-fit either kept them too small (3-up) or stretched a lone
   3rd card to the full row width (2-up). Explicit 2-col → 1-col gives
   consistently large, evenly-sized cards at every width. The breakpoint
   is well clear of the phone range, so mobile is unaffected — it was
   already a single full-width column and stays that way, just bigger. */
.ba-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) {
  .ba-grid { grid-template-columns: 1fr; }
}
.ba-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: hsl(var(--white));
}
.ba-images { display: grid; grid-template-columns: 1fr 1fr; }
.ba-half { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.ba-half img { width: 100%; height: 100%; object-fit: cover; }
.ba-tag {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: hsl(var(--ink) / .75);
  color: hsl(var(--white));
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 999px;
}
.ba-tag.after { left: auto; right: .6rem; background: hsl(var(--accent)); }
.ba-caption { padding: 1rem 1.25rem; font-size: .9rem; color: hsl(var(--muted-ink)); text-align: center; }

/* ---------- FAQ ---------- */
.faq-item {
  background: hsl(var(--white));
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0;
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: 1rem; }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: hsl(var(--ink));
}
.faq-question .icon { transition: transform .2s ease; flex-shrink: 0; color: hsl(var(--accent-dark)); }
.faq-item.is-open .faq-question .icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-item.is-open .faq-answer { max-height: 400px; }
.faq-answer-inner { padding: 0 1.5rem 1.25rem; color: hsl(var(--muted-ink)); }

/* ---------- Contact / Info blocks ---------- */
.info-row { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.info-row .icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: hsl(var(--accent-soft));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-row strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--muted-ink)); }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: .4rem 0; border-bottom: 1px solid hsl(var(--ink) / .06); }
.hours-table td:last-child { text-align: right; font-weight: 600; }
.hours-table tr.is-closed td:last-child { color: hsl(var(--muted-ink)); }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, hsl(var(--accent)), hsl(var(--accent-dark)));
  color: hsl(var(--white));
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.cta-banner h2 { color: hsl(var(--white)); }
.cta-banner p { color: hsl(var(--white) / .9); max-width: 560px; margin-inline: auto; }
.cta-banner .btn-primary { background: hsl(var(--white)); color: hsl(var(--accent-dark)); box-shadow: none; }
.cta-banner .btn-primary:hover { background: hsl(var(--white) / .9); }

/* ---------- Footer ---------- */
.site-footer {
  background: hsl(var(--ink));
  color: hsl(var(--white) / .85);
  padding: 3.5rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-grid h4 { color: hsl(var(--white)); font-size: 1rem; margin-bottom: 1rem; }
.footer-grid a { color: hsl(var(--white) / .7); }
.footer-grid a:hover { color: hsl(var(--white)); }
.footer-grid ul li { margin-bottom: .6rem; }
.social-row { display: flex; gap: .75rem; margin-top: 1rem; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%;
  background: hsl(var(--white) / .1);
  display: flex; align-items: center; justify-content: center;
}
.footer-bottom {
  border-top: 1px solid hsl(var(--white) / .12);
  padding-top: 1.5rem;
  font-size: .85rem;
  color: hsl(var(--white) / .55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: hsl(var(--white));
  box-shadow: 0 -6px 20px hsl(var(--ink) / .12);
  padding: .75rem 1rem;
  gap: .75rem;
}
.mobile-cta-bar .btn { flex: 1; }

/* ==========================================================================
   Responsive — one shared breakpoint for the nav↔hamburger switch, the
   header CTA↔sticky-bar switch, and the mobile-cta-bar's appearance.
   Measured from the widest real nav (6 links + phone number + logo, on
   the detailing/tinting pages): brand+links+cta needs ~1036px at minimum
   before it collides, so the breakpoint sits at 1080px with headroom.
   Keeping these three in sync is the whole point — a mismatched pair is
   what causes a stretch of viewport widths with no visible CTA at all.
   ========================================================================== */
@media (min-width: 1080px) {
  .nav-phone { display: inline-flex; align-items: center; gap: .4rem; }
}

@media (max-width: 1079px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta > a.btn-primary { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 72px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .nav-brand { font-size: 1.1rem; }
  .nav-brand img { height: 34px; width: 34px; }
}

@media (max-width: 400px) {
  .container { padding-inline: 1rem; }
  .btn { padding: .8rem 1.4rem; font-size: .9rem; }
}

/* Respect reduced-motion preference: freeze autoplay hero videos on their
   poster frame instead of forcing continuous motion, and drop hover-lift
   transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .gallery-item img {
    transition: none !important;
  }
  .btn:hover, .card:hover { transform: none; }
  .gallery-item:hover img { transform: none; }
}
