/* =========================================================
   Smith Automotive of Reidsville — styles
   Change the colors and fonts here and the whole site follows.
   ========================================================= */
:root {
  --black: #000000;
  --white: #ffffff;
  --ink: #2b2b2b;          /* body text on white sections */
  --red: #e03127;          /* accent — replace with the exact hex from Wix */
  --line: rgba(255, 255, 255, 0.55);
  --photo-fallback: #2c2c2c;

  --font-head: "Questrial", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-logo: "Kaushan Script", "Brush Script MT", cursive;

  --gutter: clamp(1rem, 4.2vw, 4.5rem);
  --maxw: 1600px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, figure, blockquote, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--white); color: var(--black); padding: .6rem 1rem;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */
.btn-circle {
  display: inline-grid;
  place-items: center;
  width: 9rem;
  height: 9rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: transparent;
  font: inherit;
  font-size: 1.1rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, color .2s;
  flex-shrink: 0;
}

.btn-circle--dark { border-color: var(--black); color: var(--black); }

.btn-circle--red { border-color: var(--red); color: var(--red); }

.btn-pill {
  display: inline-block;
  padding: .85rem 1.4rem;
  border: 2px solid var(--white);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}

/* ---------- Header ---------- */
.site-header { background: var(--black); }

.header-inner {
  max-width: 1920px;
  margin: 0 auto;
  padding: 1rem var(--gutter) 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem 3rem;
  align-items: start;
}

.logo { display: block; text-decoration: none; }
.logo img { width: clamp(220px, 18vw, 320px); max-width: none; height: auto; }  /* never squeezed */
.logo img + .logo-text { display: none; }   /* text logo only shows when no image file */

.logo-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  padding: .8rem 1.3rem .7rem;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.35) 0 2px, transparent 2px 9px),
    linear-gradient(135deg, #d8d8d8, #a9a9a9 55%, #cfcfcf);
  border: 3px solid #8d8d8d;
  color: #111;
  line-height: 1;
}
.logo-script { white-space: nowrap; font-family: var(--font-logo); font-size: clamp(1.8rem, 2.6vw, 2.6rem); }
.logo-sub { font-family: Georgia, "Times New Roman", serif; font-size: .8rem; margin-top: .2rem; }

.brand-address { font-size: .95rem; margin-top: .5rem; max-width: 18rem; }

.header-hours { justify-self: end; font-size: 1.05rem; line-height: 1.55; }
.header-phone {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1.45rem;
  text-decoration: none;
  margin-bottom: .35rem;
}
.header-phone:hover { color: var(--red); }
.header-hours .hours-list li { white-space: nowrap; }
.hours-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .15rem; }
.hours-label { text-decoration: underline; text-underline-offset: 4px; }
.header-hours .hours-list li.is-today { color: var(--red); }
.header-hours .ct-open { font-size: .78rem; padding: .15rem .6rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2vw, 2.25rem);
  font-size: 1.15rem;
}
.site-nav ul { display: flex; flex-wrap: nowrap; gap: clamp(1.4rem, 2vw, 2.25rem); }
.site-nav a { white-space: nowrap; }
.site-nav ul a { text-decoration: none; }
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { color: var(--red); }

.nav-toggle, .mobile-quote { display: none; }

/* ---------- Hero + services ---------- */
.hero {
  position: relative;
  /* clip-path keeps the fixed photo from showing outside this section */
  clip-path: inset(0);
  padding-bottom: 3.5rem;
}
.hero > :not(.hero-bg) { position: relative; z-index: 1; }

/* Photo stays still while the page scrolls over it (works on phones too) */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--photo-fallback);
  /* darker on the left where the headline sits, lighter on the right */
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.38) 100%),
    url("../images/hero.jpg"),
    radial-gradient(ellipse at 70% 30%, #4a4a4a, #1c1c1c 70%);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.hero-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter) 0 calc(var(--gutter) + 5%);
}
.hero-title {
  font-family: var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 5.3vw, 5rem);
  line-height: 1.12;
  letter-spacing: .005em;
}
.hero-sub {
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  font-weight: 300;
  margin: 1.3rem 0 1.8rem;
  letter-spacing: .02em;
}

.services-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
}

/* every tile draws a 1px outline that merges with its neighbours */
.svc, .svc-title, .svc-feature {
  background: var(--black);
  box-shadow: 0 0 0 1px var(--line);
}

.svc-title {
  grid-column: 3 / 5; grid-row: 1;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.4rem, 1.9vw, 1.9rem);
  padding: 1.4rem 1.6rem;
}
.svc-battery { grid-column: 3; grid-row: 2; }
.svc-tires   { grid-column: 4; grid-row: 2; }
.svc-ac      { grid-column: 1; grid-row: 3; }
.svc-feature { grid-column: 2 / 5; grid-row: 3; }
.svc-row4    { grid-row: 4; }

.svc {
  min-height: clamp(15rem, 20vw, 21rem);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  text-align: center;
}
.svc h3 { font-weight: 400; font-size: 1.2rem; line-height: 1.35; letter-spacing: .01em; }

.svc-icon { width: 6.5rem; height: 6.5rem; overflow: visible; }
.svc-icon .w, .svc-icon .r {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svc-icon .w { stroke: var(--white); }
.svc-icon .r { stroke: var(--red); }
.svc-icon .fill-bg { fill: var(--black); }

.svc-feature {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1.5rem, 6vw, 7rem);
  padding: 2.5rem clamp(1.5rem, 6vw, 7rem);
}
.svc-feature-text {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 2.8vw, 3rem);
  line-height: 1.2;
}

/* ---------- White sections ---------- */
.light-section { background: var(--white); color: var(--ink); padding: 3.5rem 0 4.5rem; }

.section-heading {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.1vw, 2.15rem);
  color: var(--black);
}
.rule { border: 0; border-top: 1px solid var(--black); margin: 2rem 0; }
.rule--light { border-top-color: var(--line); }

.big-statement {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.3vw, 3.1rem);
  line-height: 1.2;
  color: var(--black);
  padding: 2rem 0;
}

.about-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  margin-top: 3.5rem;
}
.about-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  max-width: 36rem;
  font-size: 1.15rem;
  line-height: 1.8;
  padding-left: .5rem;
}

.photo-slot {
  background-color: #d9d9d9;
  background-size: cover;
  background-position: center;
}

/* Photos drift slightly inside their frames while scrolling */
.parallax { position: relative; overflow: hidden; }
.parallax-inner {
  position: absolute;
  left: 0; right: 0;
  top: -15%;
  height: 130%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}


.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--ink);
  border-top: 0;
}
.review {
  padding: 2.75rem clamp(1.5rem, 7vw, 8rem) 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}
.review + .review { border-left: 1px solid var(--ink); }
.review figcaption { font-family: var(--font-head); color: var(--red); font-size: 1.75rem; line-height: 1.2; }

/* ---------- Contact ---------- */
.contact { background: var(--black); padding: clamp(4rem, 8vw, 7rem) 0 2.5rem; }

.ct-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.ct-title {
  font-family: var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.05;
}
.ct-lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); font-weight: 300; margin-top: 1rem; line-height: 1.6; text-wrap: balance; }

/* three info tiles, drawn with the same thin lines as the service grid */
.ct-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
}
.ct-card {
  background: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}
.ct-icon { width: 3rem; height: 3rem; margin-bottom: .6rem; }
.ct-icon .w, .ct-icon .r { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ct-icon .w { stroke: var(--white); }
.ct-icon .r { stroke: var(--red); }
.ct-card h3 {
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #bdbdbd;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.ct-phone {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  text-decoration: none;
  line-height: 1.2;
}
.ct-phone:hover { color: var(--red); }
.ct-card address { font-size: 1.2rem; line-height: 1.55; }
.ct-link {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  margin-top: .2rem;
}
.ct-link:hover { color: var(--red); }
.ct-note { font-size: .9rem; color: #9a9a9a; margin-top: auto; padding-top: .4rem; }

.ct-open {
  font-size: .82rem;
  letter-spacing: .02em;
  text-transform: none;
  font-weight: 400;
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.ct-open.is-open { color: #7ee2a0; }
.ct-open.is-closed { color: #ff8a80; }

.ct-hours { width: 100%; margin: 0; display: grid; gap: .3rem; font-size: 1.02rem; }
.ct-hours > div { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.ct-hours dt { font-weight: 400; }
.ct-hours dd { margin: 0; color: #d6d6d6; white-space: nowrap; }
.ct-hours .is-today dt, .ct-hours .is-today dd { color: var(--red); }

/* form + map */
.ct-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1px;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.ct-form-shell, .ct-map { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); background: var(--black); }
.ct-form-shell { position: relative; }
.contact-form { padding: clamp(1.75rem, 3.5vw, 3rem); }
.ct-form-title {
  font-family: var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: 1.5rem;
}
.ct-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}
.ct-wide { grid-column: 1 / -1; }
.contact-form label { display: grid; gap: .45rem; font-size: .95rem; color: #d6d6d6; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .6);
  color: var(--white);
  font: inherit;
  font-size: 1.05rem;
  padding: .85rem .9rem;
  border-radius: 0;
  transition: border-color .2s;
}
.contact-form input::placeholder { color: rgba(255, 255, 255, .45); }
.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--white); }
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.contact-form textarea { resize: vertical; min-height: 8.5rem; }

.ct-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.6rem;
}
.ct-submit-row .btn-circle { width: 7.5rem; height: 7.5rem; margin-left: auto; }
.btn-circle--solid { background: var(--red); border-color: var(--red); color: var(--white); }

.hp { position: absolute; left: -9999px; }

.form-status { font-size: 1rem; }
.form-status.is-error { color: #ff8a80; }
.contact-form.is-sending button[type="submit"] { opacity: .5; pointer-events: none; }

.ct-map { min-height: 26rem; }
.ct-map iframe {
  width: 100%;
  height: 100%;
  min-height: 26rem;
  border: 0;
  display: block;   /* full-color Google Map */
}

.ct-pay {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.ct-pay p { font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: #bdbdbd; }
.ct-pay ul { display: flex; flex-wrap: wrap; gap: .55rem; }
.ct-pay li {
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .92rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: .6rem 2rem;
  flex-wrap: wrap;
  font-size: .92rem;
  color: #a8a8a8;
  padding-top: 1.75rem;
}

/* ---------- Full-background photo sections (About, reviews) ----------
   Same technique as the top photo: it stays still while the page scrolls over it. */
.photo-section {
  position: relative;
  clip-path: inset(0);
  color: var(--white);
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}
.photo-section > .container { position: relative; z-index: 1; }
.section-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--photo-fallback);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.about .section-bg {
  /* darker on the left where the text sits */
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.84) 0%, rgba(0,0,0,.68) 45%, rgba(0,0,0,.35) 100%),
    url("../images/about.jpg");
}
.testimonials .section-bg {
  background-image:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
    url("../images/testimonials.jpg");
}
.photo-section .section-heading,
.photo-section .big-statement { color: var(--white); }
.about .about-text { font-size: 1.2rem; max-width: 38rem; }

.testimonials .reviews { border: 0; gap: 1px; margin-top: clamp(2rem, 4vw, 3rem); }
.testimonials .review {
  background: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
  color: var(--white);
}
.testimonials .review + .review { border: 0; }

/* ---------- Animations ----------
   Only hidden when JavaScript is running, so the page never goes blank. */
.js :is(
  .hero-title, .hero-sub, .hero-content .btn-circle,
  .svc > *, .svc-feature-text, .svc-feature .btn-circle,
  .section-heading, .big-statement, .about-text p, .about-text .btn-circle,
  .aboutpg-text p, .aboutpg-photo, .values-title, .value-tile > *, .mp-wrap,
  .review, .ct-head > *, .ct-card, .ct-main > *, .ct-pay, .site-footer
) {
  opacity: 0;
  transition: opacity 1s ease var(--delay, 0s);
}
.js .is-visible:is(
  .hero-title, .hero-sub, .hero-content .btn-circle,
  .svc > *, .svc-feature-text, .svc-feature .btn-circle,
  .section-heading, .big-statement, .about-text p, .about-text .btn-circle,
  .aboutpg-text p, .aboutpg-photo, .values-title, .value-tile > *, .mp-wrap,
  .review, .ct-head > *, .ct-card, .ct-main > *, .ct-pay, .site-footer
) { opacity: 1; }

/* Reduce Motion (Mac/iPhone setting): gentle fades still play, but photos don't drift */
@media (prefers-reduced-motion: reduce) {
  .parallax-inner { transform: none !important; }
}

/* ---------- Tablet ---------- */
/* If the menu can't fit on one line beside the logo and hours,
   it moves to its own row (main.js checks this as the window resizes) */
@media (min-width: 821px) {
  .site-header.nav-below .header-inner { grid-template-columns: auto 1fr; }
  .site-header.nav-below .site-nav { grid-column: 1 / -1; justify-content: space-between; }
}
/* Same fallback if JavaScript is off */
@media (min-width: 821px) and (max-width: 1800px) {
  html:not(.js) .header-inner { grid-template-columns: auto 1fr; }
  html:not(.js) .site-nav { grid-column: 1 / -1; justify-content: space-between; }
}

@media (max-width: 1100px) {
  .review { padding-inline: 2rem; }
}

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    padding-bottom: 1rem;
    gap: 1rem .75rem;
  }
  .hero-title br { display: none; }
  .brand-address, .header-hours { display: none; }
  .logo img { width: 100%; max-width: 190px; }   /* shrinks to leave room for the header buttons */
  .logo-script { font-size: 1.35rem; }
  .logo-text { padding: .55rem .8rem .5rem; }
  .logo-sub { font-size: .6rem; }

  .mobile-quote {
    display: inline-block;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: var(--red);
    text-decoration: none;
    font-weight: 500;
    font-size: .92rem;
    white-space: nowrap;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    background: none;
    border: 1px solid var(--line);
    color: var(--white);
    cursor: pointer;
  }
  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    display: block;
    width: 1.3rem;
    height: 2px;
    background: currentColor;
    position: relative;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem 0 .5rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .8rem 0; border-bottom: 1px solid #222; }
  .site-nav .btn-pill { text-align: center; }

  .hero-content { padding-left: var(--gutter); padding-top: 3.5rem; }
  /* phones: text spans the width, so darken evenly */
  .hero-bg { background-image: linear-gradient(rgba(0,0,0,.64), rgba(0,0,0,.64)), url("../images/hero.jpg"), radial-gradient(ellipse at 70% 30%, #4a4a4a, #1c1c1c 70%); }
  .hero { padding-bottom: 2rem; }

  .services-grid { grid-template-columns: 1fr 1fr; margin-top: 3rem; }
  .services-grid > * { grid-column: auto; grid-row: auto; }
  .svc-title, .svc-feature { grid-column: 1 / -1; }
  .svc-title { margin-top: 0; }
  .svc { min-height: 13rem; }
  .svc-icon { width: 5rem; height: 5rem; }
  .svc h3 { font-size: 1.05rem; }
  .svc-feature { flex-direction: column; align-items: flex-start; padding: 2.5rem 1.5rem; }

  .about-body { grid-template-columns: 1fr; }
  .about-text { max-width: none; padding-left: 0; }

  .reviews { grid-template-columns: 1fr; }
  .review + .review { border-left: 0; border-top: 1px solid var(--ink); }

}

@media (max-width: 350px) {
  .services-grid { grid-template-columns: 1fr; }
  .mobile-quote { padding: .45rem .7rem; font-size: .85rem; }
  .logo-script { font-size: 1.15rem; }
  .logo-text { padding: .45rem .6rem .4rem; }
  .header-inner { gap: 1rem .5rem; }
}

/* ---------- Request a Quote popup ---------- */
body.modal-open { overflow: hidden; }

.quote-modal {
  width: min(1320px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--white);
  background: var(--black);
  color: var(--white);
  overflow: auto;
}
.quote-modal::backdrop { background: rgba(0, 0, 0, .72); }
.quote-modal[open] { animation: quote-in .35s ease; }
.quote-modal[open]::backdrop { animation: quote-fade .35s ease; }
@keyframes quote-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes quote-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .quote-modal[open], .quote-modal[open]::backdrop { animation: none; }
}

.quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2.4rem) clamp(1.25rem, 4.3vw, 3.6rem);
  border-bottom: 1px solid var(--white);
}
.quote-head h2 {
  font-family: var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.8vw, 3.3rem);
  line-height: 1;
}
.quote-close {
  width: 3.2rem; height: 3.2rem;
  display: grid; place-items: center;
  background: none; border: 0; color: var(--white);
  cursor: pointer; flex-shrink: 0;
}
.quote-close svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.2; fill: none; }
.quote-close:hover { color: var(--red); }

.quote-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr) minmax(9rem, .85fr);
  grid-template-areas:
    "first   last    ."
    "service message submit"
    "phone   message submit";
  gap: 1.1rem 2.8rem;
  padding: clamp(2rem, 7vw, 8rem) clamp(1.25rem, 4.3vw, 3.6rem) clamp(2rem, 4.5vw, 4.5rem);
}
.q-first   { grid-area: first; }
.q-last    { grid-area: last; }
.q-service { grid-area: service; }
.q-phone   { grid-area: phone; }
.q-message { grid-area: message; }
.q-submit  { grid-area: submit; place-self: center; }

.quote-body label {
  display: grid;
  gap: .7rem;
  text-align: center;
  font-size: 1.05rem;
}
.q-message { grid-template-rows: auto 1fr; }

.quote-body input,
.quote-body select,
.quote-body textarea {
  width: 100%;
  min-height: 4.8rem;
  background: transparent;
  border: 1px solid var(--white);
  border-radius: 0;
  color: var(--white);
  font: inherit;
  padding: .9rem 1rem;
}
.quote-body input[data-phone] { text-align: center; }
.quote-body input::placeholder { color: rgba(255,255,255,.85); }
.quote-body textarea { height: 100%; resize: vertical; }
.quote-body :is(input, select, textarea):focus { outline: 2px solid var(--red); outline-offset: 0; }

.select-wrap { position: relative; display: block; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 3rem; cursor: pointer; }
.select-wrap select option { background: var(--black); color: var(--white); }
.select-wrap::after {
  content: "";
  position: absolute; right: 1.5rem; top: 50%;
  width: .6rem; height: .6rem;
  border-right: 1.5px solid var(--white); border-bottom: 1.5px solid var(--white);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.quote-foot {
  border-top: 1px solid var(--white);
  min-height: clamp(3.5rem, 6vw, 5.5rem);
  display: flex;
  align-items: center;
  padding: 1rem clamp(1.25rem, 4.3vw, 3.6rem);
}
.quote-status { font-size: 1.05rem; }
.quote-status.is-error { color: #ff8a80; }

.quote-form.is-sending .q-submit { opacity: .5; pointer-events: none; }

/* Result overlays cover the popup only */
.quote-modal.has-result { overflow: hidden; }
.quote-result, .form-result {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  background: rgba(0, 0, 0, .97);
  text-align: center;
  animation: quote-fade .3s ease;
}
.quote-result[hidden], .form-result[hidden], .result-panel[hidden] { display: none; }
.result-panel {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  max-width: 34rem;
}
.result-icon { width: 5.5rem; height: 5.5rem; }
.result-icon .ring, .result-icon .mark {
  fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.result-success .ring { stroke: var(--white); }
.result-success .mark { stroke: var(--red); }
.result-error .ring, .result-error .mark { stroke: var(--red); }
.result-title {
  font-family: var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.1;
}
.result-text { font-size: 1.15rem; line-height: 1.7; }
.result-text a { color: var(--white); white-space: nowrap; }
.result-text a:hover { color: var(--red); }
.result-actions { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.result-actions .btn-circle { width: 8rem; height: 8rem; }
@media (prefers-reduced-motion: reduce) { .quote-result, .form-result { animation: none; } }

@media (max-width: 820px) {
  .quote-modal { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .quote-body {
    grid-template-columns: 1fr;
    grid-template-areas: "first" "last" "service" "phone" "message" "submit";
    padding-top: 2rem;
  }
  .quote-body label { text-align: left; }
  .quote-body input[data-phone] { text-align: left; }
  .quote-body input, .quote-body select { min-height: 3.4rem; }
  .q-message textarea { min-height: 9rem; }
  .q-submit { place-self: start; }
}

/* ---------- Services page ---------- */
.services-page { background: var(--black); padding: clamp(3rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5.5rem); }
.services-page .section-heading,
.services-page .big-statement { color: var(--white); }
.services-page .big-statement { padding: 1.4rem 0; }

.services-full {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
}
.svc-card {
  background: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
  min-height: clamp(20rem, 28vw, 27rem);
  padding: clamp(3rem, 5vw, 4.5rem) clamp(1.25rem, 3vw, 3rem) 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;   /* icons line up across each row */
  gap: 1.1rem;
  text-align: center;
}
.svc-card .svc-icon { width: 6.5rem; height: 6.5rem; margin-bottom: .6rem; }
.svc-card h3 {
  font-weight: 400;
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
  line-height: 1.3;
  max-width: 16rem;
  min-height: 2.6em;   /* one- and two-line titles take the same space */
  display: grid;
  place-items: center;
}
.svc-card p {
  color: #cfcfcf;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 19rem;
  min-height: 5em;   /* keeps icons and titles lined up across a row */
}

@media (max-width: 1000px) {
  .services-full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .services-full { grid-template-columns: minmax(0, 1fr); }
  .svc-card { min-height: 0; padding: 2.75rem 1.25rem; }
  .svc-card p { min-height: 0; }
}

/* Services page fade-ins */
.js .svc-card > * { opacity: 0; transition: opacity 1s ease var(--delay, 0s); }
.js .svc-card > .is-visible { opacity: 1; }

/* ---------- Contact: smaller screens ---------- */
@media (max-width: 1000px) {
  .ct-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ct-cards .ct-card:last-child { grid-column: 1 / -1; }
  .ct-main { grid-template-columns: minmax(0, 1fr); }
  .ct-map, .ct-map iframe { min-height: 20rem; }
}
@media (max-width: 600px) {
  .ct-cards { grid-template-columns: minmax(0, 1fr); }
  .ct-fields { grid-template-columns: minmax(0, 1fr); }
  .ct-submit-row { flex-direction: column-reverse; align-items: flex-start; }
  .ct-submit-row .btn-circle { margin-left: 0; }
  .site-footer { flex-direction: column; }
}

/* ---------- About Us page ---------- */
.about-page { background: var(--black); padding: clamp(3rem, 8vw, 7rem) 0 clamp(2rem, 5vw, 4rem); }
.about-page .section-heading, .about-page .big-statement,
.values .section-heading { color: var(--white); }
.about-page .big-statement { padding: 1.4rem 0; }

.aboutpg-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 8rem);
  align-items: start;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.aboutpg-text { display: grid; gap: 1.6rem; font-size: 1.15rem; line-height: 1.8; max-width: 34rem; padding-top: .5rem; }
.aboutpg-text a { color: var(--white); text-decoration-color: var(--red); text-underline-offset: 4px; white-space: nowrap; }
.aboutpg-text a:hover { color: var(--red); }
.aboutpg-photo { width: 100%; height: auto; aspect-ratio: 1400 / 1159; object-fit: cover; }

.values { background: var(--black); padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.values-rule { max-width: 76%; }
.values-title {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.2;
  margin: 1.5rem 0 clamp(1.75rem, 4vw, 3.25rem);
}
.values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; }
.value-tile {
  background: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
  min-height: clamp(15rem, 28vw, 28rem);
  display: grid;
  place-items: center;
  padding: 2rem clamp(1rem, 3vw, 3rem);
  text-align: center;
}
.value-tile p {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--red);
  font-size: clamp(1.4rem, 2.3vw, 2.2rem);
  line-height: 1.35;
  letter-spacing: .02em;
  max-width: 15ch;
}
.value-tile .btn-circle { width: 9.5rem; height: 9.5rem; }

@media (max-width: 900px) {
  .aboutpg-body { grid-template-columns: minmax(0, 1fr); }
  .aboutpg-text { max-width: none; }
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .values-rule { max-width: none; }
}
@media (max-width: 520px) {
  .values-grid { grid-template-columns: minmax(0, 1fr); }
  .value-tile { min-height: 11rem; }
  .value-tile p { max-width: 20ch; font-size: 1.4rem; }
}

/* ---------- Map page ---------- */
.map-page { background: var(--black); padding: clamp(3rem, 8vw, 7rem) 0 clamp(1rem, 3vw, 2rem); }
.map-page .section-heading, .map-page .big-statement { color: var(--white); }
.map-page .big-statement { padding: 1.4rem 0; }

.mp-wrap {
  position: relative;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}
.mp-map iframe { display: block; width: 100%; height: clamp(26rem, 62vh, 40rem); border: 0; }

/* address card sits over the map on wide screens */
.mp-card {
  position: absolute;
  top: clamp(1rem, 2.5vw, 2rem);
  left: clamp(1rem, 2.5vw, 2rem);
  width: min(24rem, calc(100% - 2rem));
  background: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 12px 32px rgba(0, 0, 0, .45);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
}
.mp-name { font-family: var(--font-head); font-weight: 400; text-transform: uppercase; font-size: 1.35rem; line-height: 1.25; }
.mp-card address { font-size: 1.15rem; line-height: 1.55; }
.mp-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .6rem; }
.mp-btn {
  display: inline-block;
  padding: .8rem 1.2rem;
  border: 1px solid var(--white);
  border-radius: 999px;
  text-decoration: none;
  font-size: .98rem;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.mp-btn--red { background: var(--red); border-color: var(--red); }

/* the big map is already on this page, so the contact section's small one is hidden */
.page-map .ct-map { display: none; }
.page-map .ct-main { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 760px) {
  .mp-card { position: static; width: auto; box-shadow: none; border-top: 1px solid rgba(255, 255, 255, .35); }
  .mp-map iframe { height: 22rem; }
}

/* ---------- Desktop-only / phone-only pieces ---------- */
.only-mobile { display: none !important; }
@media (max-width: 820px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: inline-grid !important; }
}

/* Hover looks only on devices with a mouse (phones would otherwise "stick" them after a tap) */
@media (hover: hover) {
  .btn-circle:hover { background: var(--white); color: var(--black); }
  .btn-circle--dark:hover { background: var(--black); color: var(--white); }
  .btn-circle--red:hover { background: var(--red); color: var(--white); }
  .btn-pill:hover { background: var(--white); color: var(--black); }
  .btn-circle--solid:hover { background: var(--white); border-color: var(--white); color: var(--black); }
  .result-error .btn-circle--red:hover { color: var(--white); }
  .mp-btn:hover { background: var(--white); color: var(--black); }
  .mp-btn--red:hover { background: var(--white); border-color: var(--white); color: var(--black); }
}

/* ---------- Floating call button (phones only) ---------- */
.float-call { display: none; }
@media (max-width: 820px) {
  .float-call {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 50;                      /* above the page; the quote popup still opens on top of it */
    width: 3.75rem;
    height: 3.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 255, 255, .85);
    -webkit-tap-highlight-color: transparent;
  }
  .float-call svg { width: 1.9rem; height: 1.9rem; fill: currentColor; transform: scaleX(-1); }   /* mirrored handset */
  .float-call:active { transform: scale(.94); }
  /* leave room so the button never covers the last lines of the page */
  body { padding-bottom: 5.5rem; }
}
