/* =========================================================
   YSB Pro Painting — mobile-first stylesheet
   Breakpoints: 480 / 768 / 1024 / 1280 / 1600
   ========================================================= */

:root {
  --navy: #0f2a44;
  --navy-2: #173a5c;
  --accent: #f4b63f;
  --accent-dark: #e0a12a;
  --ink: #1b2430;
  --muted: #5b6776;
  --line: #e3e7ec;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --ok: #1f8a4c;
  --err: #c0392b;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 42, 68, .08);
  --shadow-lg: 0 20px 50px rgba(15, 42, 68, .18);

  --header-h: 64px;
  --gutter: 1rem;
  --maxw: 1200px;

  --fs-h1: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
  --fs-h2: clamp(1.6rem, 1.15rem + 1.9vw, 2.5rem);
  --fs-lead: clamp(1.05rem, .98rem + .35vw, 1.25rem);
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--navy-2); }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
body.modal-open { overflow: hidden; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--navy); padding: .6rem 1rem; z-index: 1000; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}
.container-narrow { --maxw: 820px; }

.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.06); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-sm { min-height: 44px; padding: .5rem 1rem; font-size: .95rem; white-space: nowrap; }
.btn-lg { min-height: 54px; padding: .9rem 1.8rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: not-allowed; }

.link-btn {
  background: none;
  border: 0;
  padding: .5rem 0;
  min-height: 44px;
  color: var(--navy-2);
  font-weight: 700;
  text-align: left;
}
.link-btn:hover { color: var(--accent-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(15,42,68,.08); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.logo b { color: #ca922f; } /* muted gold: a touch darker and less saturated than --accent-dark */
.logo img { width: 34px; height: 34px; }
.logo-light { color: #fff; }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-phone { display: none; align-items: center; gap: .4rem; color: var(--navy); font-weight: 700; text-decoration: none; min-height: 44px; padding: 0 .4rem; }
.header-phone svg { width: 18px; height: 18px; fill: var(--accent-dark); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  background: none;
  border: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav: slide-in drawer from the right (page stays visible, dimmed, on the left) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(8, 20, 34, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }

.main-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2; /* above the header buttons */
  width: min(320px, 82vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px 0 0 22px;
  box-shadow: -20px 0 50px rgba(8, 20, 34, .2);
  padding: calc(1rem + env(safe-area-inset-top)) 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .35s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .35s;
}
.main-nav.is-open { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.22, .8, .24, 1), visibility 0s; }

.nav-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: .75rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.nav-title { font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.nav-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
}
.nav-close:hover { background: var(--line); }

.nav-links { display: flex; flex-direction: column; }
.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: .5rem .25rem;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 231, 236, .7);
  transition: color .2s, padding-left .2s;
}
.nav-links a::after { content: "\2192"; font-weight: 400; color: var(--accent-dark); opacity: .7; transition: transform .2s; }
.nav-links a:hover, .nav-links a:active { color: var(--accent-dark); padding-left: .5rem; }
.nav-links a:hover::after { transform: translateX(3px); }

/* Links slide in one after another when the drawer opens */
.main-nav.is-open .nav-links a { animation: nav-item-in .4s ease-out both; }
.main-nav.is-open .nav-links a:nth-child(2) { animation-delay: .04s; }
.main-nav.is-open .nav-links a:nth-child(3) { animation-delay: .08s; }
.main-nav.is-open .nav-links a:nth-child(4) { animation-delay: .12s; }
.main-nav.is-open .nav-links a:nth-child(5) { animation-delay: .16s; }
@keyframes nav-item-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.nav-foot { margin-top: auto; padding-top: 1.5rem; display: grid; gap: .6rem; }
.nav-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.nav-call:hover { border-color: var(--accent-dark); }
.nav-call svg { width: 17px; height: 17px; fill: var(--accent-dark); }
.nav-hours { margin: .25rem 0 0; text-align: center; font-size: .82rem; color: var(--muted); }
body.menu-open { overflow: hidden; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 35;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(15, 42, 68, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility 0s linear .25s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s, visibility 0s, background .2s; }
.to-top svg { width: 20px; height: 20px; fill: var(--navy); }
.to-top:hover { background: var(--accent); }
body.menu-open .to-top { opacity: 0; visibility: hidden; }


/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: clamp(560px, 88svh, 820px);
  display: flex;
  align-items: center;
  padding-block: 3.5rem;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: var(--navy); }
.hero-media img, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video { opacity: 0; transition: opacity .8s; }
.hero-video.is-playing { opacity: 1; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10,28,46,.92) 0%, rgba(10,28,46,.75) 50%, rgba(10,28,46,.35) 100%);
}
.hero-content { max-width: var(--maxw); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero .eyebrow { color: var(--accent); }
.hero-lead { font-size: var(--fs-lead); max-width: 38rem; color: rgba(255,255,255,.9); }
.hero-ctas { display: flex; flex-direction: column; gap: .75rem; margin: 1.75rem 0 2rem; }

.trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.25rem; max-width: 36rem; font-weight: 600; font-size: .95rem; }
.trust-list li { display: flex; align-items: center; gap: .45rem; }
.trust-list svg { width: 20px; height: 20px; flex: none; fill: var(--accent); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section-head p:last-child { color: var(--muted); font-size: var(--fs-lead); margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.25rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.service-card { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card p { color: var(--muted); flex: 1; }
.icon-badge { width: 52px; height: 52px; border-radius: 12px; background: rgba(244,182,63,.18); display: grid; place-items: center; margin-bottom: 1rem; }
.icon-badge svg { width: 28px; height: 28px; fill: var(--navy); }

/* ---------- Work / Before-After ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}
.ba, .video-card {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #dfe5ec;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.ba img, .video-card video, .video-card .yt, .video-card .yt img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0,0,0,.3);
}
.ba-handle::after {
  content: "\2194";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.ba input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.ba-label {
  position: absolute;
  top: .75rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: rgba(15,42,68,.8);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  pointer-events: none;
}
.ba-label-before { left: .75rem; }
.ba-label-after { right: .75rem; background: var(--accent); color: var(--navy); }
.ba figcaption, .video-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 1rem .8rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  pointer-events: none;
}

.yt { border: 0; padding: 0; background: #000; }
.yt::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: rgba(0,0,0,.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: background-color .2s;
}
.yt:hover::after { background-color: #e02020; }
.video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Vertical work videos ---------- */
.reels-head { text-align: center; margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0 1.25rem; }
.reels-head h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin-bottom: .25rem; }
.reels-head p { color: var(--muted); margin: 0; }
.reel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  max-width: 600px;
  margin-inline: auto;
}
.reel {
  position: relative;
  margin: 0;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a1e31;
  box-shadow: var(--shadow);
}
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* In full screen, show the whole frame instead of cropping */
.reel video:fullscreen { object-fit: contain; background: #000; }
.reel video:-webkit-full-screen { object-fit: contain; background: #000; }
.reel-play {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.reel-play svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  padding: 16px 14px 16px 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(15, 42, 68, .55);
  border: 2px solid rgba(255,255,255,.85);
  fill: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .2s, transform .2s;
}
.reel-play:hover svg, .reel-play:focus-visible svg { background: var(--accent-dark); transform: translate(-50%, -50%) scale(1.06); }
.reel figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem .8rem .75rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
  font-weight: 700;
  font-size: clamp(.8rem, .75rem + .25vw, .95rem);
  line-height: 1.3;
  pointer-events: none;
}
@media (min-width: 768px) {
  .reel-grid { gap: 1.25rem; }
  .reel-play svg { width: 72px; height: 72px; padding: 20px 17px 20px 22px; }
}

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.step { position: relative; padding: 1.75rem 1.5rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.step p { color: var(--muted); margin: 0; }
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  text-align: center;
}
.why-item strong { display: block; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); color: var(--accent); line-height: 1.1; }
.why-item span { font-size: clamp(.78rem, .72rem + .3vw, .9rem); color: rgba(255,255,255,.85); }

/* ---------- Reviews ---------- */
.review { margin: 0; display: flex; flex-direction: column; }
.review p { flex: 1; font-size: 1.02rem; }
.review footer { display: flex; align-items: center; gap: .75rem; padding-top: 1rem; margin-top: .25rem; border-top: 1px solid var(--line); }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--accent); font-weight: 800; font-size: .9rem; letter-spacing: .04em; }
.who { display: flex; flex-direction: column; line-height: 1.25; }
.who b { color: var(--navy); font-size: 1rem; }
.who small { color: var(--muted); font-size: .85rem; }
.stars { color: var(--accent); font-size: 1.15rem; letter-spacing: .1em; margin-bottom: .6rem; }

/* ---------- Areas ---------- */
.areas { display: grid; gap: 1.5rem; align-items: center; }
.areas p { color: var(--muted); }
.areas .about-line { color: var(--ink); font-size: 1.05rem; }
.areas .about-line strong { color: var(--navy); }
.pill-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill-list li { padding: .55rem 1rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); font-weight: 600; color: var(--navy); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .75rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  font-weight: 700;
  color: var(--navy);
  position: relative;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-dark);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 1.25rem 1.2rem; margin: 0; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }
.cta-inner { display: grid; gap: 1.5rem; }
.cta-actions { display: flex; flex-direction: column; gap: .75rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1e31; color: rgba(255,255,255,.75); padding: 3rem 0 calc(4.75rem + env(safe-area-inset-bottom)); font-size: .95rem; } /* bottom room so the back-to-top button never covers the credit line */
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .75rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-inner { display: grid; gap: 2rem; }
.footer-inner .logo { margin-bottom: .75rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; }
.footer-bottom .credit { color: rgba(255,255,255,.45); font-size: .8rem; }
.footer-bottom p { margin: 0; }

/* ---------- Quote modal (3-step, FlooringDNA style) ---------- */
[hidden] { display: none !important; }

.quote-modal {
  --qm-bg: #f3ede4;
  --qm-card: rgba(255,255,255,.45);
  border: 0;
  padding: 0;
  margin: auto;
  width: min(100% - 1.25rem, 880px);
  max-width: none;
  max-height: 90dvh;
  border-radius: 10px;
  background: var(--qm-bg);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  overflow: hidden;
}
.quote-modal::backdrop { background: rgba(8, 20, 34, .45); backdrop-filter: blur(6px); }
.quote-modal[open] { animation: modal-in .3s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.qm { position: relative; display: flex; flex-direction: column; max-height: 90dvh; }

.qm-progress { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: rgba(0,0,0,.06); z-index: 2; }
.qm-progress span { display: block; height: 100%; width: 33.33%; background: var(--accent-dark); box-shadow: 0 0 8px rgba(224,161,42,.5); transition: width .6s ease; }

.qm-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1rem .5rem 1.25rem; }
.qm-brand {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.35);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0,0,0,.6);
}
.qm-brand img { width: 16px; height: 16px; }
.modal-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.7);
  font-size: 1.6rem;
  line-height: 1;
}
.modal-close:hover { background: rgba(0,0,0,.12); }

.qm-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.qm-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: .5rem 1.25rem 1.25rem; }

.qstep { animation: step-in .35s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qstep h2 { font-size: clamp(1.1rem, 1rem + .7vw, 1.45rem); color: #111; margin-bottom: .35rem; }
.qstep-sub { font-size: .88rem; font-weight: 500; color: rgba(0,0,0,.6); margin-bottom: 1rem; }
.qstep-narrow { max-width: 420px; margin-inline: auto; padding-top: .5rem; }
.qstep-narrow h2 { margin-bottom: 1.25rem; }
.qstep[data-step="2"] { text-align: center; }

/* Service cards */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: .9rem .5rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--qm-card);
  color: #111;
  font-weight: 700;
  font-size: .88rem;
  line-height: 1.2;
  text-align: center;
  transition: border-color .2s, background .2s, transform .15s;
}
.svc:hover { background: rgba(255,255,255,.65); }
.svc:active { transform: scale(.98); }
.svc-img { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(0,0,0,.06); flex: none; }
.svc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.svc:hover .svc-img img { transform: scale(1.06); }
.svc[aria-pressed="true"] { border-color: var(--accent-dark); background: rgba(255,255,255,.8); }
.svc[aria-pressed="true"]::after {
  content: "\2713";
  position: absolute;
  top: .45rem;
  right: .45rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
  font-size: .8rem;
  display: grid;
  place-items: center;
}

/* Timeline */
.time-list { display: grid; gap: .6rem; }
.time-opt {
  min-height: 52px;
  padding: .8rem 1rem;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  color: #111;
  font-weight: 700;
  font-size: .98rem;
  transition: border-color .2s, background .2s;
}
.time-opt:hover, .time-opt:focus-visible { border-color: var(--accent-dark); background: #fff; }

.qm-back {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 1.25rem;
  border: 0;
  border-radius: 8px;
  background: rgba(0,0,0,.05);
  color: rgba(0,0,0,.65);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.qm-back:hover { background: rgba(0,0,0,.1); }

/* Contact */
.qm-fields { display: grid; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; font-size: .85rem; color: #222; }
.field span { padding-left: .5rem; letter-spacing: .02em; }
.field input {
  width: 100%;
  min-height: 54px;
  padding: .85rem 1rem;
  border: 1.5px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.6);
  color: #111;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: rgba(0,0,0,.4); }
.field input:focus { outline: none; border-color: var(--accent-dark); box-shadow: 0 0 0 3px rgba(244,182,63,.25); }
.field.has-error input { border-color: var(--err); }
.qm-note { margin: .9rem 0 0; font-size: .8rem; color: rgba(0,0,0,.55); text-align: center; }

.hp { display: none !important; }

/* Sticky footer */
.qm-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .9rem 1.25rem calc(.9rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0,0,0,.06);
  background: rgba(243,237,228,.95);
  animation: foot-in .3s ease-out;
}
@keyframes foot-in { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
.qm-cta { width: 100%; max-width: 420px; letter-spacing: .08em; text-transform: uppercase; border-radius: 12px; }
.qm-foot .qm-back { max-width: 420px; margin-top: .5rem; }
.form-status { width: 100%; max-width: 420px; margin: 0; font-weight: 600; font-size: .88rem; text-align: center; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--err); margin-bottom: .6rem; }

/* ---------- Simple pages (thank-you) ---------- */
.page-simple { padding-block: var(--section-y); min-height: 60vh; }
.page-simple .container-narrow > * + h2 { margin-top: 2rem; }
.thanks { text-align: center; }
.thanks-icon { width: 84px; height: 84px; margin: 0 auto 1.5rem; border-radius: 50%; background: rgba(31,138,76,.12); display: grid; place-items: center; }
.thanks-icon svg { width: 44px; height: 44px; fill: var(--ok); }
.thanks-steps { text-align: left; display: grid; gap: .75rem; margin: 2rem 0; }
.thanks-steps li { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); }
.thanks-steps b { color: var(--navy); }
.thanks-actions { display: flex; flex-direction: column; gap: .75rem; align-items: stretch; }
.page-simple .btn-ghost { color: var(--navy); border-color: var(--navy); }
.page-simple .btn-ghost:hover { background: var(--navy); color: #fff; }


/* Small phones: compact header so logo + Free Quote + menu fit on one line */
@media (max-width: 479px) {
  .header-inner { gap: .5rem; }
  .header-actions { gap: .35rem; }
  .logo { font-size: .98rem; gap: .45rem; }
  .logo img { width: 30px; height: 30px; }
  .header-actions .btn-sm { min-height: 40px; padding: .45rem .85rem; font-size: .85rem; }
  .nav-toggle { width: 40px; padding: 0 9px; }
}
/* Very narrow phones (e.g. first-gen iPhone SE): hero + menu already have a quote button */
@media (max-width: 359px) {
  .header-actions .btn-sm { display: none; }
}

/* =========================================================
   ≥ 480px
   ========================================================= */
@media (min-width: 480px) {
  :root { --gutter: 1.25rem; }
  .hero-ctas, .cta-actions, .thanks-actions { flex-direction: row; flex-wrap: wrap; }
  .thanks-actions { justify-content: center; }
}

/* Short phones (e.g. iPhone SE): tighter popup so all options fit */
@media (max-width: 639px) and (max-height: 700px) {
  .quote-modal, .qm { max-height: 96dvh; }
  .qm-head { padding: .8rem .75rem .25rem 1rem; }
  .qm-body { padding: .25rem 1rem .75rem; }
  .qstep h2 { font-size: 1.02rem; }
  .qstep-sub { margin-bottom: .6rem; }
  .svc-grid { gap: .45rem; }
  .svc { padding: .6rem .4rem; gap: .4rem; font-size: .82rem; }
  .svc-img { width: 50px; height: 50px; }
  .qm-foot { padding-block: .6rem calc(.6rem + env(safe-area-inset-bottom)); }
  .qm-cta { min-height: 48px; }
}

/* =========================================================
   ≥ 640px — roomier popup
   ========================================================= */
@media (min-width: 640px) {
  .qm-head { padding: 1.5rem 1.5rem .75rem 2rem; }
  .qm-body { padding: .5rem 2.5rem 2rem; }
  .qm-fields { grid-template-columns: 1fr 1fr; }
  .svc-grid { grid-template-columns: repeat(4, 1fr); gap: .9rem; }
  .svc-img { width: 76px; height: 76px; }
}

/* Larger cards on wider screens */
@media (min-width: 768px) {
  .svc { padding: 1.4rem .6rem; }
  .svc-img { width: 88px; height: 88px; }
  .qstep-sub { margin-bottom: 1.5rem; }
}


/* =========================================================
   ≥ 768px — tablets
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 2rem; --header-h: 72px; }
  .header-phone { display: inline-flex; }
  .trust-list { grid-template-columns: repeat(4, auto); justify-content: start; max-width: none; }
  .why-grid { padding: 2rem; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .cta-inner { grid-template-columns: 1fr auto; align-items: center; }
  .areas { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  /* Odd card out on the last row: centre it instead of leaving a gap */
  .work-grid > .ba:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - .625rem); }
  .to-top { right: 1.5rem; bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}

/* =========================================================
   ≥ 1024px — desktop nav
   ========================================================= */
@media (min-width: 1024px) {
  .site-header { backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); }
  .nav-toggle, .nav-backdrop, .nav-head, .nav-foot { display: none; }
  .main-nav, .main-nav.is-open {
    position: static;
    width: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    overflow: visible;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .nav-links { flex-direction: row; gap: .25rem; }
  .nav-links a, .main-nav.is-open .nav-links a {
    min-height: 0;
    padding: .6rem .8rem;
    border: 0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    animation: none;
  }
  .nav-links a::after { content: none; }
  .nav-links a:hover { background: var(--bg-alt); color: var(--navy); padding-left: .8rem; }
  .hero { padding-block: 5rem; }
}

/* =========================================================
   ≥ 1280px
   ========================================================= */
@media (min-width: 1280px) {
  :root { --maxw: 1240px; }
}

/* =========================================================
   ≥ 1600px — large screens
   ========================================================= */
@media (min-width: 1600px) {
  :root { --maxw: 1400px; }
  body { font-size: 1.0625rem; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
