/* The Flooring Guys — components. Semantic tokens only: no raw hex here.
   Verify with:  grep -nE '#[0-9A-Fa-f]{3,6}\b' components.css  → no matches. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* The page must never pan sideways on a phone. `clip` (not `hidden`) so the
   sticky header keeps working. Belt-and-braces on top of per-element fixes. */
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font-body); font-size: var(--fs-base);
  line-height: var(--lh-body); color: var(--color-text-body);
  background: var(--color-bg-page);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); color: var(--color-text-heading);
  line-height: var(--lh-tight); margin: 0 0 var(--sp-4);
}
h1 { font-size: var(--fs-3xl); } h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); } h4 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--sp-4); }
a { color: var(--color-text-link); }
a:hover { color: var(--color-text-link-hover); }
:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible,
.hero :focus-visible, .cta-band :focus-visible, .mobile-bar :focus-visible {
  outline-color: var(--color-focus-ring-inverse);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-4); }
.section { padding: var(--sp-7) 0; }
.section--alt { background: var(--color-bg-alt); }
.section-kicker {
  color: var(--color-text-accent); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; font-size: var(--fs-xs); margin: 0 0 var(--sp-2);
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--color-bg-page); color: var(--color-text-link);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
}
.skip-link:focus { left: var(--sp-2); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--color-bg-header); color: var(--color-text-inverse);
}
.site-header .container {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; flex-shrink: 0; }
.brand img { width: 55px; height: 48px; }
.brand-name {
  font-family: var(--font-heading); font-weight: 700;
  color: var(--color-text-inverse); font-size: var(--fs-lg); line-height: 1.1;
  white-space: nowrap;
}
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: var(--sp-3); margin: 0; padding: 0; }
.site-nav a {
  color: var(--color-nav-link); text-decoration: none; font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-1); display: inline-block; white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; color: var(--color-nav-link); }
.header-phone {
  color: var(--color-text-inverse); text-decoration: none; font-weight: 700;
  font-size: var(--fs-sm); white-space: nowrap; flex-shrink: 0;
}
.site-header .header-cta { flex-shrink: 0; }
.header-phone:hover { text-decoration: underline; color: var(--color-text-inverse); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch-target-min); padding: var(--sp-2) var(--sp-5);
  background: var(--color-cta-bg); color: var(--color-cta-text);
  border: 0; border-radius: var(--radius); font-weight: 700;
  font-size: var(--fs-sm); text-decoration: none; cursor: pointer;
  transition: background var(--motion-fast); white-space: nowrap;
}
.btn:hover { background: var(--color-cta-bg-hover); color: var(--color-cta-text); }
.btn--ghost {
  background: transparent; color: var(--color-text-inverse);
  box-shadow: inset 0 0 0 2px var(--color-text-inverse);
}
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--lg { font-size: var(--fs-base); padding: var(--sp-3) var(--sp-6); }

/* mobile nav */
.nav-toggle {
  display: none; background: none; border: 0; color: var(--color-text-inverse);
  min-width: var(--touch-target-min); min-height: var(--touch-target-min);
  font-size: 1.6rem; cursor: pointer; margin-left: auto;
}
@media (max-width: 1151px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: block; position: fixed; inset: 64px 0 0 0;
    background: var(--color-bg-header); z-index: var(--z-nav-panel);
    overflow-y: auto; padding: var(--sp-5);
  }
  .site-nav.open ul { flex-direction: column; gap: 0; }
  .site-nav.open a {
    font-size: var(--fs-lg); padding: var(--sp-3) var(--sp-2); display: block;
  }
  .nav-toggle { display: block; }
  /* Phone + Text + Quote live in the sticky bottom bar on mobile; keeping
     them in the header too overflowed it 160px past the viewport. */
  .header-cta, .site-header .header-phone { display: none; }
}

/* mobile sticky bottom bar */
.mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: var(--z-mobile-bar);
  display: flex; background: var(--color-bg-header);
  padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + env(safe-area-inset-bottom));
  gap: var(--sp-2);
}
.mobile-bar a { flex: 1; min-width: 0; padding-left: var(--sp-3); padding-right: var(--sp-3); }
@media (min-width: 1152px) { .mobile-bar { display: none; } }
@media (max-width: 1151px) { body { padding-bottom: 76px; } }

/* ---------- hero ---------- */
/* Owner preference (carried from THG): NO overlay boxes behind hero text.
   The photo itself is brightened at build time; text sits on a bottom
   gradient scrim only as far as legibility needs. */
.hero { position: relative; background: var(--color-bg-header); }
.hero-photo { position: absolute; inset: 0; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,28,34,.72) 0%, rgba(28,28,34,.28) 45%, rgba(28,28,34,.12) 100%);
}
.hero-inner {
  position: relative; padding: var(--sp-8) 0; color: var(--color-text-inverse);
  text-shadow: 0 1px 8px rgba(28,28,34,.55);
}
.hero h1 { color: var(--color-text-inverse); font-size: var(--fs-hero); max-width: 18ch; }
.hero-sub { font-size: var(--fs-lg); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.proof-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-4) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); font-weight: 600; }
.proof-chips li { display: flex; align-items: center; gap: var(--sp-2); }

/* ---------- cards ---------- */
.card-grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  background: var(--color-bg-page); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden;
  display: flex; flex-direction: column;
}
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: var(--sp-4) var(--sp-4) var(--sp-5); flex: 1; display: flex; flex-direction: column; }
.card h2, .card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.card p { color: var(--color-text-muted); font-size: var(--fs-sm); flex: 1; }
.card-link { font-weight: 700; font-size: var(--fs-sm); text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-link::after { content: " \2192"; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-bg-band); color: var(--color-text-inverse); text-align: center; }
.cta-band h2 { color: var(--color-text-inverse); }
.cta-band .btn { background: var(--color-bg-page); color: var(--color-text-accent); }
.cta-band .btn:hover { background: var(--color-bg-alt); }

.trust-line { font-size: var(--fs-xs); font-weight: 600; opacity: .92; margin-top: var(--sp-4); }
.section .trust-line { color: var(--color-text-muted); }

/* ---------- process strip ---------- */
.process { border-top: 4px solid var(--color-bg-accent-rule); }
.process-steps { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; margin: 0; padding: 0; list-style: none; }
.process-steps li { counter-increment: step; }
.process-steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-cta-bg); color: var(--color-cta-text);
  font-weight: 700; margin-bottom: var(--sp-3);
}

/* ---------- review band ---------- */
.review-band blockquote {
  margin: 0; background: var(--color-bg-page); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: var(--sp-5);
}
.review-band cite { font-style: normal; font-weight: 700; color: var(--color-text-heading); display: block; margin-top: var(--sp-3); font-size: var(--fs-sm); }
.review-grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stars { color: var(--color-text-accent); letter-spacing: .12em; font-size: var(--fs-sm); }

/* ---------- prose (generated page bodies) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--sp-6); }
.prose h3, .prose h4 { margin-top: var(--sp-5); }
.prose img { border-radius: var(--radius); margin: var(--sp-5) 0; }
.page-hero { background: var(--color-bg-alt); padding: var(--sp-6) 0; }
.page-hero h1 { margin-bottom: var(--sp-2); }
.page-hero .breadcrumbs { font-size: var(--fs-xs); color: var(--color-text-muted); margin: 0; }

/* split: photo + copy, side by side */
.split { display: grid; gap: var(--sp-6); grid-template-columns: 2fr 3fr; align-items: center; }
.split--flip { grid-template-columns: 3fr 2fr; }
.split-photo { border-radius: var(--radius); box-shadow: var(--shadow-raised); width: 100%; }
@media (max-width: 900px) {
  .split, .split--flip { grid-template-columns: 1fr; }
  .split-photo { max-width: 480px; }
}

/* two-column with photo rail */
.prose-layout { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 72ch) minmax(220px, 1fr); align-items: start; }
.photo-rail { display: grid; gap: var(--sp-4); }
.photo-rail img { border-radius: var(--radius); box-shadow: var(--shadow-card); }
@media (max-width: 900px) { .prose-layout { grid-template-columns: 1fr; } }

/* ---------- blog ---------- */
.post-meta { color: var(--color-text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.post-list { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: var(--sp-5) 0 0; list-style: none; }
.tag-cloud a {
  display: inline-block; padding: var(--sp-1) var(--sp-3);
  background: var(--color-bg-alt); border-radius: 999px;
  font-size: var(--fs-xs); text-decoration: none;
}
.tag-cloud a:hover { background: var(--color-bg-band); color: var(--color-text-inverse); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr 1fr; max-width: 640px; }
.form-grid .form-field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-field label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--sp-1); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: var(--touch-target-min);
  padding: var(--sp-2) var(--sp-3); font: inherit;
  border: 1px solid var(--color-border-input); border-radius: var(--radius-sm);
  background: var(--color-bg-page); color: var(--color-text-body);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: var(--sp-1); }
.form-error { color: var(--color-error); font-size: var(--fs-sm); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--color-bg-footer); color: var(--color-text-inverse);
  padding: var(--sp-7) 0 var(--sp-6); margin-top: var(--sp-8);
}
.footer-cols { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-col-title { font-weight: 700; margin-bottom: var(--sp-3); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .05em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--sp-2); }
.site-footer a { color: var(--color-text-inverse); text-decoration: none; font-size: var(--fs-sm); }
.site-footer a:hover { text-decoration: underline; color: var(--color-text-inverse); }
.footer-legal { margin-top: var(--sp-6); padding-top: var(--sp-4); font-size: var(--fs-xs); opacity: .85; }

/* ---------- duralast colorway swatches ---------- */
.swatch-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.color-card {
  background: var(--color-bg-page); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden; position: relative;
}
.color-card img:not(.color-chip) { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.color-chip {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  border: 2px solid var(--color-bg-page); object-fit: cover;
}
.color-card-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-2) var(--sp-3);
}
.color-card-row h3 { font-size: var(--fs-base); margin: 0; }
.heart-btn {
  background: none; border: 0; cursor: pointer; font-size: 1.5rem;
  color: var(--color-text-muted);
  min-width: var(--touch-target-min); min-height: var(--touch-target-min);
}
.heart-btn.on { color: var(--color-cta-bg); }

/* sticky "your list" bar, above .mobile-bar on small screens */
.fav-bar {
  position: fixed; bottom: 76px; left: 0; right: 0;
  z-index: calc(var(--z-mobile-bar) + 1);
  background: var(--color-bg-band); color: var(--color-text-inverse);
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-4); padding: var(--sp-2) var(--sp-4);
}
@media (min-width: 1152px) { .fav-bar { bottom: 0; } }
.fav-bar .btn { background: var(--color-bg-page); color: var(--color-text-accent); }
.fav-bar[hidden] { display: none; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: var(--sp-8) 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
