/* Fix N Go — landing page styles. Mobile-first; breakpoints at 600px, 900px and 1200px. */

:root {
  --red: #c8161d;          /* white text on this: ~5.9:1 */
  --red-dark: #a51218;
  --red-on-dark: #ff6b6b;  /* small text on --ink: ~6.6:1 */
  --ink: #0f1418;
  --ink-2: #1a2127;
  --text: #1c2329;
  --muted: #545d66;
  --line: #dde2e6;
  --bg-soft: #f3f5f7;
  --focus: #1d6fe0;
  --focus-on-dark: #ffbf47;
  --radius: 8px;
  --bar-h: 60px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--red); }
a:hover { color: var(--red-dark); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hero :focus-visible,
.estimate :focus-visible,
.final-cta :focus-visible,
.site-footer :focus-visible,
.mobile-bar :focus-visible { outline-color: var(--focus-on-dark); }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: #fff; color: var(--ink); padding: .75rem 1rem; border-radius: var(--radius); font-weight: 700;
}
.skip-link:focus { top: 1rem; }

main:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.icon-accent { color: var(--red); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; padding: .8rem 1.5rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 800; font-size: 1rem; letter-spacing: .03em; line-height: 1.2;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn-sub { font-weight: 600; font-size: .85rem; letter-spacing: 0; opacity: .9; }
.btn-sm { min-height: 44px; padding: .55rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: #56616b; color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

.cta-row { display: flex; flex-direction: column; gap: .75rem; }

/* ---------- Header ---------- */

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-name { color: var(--red); font-weight: 900; font-size: 1.45rem; letter-spacing: .06em; }
.brand-sub { color: var(--ink); font-weight: 800; font-size: .72rem; letter-spacing: .2em; margin-top: .3rem; }
.header-actions { display: none; align-items: center; gap: 1.25rem; }
.header-phone { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); font-weight: 800; text-decoration: none; }
.header-phone .icon { color: var(--red); }

/* ---------- Shared section styles ---------- */

.section { padding: 3.5rem 0; scroll-margin-top: 1rem; }
.eyebrow {
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: .6rem;
}
.eyebrow-on-dark { color: var(--red-on-dark); }
.section h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); color: var(--ink); }
.section-lead { margin-top: .75rem; color: var(--muted); font-size: 1.1rem; max-width: 40rem; }
.section-cta { margin-top: 2rem; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- 1. Hero ---------- */

.hero { background: var(--ink); color: #fff; }
.hero-grid { display: grid; gap: 1.75rem; padding: 2.25rem 0 0; }
.hero h1 { font-size: clamp(2.35rem, 1.6rem + 3.6vw, 4rem); letter-spacing: -.01em; }
.hero .accent { color: var(--red-on-dark); }
.hero-lead { margin: 1rem 0 1.5rem; font-size: 1.1rem; color: #d7dde2; max-width: 34rem; }
.hero-media { margin-inline: -1.25rem; }
.hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 45%; }

/* ---------- 2. Trust ---------- */

.trust { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.trust-list { list-style: none; display: grid; gap: .9rem; padding: 1.4rem 0; }
.trust-list li { display: flex; align-items: center; gap: .65rem; color: var(--ink); line-height: 1.3; }
.trust-link { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.trust-link:hover { color: var(--red); }
/* Location item: the whole item (icon + address) is one directions link. The ::after enlarges the touch target
   to at least 44px without changing the visible trust-bar layout. */
.trust-location-link { position: relative; display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.trust-location-link::after { content: ""; position: absolute; inset: -11px -6px; }
.trust-location-link strong { text-decoration: underline; text-underline-offset: .2em; }
.trust-location-link:hover strong { color: var(--red); }
/* Google rating badge: stars + score on the first line, source + count on the second. */
.trust-rating-link { display: inline-grid; gap: .15rem; text-decoration: none; line-height: 1.2; }
.trust-rating-top { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.05rem; }
.trust-rating-sub { font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- 3. Services ---------- */

.service-grid { list-style: none; display: grid; gap: 1rem; margin-top: 1.75rem; }
.service {
  border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; background: #fff;
}
.service h3 { font-size: 1.15rem; color: var(--ink); margin-bottom: .35rem; }
.service p { color: var(--muted); }

/* ---------- 4. Real repair results ---------- */

.results { background: var(--bg-soft); }
.gallery { list-style: none; display: grid; gap: 1rem; margin-top: 1.75rem; }
.gallery figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: .7rem 1rem; font-size: .95rem; font-weight: 700; color: var(--ink); }

/* ---------- 5. Estimate ---------- */

.estimate { background: var(--ink); color: #fff; scroll-margin-top: 0; }
.estimate h2 { color: #fff; }
.estimate-grid { display: grid; gap: 1.75rem; }
.estimate-intro p { color: #d7dde2; margin-top: .75rem; max-width: 30rem; }
.estimate-intro .eyebrow { color: var(--red-on-dark); margin-top: 0; }
.estimate-call a { color: #fff; font-weight: 800; white-space: nowrap; }

.estimate-panel {
  background: var(--ink-2); border: 1px solid #2c353d; border-radius: 12px;
  padding: 1.25rem; margin-inline: -.5rem;
}
.estimate-fallback p { color: #d7dde2; margin-bottom: 1rem; }
.estimate-fallback .fallback-title { color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: .5rem; }

.wizard-progress { margin-bottom: 1.25rem; }
.wizard-count { font-size: .9rem; font-weight: 700; color: #c3cad0; margin-bottom: .5rem; }
.progress-track { height: 6px; background: #2c353d; border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; width: 20%; background: var(--red-on-dark); border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .progress-bar { transition: width .25s ease; }
}

.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { padding: 0; margin-bottom: 1rem; width: 100%; }
.step-title { font-size: 1.4rem; color: #fff; }
.step-title:focus { outline: none; }
.step-title:focus-visible { outline: 3px solid var(--focus-on-dark); outline-offset: 4px; }
.optional { font-weight: 400; font-size: 1rem; color: #c3cad0; }

.choice-grid { display: grid; gap: .6rem; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: .75rem 1rem;
  border: 2px solid #3a444d; border-radius: var(--radius); background: var(--ink);
  font-weight: 700; color: #fff;
}
.choice span::before {
  content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 2px solid #8a959e; background: transparent;
}
.choice input:checked + span { border-color: var(--red-on-dark); background: #2a1719; }
.choice input:checked + span::before { border-color: var(--red-on-dark); background: var(--red-on-dark); box-shadow: inset 0 0 0 3px #2a1719; }
.choice input:focus-visible + span { outline: 3px solid var(--focus-on-dark); outline-offset: 2px; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .4rem; color: #fff; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; min-height: 50px; padding: .7rem .9rem;
  font: inherit; font-size: 1.0625rem; /* >=16px avoids iOS zoom-on-focus */
  color: var(--text); background: #fff; border: 2px solid #8a959e; border-radius: var(--radius);
}
.field input[aria-invalid="true"] { border-color: var(--red-on-dark); border-width: 3px; }
/* Native "No file chosen" text is hidden: selections accumulate in the preview list and count below. */
.field input[type="file"] { width: 100%; font: inherit; font-size: .95rem; color: transparent; }
.hint:empty { display: none; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; margin-right: .75rem; min-height: 44px; padding: .5rem 1rem;
  border: 2px solid #fff; border-radius: var(--radius); background: transparent; color: #fff; cursor: pointer;
}

.field-error {
  display: flex; gap: .4rem; margin-top: .45rem; font-weight: 700; font-size: .95rem; color: #ffb3b3;
}
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #ffb3b3; color: var(--ink); font-size: .8rem; font-weight: 900; }
.step > .field-error { margin-top: .75rem; }

.hint { font-size: .95rem; color: #c3cad0; margin-bottom: 1rem; }
.summary { background: var(--ink); border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: 1rem; font-size: .95rem; color: #d7dde2; }
.summary:empty { display: none; }

.photo-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.photo-list:empty { display: none; }
.photo-list li { position: relative; }
.photo-list img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #2c353d; }
.photo-remove {
  margin-top: .3rem; width: 100%; min-height: 40px; font: inherit; font-size: .85rem; font-weight: 700;
  background: transparent; color: #fff; border: 1px solid #56616b; border-radius: 6px; cursor: pointer;
}

.wizard-nav { display: flex; gap: .75rem; margin-top: 1.25rem; }
.wizard-nav [data-next] { flex: 1; }
.submit-message:empty { display: none; }
.submit-message {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius);
  background: #fff; color: var(--text); border-left: 5px solid var(--red); font-weight: 600;
}
.submit-message a { font-weight: 800; }

/* Spam honeypot: removed from view without display:none (some bots skip hidden inputs). */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.estimate-receipt p { color: #d7dde2; margin-top: .75rem; }
.receipt-title { font-size: 1.4rem; color: #fff; }
.receipt-title:focus { outline: none; }
.receipt-title:focus-visible { outline: 3px solid var(--focus-on-dark); outline-offset: 4px; }
.estimate-receipt .receipt-ref { color: #fff; font-size: 1.15rem; letter-spacing: .04em; white-space: nowrap; }
.receipt-photos:empty { display: none; }

/* ---------- 6. Reviews ---------- */

.reviews-head { display: grid; gap: 1.25rem; align-items: end; }
.reviews-intro { display: grid; gap: .4rem; justify-items: start; }
.rating-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .6rem; }
.rating-score { font-size: 1.25rem; color: var(--ink); line-height: 1.2; }
.rating-score strong { font-size: 1.6rem; }
.rating-count { font-size: 1.05rem; color: var(--ink); font-weight: 700; }
.rating-source { font-size: .9rem; color: var(--muted); }
.text-link { font-weight: 800; margin-top: .4rem; }

/* Star rows (decorative; the rating is always stated in text). */
.stars { display: inline-flex; gap: .1rem; color: var(--red); flex: none; }
.star { width: 1rem; height: 1rem; fill: currentColor; }
.stars-lg .star { width: 1.4rem; height: 1.4rem; }

/* Review carousel: native horizontal scroll-snap (swipe/trackpad/keyboard); JS only adds Previous/Next,
   the position indicator and Read more. No autoplay, no looping. 1 card < 600px, 2 at 600-1199px, 3 at >= 1200px. */
.reviews-controls { display: flex; align-items: center; gap: .75rem; }
.reviews-nav {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
}
.reviews-nav:hover:not([aria-disabled="true"]) { background: var(--ink); color: #fff; }
.reviews-nav[aria-disabled="true"] { opacity: .35; cursor: default; }
.reviews-position { min-width: 8.5rem; text-align: center; font-weight: 700; color: var(--ink); font-size: .95rem; }
.reviews-carousel { margin-top: 1.5rem; }
.review-track {
  /* position: relative keeps the visually-hidden text inside off-screen cards clipped by the scroller. */
  position: relative; list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 1rem;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: .25rem .25rem 1rem;
  scroll-padding-inline: .25rem; /* snap points align exactly with card edges (matches the script's paging) */
}
.review-track:focus-visible { outline-offset: 4px; }
.reviews-carousel.is-enhanced .review-track { scrollbar-width: none; }
.reviews-carousel.is-enhanced .review-track::-webkit-scrollbar { display: none; }
.review-card {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: .7rem; min-width: 0;
  padding: 1.35rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.review-head { display: flex; align-items: center; gap: .75rem; }
.review-initials {
  width: 2.6rem; height: 2.6rem; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
.review-name { font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.review-text { color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.review-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.review-more {
  align-self: flex-start; min-height: 44px; padding: 0 .25rem; margin: -.4rem 0 -.4rem -.25rem;
  border: 0; background: none; color: var(--red); font: inherit; font-weight: 800; text-decoration: underline;
  text-underline-offset: .2em; cursor: pointer;
}
.review-source { margin-top: auto; font-size: .85rem; color: var(--muted); }
.reviews-foot { margin-top: 1rem; display: grid; gap: .25rem; justify-items: start; }
.reviews-note { font-size: .9rem; color: var(--muted); }

/* ---------- 7. Process ---------- */

.process { background: var(--bg-soft); }
.process-list { list-style: none; counter-reset: step; display: grid; gap: 1rem; margin-top: 1.75rem; }
.process-list li {
  counter-increment: step; position: relative; padding: 1.1rem 1.25rem 1.1rem 4.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.process-list li::before {
  content: counter(step); position: absolute; left: 1.1rem; top: 1rem;
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 800;
}
.process-list h3 { font-size: 1.1rem; color: var(--ink); margin-bottom: .3rem; }
.process-list p { color: var(--muted); }

/* ---------- 8. Location ---------- */

.location-grid { display: grid; gap: 1.5rem; align-items: end; }
.address { font-style: normal; margin-top: 1rem; font-size: 1.1rem; line-height: 1.6; color: var(--ink); }
/* Location card (built-in; no map imagery or third-party map). */
.location-card {
  margin-top: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; max-width: 34rem;
  padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft);
}
.location-card .address { margin-top: 0; }
.location-pin { width: 2rem; height: 2rem; flex: none; fill: currentColor; color: var(--red); margin-top: .15rem; }
.location-actions { display: grid; gap: .75rem; }
.directions-label { font-weight: 800; color: var(--ink); }
.directions-group { display: grid; gap: .75rem; }

/* ---------- 9. Final CTA ---------- */

.final-cta { background: var(--ink); color: #fff; padding: 3rem 0; }
.final-inner { display: grid; gap: 1.5rem; }
.final-cta h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); }

/* ---------- Footer ---------- */

.site-footer { background: #080b0d; color: #c3cad0; padding: 2rem 0; font-size: .95rem; }
.footer-inner { display: grid; gap: .35rem; }
.footer-name { color: #fff; font-weight: 800; }
.site-footer a { color: #fff; }

/* ---------- Mobile quick-action bar ---------- */

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom); background: var(--ink);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
}
.mobile-bar a {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--bar-h); font-weight: 900; letter-spacing: .05em; text-decoration: none; color: #fff;
}
.mobile-bar .mobile-estimate { background: var(--red); }
.mobile-bar-hidden .mobile-bar { transform: translateY(110%); }
@media (prefers-reduced-motion: no-preference) {
  .mobile-bar { transition: transform .2s ease; }
}

/* ---------- >= 600px ---------- */

@media (min-width: 600px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .review-track { grid-auto-columns: calc((100% - 1rem) / 2); }
  .trust-list { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery li:first-child { grid-column: 1 / -1; }
  .gallery li:first-child img { aspect-ratio: 16 / 9; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .choice-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .estimate-panel { padding: 2rem; margin-inline: 0; }
  .directions-group { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- >= 900px ---------- */

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .reviews-head { grid-template-columns: 1fr auto; }

  .site-header { position: sticky; top: 0; z-index: 40; }
  .header-actions { display: flex; }
  :root { --header-h: 76px; }
  .section, .estimate { scroll-margin-top: var(--header-h); }
  .wizard { scroll-margin-top: calc(var(--header-h) + 1rem); }

  .section { padding: 5rem 0; }

  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3rem; padding: 4rem 0; }
  .hero-media { margin-inline: 0; }
  .hero-media img { aspect-ratio: 3 / 2; border-radius: 12px; }

  .service-grid { grid-template-columns: repeat(3, 1fr); }

  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery li:first-child { grid-column: auto; }
  .gallery li:first-child img { aspect-ratio: 4 / 3; }

  .estimate-grid { grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: start; }
  .estimate-intro { position: sticky; top: calc(var(--header-h) + 2rem); }

  .process-list { grid-template-columns: repeat(5, 1fr); }
  .process-list li { padding: 4rem 1.1rem 1.25rem; }
  .process-list li::before { top: 1.1rem; }

  .location-grid { grid-template-columns: 1fr auto; }
  .final-inner { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 1200px) {
  .trust-list { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .review-track { grid-auto-columns: calc((100% - 2rem) / 3); }
}
