/* ==========================================================================
   Loxley Roofing and Construction — main stylesheet
   Brand palette (from the leaf logo):
     leaf green #17A81A · leaf red #DE1E1E · near-black #111315 · warm white #F3F0E9
   Green is the ambient accent site-wide; red is reserved for primary CTAs.
   ========================================================================== */

:root {
  --ink: #111315;
  --charcoal: #25282B;
  --paper: #F3F0E9;
  --stone: #C8C1B4;

  /* Brand colours */
  --brand-green: #17A81A;
  --brand-green-hi: #33C531;
  --brand-green-deep: #0C6E0E;
  --brand-red: #DE1E1E;
  --brand-red-hi: #F0392F;
  --brand-red-deep: #A81414;

  /* Accent aliases — the site's single accent token now resolves to brand green. */
  --brass: var(--brand-green);
  --brass-hi: var(--brand-green-hi);
  --dusk: #0E3A1F;
  --line: rgba(243, 240, 233, 0.14);
  --line-soft: rgba(243, 240, 233, 0.08);

  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.89rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 4.6rem);
  --step-5: clamp(3rem, 2.1rem + 4.6vw, 5.8rem);

  --space-section: clamp(5rem, 4rem + 8vh, 10rem);
  --gutter: clamp(1.25rem, 5vw, 5.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.7s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--brass); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 999;
  padding: 0.7rem 1.2rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--step--1);
  transform: translateY(-300%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Typography ---------- */
.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.1rem;
}
.display {
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 18ch;
  text-wrap: balance;
}
.display-xl {
  font-size: var(--step-5);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 16ch;
  text-wrap: balance;
}
.lede {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.6;
  color: var(--stone);
  max-width: 56ch;
  margin-top: 1.4rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), transform 0.35s var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--brand-red); color: #fff; }
.btn-solid:hover { background: var(--brand-red-hi); }
.btn-ghost {
  border: 1px solid rgba(243, 240, 233, 0.35);
  color: var(--paper);
  background: rgba(17, 19, 21, 0.2);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { border-color: var(--paper); background: rgba(243, 240, 233, 0.08); }

/* ---------- Reveal-on-scroll primitives ----------
   Content is VISIBLE by default. The hidden/animated baseline is applied only
   when JavaScript adds `.reveal-on` to <html> (and only when motion is allowed),
   and the reveal scan in main.js guarantees anything in or above the viewport is
   shown on load, hash-jump, End key, or scroll restore — never a blank screen. */
html.reveal-on [data-reveal],
html.reveal-on [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--rd, 0s);
}
html.reveal-on .is-revealed[data-reveal],
html.reveal-on .is-revealed[data-reveal-group] > *,
html.reveal-on [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  transition: background 0.5s var(--ease-out), border-color 0.5s var(--ease-out),
              backdrop-filter 0.5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(17, 19, 21, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem var(--gutter);
  transition: padding 0.5s var(--ease-out);
}
.site-header.is-scrolled .header-inner { padding-block: 0.8rem; }

.wordmark { display: inline-flex; align-items: center; line-height: 1; }
.header-logo { height: clamp(54px, 6.4vw, 80px); width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45)); transition: height 0.4s var(--ease-out); }
.site-header.is-scrolled .header-logo { height: clamp(46px, 5.4vw, 64px); }
.brand-mark { height: 2.6rem; width: auto; flex: 0 0 auto; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4)); }
.wordmark-text { display: inline-flex; flex-direction: column; line-height: 1; }
.wordmark-primary {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}
.wordmark-secondary {
  margin-top: 0.32rem;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--stone);
}

.nav-desktop { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.9rem); }
.nav-desktop a:not(.btn) {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(243, 240, 233, 0.78);
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.35s var(--ease-out);
}
.nav-desktop a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--brass);
  transition: right 0.4s var(--ease-out);
}
.nav-desktop a:not(.btn):hover,
.nav-desktop a.is-active { color: var(--paper); }
.nav-desktop a:not(.btn):hover::after,
.nav-desktop a.is-active::after { right: 0; }
.btn-nav { padding: 0.7rem 1.3rem; margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0.6rem;
  z-index: 320;
}
.nav-toggle-line {
  display: block;
  width: 26px; height: 2px;
  background: var(--paper);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(17, 19, 21, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0s linear 0.45s;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.mobile-nav-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  padding: 6rem var(--gutter) 3rem;
}
.mobile-nav nav { display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-nav nav a {
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), color 0.3s;
  transition-delay: calc(var(--i, 0) * 55ms + 0.1s);
}
.mobile-nav.is-open nav a { opacity: 1; transform: none; }
.mobile-nav nav a:hover { color: var(--brass-hi); }
.mobile-nav .btn { align-self: flex-start; }
.mobile-nav-tag {
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 1.9;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  transform: scale(var(--hero-scale, 1.08));
  transform-origin: center 70%;
  transition: transform 0.1s linear;
}
@keyframes heroSettle {
  from { transform: scale(1.14); }
  to { transform: scale(1.08); }
}
.hero-media.is-settling img { animation: heroSettle 2.6s var(--ease-out) both; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 19, 21, 0.42) 0%, rgba(17, 19, 21, 0.05) 30%, rgba(17, 19, 21, 0.08) 55%, rgba(17, 19, 21, 0.88) 100%),
    linear-gradient(90deg, rgba(17, 19, 21, 0.35) 0%, rgba(17, 19, 21, 0) 45%);
}
.hero-content {
  position: relative;
  padding: 0 var(--gutter) clamp(6rem, 14vh, 9rem);
  max-width: 62rem;
}
.hero-headline {
  font-size: clamp(2.35rem, 1.5rem + 4.6vw, 5rem);
  font-weight: 250;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-line { display: block; }
.hero-sub {
  margin-top: 1.6rem;
  font-size: var(--step-1);
  font-weight: 300;
  color: rgba(243, 240, 233, 0.85);
  max-width: 46ch;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.hero-reveal {
  opacity: 0;
  transform: translateY(34px);
  animation: heroReveal 1.1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes heroReveal {
  to { opacity: 1; transform: none; }
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(2rem, 6vh, 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.scroll-cue-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--stone);
  writing-mode: vertical-rl;
}
.scroll-cue-track {
  width: 1px;
  height: 56px;
  background: rgba(243, 240, 233, 0.25);
  position: relative;
  overflow: hidden;
}
.scroll-cue-dot {
  position: absolute;
  left: 0; top: -30%;
  width: 100%; height: 30%;
  background: var(--brass);
  animation: cueDrop 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes cueDrop {
  0% { top: -30%; }
  60%, 100% { top: 105%; }
}

/* ==========================================================================
   Anatomy — signature scroll experience
   ========================================================================== */
.anatomy { background: var(--ink); }
.anatomy-intro {
  padding: var(--space-section) var(--gutter) clamp(3rem, 8vh, 5rem);
  max-width: 70rem;
}

.anatomy-track {
  /* Height set by JS: scenes × scene-length. Generous CSS fallback: */
  height: calc(16 * 88vh + 100vh);
  position: relative;
}
.anatomy-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

/* --- WebGL stage (3D reconstructions) --- */
.stage-3d {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s var(--ease-out), visibility 0s linear 0.55s;
  background:
    radial-gradient(120% 90% at 62% 44%, rgba(37, 44, 52, 0.55) 0%, rgba(17, 19, 21, 0) 60%),
    linear-gradient(180deg, #14171A 0%, #0E1012 100%);
}
.stage-3d.is-live {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.stage-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
/* When a 3D model is on screen the photograph steps aside. */
.anatomy-stage.has-3d .stage-media { opacity: 0; transition: opacity 0.5s var(--ease-out); }

.stage-hint {
  margin-top: 1.6rem;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  max-width: 48ch;
  line-height: 1.9;
}

/* --- media stack --- */
.stage-media {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  transform-style: preserve-3d;
  transition: opacity 0.5s var(--ease-out);
}
.scene-media {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}
.scene-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
/* wide establishing shots: full bleed */
.scene-wide { inset: 0; }
.scene-wide img {
  transform: scale(var(--s, 1)) translate3d(0, var(--ty, 0), 0);
  transform-origin: center 60%;
}
/* tall detail shots: framed architectural panel, right of the copy column */
.scene-tall {
  top: 50%;
  left: auto;
  right: clamp(4rem, 9vw, 9rem);
  height: min(82vh, 82svh);
  aspect-ratio: var(--ar, 4/5);
  transform: translateY(-50%);
  border: 1px solid var(--line-soft);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  background: var(--charcoal);
}
.scene-tall img {
  transform: scale(var(--s, 1)) translate3d(0, var(--ty, 0), 0);
  transform-origin: center center;
}
/* film-style masked reveal on tall frames */
.scene-tall { clip-path: inset(var(--clip, 0%) 0% var(--clip, 0%) 0%); }

.stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(17, 19, 21, 0.92) 0%, rgba(17, 19, 21, 0.55) 30%, rgba(17, 19, 21, 0) 58%),
    linear-gradient(0deg, rgba(17, 19, 21, 0.6) 0%, rgba(17, 19, 21, 0) 26%),
    linear-gradient(180deg, rgba(17, 19, 21, 0.45) 0%, rgba(17, 19, 21, 0) 18%);
}

/* --- narrative copy --- */
.stage-copy {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.scene-copy {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(calc(-50% + 34px));
  max-width: min(30rem, 38vw);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out),
              visibility 0s linear 0.65s;
  pointer-events: none;
}
.scene-copy.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  transition-delay: 0.12s, 0.12s, 0s;
  pointer-events: auto;
}
.scene-kicker {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.2rem;
}
.scene-num {
  font-size: var(--step-2);
  font-weight: 200;
  letter-spacing: 0;
  color: var(--paper);
  opacity: 0.9;
}
.scene-copy h3 {
  font-size: var(--step-3);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.scene-copy p:last-child {
  margin-top: 1.1rem;
  color: var(--stone);
  font-weight: 300;
  line-height: 1.7;
  max-width: 42ch;
}

/* --- progress rail (desktop) --- */
.progress-rail {
  position: absolute;
  right: clamp(1.2rem, 2.6vw, 2.6rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.rail-count {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.rail-count-total { color: rgba(243, 240, 233, 0.4); font-weight: 400; }
.rail-line {
  width: 1px;
  height: clamp(120px, 26vh, 220px);
  background: rgba(243, 240, 233, 0.16);
  position: relative;
  overflow: hidden;
}
.rail-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--brass);
  transform: scaleY(var(--p, 0));
  transform-origin: top center;
}
.rail-phase {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
  writing-mode: vertical-rl;
  max-height: 12rem;
}
.progress-bar-mobile {
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(243, 240, 233, 0.14);
  z-index: 4;
}
.progress-bar-mobile span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brass);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

/* ==========================================================================
   Completion reveal
   ========================================================================== */
.reveal-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.reveal-media, .finale-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.reveal-media img, .finale-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  transform: scale(var(--pscale, 1.05)) translate3d(0, var(--pty, 0), 0);
}
.reveal-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 19, 21, 0.55) 0%, rgba(17, 19, 21, 0.1) 35%, rgba(17, 19, 21, 0.92) 100%);
}
.reveal-content {
  padding: 30vh var(--gutter) 3rem;
  max-width: 66rem;
}
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 3rem var(--gutter) clamp(2.5rem, 7vh, 4.5rem);
  border-top: 1px solid var(--line);
}
.trust-bar li {
  flex: 1 1 auto;
  padding: 1.4rem 1.6rem 0 0;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.trust-bar li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--brass);
  flex: 0 0 auto;
}

/* ==========================================================================
   Services
   ========================================================================== */
.services {
  padding: var(--space-section) var(--gutter);
  background: var(--ink);
}
.section-head { max-width: 70rem; margin-bottom: clamp(3rem, 7vh, 4.5rem); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.service-card {
  padding: clamp(1.8rem, 3vw, 2.8rem);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: background 0.5s var(--ease-out);
}
.service-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 100%;
  width: 1px;
  background: var(--brass);
  transition: bottom 0.5s var(--ease-out);
}
.service-card:hover { background: rgba(37, 40, 43, 0.5); }
.service-card:hover::after { bottom: 0; }
.service-icon {
  display: inline-block;
  width: 42px; height: 42px;
  color: var(--brass);
  margin-bottom: 1.6rem;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 {
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}
.service-card p {
  color: var(--stone);
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.7;
}

/* ==========================================================================
   The roof, scrolled on — realistic 3D roof-assembly section
   ========================================================================== */
.roof {
  position: relative;
  height: 1000vh;
  background: radial-gradient(120% 90% at 50% 18%, #171B1E, #0B0D0E 72%);
}
.roof-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.roof-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  z-index: 1;
}
.roof-fallback { position: absolute; inset: 0; z-index: 1; }
.roof-fallback .fb {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.roof-fallback .fb img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.roof-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11,13,14,0.72) 0%, rgba(11,13,14,0.12) 26%, rgba(11,13,14,0) 46%, rgba(11,13,14,0.28) 74%, rgba(11,13,14,0.72) 100%);
}
.roof-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: clamp(84px, 14vh, 120px) var(--gutter) 0;
  pointer-events: none;
  z-index: 3;
}
.roof-head .kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.roof-head .kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.roof-head h2 { max-width: 16ch; }

.roof-label {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(40px, 8vh, 90px);
  z-index: 4;
  background: rgba(17, 19, 21, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(184, 138, 74, 0.3);
  border-radius: 4px;
  padding: 16px 22px;
  min-width: min(300px, 72vw);
  transition: opacity 0.4s var(--ease-out);
}
.roof-label .num {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.5rem;
}
.roof-label .t { font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 400; letter-spacing: -0.01em; }
.roof-label .s { font-size: 0.82rem; color: var(--stone); margin-top: 6px; line-height: 1.5; max-width: 36ch; }

.roof-legend {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(40px, 8vh, 90px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: rgba(17, 19, 21, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 16px 18px;
}
.roof-legend .lg-title {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 4px;
}
.roof-legend .lg {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: rgba(243, 240, 233, 0.55);
  transition: color 0.3s var(--ease-out);
}
.roof-legend .lg .sw {
  width: 12px; height: 12px;
  border-radius: 2px;
  flex: 0 0 auto;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.roof-legend .lg.is-active { color: var(--paper); }
.roof-legend .lg.is-active .sw { opacity: 1; box-shadow: 0 0 0 1px rgba(243, 240, 233, 0.4); }

.roof-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(243, 240, 233, 0.1);
  z-index: 4;
}
.roof-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left center;
}
.roof-replay {
  position: absolute;
  top: clamp(84px, 14vh, 120px);
  right: var(--gutter);
  z-index: 5;
  background: rgba(17, 19, 21, 0.8);
  border: 1px solid rgba(243, 240, 233, 0.18);
  color: var(--paper);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  padding: 9px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}
.roof-replay:hover { border-color: var(--paper); background: rgba(243, 240, 233, 0.08); }

@media (max-width: 760px) {
  .roof-legend { display: none; }
  .roof-label { right: var(--gutter); min-width: 0; }
}

/* ==========================================================================
   Roofing systems — exploded layers
   ========================================================================== */
.systems {
  padding: var(--space-section) var(--gutter);
  background: linear-gradient(180deg, var(--ink) 0%, #14202e 55%, var(--dusk) 130%);
  overflow: hidden;
}
.systems-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 90rem;
  margin-inline: auto;
}
.layers-list {
  margin-top: 2.6rem;
  counter-reset: layer;
  max-width: 30rem;
}
.layers-list li + li { border-top: 1px solid var(--line-soft); }
.layers-list button {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  width: 100%;
  padding: 0.72rem 0.4rem;
  text-align: left;
  font-size: var(--step-0);
  font-weight: 400;
  color: rgba(243, 240, 233, 0.72);
  transition: color 0.3s var(--ease-out), padding-left 0.35s var(--ease-out);
}
.layers-list button span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--stone);
  opacity: 0.7;
}
.layers-list button:hover,
.layers-list li.is-active button {
  color: var(--paper);
  padding-left: 0.9rem;
}
.layers-list li.is-active button span { color: var(--brass); opacity: 1; }

.systems-diagram {
  position: relative;
  height: clamp(380px, 56vh, 560px);
  perspective: 1300px;
  display: grid;
  place-items: center;
}
.layer-plane {
  position: absolute;
  width: clamp(220px, 24vw, 330px);
  height: clamp(150px, 16vw, 220px);
  border: 1px solid rgba(243, 240, 233, 0.22);
  background: linear-gradient(135deg, rgba(37, 40, 43, 0.92), rgba(17, 19, 21, 0.85));
  transform:
    rotateX(56deg)
    rotateZ(-42deg)
    translateZ(calc((var(--i) - 4.5) * var(--gap, 10px)));
  transition: transform 1.1s var(--ease-out), border-color 0.4s, box-shadow 0.4s, background 0.4s;
  transition-delay: calc(var(--i) * 40ms);
  will-change: transform;
}
.systems-diagram.is-exploded .layer-plane { --gap: 40px; }
.layer-plane:nth-child(odd) { background: linear-gradient(135deg, rgba(43, 47, 51, 0.92), rgba(24, 27, 30, 0.88)); }
.layer-plane[data-layer-plane="0"] { background: linear-gradient(135deg, rgba(90, 74, 52, 0.6), rgba(37, 32, 24, 0.9)); }
.layer-plane[data-layer-plane="5"] { background: linear-gradient(135deg, rgba(52, 56, 60, 0.95), rgba(17, 19, 21, 0.95)); }
.layer-plane.is-active {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass), 0 30px 60px -20px rgba(23, 168, 26, 0.35);
}
.layer-tag {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: rotateZ(42deg) rotateX(-56deg) translate(-50%, -50%);
  transform-origin: 0 0;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-hi);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.layer-plane.is-active .layer-tag { opacity: 1; }

/* ==========================================================================
   About
   ========================================================================== */
.about {
  padding: var(--space-section) var(--gutter);
  background: var(--paper);
  color: var(--ink);
}
.about .eyebrow { color: #96702F; }
.about-inner { max-width: 76rem; margin-inline: auto; }
.about .display { max-width: 22ch; }
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  margin-top: clamp(2.4rem, 5vh, 3.6rem);
  padding-top: 2.4rem;
  border-top: 1px solid rgba(17, 19, 21, 0.14);
}
.about-cols p {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.65;
  color: #3A3D40;
  text-wrap: pretty;
}

/* ==========================================================================
   Quality control
   ========================================================================== */
.quality {
  padding: var(--space-section) var(--gutter);
  background: #0C0E10;
}
.quality-inner { max-width: 90rem; margin-inline: auto; }
.quality-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.quality-media figure {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.quality-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 1.4s var(--ease-out);
}
.quality-media figure:hover img { transform: scale(1.045); }
.quality-media figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.4rem 1.1rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  background: linear-gradient(180deg, transparent, rgba(12, 14, 16, 0.85));
}
.quality-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.4rem, 3vw, 3rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 5vh, 3rem);
}
.quality-num {
  display: block;
  font-size: var(--step-2);
  font-weight: 200;
  color: var(--brass);
  margin-bottom: 0.9rem;
}
.quality-step h3 {
  font-size: var(--step-1);
  font-weight: 500;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}
.quality-step p {
  color: var(--stone);
  font-weight: 300;
  line-height: 1.7;
  font-size: var(--step-0);
}

/* ==========================================================================
   Finale
   ========================================================================== */
.finale {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.finale-media img { object-position: center 55%; }
.finale-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 19, 21, 0.5) 0%, rgba(17, 19, 21, 0.05) 34%, rgba(17, 19, 21, 0.9) 100%),
    linear-gradient(90deg, rgba(17, 19, 21, 0.3) 0%, rgba(17, 19, 21, 0) 50%);
}
.finale-content {
  position: relative;
  padding: 32vh var(--gutter) clamp(5rem, 12vh, 8rem);
  max-width: 68rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding: var(--space-section) var(--gutter);
  background: var(--charcoal);
  background: linear-gradient(180deg, #1B1E21 0%, var(--ink) 100%);
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 90rem;
  margin-inline: auto;
  align-items: start;
}
.contact-points { margin-top: 2.2rem; }
.contact-points li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--step-0);
  color: var(--stone);
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.contact-points li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--brass);
  flex: 0 0 auto;
}

.contact-form {
  background: rgba(17, 19, 21, 0.55);
  border: 1px solid var(--line-soft);
  padding: clamp(1.6rem, 3.4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label, .field legend {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.field label span, .field legend span { color: var(--brass); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-weight: 400;
  color: var(--paper);
  background: rgba(37, 40, 43, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
  width: 100%;
  min-height: 48px;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23C8C1B4' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(37, 40, 43, 0.9);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(200, 193, 180, 0.45); }
.field.has-error input, .field.has-error select { border-color: #C25E4C; }
.field-error {
  font-size: var(--step--1);
  color: #D98A7B;
  font-weight: 500;
}
.field-radios { border: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  cursor: pointer;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--stone);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.radio input {
  appearance: none;
  width: 14px; height: 14px;
  border: 1px solid var(--stone);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color 0.3s;
}
.radio input::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  transform: scale(0);
  transition: transform 0.25s var(--ease-out);
}
.radio input:checked::after { transform: scale(1); }
.radio:has(input:checked) {
  border-color: var(--brass);
  color: var(--paper);
  background: rgba(184, 138, 74, 0.08);
}
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.btn-submit { margin-top: 0.4rem; align-self: flex-start; position: relative; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(17, 19, 21, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { font-size: var(--step-0); color: var(--stone); min-height: 1.5em; }
.form-status.is-success { color: #A8C69B; }
.form-status.is-error { color: #D98A7B; }
.form-status a { color: var(--brass-hi); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0C0E10;
  border-top: 1px solid var(--line-soft);
  padding: clamp(3.5rem, 8vh, 6rem) var(--gutter) 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
  max-width: 90rem;
  margin-inline: auto;
}
.footer-logo { display: inline-block; }
.footer-logo img { width: clamp(190px, 22vw, 250px); height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45)); }
.footer-tag {
  margin-top: 1.2rem;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 2;
}
.footer-nav { display: flex; gap: clamp(2.5rem, 7vw, 7rem); }
.footer-col { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col-title {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.6rem;
}
.footer-col a {
  font-size: var(--step--1);
  font-weight: 400;
  color: rgba(243, 240, 233, 0.7);
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--paper); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  max-width: 90rem;
  margin: clamp(3rem, 7vh, 5rem) auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--step--1);
  color: rgba(200, 193, 180, 0.65);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .quality-grid { grid-template-columns: 1fr 1fr; row-gap: 2.4rem; }
  .systems-inner { grid-template-columns: 1fr; }
  .systems-diagram { height: clamp(320px, 44vh, 460px); order: -1; }
  .scene-copy { max-width: min(28rem, 44vw); }
}

@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .about-cols { grid-template-columns: 1fr; }
  .quality-media { grid-template-columns: 1fr; }
  .quality-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; }
  .trust-bar li { flex: 1 1 100%; padding-right: 0; }

  /* Anatomy: stacked layout — image viewport on top, copy below */
  .progress-rail { display: none; }
  .progress-bar-mobile { display: block; }
  .scene-wide,
  .scene-tall {
    inset: 0 0 auto 0;
    top: 0;
    right: 0;
    height: 54svh;
    width: 100%;
    aspect-ratio: auto;
    transform: none;
    border: 0;
    box-shadow: none;
    clip-path: none;
  }
  .scene-tall img { object-position: center 38%; }
  .stage-vignette {
    background: linear-gradient(180deg, rgba(17, 19, 21, 0.35) 0%, rgba(17, 19, 21, 0) 22%, rgba(17, 19, 21, 0) 66%, rgba(17, 19, 21, 1) 100%);
    height: 56svh;
  }
  .scene-copy {
    left: var(--gutter);
    right: var(--gutter);
    top: auto;
    bottom: 0;
    height: 46svh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1.2rem;
    transform: translateY(22px);
  }
  .scene-copy.is-active { transform: none; }
  .scene-copy h3 { font-size: var(--step-2); }
  .scene-copy p:last-child { font-size: var(--step--1); max-width: none; }
  .scene-kicker { margin-bottom: 0.7rem; }
  .scene-num { font-size: var(--step-1); }
  .reveal-content { padding-top: 40vh; }
  .hero-content { padding-bottom: 7rem; }
  .scroll-cue { display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .hero-reveal { opacity: 1; transform: none; animation: none; }
  [data-reveal], [data-reveal-group] > * { opacity: 1; transform: none; }
  .hero-media img { transform: none !important; }
  .scene-wide img, .scene-tall img { transform: none !important; }
  .scene-tall { clip-path: none !important; }
  .reveal-media img, .finale-media img { transform: none !important; }
  .scroll-cue-dot { animation: none; top: 35%; }
  .scene-copy {
    transition: opacity 0.2s linear, visibility 0s linear 0.2s;
    transform: translateY(-50%);
  }
  .scene-copy.is-active { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  .scene-copy, .scene-copy.is-active { transform: none; }
}

/* ==========================================================================
   Phase 1 — click-to-call, trust bar, NAP, mobile action bar, hero contrast
   ========================================================================== */

/* Header desktop click-to-call (sits left of the primary CTA) */
.nav-phone {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; font-size: var(--step--1); letter-spacing: 0.02em;
  color: var(--paper); white-space: nowrap;
}
.nav-phone:hover { color: var(--brand-green-hi); }
.nav-phone-icon { flex: 0 0 auto; }
@media (max-width: 1024px) { .nav-phone { display: none; } } /* avoid header crowding/clipping */

/* Hero: keyword H1 + supporting brand tagline, both high-contrast over photo */
.hero-eyebrow { color: var(--paper); text-shadow: 0 1px 12px rgba(0,0,0,0.6); }
.hero-tagline {
  margin-top: 0.5rem;
  font-size: clamp(1.15rem, 1rem + 1.5vw, 2rem);
  font-weight: 300; letter-spacing: -0.01em; line-height: 1.15;
  color: var(--paper); text-shadow: 0 1px 16px rgba(0,0,0,0.55);
}

/* Trust bar directly beneath the hero */
.trustbar { background: var(--charcoal); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.trustbar-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.55rem 0; max-width: 92rem; margin-inline: auto;
  padding: 0.85rem var(--gutter);
  font-size: var(--step--1); letter-spacing: 0.03em; color: var(--stone);
}
.trustbar-inner li { display: inline-flex; align-items: center; padding: 0 1.35rem; }
.trustbar-inner li:not(:last-child) { border-right: 1px solid var(--line); }
.tb-rating a { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--paper); }
.tb-rating a:hover { color: var(--brand-green-hi); }
.tb-stars { color: #E8B008; letter-spacing: 1px; }
.tb-rating strong { font-weight: 700; }
@media (max-width: 680px) {
  .trustbar-inner { gap: 0.35rem 0; }
  .trustbar-inner li { border-right: 0; padding: 0.1rem 0.9rem; }
}

/* Footer NAP */
.footer-nap { font-style: normal; margin-top: 1.4rem; color: var(--stone); font-size: var(--step--1); line-height: 1.85; }
.footer-nap-name { font-weight: 600; color: var(--paper); }
.footer-nap a { color: var(--stone); }
.footer-nap a:hover { color: var(--brand-green-hi); }

/* Contact form: optional section + reassurance */
.form-optional { margin: 0.4rem 0; border-top: 1px solid var(--line-soft); padding-top: 0.7rem; }
.form-optional > summary { cursor: pointer; color: var(--stone); font-size: var(--step--1); list-style: none; }
.form-optional > summary::-webkit-details-marker { display: none; }
.form-optional > summary::before { content: "+ "; color: var(--brand-green); font-weight: 700; }
.form-optional[open] > summary::before { content: "\2013 "; }
.form-optional .form-row, .form-optional .field { margin-top: 0.85rem; }
.opt { color: var(--stone); font-weight: 400; font-size: 0.85em; }
.form-reassure { margin-top: 0.75rem; font-size: var(--step--1); color: var(--stone); text-align: center; }

/* Persistent mobile action bar (click-to-call always one tap away) */
.mobile-callbar { display: none; }
@media (max-width: 760px) {
  .mobile-callbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: var(--ink); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mcb-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.95rem 0.5rem; min-height: 54px;
    font-weight: 700; font-size: 0.98rem; letter-spacing: 0.02em; color: #fff;
  }
  .mcb-call { background: var(--brand-green); }
  .mcb-quote { background: var(--brand-red); }
  body { padding-bottom: 66px; } /* clear the fixed bar */
}

/* ==========================================================================
   Phase 2 — generated route pages (hub / service / money / city pages)
   ========================================================================== */
.nav-phone-mobile { display: none; }
@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .nav-phone-mobile { display: inline-flex; align-items: center; color: var(--paper); }
}

.page-hero {
  background: linear-gradient(180deg, var(--ink) 0%, #14211c 140%);
  padding: calc(92px + clamp(2rem, 6vw, 4.5rem)) var(--gutter) clamp(2.2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero-inner { max-width: 60rem; margin-inline: auto; }
.page-hero .display { margin-top: 0.5rem; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

.page-body { max-width: 60rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.prose { margin-bottom: clamp(2rem, 4vw, 3rem); }
.prose h2 { font-size: var(--step-2); font-weight: 400; letter-spacing: -0.01em; margin-bottom: 1rem; }
.prose p { color: var(--stone); line-height: 1.8; max-width: 68ch; margin-bottom: 1rem; }
.prose p a, .prose li a { color: var(--brand-green-hi); text-decoration: underline; text-underline-offset: 3px; }
.prose-list { list-style: disc; padding-left: 1.4rem; color: var(--stone); }
.prose-list li { line-height: 1.8; margin: 0.35rem 0; max-width: 68ch; }
.content-note {
  color: var(--stone); font-size: var(--step--1); font-style: italic;
  border-left: 2px solid var(--brand-green); padding: 0.5rem 0 0.5rem 1rem;
  background: rgba(23, 168, 26, 0.05);
}
.faq-item { border-top: 1px solid var(--line-soft); padding: 0.9rem 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--paper); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+ "; color: var(--brand-green); font-weight: 700; }
.faq-item[open] summary::before { content: "\2013 "; }
.faq-item p { margin-top: 0.6rem; color: var(--stone); }

.page-cta { background: var(--charcoal); border-top: 1px solid var(--line-soft); }
.page-cta-inner { max-width: 52rem; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter); text-align: center; }
.page-cta-inner p { color: var(--stone); margin: 1rem auto 0; max-width: 48ch; }
.page-cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.8rem; }

/* ==========================================================================
   Phase 2.2 — homepage router (four-way split + storm band) + contact form page
   ========================================================================== */
.quickpaths { padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); max-width: 92rem; margin-inline: auto; }
.quickpaths-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .quickpaths-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .quickpaths-grid { grid-template-columns: 1fr; } }
.qp-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.6rem 1.4rem; border: 1px solid var(--line-soft); border-radius: 4px;
  background: linear-gradient(180deg, rgba(43, 47, 51, 0.5), rgba(17, 19, 21, 0.4));
  transition: border-color .35s var(--ease-out), transform .35s var(--ease-out), background .35s var(--ease-out);
}
.qp-card:hover { border-color: var(--brand-green); transform: translateY(-3px); }
.qp-card h3 { font-size: var(--step-1); font-weight: 500; }
.qp-card p { color: var(--stone); font-size: var(--step--1); line-height: 1.6; flex: 1; }
.qp-cta { color: var(--brand-green-hi); font-size: var(--step--1); font-weight: 600; letter-spacing: .04em; }
.qp-accent { border-color: rgba(222, 30, 30, .5); background: linear-gradient(180deg, rgba(222, 30, 30, .12), rgba(17, 19, 21, .4)); }
.qp-accent:hover { border-color: var(--brand-red); }
.qp-accent .qp-cta { color: var(--brand-red-hi); }

.stormband { background: var(--charcoal); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stormband-inner {
  max-width: 92rem; margin-inline: auto; padding: 1.4rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.stormband-kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-green-hi); }
.stormband-text { color: var(--paper); max-width: 62ch; margin-top: .3rem; }
.stormband-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.stormband.is-active { background: linear-gradient(90deg, rgba(222, 30, 30, .22), var(--charcoal)); border-color: rgba(222, 30, 30, .5); }
.stormband.is-active .stormband-kicker { color: var(--brand-red-hi); }

.contact-form-wrap { max-width: 44rem; }

/* Homepage "how a roof goes together" teaser (replaces the 16-stage scroller) */
.systems-teaser { padding: clamp(3rem, 7vw, 6rem) var(--gutter); max-width: 92rem; margin-inline: auto; }
.systems-teaser-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 820px) { .systems-teaser-inner { grid-template-columns: 1fr; } }
.systems-teaser-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.systems-teaser-media { position: relative; display: block; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-soft); }
.systems-teaser-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s var(--ease-out); }
.systems-teaser-media:hover img { transform: scale(1.04); }
.systems-teaser-badge { position: absolute; left: 1rem; bottom: 1rem; background: rgba(17, 19, 21, .82); color: var(--paper); font-size: var(--step--1); letter-spacing: .04em; padding: .5rem .9rem; border-radius: 100px; border: 1px solid var(--line); }

/* Homepage proof strip: reviews + service areas (router sections 8 & 9) */
.proofstrip { background: var(--charcoal); border-block: 1px solid var(--line-soft); }
.proofstrip-inner { max-width: 92rem; margin-inline: auto; padding: clamp(3rem, 6vw, 5rem) var(--gutter); display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 820px) { .proofstrip-inner { grid-template-columns: 1fr; } }
.proof-rating { font-size: var(--step-2); font-weight: 300; margin: .3rem 0; }
.proof-rating .tb-stars { color: #E8B008; }
.proof-rating strong { font-weight: 700; }
.proof-reviews .btn, .proof-areas .btn { margin-top: 1.2rem; }
.proof-areas-title { font-size: var(--step-2); font-weight: 400; letter-spacing: -.01em; margin-bottom: 1rem; max-width: 22ch; }
.proof-areas-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1rem; color: var(--stone); }
@media (min-width: 560px) { .proof-areas-list { grid-template-columns: repeat(3, 1fr); } }
.proof-areas-list li { font-size: var(--step--1); }
.proof-areas-list a { color: var(--brand-green-hi); }
.proof-areas-list a:hover { text-decoration: underline; }

/* Phase 4 — holiday lighting: guarantees + pricing cards */
.guarantee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; }
@media (max-width: 760px) { .guarantee-grid { grid-template-columns: 1fr; } }
.guarantee { border: 1px solid var(--line-soft); border-radius: 4px; padding: 1.3rem; background: linear-gradient(180deg, rgba(23,168,26,.06), rgba(17,19,21,.3)); }
.guarantee h3 { font-size: var(--step-1); font-weight: 500; margin-bottom: .5rem; }
.guarantee p { color: var(--stone); font-size: var(--step--1); line-height: 1.7; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: .5rem 0 1rem; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--line-soft); border-radius: 4px; padding: 1.5rem; text-align: center; }
.price-card h3 { font-size: var(--step-1); font-weight: 500; }
.price-card p { color: var(--stone); font-size: var(--step--1); margin: .6rem 0; }
.price-figure { color: var(--brand-green-hi) !important; font-weight: 700; letter-spacing: .02em; }
.price-featured { border-color: var(--brand-red); background: linear-gradient(180deg, rgba(222,30,30,.1), rgba(17,19,21,.3)); }

/* ==========================================================================
   Nav dropdown — groups roofing / commercial / gutters under one "Roofing" tab
   Click-to-open via nav.js (.open class), with a :focus-within fallback when
   JS is unavailable. See js/nav.js.
   ========================================================================== */
.nav-dd { position: relative; }
/* The toggle is a <button> styled to match the other desktop nav links. */
.nav-dd-toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  background: none; border: 0; margin: 0; cursor: pointer;
  font-family: inherit; font-size: var(--step--1); font-weight: 500;
  letter-spacing: .04em; color: rgba(243, 240, 233, .78);
  padding: .35rem 0; position: relative;
  transition: color .35s var(--ease-out);
}
.nav-dd-toggle::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--brass); transition: right .4s var(--ease-out);
}
.nav-dd-toggle:hover, .nav-dd-toggle.is-active, .nav-dd.open .nav-dd-toggle { color: var(--paper); }
.nav-dd-toggle:hover::after, .nav-dd-toggle.is-active::after, .nav-dd.open .nav-dd-toggle::after { right: 0; }
.nav-caret { font-size: .6em; transition: transform .3s var(--ease-out); }
.nav-dd.open .nav-caret { transform: rotate(180deg); }
html:not(.nav-js) .nav-dd:focus-within .nav-caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: 100%; left: 0; min-width: 208px;
  display: flex; flex-direction: column;
  background: rgba(17, 19, 21, .97);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft); border-radius: 6px;
  padding: .45rem; margin-top: .7rem;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility .25s;
  z-index: 210; box-shadow: 0 22px 55px -22px rgba(0, 0, 0, .65);
}
.nav-dd-menu::before { content: ""; position: absolute; top: -.7rem; left: 0; right: 0; height: .7rem; }
/* JS mode: only the .open class (from the click toggle) reveals the menu. */
.nav-dd.open .nav-dd-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s;
}
/* No-JS fallback only: reveal on keyboard focus. */
html:not(.nav-js) .nav-dd:focus-within .nav-dd-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s;
}
.nav-desktop .nav-dd-menu a {
  display: block; padding: .55rem .85rem; border-radius: 4px;
  font-size: var(--step--1); font-weight: 500; letter-spacing: .02em;
  color: rgba(243, 240, 233, .82); white-space: nowrap;
}
.nav-desktop .nav-dd-menu a::after { display: none !important; }
.nav-desktop .nav-dd-menu a:hover { background: rgba(243, 240, 233, .07); color: var(--paper); }
.nav-desktop .nav-dd-menu a.is-active { background: rgba(23, 168, 26, .1); color: var(--brand-green-hi); }
