/* Design tokens. Brand colors and fonts come from jtmremodeling.com. */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Color: JTM brand, used the way the reference template uses black and white */
  --c-cream: #fdfcf9;        /* page background */
  --c-sand: #f3f2ee;         /* fields, image placeholders */
  --c-forest: #294b38;       /* primary brand green */
  --c-deep: #142c1f;         /* text, dark surfaces (the template's black) */
  --c-sage: #6b746e;         /* secondary text, (01) numbers (the template's grey) */
  --c-copper: #c56c21;       /* brand accent on dark surfaces */
  --c-copper-deep: #a85a1b;  /* accent fills / small text on light (WCAG AA) */
  --c-copper-soft: #e9a466;  /* accent text on dark green (WCAG AA) */
  --c-ink: var(--c-deep);
  --c-ink-soft: #3c4a42;     /* paragraph text */
  --c-line: rgba(20, 44, 31, 0.12);
  --c-line-strong: rgba(20, 44, 31, 0.85);
  --c-line-light: rgba(253, 252, 249, 0.2);
  --c-on-dark: #fdfcf9;
  --c-on-dark-soft: rgba(253, 252, 249, 0.74);
  --c-error: #a3321f;
  --c-success: var(--c-forest);

  /* Typography: one grotesk family for display and UI, as in the template */
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --tracking-display: -0.03em;

  --fs-hero: clamp(2.5rem, min(1rem + 4.4vw, 10svh), 4.375rem);     /* 70px; shrinks on short screens */
  --fs-display: clamp(2.375rem, 1rem + 4.6vw, 5.625rem);  /* 90px */
  --fs-h2: clamp(2rem, 1rem + 4vw, 3.125rem);            /* 50px from ~850px wide: section headings */
  --fs-h3: clamp(1.75rem, 1.1rem + 2.2vw, 3.75rem);       /* 60px */
  --fs-h4: clamp(1.375rem, 1.2rem + 0.55vw, 1.75rem);     /* 28px */
  --fs-h5: clamp(1.1875rem, 1.1rem + 0.3vw, 1.5rem);      /* 24px */
  --fs-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.875rem;
  --lh-display: 1.02;
  --lh-body: 1.55;

  /* Layout */
  --gutter: 20px;
  --content-max: 1440px;
  --container-max: calc(var(--content-max) + 2 * var(--gutter));
  --grid-gap: 16px;
  --section: 80px;           /* vertical rhythm between major sections */
  --section-tight: 56px;
  --stack-xs: 8px;
  --stack-s: 16px;
  --stack-m: 24px;
  --stack-l: 40px;
  --stack-xl: 64px;
  --head-gap: var(--stack-xl);   /* section heading -> its content */
  --cta-gap: 30px;               /* mobile: content block -> its buttons */
  --nav-top: 16px;
  --header-h: 92px;          /* pill + its top offset */

  /* Shape */
  --radius-img: 8px;
  --radius-card: 10px;
  --radius-pill: 999px;
  --border: 1px solid var(--c-line);
  --border-strong: 1px solid var(--c-line-strong);
  --border-light: 1px solid var(--c-line-light);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-expo: cubic-bezier(0.87, 0, 0.13, 1);  /* template inOutExpo (service rows) */
  --dur-fast: 400ms;
  --dur-base: 650ms;
  --dur-slow: 900ms;

  /* Layers */
  --z-lines: 40;
  --z-menu: 50;
  --z-header: 60;
  --z-skip: 70;
  --z-preloader: 100;
}

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
    --grid-gap: 24px;
    --section: 120px;
    --section-tight: 80px;
    --nav-top: 24px;
    --header-h: 100px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 90px;          /* required desktop content padding */
    --section: 150px;
    --section-tight: 100px;
    --stack-xl: 80px;
    --head-gap: 50px;
    --nav-top: 30px;
    --header-h: 106px;
  }
}

/* ==========================================================================
   Visual language follows the Studio Arch reference template: full-bleed photo
   heroes, a floating pill navigation, white pages framed by two hairlines,
   large uppercase grotesk headings, pill buttons with a round arrow, ruled
   rows and counter cards, a text marquee and a dark footer with a big menu.
   ========================================================================== */

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--c-cream);
  /* Keep the scrollbar's space reserved, so the page does not shift sideways
     when the menu locks scrolling or a page is shorter than the window. */
  scrollbar-gutter: stable;
}

/* Page-to-page navigation: a short cross-fade instead of a hard cut (Chrome, Edge, Safari 18.2+).
   The header pills keep their own layers, so they stay still while the page changes. The names sit on
   the pills, not on .header: a named ancestor becomes the backdrop root and the pills' blur would see nothing. */
@view-transition { navigation: auto; }
.header__pill { view-transition-name: site-header-pill; }
.header__phone { view-transition-name: site-header-phone; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 280ms; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

body {
  margin: 0;
  background: var(--c-cream);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
main { display: block; outline: none; }
sup { line-height: 0; }

:focus-visible { outline: 2px solid var(--c-copper-deep); outline-offset: 3px; border-radius: 3px; }

.icon { width: 1.125em; height: 1.125em; flex: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 16px; top: 12px; z-index: var(--z-skip);
  padding: 12px 18px; border-radius: var(--radius-pill);
  background: var(--c-deep); color: var(--c-on-dark); font-weight: 600;
  transform: translateY(-160%); transition: transform var(--dur-fast) var(--ease-out);
}
.skip:focus { transform: none; }

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

/* Page frame: two vertical hairlines just outside the content edge, as in the template. */
.frame { display: none; }
@media (min-width: 768px) {
  .frame {
    display: block; position: fixed; inset: 0; z-index: var(--z-lines); pointer-events: none;
    width: 100%; max-width: var(--container-max); margin-inline: auto;
    padding-inline: calc(var(--gutter) - 12px);
  }
  .frame::before { content: ''; display: block; height: 100%; border-inline: 1px solid var(--c-line); }
}

/* ==========================================================================
   Sections and vertical rhythm
   ========================================================================== */

.section { padding-block: var(--section); }
.section--dark { background: var(--c-deep); color: var(--c-on-dark); }

/* Light sections sit on one white page, so neighbours share a single gap. */
.section:not(.section--dark) + .section:not(.section--dark),
.pintro + .section:not(.section--dark) { padding-top: 0; }

/* Single-column grids never stretch past their container on narrow screens. */
.phero__grid, .pintro__grid, .shead, .feature, .cols, .offer__card, .work__grid, .estimate__grid, .duo__grid { grid-template-columns: minmax(0, 1fr); }

.section__cta { margin-top: var(--stack-xl); }
.section__cta .actions { margin-top: 0; }

/* ==========================================================================
   Typography
   ========================================================================== */

/* Small outlined pill above a heading (template: "WHAT WE DO", "ABOUT US"). */
.label {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 38px; padding: 6px 18px; margin-bottom: var(--stack-m);
  border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill);
  font-family: var(--f-display); font-size: var(--fs-label); font-weight: 500; line-height: 1.2;
  letter-spacing: 0; text-transform: uppercase; color: var(--c-ink);
}
.label__num { color: var(--c-sage); }
.label--light { color: var(--c-on-dark); border-color: rgba(253, 252, 249, 0.55); }
.label--light .label__num { color: var(--c-on-dark-soft); }

.display {
  font-family: var(--f-display);
  font-stretch: 100%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-display);
  color: var(--c-ink);
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: manual;
}
.display--hero { font-size: var(--fs-hero); font-weight: 600; }
.display--display { font-size: var(--fs-display); font-weight: 600; }
.display--h2 { font-size: var(--fs-h2); }
.display--h3 { font-size: var(--fs-h3); }
.display--light { color: var(--c-on-dark); }

/* Line-mask word reveal. Words stay inline text for SEO and screen readers. */
.display .w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: 0.04em 0.08em; margin-block: -0.04em -0.08em; }
.display .w > span { display: inline-block; }

.lead { font-family: var(--f-display); font-size: var(--fs-lead); line-height: 1.35; font-weight: 500; color: var(--c-ink); max-width: 40ch; margin-bottom: var(--stack-s); letter-spacing: -0.01em; }
.lead:last-child { margin-bottom: 0; }
.lead--light { color: var(--c-on-dark); }
.body { color: var(--c-ink-soft); max-width: 60ch; margin-bottom: 1em; }
.body:last-child { margin-bottom: 0; }
.body--light { color: var(--c-on-dark-soft); }
.inline-link { color: var(--c-forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Buttons (template: pill with the label and a round arrow on the right)
   ========================================================================== */

.btn {
  --btn-bg: var(--c-deep); --btn-fg: var(--c-on-dark); --btn-ic-bg: var(--c-copper-deep); --btn-ic-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 6px 6px 6px 24px;
  border: 1px solid var(--btn-bd); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--f-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform 200ms var(--ease-out);
}
.btn__icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--btn-ic-bg); color: var(--btn-ic-fg);
  transition: transform var(--dur-base) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn__icon .icon { width: 16px; height: 16px; }
.btn__label + .btn__icon { margin-left: auto; } /* full-width buttons: arrow stays on the right edge */
.btn:hover .btn__icon:not(.btn__icon--lead), .btn:focus-visible .btn__icon:not(.btn__icon--lead) { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }
.btn--primary:hover, .btn--primary:focus-visible { --btn-bg: var(--c-forest); }
.btn--dark { --btn-ic-bg: var(--c-on-dark); --btn-ic-fg: var(--c-deep); }
.btn--dark:hover, .btn--dark:focus-visible { --btn-bg: var(--c-forest); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--c-deep); --btn-ic-bg: var(--c-deep); --btn-ic-fg: #fff; }
.btn--light:hover, .btn--light:focus-visible { --btn-bg: var(--c-cream); --btn-ic-bg: var(--c-copper-deep); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-ink); --btn-bd: var(--c-line-strong); --btn-ic-bg: var(--c-sand); --btn-ic-fg: var(--c-ink); }
.btn--outline:hover, .btn--outline:focus-visible { --btn-bg: var(--c-deep); --btn-fg: var(--c-on-dark); --btn-ic-bg: rgba(253, 252, 249, 0.14); --btn-ic-fg: var(--c-on-dark); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--c-on-dark); --btn-bd: rgba(253, 252, 249, 0.6); --btn-ic-bg: rgba(253, 252, 249, 0.16); --btn-ic-fg: var(--c-on-dark); }
.btn--outline-light:hover, .btn--outline-light:focus-visible { --btn-bg: #fff; --btn-fg: var(--c-deep); --btn-ic-bg: var(--c-deep); --btn-ic-fg: #fff; }
/* Hero phone button: frosted glass over the photo. */
.phero .btn--outline-light { --btn-bg: rgba(253, 252, 249, 0.14); --btn-bd: rgba(253, 252, 249, 0.45); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.phero .btn--outline-light:hover, .phero .btn--outline-light:focus-visible { --btn-bg: #fff; }
@media (prefers-reduced-transparency: reduce) { .phero .btn--outline-light { --btn-bg: rgba(20, 44, 31, 0.7); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.btn--phone { padding: 6px 24px 6px 6px; }
.btn--sm { min-height: 46px; padding: 4px 4px 4px 18px; gap: 12px; font-size: 0.875rem; }
.btn--sm .btn__icon { width: 38px; height: 38px; }
.btn--block { width: 100%; justify-content: space-between; }
.btn--block.btn--phone { justify-content: flex-start; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: var(--stack-l); }
@media (max-width: 767px) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; justify-content: space-between; }
  .actions .btn--phone { justify-content: flex-start; }
}

.tlink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--f-display); font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; color: var(--c-ink); }
.tlink span { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; padding-bottom: 2px; transition: background-size var(--dur-base) var(--ease-out); }
.tlink:hover span { background-size: 0 1px; background-position: 100% 100%; }
.tlink .icon { color: var(--c-copper-deep); transition: transform var(--dur-fast) var(--ease-out); }
.tlink:hover .icon { transform: translateX(4px); }

/* Outlined pills (template service tags). */
.tag, .pills li, .citytags li {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 18px;
  border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill);
  font-family: var(--f-display); font-size: var(--fs-small); font-weight: 500; line-height: 1.2; color: var(--c-ink);
}
.pills, .citytags { display: flex; flex-wrap: wrap; gap: 10px; margin-block: var(--stack-m); }

/* Scope list in Statement blocks: outlined pills, aligned to a two-column grid. */
.scopelist { display: grid; gap: 10px; margin-block: var(--stack-m); }
.scopelist li {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 20px 10px 16px;
  border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill);
  font-family: var(--f-display); font-size: var(--fs-small); font-weight: 500; line-height: 1.25; color: var(--c-ink);
}
.scopelist .icon { flex: none; width: 16px; height: 16px; color: var(--c-forest); }
@media (min-width: 640px) {
  .scopelist { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .scopelist li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.checks { display: grid; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 500; }
.checks .icon { width: 28px; height: 28px; padding: 6px; border-radius: 50%; border: 1px solid var(--c-line-strong); }
.checks--light { margin-top: var(--stack-m); }
.checks--light li { color: var(--c-on-dark); }
.checks--light .icon { border-color: rgba(253, 252, 249, 0.5); color: var(--c-copper-soft); }

/* Ruled rows with a grey (01) number: shared by several lists. */
.numlist, .spec, .preplist { border-top: var(--border); }
.numlist { margin-bottom: var(--stack-m); }
.numlist li, .spec li, .preplist li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: baseline; padding: 20px 0; border-bottom: var(--border); }
.numlist li { font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.numlist span, .spec__num, .preplist__num { font-family: var(--f-display); font-size: 1.0625rem; font-weight: 400; letter-spacing: 0; color: var(--c-sage); }
.spec { margin-top: var(--stack-l); }
.spec__name, .preplist__name { font-family: var(--f-display); font-weight: 500; font-size: var(--fs-h4); line-height: 1.15; letter-spacing: -0.025em; }
.spec__num::before, .preplist__num::before, .numlist span::before { content: '('; }
.spec__num::after, .preplist__num::after, .numlist span::after { content: ')'; }
@media (min-width: 768px) { .preplist { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); display: grid; } }

/* ==========================================================================
   Media
   ========================================================================== */

.media { position: relative; overflow: hidden; aspect-ratio: var(--m-ratio, var(--ratio, 4 / 3)); border-radius: var(--radius-img); background: var(--c-sand); }
@media (min-width: 768px) { .media { aspect-ratio: var(--ratio, 4 / 3); } }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transition: transform 1200ms var(--ease-out); }
.section--dark .media { background: rgba(253, 252, 249, 0.06); }

/* ==========================================================================
   Header: floating pill (logo + menu button) with a round phone button
   ========================================================================== */

.header { position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: var(--z-header); pointer-events: none; }
.header__bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding-inline: var(--gutter); }
.header__pill, .header__phone {
  pointer-events: auto;
  background: rgba(253, 252, 249, 0.2);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(253, 252, 249, 0.22);
  transition: background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.header__pill { display: flex; align-items: center; gap: 16px; height: 60px; padding: 8px 8px 8px 22px; border-radius: var(--radius-pill); }
.header.is-scrolled .header__pill, .header.is-scrolled .header__phone,
.header.is-menu .header__pill, .header.is-menu .header__phone { background: rgba(20, 44, 31, 0.72); box-shadow: inset 0 0 0 1px rgba(253, 252, 249, 0.08); }
.header__logo { display: flex; align-items: center; min-height: 44px; }
.logo { height: 30px; width: auto; }
.header__phone { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--c-on-dark); }
.header__phone .icon { width: 20px; height: 20px; }
.header__phone:hover { background: var(--c-copper-deep); }

.burger { position: relative; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--c-deep); cursor: pointer; transition: transform 200ms var(--ease-out); }
.burger:active { transform: scale(0.94); }
.burger__lines { position: absolute; inset: 0; }
.burger__lines span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform var(--dur-base) var(--ease-out); }
.burger__lines span:first-child { top: 18.5px; }
.burger__lines span:last-child { top: 24.5px; }
.burger[aria-expanded="true"] .burger__lines span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 379px) {
  .header__pill { gap: 10px; padding-left: 16px; }
  .logo { height: 26px; }
  .header__phone { width: 52px; height: 52px; }
}

/* ==========================================================================
   Menu: a panel that drops below the pill (template menu)
   ========================================================================== */

.menu { position: fixed; inset: 0; z-index: var(--z-menu); }
.menu[hidden] { display: none; }
.menu__scrim { position: absolute; inset: 0; background: rgba(12, 22, 16, 0.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); }
.menu__panel {
  position: absolute; top: 0; left: 0; right: 0; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--c-cream); color: var(--c-ink);
  clip-path: inset(0 0 100% 0); transition: clip-path var(--dur-slow) var(--ease-in-out);
}
.menu.is-open .menu__scrim { opacity: 1; }
.menu.is-open .menu__panel { clip-path: inset(0); }
.menu__inner { display: grid; gap: var(--stack-l); max-width: var(--container-max); margin-inline: auto; padding: calc(var(--header-h) + 32px) var(--gutter) var(--stack-l); }
.menu__media { display: none; }
.menu__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; font-size: var(--fs-small); color: var(--c-sage); }
.menu__nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--stack-l); }
/* Column heading: small uppercase caption, so the links carry the weight. */
.menu__h {
  margin-bottom: 12px;
  font-family: var(--f-display); font-size: 0.8125rem; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage);
}
.menu__list { display: grid; }
.menu__list li { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); transition-delay: calc(200ms + var(--i) * 35ms); }
.menu.is-open .menu__list li, .menu.is-open .menu__box { opacity: 1; transform: none; }
.menu__link { display: inline-flex; align-items: center; min-height: 44px; padding-block: 6px; font-family: var(--f-display); font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: var(--c-ink-soft); transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.menu__link:hover { color: var(--c-ink); transform: translateX(8px); }
.menu__link[aria-current="page"] { color: var(--c-copper-deep); }
.menu__boxes { display: grid; gap: 12px; }
.menu__box {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; row-gap: 6px;
  padding: 18px 18px 18px 24px; border: var(--border); border-radius: 20px;
  opacity: 0; transform: translateY(16px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-radius var(--dur-base) var(--ease-out), border-color var(--dur-fast);
  transition-delay: calc(200ms + var(--i) * 35ms), calc(200ms + var(--i) * 35ms), 0s, 0s;
}
.menu__box:hover { border-radius: 100px; border-color: var(--c-line-strong); }
.menu__box-label { grid-column: 1; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.menu__box-value { grid-column: 1; font-family: var(--f-display); font-size: 1.125rem; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.menu__box .icon { grid-column: 2; grid-row: 1 / 3; box-sizing: content-box; width: 18px; height: 18px; padding: 12px; border: var(--border); border-radius: 50%; color: var(--c-ink); transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.menu__box:hover .icon { background: var(--c-deep); border-color: var(--c-deep); color: var(--c-cream); }
body.menu-open { overflow: hidden; }
@media (min-width: 640px) {
  .menu__nav { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: var(--grid-gap); }
}
@media (min-width: 1024px) {
  .menu__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: 56px; padding-top: calc(var(--header-h) + 48px); padding-bottom: 56px; }
  .menu__media { display: grid; gap: 0; grid-column: 1 / 6; align-content: start; }
  .menu__media .media { border-radius: 20px; margin-bottom: 16px; }
  .menu__nav { grid-column: 7 / -1; column-gap: 48px; align-content: start; }
  .menu__boxes { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .menu__box { padding: 24px 24px 24px 32px; }
  .menu__box-value { font-size: 1.25rem; }
}

/* ==========================================================================
   Page hero: full-bleed photo, content at the bottom (template hero)
   ========================================================================== */

.phero { position: relative; display: flex; align-items: flex-end; min-height: max(640px, 100svh); padding: calc(var(--header-h) + 40px) 0 var(--stack-l); overflow: hidden; color: var(--c-on-dark); background: var(--c-deep); }
.phero--display { min-height: max(600px, 88svh); }
.phero__bg { position: absolute; inset: 0; }
.phero__bg .media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; background: var(--c-deep); }
.phero__bg::after { content: ''; position: absolute; inset: 0; background: rgba(12, 18, 14, 0.42); }
.phero > .container { position: relative; }
.phero__grid { display: grid; }
.phero__top {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding-top: 20px; margin-bottom: var(--stack-l);
  font-family: var(--f-display); font-size: 1rem; font-weight: 500;
}
.phero__top::before { content: ''; position: absolute; top: 0; left: calc(50% - 50vw); width: 100vw; height: 1px; background: rgba(253, 252, 249, 0.3); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--c-on-dark-soft); }
.crumbs li { white-space: nowrap; }
.crumbs li + li::before { content: '/'; margin-right: 10px; opacity: 0.6; }
.crumbs a { transition: color var(--dur-fast) var(--ease-out); }
.crumbs a:hover, .crumbs [aria-current] { color: var(--c-on-dark); }
.phero__lic { white-space: nowrap; }
.phero__title { max-width: 15em; }
.phero__sub { max-width: 34em; margin-top: var(--stack-m); font-family: var(--f-display); font-size: var(--fs-lead); font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; }
.phero--display .phero__title { max-width: none; font-size: clamp(2.125rem, 1rem + 3.2vw, 3.75rem); text-wrap: balance; }  /* 60px */
.phero--display .phero__sub { max-width: 60em; font-size: 1.125rem; line-height: 1.45; text-wrap: balance; }  /* 18px */
.phero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--stack-l) var(--grid-gap); margin-top: var(--stack-l); }
.phero__foot .actions { margin-top: 0; order: 1; }
.hcard { display: none; order: 2; }
@media (max-width: 767px) {
  .phero { padding-bottom: 32px; }
  .phero__foot { width: 100%; }
  .phero__foot .actions { width: 100%; }
}
@media (min-width: 640px) {
  .hcard { display: block; width: 100%; max-width: 380px; }
}
@media (min-width: 640px) and (max-height: 760px) {
  .hcard .hcard__index { display: none; }
  .phero__sub { margin-top: var(--stack-s); }
}
@media (min-width: 1024px) {
  .phero { padding-bottom: 64px; }
  .phero__foot { margin-top: var(--stack-l); }
}

/* Hero card (template "Horizon Residence" card). */
.hcard__index { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--f-display); font-size: 1.125rem; }
.hcard__rule { flex: 1; height: 1px; background: rgba(253, 252, 249, 0.45); }
.hcard__box { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 14px; padding: 3px 14px 3px 3px; border-radius: var(--radius-card); background: #fff; color: var(--c-ink); transition: transform var(--dur-base) var(--ease-out); }
.hcard__box:hover { transform: translateY(-3px); }
.hcard__box .media { border-radius: 8px; }
.hcard__body { display: grid; gap: 4px; }
.hcard__title { font-family: var(--f-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.hcard__text { font-size: 0.9375rem; color: var(--c-sage); line-height: 1.3; }
.hcard__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-family: var(--f-display); font-size: 0.9375rem; font-weight: 600; text-transform: uppercase; }
.hcard__cta .icon { width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease-out); }
.hcard__box:hover .hcard__cta .icon { transform: translateX(3px); }

/* Intro strip under the hero: facts left, copy right. */
.pintro { padding-block: var(--section-tight) var(--section); }
.pintro__grid { display: grid; gap: var(--stack-l); }
.pintro__facts { border-top: var(--border); }
.pintro__facts li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: baseline; padding: 18px 0; border-bottom: var(--border); font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.pintro__num { font-size: 1.0625rem; font-weight: 400; color: var(--c-sage); letter-spacing: 0; }
.pintro__lead { max-width: 46ch; font-family: var(--f-display); font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.5rem); font-weight: 500; line-height: 1.32; letter-spacing: -0.015em; margin-bottom: var(--stack-m); }
.pintro__lead:last-child { margin-bottom: 0; }
@media (min-width: 1024px) {
  .pintro__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
  .pintro__facts { grid-column: 1 / 7; }
  .pintro__text { grid-column: 8 / -1; }
  .pintro__facts:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--grid-gap); border-top: 0; }
  .pintro__facts:only-child li { border-top: var(--border); }
  .pintro__text:only-child { grid-column: 1 / 10; }
}

/* ==========================================================================
   Section header: pill label + large heading left, copy right, bottom-aligned
   ========================================================================== */

.shead { display: grid; margin-bottom: var(--head-gap); }
.shead__aside { margin-top: var(--stack-m); }
.shead__aside .actions { margin-top: var(--stack-m); }
@media (min-width: 1024px) {
  .shead { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: end; }
  .shead__main { grid-column: 1 / 8; }
  .shead--solo .shead__main { grid-column: 1 / 11; }
  .shead__aside { grid-column: 8 / -1; margin-top: 0; }
}
.container > .shead:only-child { margin-bottom: 0; }

/* ==========================================================================
   Feature (template "We've crafted" block): heading across the top,
   then photo on the left and text on the right
   ========================================================================== */

.feature { display: grid; }
.feature__media { margin-block: var(--stack-l); }
@media (min-width: 1024px) {
  .feature { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
  .feature__head { grid-column: 1 / 11; grid-row: 1; margin-bottom: var(--head-gap); }
  .feature__media { grid-column: 1 / 7; grid-row: 2; margin: 0; }
  .feature__body { grid-column: 8 / -1; grid-row: 2; }
  .feature--reverse .feature__media { grid-column: 7 / -1; }
  .feature--reverse .feature__body { grid-column: 1 / 6; }
}

/* Statement blocks: photo runs down to the CTA, text sits closer to the photo. */
@media (min-width: 1024px) {
  .statement .feature { align-items: stretch; }
  .statement .feature__media { grid-column: 1 / 7; display: flex; }
  .statement .feature__media .media { flex: 1; aspect-ratio: auto; min-height: 380px; }
  .statement .feature__media .media img { position: absolute; inset: 0; } /* photo follows the copy's height, not its own ratio */
  /* Short copy: CTA drops to the photo's bottom edge. */
  .statement .feature__body { display: flex; flex-direction: column; }
  .statement .feature__body > .actions:last-child { margin-top: auto; padding-top: var(--stack-m); }
  .statement .feature__body { grid-column: 7 / -1; padding-left: calc(var(--grid-gap) * 2); }
  .statement .feature__body > :last-child { margin-bottom: 0; }
  .statement .feature--reverse .feature__media { grid-column: 7 / -1; }
  .statement .feature--reverse .feature__body { grid-column: 1 / 7; padding-left: 0; padding-right: calc(var(--grid-gap) * 2); }
}

/* ==========================================================================
   Two columns: title left, content right
   ========================================================================== */

.cols { display: grid; }
.cols__lead { margin-top: var(--stack-m); }
.cols__right { margin-top: var(--stack-l); }
.cols--divided { margin-top: var(--section-tight); padding-top: var(--section-tight); border-top: var(--border); }
@media (min-width: 1024px) {
  .cols { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
  .cols__left { grid-column: 1 / 7; }
  .cols__left--sticky { position: sticky; top: calc(var(--header-h) + 32px); }
  .cols__right { grid-column: 8 / -1; margin-top: 0; }
}

/* ==========================================================================
   Offer ($1,800 OFF): a sand card on the white page, offer left, photo right.
   Mobile order: label, heading, photo, text, CTAs.
   ========================================================================== */

.offer { scroll-margin-top: 24px; }
.offer__card { display: grid; grid-template-columns: minmax(0, 1fr); padding: 24px 20px; border-radius: 20px; background: var(--c-sand); }
.display--offer { font-size: var(--fs-h2); font-weight: 600; line-height: 1.02; }
.display--offer .accent { color: var(--c-copper-deep); }
.offer__media { margin-block: var(--stack-m); }
.offer__media .media { border-radius: 14px; }
.offer__body .lead { max-width: 32ch; }
.offer__body .body { max-width: 46ch; }
.offer__body .actions { margin-top: var(--stack-m); }
.offer .btn--outline:not(:hover, :focus-visible) { --btn-ic-bg: var(--c-cream); }
@media (min-width: 1024px) {
  .offer__card { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--grid-gap); padding: 16px; }
  .offer__media { grid-column: 7 / -1; grid-row: 1 / 3; margin: 0; }
  .offer__media .media { height: 100%; min-height: 460px; aspect-ratio: auto; }
  .offer__head { grid-column: 1 / 6; grid-row: 1; padding: 40px 0 0 40px; }
  .offer__body { grid-column: 1 / 6; grid-row: 2; align-self: end; padding: var(--stack-l) 0 40px 40px; }
  .offer__body .lead { padding-top: var(--stack-l); border-top: var(--border); max-width: none; }
}

/* ==========================================================================
   James Hardie: a sub-part of the Siding block (one section, as on the live site).
   A drawn hairline, a smaller heading on the left, copy + tags + actions on the right.
   ========================================================================== */

.subfeat { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--stack-xl); }
.subfeat .display { font-size: clamp(1.625rem, 1.2rem + 1.1vw, 2.25rem); }
.subfeat__rule { height: 1px; margin-bottom: var(--stack-l); background: var(--c-line); transform-origin: left center; }
.subfeat__kicker { margin-bottom: 12px; font-family: var(--f-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.subfeat__body { margin-top: var(--stack-m); }
.subfeat__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--stack-m); }
.subfeat__tags .tag { min-height: 36px; padding: 6px 16px; font-size: 0.875rem; }
.subfeat__body .actions { margin-top: var(--stack-l); }
@media (min-width: 1024px) {
  .subfeat { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
  .subfeat__rule { grid-column: 1 / -1; margin-bottom: 56px; }
  .subfeat__head { grid-column: 1 / 6; }
  .subfeat__body { grid-column: 7 / -1; margin-top: 0; }
  .subfeat__body .body { max-width: 60ch; }
}

/* ==========================================================================
   Service rows (template "Our Services": (01) | name | tags | plus; the row
   opens on hover to show a photo and a "View details" link)
   ========================================================================== */

.srows__rule { height: 1px; background: var(--c-line-strong); transform-origin: left center; }
.srow { border-bottom: var(--border); }
.srow__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 24px 0 20px; }
.srow__num { grid-column: 1; grid-row: 1; font-family: var(--f-display); font-size: 1.125rem; color: var(--c-sage); }
.srow__name { grid-column: 1 / -1; grid-row: 2; font-family: var(--f-display); font-weight: 500; font-size: var(--fs-h4); line-height: 1.15; letter-spacing: -0.03em; }
.srow__name a { transition: color var(--dur-fast) var(--ease-out); }
.srow__name a:hover { color: var(--c-copper-deep); }
.srow__tags { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 8px; }
.srow__tags .tag { min-height: 36px; padding: 6px 14px; font-size: 0.8125rem; color: var(--c-ink-soft); white-space: nowrap; }
.srow__toggle {
  grid-column: 2; grid-row: 1; position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; background: none; color: var(--c-ink); cursor: pointer;
}
.srow__plus, .srow__cross { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-expo); }
.srow__plus { color: var(--c-sage); }
.srow__plus .icon { width: 18px; height: 18px; }
.srow__cross { opacity: 0; transform: rotate(-90deg); }
.srow__cross .icon { width: 16px; height: 16px; }

/* Collapsible panel: grid rows 0fr -> 1fr animates to the content's own height. */
.srow__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 600ms var(--ease-expo); }
.srow__clip { min-height: 0; overflow: hidden; }
.srow__panel { display: grid; gap: 16px; padding-bottom: 24px; opacity: 0; transition: opacity 400ms var(--ease-out); }
.srow__media { display: block; border-radius: 10px; overflow: hidden; }
.srow__media img { transition: transform 900ms var(--ease-out); }
.srow__media:hover img { transform: scale(1.04); }
.srow__text { max-width: 54ch; font-size: var(--fs-small); color: var(--c-ink-soft); }
.srow__text p + p { margin-top: 10px; }
.srow__lead { font-family: var(--f-display); font-size: 1.0625rem; font-weight: 500; line-height: 1.35; color: var(--c-ink); }

.srow.is-open .srow__more, .srow:has(:focus-visible) .srow__more { grid-template-rows: 1fr; }
.srow.is-open .srow__panel, .srow:has(:focus-visible) .srow__panel { opacity: 1; transition-delay: 150ms; }
.srow.is-open .srow__plus, .srow:has(:focus-visible) .srow__plus { opacity: 0; transform: rotate(90deg); }
.srow.is-open .srow__cross, .srow:has(:focus-visible) .srow__cross { opacity: 1; transform: none; }
@media (hover: hover) {
  .srow:hover .srow__more { grid-template-rows: 1fr; }
  .srow:hover .srow__panel { opacity: 1; transition-delay: 150ms; }
  .srow:hover .srow__plus { opacity: 0; transform: rotate(90deg); }
  .srow:hover .srow__cross { opacity: 1; transform: none; }
}

/* "View details": the label rolls up and the arrow swaps diagonally (template service button). */
.rollink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--f-display); font-size: 0.9375rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0; color: var(--c-ink); }
.rollink__txt { position: relative; display: block; height: 1.2em; line-height: 1.2; overflow: hidden; }
.rollink__txt > span { display: block; transition: transform 500ms var(--ease-out); }
.rollink__ic { position: relative; display: grid; width: 16px; height: 16px; overflow: hidden; color: var(--c-copper-deep); }
.rollink__ic .icon { grid-area: 1 / 1; width: 16px; height: 16px; transition: transform 500ms var(--ease-out); }
.rollink__ic .icon:last-child { transform: translate(-100%, 100%); }
.rollink:hover .rollink__txt > span, .rollink:focus-visible .rollink__txt > span { transform: translateY(-100%); }
.rollink:hover .rollink__ic .icon:first-child, .rollink:focus-visible .rollink__ic .icon:first-child { transform: translate(100%, -100%); }
.rollink:hover .rollink__ic .icon:last-child, .rollink:focus-visible .rollink__ic .icon:last-child { transform: none; }

@media (min-width: 1024px) {
  .srow__top { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); padding: 28px 0 24px; }
  .srow__num { grid-column: 1 / 3; }
  .srow__name { grid-column: 3 / 8; grid-row: 1; }
  .srow__tags { grid-column: 8 / 12; grid-row: 1; }
  .srow__toggle { grid-column: 12; justify-self: end; }
  .srow__panel { grid-template-columns: repeat(10, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: 20px; margin-left: calc((100% + var(--grid-gap)) / 12 * 2); padding-bottom: 32px; }
  .srow__media { grid-column: 1 / 4; grid-row: 1; }
  .srow__cta { grid-column: 1 / 4; grid-row: 2; }
  .srow__text { grid-column: 6 / 10; grid-row: 1; }
}

/* ==========================================================================
   Why JTM: heading, copy and contact buttons on the left (pinned while the
   cards scroll on desktop); the five reasons as compact sand counter cards.
   Mobile order: label, heading, copy, cards, buttons (CTAs last).
   ========================================================================== */

.why__grid { display: flex; flex-direction: column; }
.why__aside { display: contents; }
.why__head { order: 1; }
.why__head .lead { margin-top: var(--stack-m); }
.why__cards { order: 2; display: grid; gap: 12px; margin-top: var(--stack-l); }
.why__cta { order: 3; }

.wcard { display: flex; flex-direction: column; padding: 24px; border-radius: 20px; background: var(--c-sand); }
.wcard__label { display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.wcard__num { font-weight: 400; letter-spacing: 0; }
.wcard__label { align-items: center; min-height: 1.2em; }
.wcard__glyph { display: grid; place-items: center; width: 40px; height: 40px; margin: -12px 0; border-radius: 50%; background: var(--c-cream); color: var(--c-forest); }
.wcard__glyph .icon { width: 20px; height: 20px; }
.wcard__value { margin: 20px 0 12px; font-family: var(--f-display); font-size: clamp(2.25rem, 1.7rem + 1.3vw, 2.75rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.04em; color: var(--c-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wcard__value sup { position: relative; top: 0.2em; margin-left: 0.12em; font-size: 0.36em; font-weight: 500; letter-spacing: 0; text-transform: uppercase; vertical-align: top; color: var(--c-copper-deep); }
.wcard__approx, .wcard__hash { margin-right: 0.04em; font-size: 0.5em; vertical-align: 0.5em; color: var(--c-sage); }
.wcard__title { margin: 20px 0 12px; font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.wcard__text { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; max-width: 46ch; font-size: var(--fs-small); color: var(--c-ink-soft); }
.wcard__text .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--c-forest); }

@media (min-width: 640px) {
  .why__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcard--wide { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .why__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: start; }
  .why__aside { display: block; grid-column: 1 / 6; position: sticky; top: calc(var(--header-h) + 24px); }
  .why__cards { grid-column: 7 / -1; margin-top: 0; }
  .wcard { padding: 28px; min-height: 200px; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .wcard[data-reveal] { transition-delay: calc(80ms + var(--i, 0) * 70ms); }
}

/* ==========================================================================
   Facts (template counter cards: title, big number, text)
   ========================================================================== */

.facts { --fv: clamp(3.25rem, 2rem + 3.4vw, 5rem); display: grid; gap: var(--stack-m) var(--grid-gap); }
.fact { display: flex; flex-direction: column; padding: 24px 16px 28px; border-top: var(--border); border-bottom: var(--border); }
.fact__title { order: 0; font-family: var(--f-display); font-size: 1.125rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.fact__value { order: 1; margin: 28px 0 32px; font-family: var(--f-display); font-weight: 500; font-size: var(--fv); line-height: 0.9; letter-spacing: -0.05em; color: var(--c-ink); white-space: nowrap; }
.fact__value sup { font-size: 0.32em; vertical-align: top; margin-left: 0.12em; letter-spacing: 0; text-transform: uppercase; color: var(--c-sage); position: relative; top: 0.35em; }
.fact__hash { font-size: 0.5em; vertical-align: 0.7em; margin-right: 0.04em; color: var(--c-sage); }
.fact__text { order: 2; margin-top: auto; color: var(--c-ink-soft); font-size: var(--fs-small); max-width: 42ch; }
.fact--plain .fact__text { margin-top: 12px; }
.facts--light .fact { border-color: var(--c-line-light); }
.facts--light .fact__value, .facts--light .fact__title { color: var(--c-on-dark); }
.facts--light .fact__value sup, .facts--light .fact__text, .facts--light .fact__hash { color: var(--c-on-dark-soft); }

@media (min-width: 640px) {
  .facts--why, .facts--two, .facts--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts--why .fact:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .facts--why { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .facts--why .fact:nth-child(-n+2) { grid-column: span 3; }
  .facts--why .fact:nth-child(n+3), .facts--why .fact:last-child { grid-column: span 2; }
}
@media (min-width: 1280px) {
  .facts--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Cards without a number keep the same height as the ones with one. */
  .facts--four .fact--plain .fact__text { margin-top: auto; }
}

/* ==========================================================================
   Process
   ========================================================================== */

.step { position: relative; }
.step__line { position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--c-copper); transform-origin: left top; transition: transform 1100ms var(--ease-out); }
.step__num { display: block; font-family: var(--f-display); font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; color: var(--c-ink); }
.step__title { font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 10px; }
.step__text { color: var(--c-ink-soft); font-size: var(--fs-small); max-width: 42ch; }

/* Row of steps (home): counter cards. */
.steps { display: grid; gap: var(--stack-m) var(--grid-gap); }
.steps .step { display: flex; flex-direction: column; padding: 24px 16px 0; border-top: var(--border); }
.process__lead { margin-top: var(--stack-m); }
.process__cta .actions { margin-top: 0; }
@media (min-width: 1024px) {
  .process__cta .actions, .work__cta .actions { justify-content: flex-end; }
}
.steps .step__num { font-size: clamp(3.25rem, 2rem + 3.4vw, 5rem); margin-bottom: 40px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps__cta { grid-column: -2 / -1; } } /* CTA card always in the last column of the last row */
@media (min-width: 1024px) { .steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Process steps with a photo on top (service pages). */
.steps--media { gap: var(--grid-gap); }
.steps--media .step {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; column-gap: 14px;
  padding: 8px 8px 24px; border-top: 0; border-radius: 20px; background: var(--c-sand);
  transition: transform var(--dur-base) var(--ease-out);
}
.steps--media .step:hover { transform: translateY(-3px); }
.steps--media .step__media { grid-column: 1 / -1; margin-bottom: 20px; border-radius: 14px; }
.steps--media .step__line { display: none; }
.steps--media .step__num {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 0 0 12px; border-radius: 50%;
  background: var(--c-deep); color: var(--c-on-dark); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; line-height: 1;
}
.steps--media .step__title { margin: 0; padding-right: 12px; }
.steps--media .step__text:empty { display: none; }
.steps--media .step__text { grid-column: 1 / -1; margin-top: 14px; padding-inline: 12px; }
.step__media--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 4 / 3;
  background: var(--c-cream); color: var(--c-sage); font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.step__media--empty .icon { width: 32px; height: 32px; opacity: 0.6; }
/* Leftover grid cell on service pages: CTA instead of an empty slot. */
.steps__cta { display: flex; align-items: flex-end; padding: 24px; border-radius: 20px; background: var(--c-deep); }
.steps__cta .actions { flex-direction: column; align-items: stretch; width: 100%; }
.steps__cta .actions { margin-top: 0; }

/* Numbered list of steps (service pages): ruled rows. */
.steplist { margin-bottom: var(--stack-l); border-top: var(--border); }
.steplist .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 12px; padding: 24px 0; border-bottom: var(--border); }
.steplist .step__line { display: none; }
.steplist .step__num { grid-row: 1 / 3; font-size: 1.125rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--c-sage); }
.steplist .step__num::before { content: '('; }
.steplist .step__num::after { content: ')'; }
.steplist + div .actions { margin-top: 0; }
@media (min-width: 1024px) { .steplist .step { grid-template-columns: 96px 1fr; padding: 28px 0; } }

/* ==========================================================================
   Gallery: one large photo, two stacked
   ========================================================================== */

.gallery { display: grid; gap: var(--grid-gap); }
.gallery__item:hover .media img { transform: scale(1.035); }
@media (min-width: 768px) {
  .gallery { grid-template-columns: 1.45fr 1fr; grid-template-rows: 1fr 1fr; }
  .gallery__item--main { grid-row: 1 / 3; }
  .gallery__item--side .media { height: 100%; aspect-ratio: auto; }
  .gallery__item--side .media img { position: absolute; inset: 0; }
}

/* Our Work: DOM is the mobile order (heading, photos, text, CTA); desktop puts the text beside the heading. */
.work__grid { display: grid; }
.work__main { margin-top: var(--stack-l); }
.work__text { margin-top: var(--stack-l); }
.work__side { margin-top: var(--stack-l); }
@media (min-width: 1024px) {
  .work__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; column-gap: var(--grid-gap); }
  .work__head { grid-column: 1 / 8; grid-row: 1; margin-bottom: var(--head-gap); }
  .work__main { grid-column: 1 / 8; grid-row: 2 / 4; margin: 0; }
  .work__main .media { height: 100%; aspect-ratio: auto; min-height: 560px; }
  .work__main .media img { position: absolute; inset: 0; }
  .work__text { grid-column: 8 / -1; grid-row: 2; margin: 0 0 var(--stack-l); }
  .work__side { grid-column: 8 / -1; grid-row: 3; align-self: end; margin: 0; }
  .work__cta { grid-column: 8 / -1; grid-row: 1; align-self: end; margin: 0 0 var(--head-gap); }
}

/* ==========================================================================
   Service areas
   ========================================================================== */

/* "Serving Sacramento / and Surrounding / Communities" on three lines. */
.areas .shead .display { max-width: 13em; }
.areas--service .shead .display { text-wrap: balance; }
@media (min-width: 1024px) {
  /* Heading (cols 1-7) and copy (cols 8-12) on one row; heading a few px smaller so it fits in three lines. */
  .areas.areas--service .shead { container-type: inline-size; }
  .areas.areas--service .shead__main { grid-column: 1 / 8; }
  .areas.areas--service .shead__aside { grid-column: 8 / -1; margin-top: 0; }
  /* Font scales with the row width and the title length (set inline as --title-chars). */
  .areas.areas--service .shead .display { max-width: none; font-size: min(var(--fs-h2), calc(215cqi / var(--title-chars, 60))); }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .areas .shead__main { grid-column: 1 / -1; }
  .areas .shead__aside { grid-column: 8 / -1; margin-top: var(--stack-l); }
}

/* Service areas (home): one sand card. Left: pin, title, radius, CTAs.
   Right: the cities as a numbered two-column list linking to /serviceareas.
   Mobile order: info, cities, CTAs. */
.coverage { display: grid; grid-template-columns: minmax(0, 1fr); padding: 24px 20px; border-radius: 20px; background: var(--c-sand); }
.coverage__pin { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 50%; background: var(--c-cream); color: var(--c-forest); }
.coverage__pin .icon { width: 24px; height: 24px; }
.coverage__title { font-family: var(--f-display); font-size: var(--fs-h4); font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; }
.coverage__text { max-width: 36ch; margin-top: 10px; font-size: var(--fs-small); color: var(--c-ink-soft); }
.coverage__list { margin-top: var(--stack-l); border-top: var(--border); }
.coverage__city { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 12px 4px 12px 0; border-bottom: var(--border); transition: padding var(--dur-base) var(--ease-out); }
.coverage__num { font-family: var(--f-display); font-size: 0.9375rem; color: var(--c-sage); }
.coverage__name { font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; color: var(--c-ink); transition: color var(--dur-fast) var(--ease-out); }
.coverage__city .icon { width: 18px; height: 18px; color: var(--c-sage); transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast); }
.coverage__city:hover { padding-left: 8px; }
.coverage__city:hover .coverage__name { color: var(--c-copper-deep); }
.coverage__city:hover .icon { transform: rotate(45deg); color: var(--c-copper-deep); }
.coverage__cta .actions { margin-top: var(--stack-l); }
.coverage__city--static:hover { padding-left: 0; }
.coverage__city--static:hover .coverage__name { color: var(--c-ink); }
.coverage .btn--outline:not(:hover, :focus-visible) { --btn-ic-bg: var(--c-cream); }
@media (min-width: 640px) {
  .coverage__list { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows), auto); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); }
}
@media (min-width: 1024px) {
  .coverage { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--grid-gap); padding: 40px; }
  .coverage__info { grid-column: 1 / 5; grid-row: 1; }
  .coverage__cta { grid-column: 1 / 5; grid-row: 2; align-self: end; }
  /* Both buttons take the width of the wider one. */
  .coverage__cta .actions { display: inline-flex; flex-direction: column; align-items: stretch; }
  .coverage__cta .btn { justify-content: space-between; }
  .coverage__cta .btn--phone { justify-content: flex-start; }
  .coverage__list { grid-column: 6 / -1; grid-row: 1 / 3; margin-top: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .coverage__list li[data-reveal] { transition-delay: calc(80ms + var(--i, 0) * 50ms); }
}

.citytags { margin: var(--stack-m) 0 var(--stack-s); }


/* ==========================================================================
   Sub-services, two articles
   ========================================================================== */

/* Sub-services (windows, repair): sand cards, number badge in line with the title. */
.subs__list { display: grid; gap: var(--grid-gap); }
.sub { display: flex; flex-direction: column; padding: 28px 24px; border-radius: 20px; background: var(--c-sand); scroll-margin-top: calc(var(--header-h) + 24px); }
.sub__top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sub__num { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--c-deep); color: var(--c-on-dark); font-family: var(--f-display); font-size: 0.9375rem; font-weight: 500; }
.sub__title { font-family: var(--f-display); font-weight: 500; font-size: var(--fs-h5); line-height: 1.2; letter-spacing: -0.02em; }
.sub__lead { font-family: var(--f-display); font-size: 1.0625rem; font-weight: 500; line-height: 1.35; margin-bottom: 12px; color: var(--c-ink); }
.sub__body .body { font-size: var(--fs-small); }
@media (min-width: 768px) { .subs__list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sub { padding: 32px 28px; } }
.duo__item { padding-top: var(--stack-l); border-top: var(--border); }
.duo__item .display--h3 { margin-bottom: var(--stack-m); }
@media (min-width: 1024px) {
  .duo__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(var(--grid-gap) * 3); }
}

/* ==========================================================================
   FAQ: ruled rows with a plus icon
   ========================================================================== */

.faq__note { margin-top: var(--stack-m); }
.faq__list { border-top: var(--border); }
.qa { border-bottom: var(--border); }
.qa__q { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; padding: 20px 0; cursor: pointer; list-style: none; }
.qa__q::-webkit-details-marker { display: none; }
.qa__q h3 { font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
.qa__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast); }
.qa__icon .icon { width: 26px; height: 26px; }
.qa__q:hover .qa__icon { color: var(--c-copper-deep); }
.qa[open]:not(.is-closing) .qa__icon { transform: rotate(45deg); }
.qa__a { padding: 0 56px 28px 0; color: var(--c-ink-soft); max-width: 64ch; }
.qa[open]:not(.is-closing) .qa__a { animation: qa-in var(--dur-base) var(--ease-out); }
.qa.is-closing .qa__a { opacity: 0; transition: opacity 300ms var(--ease-out); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }

/* ==========================================================================
   Contact
   ========================================================================== */

.estimate__grid { display: grid; }
.estimate__head { margin-bottom: var(--stack-l); }
.estimate__head .display { margin-bottom: var(--stack-s); }
/* The form sits in a sand card (same surface as the home page coverage card). */
.estimate__form { padding: 24px 20px; border-radius: 20px; background: var(--c-sand); }
.details { margin-top: var(--stack-l); }
.details__title { font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.3; margin-bottom: var(--stack-s); max-width: 26ch; }
.details__links { border-top: var(--border); }
.details__link { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 4px 18px 0; border-bottom: var(--border); transition: padding var(--dur-base) var(--ease-out); }
.details__glyph { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-sand); color: var(--c-forest); transition: background-color var(--dur-fast), color var(--dur-fast); }
.details__glyph .icon { width: 20px; height: 20px; }
.details__main { display: grid; gap: 4px; min-width: 0; }
.details__key { font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.details__value { font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; color: var(--c-ink); overflow-wrap: anywhere; transition: color var(--dur-fast) var(--ease-out); }
.details__link > .icon { width: 18px; height: 18px; color: var(--c-sage); transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast); }
.details__link:hover { padding-left: 8px; }
.details__link:hover .details__glyph { background: var(--c-forest); color: var(--c-on-dark); }
.details__link:hover .details__value { color: var(--c-copper-deep); }
.details__link:hover > .icon { transform: rotate(45deg); color: var(--c-copper-deep); }
.details__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--grid-gap); margin-top: var(--stack-m); }
.details__fact--wide { grid-column: 1 / -1; }
.details__fact dt { font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.details__fact dd { margin-top: 6px; font-size: 0.9375rem; line-height: 1.5; color: var(--c-ink-soft); }
@media (min-width: 1024px) {
  /* Extra form height goes to row 2, so the details follow the heading with no gap. */
  .estimate__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--grid-gap); align-items: start; }
  .estimate__head { grid-column: 1 / 5; grid-row: 1; }
  .details { grid-column: 1 / 5; grid-row: 2; position: sticky; top: calc(var(--header-h) + 24px); }
  .estimate__form { grid-column: 6 / -1; grid-row: 1 / 3; padding: 40px; }
}

.form__grid { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .field--wide, .field--s3 { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  /* Six tracks: name | phone | email, then address | city | ZIP. */
  .form__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .field--s1 { grid-column: span 1; }
  .field--s2 { grid-column: span 2; }
  .field--s3 { grid-column: span 3; }
}
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.field__label { font-family: var(--f-display); font-size: 1rem; font-weight: 500; color: var(--c-ink); padding: 0; }
.req { color: var(--c-copper-deep); }
.field__input { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid transparent; border-radius: var(--radius-card); background: var(--c-cream); color: var(--c-ink); font: 500 1rem/1.4 var(--f-body); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast); }
.field__input:hover { border-color: var(--c-line); }
.field__input:focus { outline: none; border-color: var(--c-forest); box-shadow: 0 0 0 3px rgba(41, 75, 56, 0.2); background: #fff; }
.field__input--area { min-height: 120px; resize: vertical; }
.field__help { font-size: 0.8125rem; color: var(--c-sage); line-height: 1.45; }
.field__help:empty, .field__err:empty { display: none; }
.field__err { font-size: 0.8125rem; font-weight: 700; color: var(--c-error); }
.field.is-invalid .field__input { border-color: var(--c-error); box-shadow: 0 0 0 3px rgba(163, 50, 31, 0.12); }
.choices.is-invalid .choice { border-color: rgba(163, 50, 31, 0.6); }
.choices__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.choice { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 8px; border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill); background: var(--c-cream); font-size: 0.875rem; font-weight: 600; cursor: pointer; user-select: none; transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast), color var(--dur-fast); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(20, 44, 31, 0.35); background: #fff; color: transparent; transition: inherit; }
.choice__box .icon { width: 13px; height: 13px; }
.choice:hover { border-color: var(--c-ink); }
.choice:has(input:checked) { background: var(--c-forest); border-color: var(--c-forest); color: var(--c-on-dark); }
.choice:has(input:checked) .choice__box { background: var(--c-on-dark); border-color: var(--c-on-dark); color: var(--c-forest); }
.choice:has(input:focus-visible) { outline: 2px solid var(--c-copper-deep); outline-offset: 3px; }
.upload { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px 8px 8px; border: 1px dashed rgba(20, 44, 31, 0.3); border-radius: var(--radius-card); background: var(--c-cream); cursor: pointer; transition: border-color var(--dur-fast), background-color var(--dur-fast); }
.upload:hover { border-color: var(--c-forest); background: #fff; }
.upload:has(input:focus-visible) { outline: 2px solid var(--c-copper-deep); outline-offset: 3px; }
.upload > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--c-sand); color: var(--c-forest); }
.upload__text { font-size: 0.9375rem; }
.upload__files { color: var(--c-sage); font-weight: 500; }
.upload__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.btn--submit { border: 0; }
.btn--submit[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.btn--submit[aria-busy="true"] .btn__icon { animation: pulse 1.2s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { transform: scale(0.85); } }
.form__status { font-size: 0.9375rem; font-weight: 600; max-width: 46ch; }
.form__status.is-error { color: var(--c-error); }
.form__status.is-success { color: var(--c-forest); }
@media (max-width: 767px) { .btn--submit { width: 100%; justify-content: space-between; } }
.form-done { padding: 40px 0; }
.form-done .display { margin-bottom: var(--stack-m); }


.nf__links { display: grid; justify-items: start; gap: 4px; }

/* ==========================================================================
   Text marquee (template "BUILD A PROJECT" strip)
   ========================================================================== */

.tslide { padding-block: var(--section-tight); overflow: hidden; }
.marquee__track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee__group { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); padding-right: clamp(24px, 3vw, 48px); }
.marquee__word { font-family: var(--f-display); font-weight: 500; text-transform: uppercase; white-space: nowrap; font-size: clamp(3rem, 1.4rem + 6vw, 7.5rem); letter-spacing: -0.04em; line-height: 1; color: var(--c-ink); }
.marquee__word--soft { color: rgba(20, 44, 31, 0.3); }
.marquee__star { width: clamp(28px, 1.6rem + 1.2vw, 52px); height: auto; color: var(--c-copper); }
/* The marquee opens the dark footer: cream words, soft cream in between, a hairline below. */
.footer .tslide { border-bottom: var(--border-light); }
.footer .marquee__word { color: var(--c-on-dark); }
.footer .marquee__word--soft { color: rgba(253, 252, 249, 0.32); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Footer (template footer): closing heading, big menu, contact + photo
   ========================================================================== */

.footer { background: var(--c-deep); color: var(--c-on-dark); }
.footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--stack-l) var(--grid-gap); padding-block: var(--section-tight) var(--stack-xl); }
.footer__lead, .footer__col--contact { grid-column: 1 / -1; }
.footer__home { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: var(--stack-m); }
.footer__logo { height: 52px; width: auto; }
.footer__blurb { max-width: 40ch; font-size: var(--fs-body); color: var(--c-on-dark); }
.footer__license { margin-top: 12px; font-size: var(--fs-small); color: var(--c-on-dark-soft); }
.footer__lead .actions { margin-top: var(--stack-l); }
.footer__h { margin-bottom: var(--stack-s); font-family: var(--f-display); font-size: 0.9375rem; color: var(--c-on-dark-soft); }
.footer__links { display: grid; }
.footer__link { display: inline-flex; align-items: center; min-height: 40px; font-family: var(--f-display); font-size: 1.125rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.footer__link:hover { color: var(--c-copper-soft); transform: translateX(6px); }
.footer__contact { display: grid; gap: 6px; font-family: var(--f-display); font-size: 1.125rem; font-weight: 500; line-height: 1.35; }
.footer__contact a { display: inline-flex; min-height: 40px; align-items: center; overflow-wrap: anywhere; transition: color var(--dur-fast) var(--ease-out); }
.footer__contact a:hover { color: var(--c-copper-soft); }
.footer__contact li:not(:has(a)) { margin-top: 8px; font-size: var(--fs-small); font-weight: 400; color: var(--c-on-dark-soft); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px 32px; border-top: var(--border-light); font-size: 0.9375rem; color: var(--c-on-dark-soft); }
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer__lead { grid-column: 1 / 5; }
  .footer__col--menu { grid-column: 6 / 8; }
  .footer__col--services { grid-column: 8 / 10; }
  .footer__col--contact { grid-column: 10 / -1; }
}

/* ==========================================================================
   Preloader (assets/js/preloader.js). Only shown when the head script adds .has-preloader.
   ========================================================================== */

.preloader { display: none; }
.has-preloader .preloader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: var(--z-preloader);
  overflow: hidden; color: var(--c-on-dark); pointer-events: auto;
  padding: max(24px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
html.is-loading { overflow: hidden; scrollbar-gutter: stable; }

/* Two halves of the surface; they part to open the page. Each overlaps the seam by 1px. */
.preloader__panel { position: absolute; left: 0; right: 0; background: var(--c-deep); will-change: transform; }
.preloader__panel--top { top: 0; height: calc(50% + 1px); }
.preloader__panel--bottom { bottom: 0; height: 50%; }

/* Drafting grid: very faint, large module, centered on the drawing. */
.preloader__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(253, 252, 249, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(253, 252, 249, 0.045) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: calc(50% - 60px) calc(50% - 60px);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 100%);
}

.preloader__stage { position: relative; display: grid; justify-items: center; width: min(480px, 82vw); }
.preloader__cell { display: grid; place-items: center; width: 100%; }
.preloader__cell > * { grid-area: 1 / 1; }
.preloader__house { position: relative; width: min(380px, 72vw); }
.preloader__svg { display: block; width: 100%; height: auto; overflow: visible; }
.preloader__logo { display: block; width: 100%; height: auto; clip-path: inset(0 100% 0 0); opacity: 0; }

/* Construction guides through the ground line and the gable apex, running off the screen. */
.preloader__guide { position: absolute; display: block; background: rgba(253, 252, 249, 0.16); pointer-events: none; }
.preloader__guide--h { left: 50%; top: calc(236 / 260 * 100%); width: 300vw; height: 1px; margin-left: -150vw; transform: scaleX(0); }
.preloader__guide--v { top: 50%; left: calc(150 / 400 * 100%); width: 1px; height: 300vh; margin-top: -150vh; transform: scaleY(0); }

.pl-draw { fill: none; stroke: var(--c-on-dark); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pl-open { fill: var(--c-deep); stroke-opacity: 0.9; }
.pl-faint { stroke-opacity: 0.4; }
.pl-dim { stroke: var(--c-copper-soft); stroke-width: 1; stroke-opacity: 0.8; }
.pl-board { fill: rgba(253, 252, 249, 0.07); stroke: rgba(253, 252, 249, 0.55); stroke-width: 1; opacity: 0; }

.preloader__meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--stack-s);
  width: 100%; margin-top: 28px; opacity: 0;
  font-family: var(--f-body); font-size: 0.625rem; font-weight: 600; line-height: 1; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-on-dark-soft);
}
.preloader__count { font-family: var(--f-display); font-weight: 500; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; color: var(--c-on-dark); }
@media (min-width: 768px) { .preloader__meta { font-size: 0.6875rem; } }

/* While the page is covered, the hero waits: its CSS entrance is handed to the preloader. */
html.has-preloader .phero__bg img { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .is-loading .phero [data-reveal="words"].is-in .w > span { transform: translateY(108%); transition: none; }
}

/* ==========================================================================
   Motion (only with JS and without a reduced-motion preference)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not([data-reveal="words"], [data-reveal="line"]) { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="words"] .w > span { transform: translateY(108%); transition: transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 40ms); }
  .js [data-reveal="words"].is-in .w > span { transform: none; }
  .js .media--reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .media--reveal img { transform: scale(1.1); transition: transform 1500ms var(--ease-out); }
  .js .media--reveal.is-in { clip-path: inset(0 0 0 0); }
  .js .media--reveal.is-in img { transform: scale(1); }
  .js .gallery__item:hover .media--reveal.is-in img { transform: scale(1.035); }
  .js .srow[data-reveal] { transition-delay: calc(150ms + var(--i, 0) * 80ms); }
  .js [data-reveal="line"] { transform: scaleX(0); transition: transform 1400ms var(--ease-in-out); }
  .js [data-reveal="line"].is-in { transform: scaleX(1); }
  .js .step__line { transform: scaleX(0); }
  .js .step.is-in .step__line { transform: scaleX(1); transition-delay: 150ms; }
  .js .phero__bg img { animation: hero-in 1800ms var(--ease-out) both; }
  @keyframes hero-in { from { transform: scale(1.08); } }
}

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

@media print {
  .preloader { display: none !important; }
  .header, .menu, .tslide, .frame, .footer .actions { display: none !important; }
  .phero { min-height: 0; color: var(--c-ink); background: none; }
  .phero__bg { display: none; }
  .phero .display--light { color: var(--c-ink); }
}

/* ==========================================================================
   James Hardie block (/siding): one compact sand card, copy left, benefits + CTA right
   ========================================================================== */

.hardie__card { display: grid; gap: var(--stack-l); padding: 28px 20px; border-radius: 20px; background: var(--c-sand); }
.hardie__main .display { margin-top: var(--stack-s); }
.hardie__copy { margin-top: var(--stack-m); }
.hardie__copy .lead { margin-bottom: var(--stack-s); }
.hardie__intro { margin-bottom: 4px; font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.hardie__list { border-top: var(--border); }
.hardie__list li { display: grid; grid-template-columns: 44px 1fr; align-items: baseline; gap: 8px; padding: 14px 0; border-bottom: var(--border); font-family: var(--f-display); font-size: 1.125rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; color: var(--c-ink); }
.hardie__num { font-size: 0.9375rem; font-weight: 400; color: var(--c-sage); }
.hardie__num::before { content: '('; }
.hardie__num::after { content: ')'; }
.hardie__sidelead { margin-bottom: var(--stack-s); font-family: var(--f-display); font-size: var(--fs-h5); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; color: var(--c-ink); }
.hardie__intro + .hardie__sidelead { margin-top: 8px; }
.hardie__note { margin-top: var(--stack-m); font-size: var(--fs-small); }
.hardie__side .actions { margin-top: var(--stack-m); }
@media (min-width: 1024px) {
  .hardie__card { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); padding: 48px; }
  .hardie__main { grid-column: 1 / 7; }
  .hardie__side { grid-column: 8 / -1; align-self: end; }
}

/* ==========================================================================
   Siding inspection signs (/siding): heading + copy left, sign grid right
   ========================================================================== */

.signs__grid { display: grid; gap: var(--stack-l); }
.signs__head .lead { margin-top: var(--stack-m); }
.signs__intro { margin-bottom: var(--stack-s); font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-sage); }
.signs__list { display: grid; gap: 8px; }
.signs__list li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; border-radius: var(--radius-card); background: var(--c-sand); font-family: var(--f-display); font-size: 1.0625rem; font-weight: 500; line-height: 1.25; color: var(--c-ink); }
.signs__list .icon { flex: none; width: 20px; height: 20px; color: var(--c-copper-deep); }
.signs__body .actions { margin-top: var(--stack-m); }
@media (min-width: 640px) {
  .signs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .signs__list li:last-child:nth-child(odd) { grid-column: 1 / -1; } /* odd count: last sign spans the row, no empty cell */
}
@media (min-width: 1024px) {
  .signs__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--grid-gap); row-gap: var(--stack-l); }
  .signs__head { grid-column: 1 / 7; grid-row: 1; }
  .signs__body { grid-column: 1 / 6; grid-row: 2; align-self: end; }
  .signs__panel { grid-column: 7 / -1; grid-row: 1 / 3; align-self: start; margin-top: calc(38px + var(--stack-m)); } /* starts level with the heading, below the label pill */
}

/* Why JTM on a dark surface (/siding): same card grid as the home page */
.why--dark .why__head .body { margin-top: var(--stack-s); }
@media (min-width: 1024px) { .why--dark .why__aside { grid-column: 1 / 7; padding-right: calc(var(--grid-gap) * 2); } }
.why--dark .wcard { background: rgba(253, 252, 249, 0.06); border: 1px solid var(--c-line-light); }
.why--dark .wcard__label { color: var(--c-on-dark-soft); }
.why--dark .wcard__value, .why--dark .wcard__title { color: var(--c-on-dark); }
.why--dark .wcard__value sup { color: var(--c-copper-soft); }
.why--dark .wcard__approx, .why--dark .wcard__hash { color: var(--c-on-dark-soft); }
.why--dark .wcard__text { color: var(--c-on-dark-soft); }
.why--dark .wcard__text .icon { color: var(--c-copper-soft); }
.why--dark .wcard__glyph { background: rgba(253, 252, 249, 0.1); color: var(--c-on-dark); }

/* Process header on service pages: heading on one line across the full width
   (font scales with the container so longer titles still fit), CTA below it. */
@media (min-width: 1024px) {
  .process__head--wide { container-type: inline-size; }
  .process__head--wide .shead__main { grid-column: 1 / -1; }
  .process__head--wide .shead__main .display { font-size: min(var(--fs-h2), 4.2cqi); white-space: nowrap; }
  .process__head--wide .shead__aside { grid-column: 1 / -1; grid-row: 2; margin-top: var(--stack-m); }
  .process__head--wide .shead__aside .actions { justify-content: flex-start; }
}

/* ==========================================================================
   Mobile layout rules (client feedback, applied site-wide):
   1. photos sit under their headings, buttons close the block at full width;
   2. 80px (--section) between blocks;
   3. 30px (--cta-gap) from a block's content to its buttons.
   ========================================================================== */

/* Single-column layouts: blocks whose button sat beside the heading move it to the end. */
@media (max-width: 1023px) {
  /* How It Works: heading, steps, then the phone button. */
  .process > .container { display: flex; flex-direction: column; }
  .process__head { display: contents; }
  .process__head .shead__main { order: 1; margin-bottom: var(--head-gap); }
  .process .steps { order: 2; }
  .process__head .shead__aside { order: 3; margin-top: var(--cta-gap); }

  /* FAQ: heading, questions, then the phone button. */
  .faq .cols { display: flex; flex-direction: column; }
  .faq__head { display: contents; }
  .faq__intro { order: 1; }
  .faq__list { order: 2; }
  .faq__head > .actions { order: 3; }
}

@media (max-width: 767px) {
  /* 2. Block spacing: the strip under the hero and the James Hardie sub-block use the same 80px. */
  .pintro { padding-top: var(--section); }
  .subfeat { margin-top: var(--section); }

  /* 3. Content -> buttons. */
  .actions,
  .shead__aside .actions, .offer__body .actions, .subfeat__body .actions, .coverage__cta .actions,
  .hardie__side .actions, .signs__body .actions { margin-top: var(--cta-gap); }
  .section__cta, .phero__foot, .form__foot { margin-top: var(--cta-gap); }
  .process__cta .actions { margin-top: 0; } /* the wrapper above already carries the gap */

  /* Footer: logo and copy, the link columns, then the buttons. The grid's row gap
     (--stack-l) sits above the buttons, so the margin trims it to --cta-gap. */
  .footer__lead { display: contents; }
  .footer__intro { grid-column: 1 / -1; }
  .footer__lead .actions { grid-column: 1 / -1; order: 1; margin-top: calc(var(--cta-gap) - var(--stack-l)); }

  /* 1. Process cards with photos: number + title first, then the photo, then the text. */
  .steps--media .step { padding-top: 16px; }
  .steps--media .step__num { grid-column: 1; grid-row: 1; }
  .steps--media .step__title { grid-column: 2; grid-row: 1; }
  .steps--media .step__media { grid-row: 2; margin: 16px 0 0; }
  .steps--media .step__text { grid-row: 3; }
}

/* Mobile header and bottom bar: the pill spans the screen (logo left, menu right) and the
   phone moves from the header to a bottom bar that shows from the second block on. */
.dock { display: none; }
@media (max-width: 767px) {
  .header__phone { display: none; }
  .header__pill { flex: 1; justify-content: space-between; }

  .dock {
    position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: var(--z-header);
    display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--radius-pill);
    background: rgba(20, 44, 31, 0.72); box-shadow: inset 0 0 0 1px rgba(253, 252, 249, 0.08);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    opacity: 0; visibility: hidden; transform: translateY(calc(100% + 24px));
    transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
  }
  .dock.is-shown { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  body.menu-open .dock { opacity: 0; visibility: hidden; }
  .dock__cta { flex: 1; justify-content: space-between; min-height: 52px; }
  .dock__phone { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--c-copper-deep); color: #fff; transition: transform 200ms var(--ease-out); }
  .dock__phone:active { transform: scale(0.94); }
  .dock__phone .icon { width: 20px; height: 20px; }
  @media (prefers-reduced-transparency: reduce) { .dock { background: var(--c-deep); -webkit-backdrop-filter: none; backdrop-filter: none; } }
}

@media (max-width: 767px) {
  /* James Hardie (home): the text link sits centred above the phone button, which closes the block. */
  .subfeat__body .actions .tlink { order: -1; align-self: center; }

  /* How It Works (home): the step number sits in one row with its title. */
  .steps:not(.steps--media) .step { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 16px; }
  .steps:not(.steps--media) .step__num { font-size: 2.75rem; margin-bottom: 0; }
  .steps:not(.steps--media) .step__title { margin-bottom: 0; }
  .steps:not(.steps--media) .step__text { grid-column: 1 / -1; margin-top: 14px; }

  /* Footer: everything centred. */
  .footer__grid, .footer__bottom { text-align: center; }
  .footer__blurb { margin-inline: auto; }
  .footer__links { justify-items: center; }
  .footer__contact { justify-items: center; }
  .footer__bottom { justify-content: center; }
}

/* Contact form on mobile: service options as one even column of full-width rows. */
@media (max-width: 767px) {
  .choices__list { display: grid; gap: 8px; margin-top: 6px; }
  .choice { min-height: 52px; padding-right: 18px; }
}

/* Our Work: row of completed projects under the main photos */
.work__more { display: grid; gap: var(--grid-gap); margin-top: var(--stack-l); }
@media (min-width: 768px) {
  .work__more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .work__more { grid-column: 1 / -1; grid-row: 4; margin-top: var(--grid-gap); }
}
