/* =========================================================================
   Westside Roofing — shared stylesheet
   Type: Fraunces (display, WONK on) + Archivo (text/UI)
   Palette: wet-slate ground, Hill Country limestone paper, verdigris accent
   Fonts are loaded via <link> in each page's <head>.
   ========================================================================= */

:root {
  /* colour */
  --slate:        #1c2a33;
  --slate-800:    #1f2d36;
  --slate-700:    #2b3d47;
  --ink:          #12181c;
  --limestone:    #ede9e2;
  --limestone-2:  #e2dcd0;
  --limestone-3:  #d4ccbc;
  --oak:          #a9834f;
  --oak-soft:     #b9975f;
  --copper:       #6e4a34;
  --patina:       #3e7c6e;
  --patina-bright:#5aa591;

  --paper:        var(--limestone);
  --on-paper:     #1f272b;
  --on-paper-dim: #4f5a5f;
  --on-slate:     #ece7dd;
  --on-slate-dim: #a9b4b3;

  /* type */
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;

  --step--1: 0.833rem;
  --step-0:  1rem;
  --step-1:  1.22rem;
  --step-2:  clamp(1.4rem, 1rem + 1.6vw, 1.6rem);
  --step-3:  clamp(1.7rem, 1.1rem + 2.6vw, 2.15rem);
  --step-4:  clamp(2rem, 1rem + 3.6vw, 3.8rem);
  --step-5:  clamp(2rem, 0.9rem + 4.6vw, 4.2rem);

  /* space */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --band-y: clamp(3.5rem, 8vw, 6.5rem);

  /* geometry — the roof pitch, reused everywhere a line leans */
  --pitch: 7.4deg;

  --header-h: 3.75rem;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--on-paper);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; overflow-wrap: break-word; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible {
  outline: 3px solid var(--patina-bright);
  outline-offset: 3px;
}

/* ---------- layout helpers ---------- */
.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--tight { max-width: 46rem; }

.band { padding-block: var(--band-y); }
.band--slim { padding-block: clamp(1.1rem, 2.5vw, 1.6rem); }
.band--paper  { background: var(--paper); color: var(--on-paper); }
.band--paper2 { background: var(--limestone-2); color: var(--on-paper); }
.band--slate  { background: var(--slate); color: var(--on-slate); }
.band--hairline { border-top: 1px solid var(--limestone-3); }

/* ---------- type primitives ---------- */
.kicker {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--patina);
}
.band--slate .kicker { color: var(--patina-bright); }

.h-display {
  font-family: var(--serif);
  font-weight: 900;
  font-optical-sizing: auto;
  line-height: 1.04;
  letter-spacing: -0.018em;
  font-size: var(--step-4);
}
.h-section {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  font-size: var(--step-3);
}
.lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.32;
  letter-spacing: -0.005em;
}
.prose { max-width: 60ch; }
.prose p + p { margin-top: 1em; }
.measure-tight { max-width: 52ch; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--limestone);
  border-bottom: 1px solid var(--limestone-3);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }
.brand b {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
}
.brand span { color: var(--on-paper-dim); font-weight: 500; }

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.9rem);
  font-size: var(--step--1);
  font-weight: 600;
}
.header-nav a { text-decoration: none; }
.header-nav a:not(.tel):hover { color: var(--patina); }
.header-nav .tel {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.header-nav .sep { width: 1px; height: 1.1rem; background: var(--limestone-3); }
@media (max-width: 620px) {
  .header-nav .lnk { display: none; }
  .header-nav .sep { display: none; }
  .brand span { display: none; }
}

/* =========================================================================
   Hero — the split. One diagonal ridge divides the two audiences.
   ========================================================================= */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  background: var(--slate);
  overflow: hidden;
  isolation: isolate;
}

.plane {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: var(--on-slate);
  transition: clip-path 0.62s cubic-bezier(0.66, 0, 0.34, 1);
  will-change: clip-path;
}
.plane--res { clip-path: polygon(0 0, 45% 0, 55% 100%, 0 100%); z-index: 2; }
.plane--com { clip-path: polygon(45% 0, 100% 0, 100% 100%, 55% 100%); z-index: 1; }

.plane__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.18) contrast(1.22) brightness(0.86);
  transition: filter 0.5s ease, transform 6s ease;
  transform: scale(1.03);
}
.plane--res .plane__photo { background-image: url('img/hero-residential.jpg'); }
.plane--com .plane__photo { background-image: url('img/hero-commercial.jpg'); background-position: center 62%; }

.plane__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(15,20,24,0.95) 0%, rgba(15,20,24,0.72) 26%, rgba(15,20,24,0.2) 58%, rgba(15,20,24,0.34) 100%);
}

.plane__body {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  max-width: min(30rem, 46vw);
}
.plane__label, .plane__desc { display: block; }
.plane--com .plane__body { left: 58%; max-width: min(28rem, 38vw); padding-left: clamp(1.4rem, 2vw, 2rem); }

.plane__kicker {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--patina-bright);
  margin-bottom: 0.7rem;
}
.plane__label {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--step-5);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.plane__desc {
  margin-top: 0.9rem;
  font-size: 1.02rem;
  line-height: 1.5;
  color: #e8e4da;
  max-width: 22rem;
}
.plane__go {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--oak);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.plane__go svg { width: 1.4rem; height: 0.8rem; transition: transform 0.3s ease; }

/* interaction: the hovered plane advances along the ridge, the other recedes */
.hero:has(.plane--res:hover) .plane--res,
.hero:has(.plane--res:focus-visible) .plane--res { clip-path: polygon(0 0, 66% 0, 76% 100%, 0 100%); }
.hero:has(.plane--res:hover) .plane--com,
.hero:has(.plane--res:focus-visible) .plane--com { clip-path: polygon(66% 0, 100% 0, 100% 100%, 76% 100%); }
.hero:has(.plane--com:hover) .plane--com,
.hero:has(.plane--com:focus-visible) .plane--com { clip-path: polygon(34% 0, 100% 0, 100% 100%, 24% 100%); }
.hero:has(.plane--com:hover) .plane--res,
.hero:has(.plane--com:focus-visible) .plane--res { clip-path: polygon(0 0, 34% 0, 24% 100%, 0 100%); }

.plane:hover .plane__photo,
.plane:focus-visible .plane__photo { filter: saturate(1.28) contrast(1.28) brightness(0.98); transform: scale(1); }
.plane:hover .plane__go svg,
.plane:focus-visible .plane__go svg { transform: translateX(0.3rem); }

/* ridge overlay: a standing-seam ridge cap riding the seam — a rounded metal
   fold (perpendicular highlight/shadow), cap-overlap seams at intervals, and a
   soft raised shadow, so it reads as roofing material, not a flat divider line.
   Tracks the seam as the planes resize (same coordinate system + timing). */
.hero__ridge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    repeating-linear-gradient(180deg, rgba(15, 20, 24, 0.32) 0 2px, transparent 2px 40px),
    linear-gradient(90deg,
      #46301f 0%,
      #8a6640 20%,
      #ecd3a0 36%,
      #a9834f 52%,
      #6e4a34 66%,
      rgba(237, 233, 216, 0.62) 66%,
      rgba(237, 233, 216, 0.26) 100%);
  clip-path: polygon(44.45% 0, 45.45% 0, 55.45% 100%, 54.45% 100%);
  transition: clip-path 0.62s cubic-bezier(0.66, 0, 0.34, 1);
  filter: drop-shadow(0 1px 3px rgba(10, 14, 17, 0.45));
}
.hero:has(.plane--res:hover) .hero__ridge,
.hero:has(.plane--res:focus-visible) .hero__ridge { clip-path: polygon(65.45% 0, 66.45% 0, 76.45% 100%, 75.45% 100%); }
.hero:has(.plane--com:hover) .hero__ridge,
.hero:has(.plane--com:focus-visible) .hero__ridge { clip-path: polygon(33.45% 0, 34.45% 0, 24.45% 100%, 23.45% 100%); }

/* centre mark, riding the ridge */
.hero__mark {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  text-align: center;
  width: min(90vw, 26rem);
}
.hero__mark::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132%;
  height: 190%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(15,20,24,0.5) 0%, rgba(15,20,24,0.22) 46%, transparent 70%);
  z-index: -1;
}
.hero__mark .gable {
  width: clamp(3rem, 7vw, 4.6rem);
  height: auto;
  margin-inline: auto;
  color: var(--limestone);
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.55));
}
.hero__mark .wordmark {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 3.4vw, 1.9rem);
  letter-spacing: 0.02em;
  color: var(--limestone);
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
  line-height: 1;
}
.hero__mark .tagline {
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-slate-dim);
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}

/* mobile: stack the planes, drop the clip geometry */
@media (max-width: 860px) {
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .plane { position: relative; inset: auto; clip-path: none !important; min-height: 54svh; z-index: auto; }
  .plane__body, .plane--com .plane__body { left: 0; max-width: 100%; }
  .plane__desc { max-width: 100%; }
  .plane__photo { transform: none; }
  .hero__ridge { display: none; }
  .hero__mark {
    position: static;
    transform: none;
    width: auto;
    order: -1;
    background: var(--slate);
    padding: 1.6rem 1rem 1.4rem;
  }
  .hero__mark::before { display: none; }
  .hero__mark .gable { color: var(--limestone); }
  .hero__mark .tagline { letter-spacing: 0.04em; font-size: 0.66rem; }
}

@media (prefers-reduced-motion: reduce) {
  .plane, .plane__photo, .plane__go svg { transition: none; }
  .plane__photo { transform: none; }
  .hero:has(.plane--res:hover) .plane--res,
  .hero:has(.plane--com:hover) .plane--com,
  .hero:has(.plane--res:hover) .plane--com,
  .hero:has(.plane--com:hover) .plane--res,
  .hero:has(.plane--res:focus-visible) .plane--res,
  .hero:has(.plane--com:focus-visible) .plane--com,
  .hero:has(.plane--res:focus-visible) .plane--com,
  .hero:has(.plane--com:focus-visible) .plane--res {
    clip-path: polygon(0 0, 45% 0, 55% 100%, 0 100%);
  }
  .hero:has(.plane--com:hover) .plane--com,
  .hero:has(.plane--com:focus-visible) .plane--com {
    clip-path: polygon(45% 0, 100% 0, 100% 100%, 55% 100%);
  }
  .hero__ridge { transition: none; }
  .hero:has(.plane--res:hover) .hero__ridge,
  .hero:has(.plane--com:hover) .hero__ridge,
  .hero:has(.plane--res:focus-visible) .hero__ridge,
  .hero:has(.plane--com:focus-visible) .hero__ridge {
    clip-path: polygon(44.45% 0, 45.45% 0, 55.45% 100%, 54.45% 100%);
  }
}

/* =========================================================================
   Statement band — the contractor's voice
   ========================================================================= */
.statement .wrap {
  display: grid;
  grid-template-columns: 3px minmax(0, 33rem) minmax(0, 15rem);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
}
.statement .rule {
  align-self: stretch;
  background: var(--oak);
  transform: skewX(calc(-1 * var(--pitch)));
  transform-origin: top;
}
.statement .lead { margin-bottom: 1.1rem; }
.statement .prose { color: var(--on-paper); }
.statement__aside { display: flex; flex-direction: column; gap: 1.4rem; padding-top: 0.4rem; }
.statement__aside p { font-size: 0.9rem; line-height: 1.5; color: var(--on-paper-dim); }
.statement__term {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--patina);
  margin-bottom: 0.15rem;
}
.statement__aside p.statement__note {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.tick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tick-list li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--on-paper-dim);
}
.tick-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 2px;
  background: var(--oak);
}
@media (max-width: 900px) {
  .statement .wrap { grid-template-columns: 3px 1fr; }
  .statement__aside {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1.4rem 2rem;
    border-top: 1px solid var(--limestone-3);
    padding-top: 1.6rem;
    margin-top: 0.4rem;
  }
}
@media (max-width: 560px) {
  .statement .wrap { grid-template-columns: 1fr; }
  .statement .rule { height: 3px; transform: none; }
  .statement__aside { grid-column: 1; }
}

/* =========================================================================
   Materials strip
   ========================================================================= */
.materials .head {
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
  max-width: 40rem;
}
.materials .head p {
  margin-top: 0.8rem;
  color: var(--on-slate-dim);
  font-size: 1rem;
  line-height: 1.5;
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px; /* tight, like tile coursing */
}
.material {
  position: relative;
  background: var(--slate-800);
}
.material img {
  display: block;
  width: 100%;
  height: clamp(300px, 34vw, 440px);
  object-fit: cover;
  filter: saturate(0.9) brightness(0.95);
}
.material figcaption {
  padding: 0.8rem 0.2rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--on-slate);
}
.material .sub {
  display: block;
  font-weight: 400;
  color: var(--on-slate-dim);
  font-size: 0.76rem;
}
@media (max-width: 760px) {
  .material-grid { grid-template-columns: repeat(2, 1fr); gap: 2px 2px; }
  .material figcaption { padding-bottom: 0.8rem; }
}

/* =========================================================================
   End routing — two ruled columns for people who scrolled past the hero
   ========================================================================= */
.routing .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}
.routing .divider {
  position: absolute;
  left: 50%;
  top: -0.5rem;
  bottom: -0.5rem;
  width: 1px;
  background: var(--limestone-3);
  transform: skewX(calc(-1 * var(--pitch)));
}
.route-col { padding: 0.4rem clamp(0.5rem, 3vw, 2.4rem); }
.route-col:first-child { padding-left: 0; }
.route-col:last-child { padding-right: 0; }
.route-col a {
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--step-2);
  letter-spacing: -0.01em;
}
.route-col a:hover { color: var(--patina); }
.route-col p { margin-top: 0.6rem; color: var(--on-paper-dim); font-size: 0.95rem; max-width: 24rem; }
@media (max-width: 640px) {
  .routing .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .routing .divider { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 1px; transform: none; }
  .route-col, .route-col:first-child, .route-col:last-child { padding: 0; }
}

/* =========================================================================
   Contact prompt
   ========================================================================= */
.prompt .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: end; }
.prompt .lead { margin-bottom: 0.8rem; }
.prompt p { color: var(--on-slate-dim); max-width: 34ch; }
.prompt .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn--solid { background: var(--patina); color: #f4f1ea; }
.btn--solid:hover { background: var(--patina-bright); }
.btn--ghost { border-color: rgba(236,231,221,0.35); color: var(--on-slate); }
.btn--ghost:hover { border-color: var(--patina-bright); color: var(--patina-bright); }
@media (max-width: 680px) {
  .prompt .wrap { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- contact prompt with an inline form (index.html) ---------- */
.prompt--form .wrap { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
.prompt--form .phone-cta { margin-top: 1.4rem; font-size: 0.9rem; color: var(--on-slate-dim); }
.prompt--form .phone-cta a { color: var(--on-slate); text-decoration: none; border-bottom: 1px solid rgba(236,231,221,0.35); }
.prompt--form .phone-cta a:hover { color: var(--patina-bright); border-color: var(--patina-bright); }
@media (max-width: 680px) {
  .prompt--form .wrap { grid-template-columns: 1fr; }
}

.contact-form { display: grid; gap: 1.1rem; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--on-slate-dim);
}
.contact-form .req { color: var(--patina-bright); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  font: inherit;
  font-size: 0.98rem;
  color: var(--on-slate);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(236,231,221,0.3);
  border-radius: 0;
  padding: 0.5rem 0.05rem;
  resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(169,180,179,0.55); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--patina-bright);
}
.contact-form__file { font-size: 0.8rem; }
.contact-form input[type="file"] { font-size: 0.85rem; color: var(--on-slate-dim); padding-top: 0.2rem; }
.contact-form__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.contact-form button[type="submit"] { cursor: pointer; }
.contact-form button[type="submit"]:disabled { opacity: 0.6; cursor: default; }
.contact-form__status { font-size: 0.85rem; margin: 0; color: var(--on-slate-dim); }
.contact-form__status[data-state="err"] { color: #d98a6a; }
.contact-form[hidden] { display: none; }
.contact-form__success { color: var(--on-slate); font-size: 1.05rem; max-width: 34ch; }
@media (max-width: 560px) {
  .contact-form__row { grid-template-columns: 1fr; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: var(--on-slate-dim); }
.site-footer .wrap { padding-block: clamp(2.6rem, 6vw, 4rem); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-slate);
  margin-bottom: 0.8rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--patina-bright); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; font-size: 0.9rem; }
.footer-brand { display: flex; gap: 0.8rem; align-items: flex-start; }
.footer-brand svg { width: 2.4rem; height: 2.4rem; color: var(--limestone-2); flex: none; }
.footer-brand p { font-size: 0.9rem; max-width: 32ch; margin-top: 0.4rem; }
.footer-brand b { color: var(--on-slate); font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.footer-legal {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.2rem;
  border-top: 1px solid #262f34;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.78rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Interior pages (residential / commercial)
   ========================================================================= */
.subhero { position: relative; background: var(--slate); color: var(--on-slate); overflow: hidden; }
.subhero img,
.subhero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: saturate(1.15) contrast(1.22) brightness(0.8);
}
.subhero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,17,20,0.94) 0%, rgba(12,17,20,0.6) 34%, rgba(12,17,20,0.24) 66%, rgba(12,17,20,0.4) 100%);
}
.subhero .wrap {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 8vw, 5.5rem);
  min-height: 40svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.subhero .back {
  align-self: flex-start;
  margin-bottom: auto;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  color: var(--on-slate-dim);
}
/* one-time page-load entrance: the photo eases back (as if the camera is
   backing away from it) while the heading rises in just behind it */
@keyframes subhero-zoom-out { from { transform: scale(1.32); } to { transform: scale(1); } }
@keyframes subhero-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.subhero--enter img {
  animation: subhero-zoom-out 2.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  object-position: center 10%;
}
.subhero--enter .wrap { min-height: 64svh; }
.subhero--enter .wrap > * {
  animation: subhero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.3s;
}
.subhero--enter .wrap > *:nth-child(2) { animation-delay: 0.42s; }
.subhero--enter .wrap > *:nth-child(3) { animation-delay: 0.54s; }
.subhero--enter .wrap > *:nth-child(4) { animation-delay: 0.66s; }
@media (prefers-reduced-motion: reduce) {
  .subhero--enter img, .subhero--enter .wrap > * { animation: none; }
}

/* slow, read-paced entrance: each line of the header arrives on its own beat
   rather than all at once, settling out over roughly 8 seconds */
.subhero--reveal .back,
.subhero--reveal .kicker,
.subhero--reveal h1,
.subhero--reveal .sectors-label,
.subhero--reveal .sector-list li {
  animation: subhero-rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.subhero--reveal .back { animation-delay: 0.2s; }
.subhero--reveal .kicker { animation-delay: 1.1s; }
.subhero--reveal h1 { animation-delay: 1.9s; }
.subhero--reveal .sectors-label { animation-delay: 3.4s; }
.subhero--reveal .sector-list li:nth-child(1) { animation-delay: 4.3s; }
.subhero--reveal .sector-list li:nth-child(2) { animation-delay: 4.9s; }
.subhero--reveal .sector-list li:nth-child(3) { animation-delay: 5.5s; }
.subhero--reveal .sector-list li:nth-child(4) { animation-delay: 6.1s; }
.subhero--reveal .sector-list li:nth-child(5) { animation-delay: 6.7s; }
@media (prefers-reduced-motion: reduce) {
  .subhero--reveal .back,
  .subhero--reveal .kicker,
  .subhero--reveal h1,
  .subhero--reveal .sectors-label,
  .subhero--reveal .sector-list li { animation: none; }
}
.subhero .back:hover { color: var(--patina-bright); }
.subhero .kicker { color: var(--patina-bright); }
.subhero h1 { margin-top: 0.6rem; max-width: min(20ch, 100%); }
.subhero .lead { color: #dcd8cd; margin-top: 1rem; max-width: min(42ch, 100%); }

.sectors-label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--patina-bright);
  margin-top: 1.3rem;
}
.sector-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.8rem;
  row-gap: 0.5rem;
  max-width: 46rem;
}
.sector-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 1.05rem;
  line-height: 1.4;
  color: #dcd8cd;
}
.sector-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 2px;
  background: var(--oak-soft);
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
.cap {
  border-top: 2px solid var(--oak);
  padding-top: 0.9rem;
}
.cap h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin-bottom: 0.4rem; }
.cap p { font-size: 0.94rem; color: var(--on-paper-dim); }

/* manufacturer warranty table */
.mfr-table-wrap { overflow-x: auto; }
.mfr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.mfr-table thead th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--on-paper-dim);
  padding: 0 1.2rem 0.7rem 0;
  border-bottom: 2px solid var(--oak);
  white-space: nowrap;
}
.mfr-table tbody td {
  padding: 0.85rem 1.2rem 0.85rem 0;
  border-bottom: 1px solid var(--limestone-3);
  vertical-align: baseline;
}
.mfr-table tbody tr:last-child td { border-bottom: none; }
.mfr-table tbody td:first-child { white-space: nowrap; }
.mfr-table tbody td:last-child { color: var(--on-paper-dim); }
.mfr-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--on-paper);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.mfr-cell:hover, .mfr-cell:focus-visible { color: var(--patina); border-color: var(--patina); }
.mfr-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
}
.mfr-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  filter: grayscale(1) contrast(0.9);
  opacity: 0.8;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.mfr-cell:hover .mfr-logo img, .mfr-cell:focus-visible .mfr-logo img { filter: grayscale(0); opacity: 1; }
@media (max-width: 560px) {
  .mfr-table thead { display: none; }
  .mfr-table, .mfr-table tbody, .mfr-table tr, .mfr-table td { display: block; width: 100%; }
  .mfr-table tbody tr { padding-block: 0.9rem; border-bottom: 1px solid var(--limestone-3); }
  .mfr-table tbody td { border-bottom: none; padding: 0.15rem 0; }
  .mfr-table tbody td:last-child { font-size: 0.85rem; padding-left: calc(2.6rem + 0.9rem); }
}

/* single-manufacturer feature (one partner, called out in full) */
.mfr-feature {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: 1.4rem;
  border-top: 2px solid var(--oak);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}
.mfr-feature:hover, .mfr-feature:focus-visible { border-color: var(--patina); }
.mfr-feature__logo {
  flex: none;
  width: clamp(7rem, 16vw, 9rem);
  height: clamp(4rem, 9vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mfr-feature__logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  filter: grayscale(1) contrast(0.9);
  opacity: 0.85;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.mfr-feature:hover .mfr-feature__logo img,
.mfr-feature:focus-visible .mfr-feature__logo img { filter: grayscale(0); opacity: 1; }
.mfr-feature__body { display: flex; flex-direction: column; gap: 0.5rem; }
.mfr-feature__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
}
.mfr-feature__name svg {
  width: 1.2rem;
  height: 0.65rem;
  margin-left: 0.5rem;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mfr-feature:hover .mfr-feature__name svg,
.mfr-feature:focus-visible .mfr-feature__name svg { transform: translateX(0.25rem); opacity: 1; color: var(--patina); }
.mfr-feature__desc { font-size: 0.95rem; line-height: 1.5; color: var(--on-paper-dim); max-width: 58ch; }
@media (max-width: 560px) {
  .mfr-feature { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* manufacturer / brand trust row */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
}
@media (max-width: 760px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.7rem 1rem 0.2rem;
  border-top: 2px solid var(--oak);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}
.brand-tile:hover, .brand-tile:focus-visible { border-color: var(--patina); }
.brand-tile__mark { height: 3.2rem; display: flex; align-items: center; justify-content: center; }
.brand-tile__mark img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  filter: grayscale(1) contrast(0.9);
  opacity: 0.8;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.brand-tile:hover .brand-tile__mark img,
.brand-tile:focus-visible .brand-tile__mark img { filter: grayscale(0); opacity: 1; }
.brand-tile__mark--text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
  text-align: center;
  color: var(--on-paper-dim);
  transition: color 0.25s ease;
}
.brand-tile:hover .brand-tile__mark--text,
.brand-tile:focus-visible .brand-tile__mark--text { color: var(--patina); }
.brand-tile__name { font-size: 0.78rem; color: var(--on-paper-dim); text-align: center; }

.cols--systems { grid-template-columns: repeat(3, 1fr); gap: clamp(1.8rem, 3.5vw, 2.8rem) clamp(1.5rem, 4vw, 2.5rem); }
@media (max-width: 860px) { .cols--systems { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cols--systems { grid-template-columns: 1fr; } }

/* option cards that link out to their own page */
.cols--options { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) { .cols--options { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cols--options { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cols--options { grid-template-columns: 1fr; } }
.cap--link { display: block; text-decoration: none; color: inherit; transition: border-color 0.2s ease; }
.cap--link:hover, .cap--link:focus-visible { border-color: var(--patina); }
.cap__img { display: block; overflow: hidden; margin-bottom: 0.9rem; background: var(--limestone-3); }
.cap__img img {
  display: block;
  width: 100%;
  height: clamp(120px, 14vw, 170px);
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 0.4s ease, filter 0.3s ease;
}
.cap--link:hover .cap__img img, .cap--link:focus-visible .cap__img img { transform: scale(1.05); filter: saturate(1.02); }
.cap--link h3 svg {
  display: inline-block;
  vertical-align: middle;
  width: 1.1rem;
  height: 0.6rem;
  margin-left: 0.4rem;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.cap--link:hover h3 svg, .cap--link:focus-visible h3 svg { transform: translateX(0.25rem); opacity: 1; color: var(--patina); }

/* cross-links between the material option pages */
.crosslinks { font-size: 0.9rem; color: var(--on-paper-dim); }
.crosslinks span { font-weight: 600; color: var(--on-paper); margin-right: 0.4rem; }
.crosslinks a { text-decoration: none; color: var(--on-paper-dim); border-bottom: 1px solid var(--limestone-3); }
.crosslinks a:hover { color: var(--patina); border-color: var(--patina); }
.crosslinks .sep { margin: 0 0.5rem; color: var(--limestone-3); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2px;
}
.gallery figure { background: var(--slate-800); display: flex; flex-direction: column; }
.gallery img {
  display: block;
  width: 100%;
  height: clamp(210px, 24vw, 290px);
  object-fit: cover;
}
.gallery figcaption { padding: 0.75rem 0.1rem 0; font-size: 0.82rem; line-height: 1.45; color: var(--on-slate-dim); }

.gallery__trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.gallery__trigger img { transition: opacity 0.2s ease; }
.gallery__trigger:hover img, .gallery__trigger:focus-visible img { opacity: 0.85; }
.gallery__trigger:focus-visible { outline: 2px solid var(--patina-bright); outline-offset: -2px; }

/* ---------- gallery lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.2rem);
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(18, 24, 28, 0.94);
}
.lightbox[hidden] { display: none; }
.lightbox__frame { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; flex: 1 1 auto; width: 100%; }
.lightbox__img {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.5);
}
.lightbox__caption { color: var(--on-slate); font-size: 0.9rem; text-align: center; max-width: 60ch; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  border: 1px solid rgba(236,231,221,0.35);
  background: rgba(31,45,54,0.7);
  color: var(--on-slate);
  border-radius: 999px;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover,
.lightbox__close:focus-visible, .lightbox__prev:focus-visible, .lightbox__next:focus-visible {
  background: var(--patina); border-color: var(--patina);
}
.lightbox__close { top: 0; right: 0; }
.lightbox__prev { left: 0; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0; top: 50%; transform: translateY(-50%); }
.lightbox__close svg, .lightbox__prev svg, .lightbox__next svg { width: 1.1rem; height: 1.1rem; }
@media (max-width: 640px) {
  .lightbox__prev, .lightbox__next { width: 2.2rem; height: 2.2rem; }
  .lightbox__frame { padding: 0 2.8rem; }
  .lightbox__close { top: -0.4rem; right: 0; }
}

.feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.feature img {
  display: block;
  width: 100%;
  height: clamp(260px, 38vw, 400px);
  object-fit: cover;
}
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; } }

hr.pitch-rule {
  border: 0;
  height: 1px;
  background: var(--limestone-3);
  margin: 0;
}
