/* MG Auto Detailing — site styles
   Palette: red / black / warm white. Fonts: Barlow + Barlow Condensed (self-hosted, OFL). */

/* ---------- Fonts ---------- */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../fonts/barlow-condensed-800.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --red: #c8141e;          /* buttons, accents on light backgrounds */
  --red-dark: #a70f18;     /* hover */
  --red-bright: #f02010;   /* logo red — decorative only */
  --red-on-dark: #ff5a4f;  /* red text on black */
  --ink: #111111;
  --ink-2: #1c1c1d;
  --black: #0b0b0b;
  --paper: #f7f3ec;        /* warm white */
  --paper-2: #efe8dc;
  --white: #fdfdfd;        /* matches the logo background */
  --text: #1a1a1a;
  --muted: #5b554d;
  --muted-on-dark: #bdb6ab;
  --line: #e2d9cb;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 84px;
  --radius: 8px;
  --section-pad: clamp(56px, 8vw, 104px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
button { font: inherit; color: inherit; cursor: pointer; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.banner :focus-visible, .work :focus-visible, .price-bar :focus-visible,
.site-footer :focus-visible, .lightbox :focus-visible { outline-color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.25rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  letter-spacing: .05em; text-transform: uppercase; text-decoration: none; line-height: 1;
  border: 2px solid transparent; border-radius: 6px;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding: 0 1.6rem; font-size: 1.2rem; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2d2d2e; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid rgba(17, 17, 17, .08);
}
.header-inner { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); height: var(--header-h); }
.brand { display: block; flex: none; border-radius: 4px; }
.brand img { height: calc(var(--header-h) - 10px); width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(8px, 2vw, 28px); }
.site-nav a {
  display: block; padding: 10px 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--red); }
.header-call .call-label { display: none; }
.menu-toggle { display: none; }

/* Collapsed mobile menu — only when JavaScript is running; without JS the links stay visible. */
@media (max-width: 899px) {
  :root { --header-h: 64px; }
  .header-call .call-number { display: none; }
  .header-call .call-label { display: inline; }
  .header-call { margin-left: auto; padding: 0 1rem; }
  .site-nav { margin-left: 0; }
}
@media (max-width: 899px) and (scripting: none) {
  .header-inner { flex-wrap: wrap; height: auto; padding-block: 6px; }
  .site-nav { order: 3; width: 100%; }
  .site-nav ul { flex-wrap: wrap; }
}
@media (max-width: 899px) and (scripting: enabled) {
  .menu-toggle {
    display: inline-grid; place-items: center;
    width: 48px; height: 48px; flex: none;
    background: transparent; border: 2px solid var(--ink); border-radius: 6px;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }
  .menu-bars { position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -7px; }
  .menu-bars::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 4px solid var(--red);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .18);
  }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { padding: 16px 4px; font-size: 1.35rem; border-bottom: 0; }
}

/* ---------- Video banner ---------- */
.banner {
  --reel-ratio: 0.5854;            /* 720 / 1230 */
  --banner-h: clamp(260px, 46svh, 480px);
  --reels-shown: 1;
  position: relative;
  background: radial-gradient(ellipse at 50% 40%, #232324 0%, var(--black) 70%);
  border-bottom: 5px solid var(--red);
  padding: 14px var(--gutter);
}
.reels {
  display: flex; justify-content: center; gap: 14px;
  height: min(var(--banner-h),
              (100vw - 2 * var(--gutter) - (var(--reels-shown) - 1) * 14px) / (var(--reels-shown) * var(--reel-ratio)));
}
.reel {
  margin: 0; height: 100%; aspect-ratio: 720 / 1230; flex: none;
  border-radius: 12px; overflow: hidden; background: #1b1b1b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel:nth-child(n + 2) { display: none; }
@media (min-width: 640px) {
  .banner { --reels-shown: 2; --banner-h: clamp(280px, 46svh, 500px); }
  .reel:nth-child(2) { display: block; }
}
@media (min-width: 1024px) {
  .banner { --reels-shown: 3; }
  .reel:nth-child(3) { display: block; }
  .reel:nth-child(1) { order: 2; }     /* featured video sits in the middle */
  .reel:nth-child(2) { order: 1; }
  .reel:nth-child(3) { order: 3; }
}
/* Short laptop screens: keep the headline and buttons above the fold. */
@media (min-width: 640px) and (max-height: 820px) {
  .banner { --banner-h: clamp(240px, 39svh, 480px); padding-block: 12px; }
}
.reel-toggle {
  position: absolute; right: var(--gutter); bottom: 22px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px 0 12px;
  background: rgba(10, 10, 10, .78); color: #fff;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  letter-spacing: .06em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.reel-toggle:hover { background: rgba(10, 10, 10, .92); border-color: #fff; }
.reel-toggle .icon { width: 1.1em; height: 1.1em; }
.reel-toggle .icon-play { display: none; }
.reel-toggle.is-paused .icon-play { display: block; }
.reel-toggle.is-paused .icon-pause { display: none; }
/* Phones: the single video leaves a dark strip on each side; the control sits there as a round button. */
@media (max-width: 639px) {
  .reel-toggle { width: 48px; height: 48px; padding: 0; justify-content: center; right: 12px; bottom: 18px; }
  .reel-toggle .reel-toggle-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .reel-toggle .icon { width: 1.3em; height: 1.3em; }
}

/* ---------- Intro ---------- */
.intro { background: var(--paper); padding-block: clamp(26px, min(4vw, 5vh), 48px); }
@media (max-width: 519px) {
  .intro .btn-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; }
  .intro .btn-lg { padding: 0 .5rem; font-size: 1.02rem; letter-spacing: .03em; gap: .4em; }
  .intro .btn-lg .icon { width: 1.1em; height: 1.1em; }
}
.intro-inner { display: grid; gap: 28px 56px; align-items: center; }
@media (min-width: 900px) { .intro-inner { grid-template-columns: 1.35fr 1fr; } }
.intro h1 {
  font-size: clamp(2.6rem, min(5.6vw, 8.6vh), 4.8rem); font-weight: 800; text-transform: uppercase;
  line-height: .92; letter-spacing: .005em;
}
.intro h1::before {
  content: ""; display: block; width: 72px; height: 6px; margin-bottom: 16px;
  background: var(--red-bright); transform: skewX(-24deg);
}
.lede { margin: 12px 0 22px; font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 500; color: var(--muted); }
.intro-facts {
  display: grid; gap: 18px;
  background: var(--white); border-left: 5px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 26px; box-shadow: 0 1px 0 var(--line);
}
.intro-facts li { display: flex; gap: 14px; align-items: flex-start; line-height: 1.45; }
.intro-facts .icon { color: var(--red); margin-top: 2px; }
.fact-price {
  display: grid; place-items: center; flex: none; width: 1.33rem; height: 1.33rem; margin-top: 2px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--red); line-height: 1;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 8px;
}
.section h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; text-transform: uppercase; }
.section-sub { margin-top: 12px; color: var(--muted); }

/* ---------- Services ---------- */
.services { background: var(--paper); padding-top: clamp(24px, 4vw, 48px); }
.service-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: none; }
.service-card {
  background: var(--white); border-top: 5px solid var(--red); border-radius: 0 0 var(--radius) var(--radius);
  padding: 26px 24px 28px; box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(0, 0, 0, .35);
}
.service-num {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: var(--red); margin-bottom: 14px;
}
.service-card h3 { font-size: 1.65rem; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; }
.service-card p { color: var(--muted); }
.price-bar {
  margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
  background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 22px 26px;
}
.price-bar p { max-width: 60ch; font-size: 1.1rem; }
.price-bar strong { color: #fff; }

/* ---------- Our Work ---------- */
.work { background: var(--ink); color: var(--paper); }
.work .eyebrow { color: var(--red-on-dark); }
.work .section-sub, .gallery-note { color: var(--muted-on-dark); }
.gallery-title {
  font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; text-transform: uppercase;
  display: flex; align-items: center; gap: 14px; margin-bottom: 8px;
}
.gallery-title::after { content: ""; flex: 1; height: 2px; background: rgba(255, 255, 255, .14); }
.gallery-note { margin-bottom: 20px; }
.gallery-finished { margin-top: 18px; }
.gallery-ba + .gallery-title { margin-top: clamp(44px, 6vw, 72px); }

.gallery { display: grid; gap: clamp(12px, 2vw, 22px); }
.gallery-ba { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .gallery-ba { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gallery-ba { max-width: 1040px; margin-inline: auto; } }

@media (min-width: 720px) {
  .gallery-finished { display: flex; align-items: flex-start; }
  .gallery-finished .is-landscape { flex: 1.3333 1 0; }
  .gallery-finished .is-portrait { flex: .75 1 0; }
}

.gallery-link {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: #222; outline-offset: 4px;
}
.gallery-link img { width: 100%; transition: transform .35s ease; }
.gallery-link:hover img { transform: scale(1.03); }
.gallery-zoom {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(10, 10, 10, .72); color: #fff; opacity: .9; transition: background-color .2s;
}
.gallery-link:hover .gallery-zoom, .gallery-link:focus-visible .gallery-zoom { background: var(--red); }
.gallery-zoom .icon { width: 18px; height: 18px; }
.ba-badge {
  position: absolute; left: 10px; padding: 4px 10px; border-radius: 3px;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(10, 10, 10, .82);
}
.ba-before { top: 10px; }
.ba-after { top: calc(50% + 10px); background: var(--red); }
.gallery-caption {
  margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--paper);
}

/* ---------- Reviews ---------- */
.reviews { background: var(--paper); }
.reviews-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.rating-snapshot {
  display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 16px;
  background: var(--white); border-radius: var(--radius); padding: 16px 22px; box-shadow: 0 1px 0 var(--line);
}
.rating-score { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; }
.rating-count { font-weight: 600; }
.rating-date { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.stars { display: flex; gap: 2px; color: var(--red); }
.stars .icon { width: 20px; height: 20px; }

.review-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.review-card figure {
  height: 100%; margin: 0; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 22px;
}
.review-card blockquote { margin: 16px 0 0; flex: 1; font-size: 1.15rem; line-height: 1.55; }
.review-card figcaption {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.review-name { font-weight: 700; }
.review-source { font-size: .9rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { background: var(--white); }
.contact-inner { display: grid; gap: 40px 64px; align-items: center; }
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1.2fr .8fr; } }
.contact-lead { font-size: 1.2rem; margin: -12px 0 28px; color: var(--muted); }
.contact-list { margin: 0 0 32px; display: grid; gap: 0; }
.contact-list > div {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 20px; align-items: start;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt {
  display: flex; align-items: center; gap: 10px; min-height: 1.6em;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase;
}
.contact-list dt .icon { color: var(--red); }
.contact-list dd { margin: 0; }
.contact-list dd a { font-weight: 600; text-underline-offset: 3px; }
.contact-list dd a:hover { color: var(--red); }
.contact-phone { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; line-height: 1; text-decoration: none; letter-spacing: .02em; }
.hours { border-collapse: collapse; }
.hours th, .hours td { padding: 2px 0; text-align: left; vertical-align: top; }
.hours th { font-weight: 600; padding-right: 22px; }
@media (max-width: 520px) {
  .contact-list > div { grid-template-columns: 1fr; }
}
.shop-photo { margin: 0; }
.shop-photo img {
  width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 82%;
  border-radius: var(--radius); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .6);
}
.shop-photo figcaption { margin-top: 12px; color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--paper); padding-block: 56px 28px; border-top: 5px solid var(--red); }
.footer-inner { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-brand img { width: 170px; background: var(--white); border-radius: var(--radius); padding: 8px 10px; }
.footer-name { margin-top: 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-title {
  font-size: 1rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-on-dark); margin-bottom: 12px;
}
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--muted-on-dark); }
.footer-col a { color: var(--paper); text-underline-offset: 3px; }
.footer-col a:hover { color: #fff; }
.footer-legal {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted-on-dark);
}
.footer-legal a { color: var(--paper); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(8, 8, 8, .97); color: #fff;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox-frame { position: relative; height: 100%; display: grid; place-items: center; padding: 64px 84px; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100%; }
.lightbox-img {
  max-width: 100%; max-height: calc(100dvh - 180px); width: auto; height: auto;
  object-fit: contain; border-radius: 6px; touch-action: pan-y;
}
.lightbox-caption {
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase; text-align: center;
}
.lightbox-btn {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px;
  background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
}
.lightbox-btn:hover { background: var(--red); border-color: var(--red); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; top: 26px; left: 22px; font-weight: 600; color: var(--muted-on-dark); }
@media (max-width: 719px) {
  .lightbox-frame { padding: 70px 12px 96px; }
  .lightbox-img { max-height: calc(100dvh - 210px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 22px; transform: none; }
  .lightbox-prev { left: calc(50% - 64px); }
  .lightbox-next { right: calc(50% - 64px); }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .gallery-link:hover img { transform: none; }
}

/* ---------- 404 ---------- */
.not-found { min-height: 100vh; display: grid; align-items: center; }
.not-found img { width: 220px; margin-bottom: 32px; }
.not-found h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; text-transform: uppercase; }
