/* ==========================================================================
   Belleville Spray Foam Insulation - stylesheet
   Hand-written. Not generated by build.py (rerun build.py after editing so
   the ?v= fingerprint in every page updates).

   Design notes
   - Palette: Quinte olive (weight), ochre (action, the colour of a fresh
     lift of closed cell foam), limestone grey (alternate sections, the rock
     the city stands on). Every text/background pair below was computed with
     the WCAG relative-luminance formula; figures are in the comments.
   - Type: Archivo, one variable family. Headings run expanded (wdth 112)
     and heavy; body runs at normal width. Self-hosted in /fonts/.
   - Signature: the depth ruler down the seam of the home hero, with a foam
     line that rises once on load. Inner heroes carry a short tick strip on
     their lower edge so the device threads through the site. Everything else
     stays quiet: no shadows on cards, no labels above headings.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */
:root {
  --color-primary:       #3A3F22;  /* Quinte olive. White on it 10.97:1. Matches THEME_COLOR. */
  --color-primary-dark:  #262A16;  /* Footer and topbar. White 14.73:1. */
  --color-primary-light: #4A5130;  /* Link colour on white, 8.9:1. */
  --color-accent:        #D9A428;  /* Ochre. Ink text on it 7.55:1; on olive 4.85:1 (large/UI only). */
  --color-accent-dark:   #8A6410;  /* Ochre for text on white, 5.37:1. */
  --color-accent-hero:   #F0C75A;  /* Light ochre for small text on olive, 6.80:1. */
  --color-stone:         #E9E8E2;  /* Limestone section background. Ink 13.89:1, muted 6.57:1. */
  --color-stone-deep:    #DCDBD2;
  --color-text:          #1B1D12;  /* 17.06:1 on white. */
  --color-heading:       #1B1D12;
  --color-text-muted:    #4E5240;  /* 8.06:1 on white. */
  --color-on-dark:       #E7E6DA;  /* Body text on the footer, 11.74:1. */
  --color-on-dark-muted: #C9CBB6;  /* 8.91:1 on the footer. */
  --color-border:        #D2D1C6;  /* Decorative rules only. */
  --color-border-strong: #7A7D66;  /* Inputs and outline buttons: 4.24:1 on white, 3.45:1 on stone (WCAG 1.4.11). */
  --color-bg:            #FFFFFF;
  --color-bg-alt:        var(--color-stone);
  --color-success:       #2F6B2F;
  --color-success-bg:    #E8F1E3;
  --color-error:         #A1261B;

  --font: "Archivo", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  /* Scale on a 1.25 ratio from a 17px body. */
  --fs-xs:  0.8125rem;
  --fs-sm:  0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:  1.25rem;
  --fs-lg:  1.5625rem;
  --fs-xl:  1.953rem;
  --fs-2xl: 2.441rem;
  --fs-3xl: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
  --lh-body: 1.65;
  --lh-tight: 1.12;

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem;  --space-7: 3rem;   --space-8: 4.5rem;
  --space-9: 6rem;

  --container: 1180px;
  --container-narrow: 780px;
  --radius: 3px;
  --header-h: 72px;
  --ease: 160ms ease;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img, picture, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--color-primary-light); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-accent-dark); }
p { margin: 0 0 var(--space-4); }
ul, ol { padding-left: 1.2em; }

h1, h2, h3 {
  font-family: var(--font);
  font-stretch: 112%;
  color: var(--color-heading);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-xl); font-weight: 760; }
h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: 0; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 200;
  background: var(--color-accent); color: var(--color-text); padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: var(--space-4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--space-8); }
.section--alt { background: var(--color-bg-alt); }
.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--space-6); }
.prose > :first-child, .prose .content-block:first-child h2 { margin-top: 0; }
.content-block + .content-block { margin-top: var(--space-6); }
.content-block h3 { margin-top: var(--space-5); }
.section-head { max-width: 62ch; margin-bottom: var(--space-6); }
.section-head.is-centered { margin-inline: auto; text-align: center; }
.lead { font-size: var(--fs-md); color: var(--color-text-muted); }
.grid { display: grid; gap: var(--space-6) var(--space-5); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-8); align-items: start; }
.is-centered { text-align: center; justify-content: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 700; font-stretch: 106%;
  padding: .8rem 1.35rem; border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.btn--primary { background: var(--color-accent); color: var(--color-text); }
.btn--primary:hover { background: #E6B53E; color: var(--color-text); }
.btn--secondary { background: var(--color-primary); color: #fff; }
.btn--secondary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--color-primary); border-color: var(--color-border-strong); }
.btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(58,63,34,.06); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn--lg { padding: 1rem 1.6rem; font-size: var(--fs-base); }
.btn--sm { padding: .55rem 1rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* ---------------------------------------------------------------- topbar + header */
.topbar { background: var(--color-primary-dark); color: var(--color-on-dark); font-size: var(--fs-xs); }
.topbar__inner { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: .45rem; }
.topbar a { color: var(--color-accent-hero); font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: var(--color-accent-hero); }

.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--color-border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--color-heading); }
.logo img { width: 42px; height: 42px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-weight: 800; font-stretch: 112%; font-size: 1.02rem; letter-spacing: -.01em; }
.logo__tag { font-size: var(--fs-xs); color: var(--color-text-muted); }
.logo:hover { color: var(--color-heading); }

.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav__list { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; padding: .55rem .7rem; font: inherit; font-weight: 600; font-size: var(--fs-sm);
  color: var(--color-text); text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: var(--radius);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--color-primary); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 3px; text-underline-offset: .5em; }
.nav__toggle::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.nav__item--has-menu { position: relative; }
.nav__submenu {
  position: absolute; top: calc(100% + 8px); left: -1rem; z-index: 50;
  display: none; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 0 var(--space-4);
  list-style: none; margin: 0; padding: var(--space-4);
  background: #fff; border: 1px solid var(--color-border); border-top: 3px solid var(--color-accent);
}
.nav__submenu.is-open, .nav__item--has-menu:focus-within .nav__submenu { display: grid; }
@media (hover: hover) and (min-width: 1025px) { .nav__item--has-menu:hover .nav__submenu { display: grid; } }
.nav__submenu a { display: block; padding: .45rem .5rem; color: var(--color-text); text-decoration: none; font-size: var(--fs-sm); }
.nav__submenu a:hover, .nav__submenu a[aria-current="page"] { color: var(--color-primary); background: var(--color-stone); }
.header-cta { display: flex; }
.nav-burger { display: none; width: 46px; height: 46px; background: none; border: 1px solid var(--color-border-strong); border-radius: var(--radius); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.nav-burger span { display: block; height: 2px; background: var(--color-text); }

.breadcrumbs { background: #fff; font-size: var(--fs-xs); color: var(--color-text-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: .65rem 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--color-border-strong); }
.breadcrumbs a { color: var(--color-text-muted); }

/* ---------------------------------------------------------------- hero (home) */
.hero { position: relative; background: var(--color-primary); color: #fff; }
.hero h1 { color: #fff; }
.hero--home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  min-height: min(640px, 82vh);
}
.hero__panel { display: flex; align-items: center; padding: var(--space-8) clamp(16px, 5vw, 72px); }
.hero__intro { max-width: 580px; }
.hero__brand {
  margin: 0 0 var(--space-5); font-weight: 700; font-size: var(--fs-sm);
  color: #fff; display: flex; flex-direction: column; gap: .15rem;
}
.hero__place { font-weight: 500; color: var(--color-accent-hero); }
.hero--home h1 { font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.1rem); font-weight: 820; font-stretch: 118%; line-height: 1.02; letter-spacing: -.02em; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: var(--space-5) 0 0; padding: 0; }
.hero__badges li { font-size: var(--fs-sm); padding: .3rem .7rem; border: 1px solid rgba(240,199,90,.55); color: var(--color-on-dark); border-radius: 2px; }
.hero__photo { position: relative; overflow: hidden; }
.hero__photo picture, .hero__photo img { width: 100%; height: 100%; }
.hero__photo img { object-fit: cover; object-position: 35% 50%; }

/* The depth ruler. Each span is one inch; the gradients draw eighths, the
   ::before draws the inch line and the ::after prints the number. The ::after
   of the ruler itself is the foam line, which rises once to the two-inch
   mark - the depth closed cell becomes its own vapour barrier. */
.ruler {
  position: relative; display: flex; flex-direction: column-reverse;
  background: var(--color-primary-dark); overflow: hidden;
}
.ruler__in {
  position: relative; flex: 1 1 0; min-height: 56px;
  background:
    repeating-linear-gradient(to top, transparent 0 calc(12.5% - 1px), rgba(217,164,40,.75) calc(12.5% - 1px) 12.5%) left / 9px 100% no-repeat,
    linear-gradient(to top, transparent calc(50% - 1px), rgba(217,164,40,.95) calc(50% - 1px) 50%, transparent 50%) left / 15px 100% no-repeat;
}
.ruler__in::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 2px; background: var(--color-accent); }
.ruler__in::after {
  content: attr(data-in); position: absolute; top: 5px; right: 4px;
  font-size: 11px; font-weight: 700; color: var(--color-accent-hero); font-variant-numeric: tabular-nums;
}
.ruler::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 33.333%;
  background: linear-gradient(to top, rgba(240,199,90,.38), rgba(240,199,90,.16));
  border-top: 2px solid var(--color-accent-hero);
  transform-origin: bottom; animation: foam-rise 1.6s cubic-bezier(.2,.7,.2,1) .35s both;
  pointer-events: none;
}
@keyframes foam-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------------------------------------------------------------- hero (inner pages) */
.hero--page { padding-block: var(--space-7) var(--space-7); }
.hero--page::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background:
    repeating-linear-gradient(to right, rgba(217,164,40,.8) 0 1px, transparent 1px 12px) bottom / 100% 6px no-repeat,
    repeating-linear-gradient(to right, var(--color-accent) 0 2px, transparent 2px 96px) bottom / 100% 10px no-repeat;
}
.hero--page h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); max-width: 22ch; }
.hero--page .hero__inner { display: block; }
.hero--split .hero__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--space-7); align-items: center; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.hero--split .hero__media img { aspect-ratio: 16 / 10; }

/* ---------------------------------------------------------------- intro band (prose under every hero) */
.intro-band { background: var(--color-bg); padding-block: var(--space-7) var(--space-6); border-bottom: 1px solid var(--color-border); }
.intro-band__inner > p:first-of-type { font-size: var(--fs-md); color: var(--color-heading); line-height: 1.55; }
.intro-band h2, .intro-band__heading { font-size: var(--fs-lg); }

/* ---------------------------------------------------------------- quote band + forms */
.quote-band { background: var(--color-stone); padding-block: var(--space-7); }
.hero-form { background: #fff; border-top: 4px solid var(--color-accent); padding: clamp(20px, 4vw, 40px); }
.hero-form__title { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.hero-form__sub { color: var(--color-text-muted); }
.quote-band .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quote-band .field--full { grid-column: span 2; }
.quote-band .field--full:last-child { grid-column: 1 / -1; }

.form-wrap { background: #fff; padding: clamp(20px, 4vw, 40px); border-top: 4px solid var(--color-accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: var(--fs-sm); }
.req { color: var(--color-error); }
.field__optional { color: var(--color-text-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--color-text); background: #fff;
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius); padding: .7rem .8rem; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); outline: 3px solid rgba(217,164,40,.6); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--color-error); }
.field__error { color: var(--color-error); font-size: var(--fs-xs); min-height: 1em; }
.form-note { font-size: var(--fs-xs); color: var(--color-text-muted); margin: var(--space-3) 0 0; }
.form-success { display: none; background: var(--color-success-bg); border-left: 4px solid var(--color-success); padding: var(--space-4); margin-bottom: var(--space-4); }
.form-success.is-visible { display: block; }
.form-success strong { display: block; }

/* ---------------------------------------------------------------- service cards */
.service-card { display: flex; flex-direction: column; }
.service-card__media { margin-bottom: var(--space-4); overflow: hidden; }
.service-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 2px; transition: transform 400ms ease; }
.service-card:hover .service-card__media img { transform: scale(1.03); }
.service-card__body { display: flex; flex-direction: column; flex: 1; border-top: 2px solid var(--color-primary); padding-top: var(--space-3); }
.service-card h3 { font-size: var(--fs-md); margin-bottom: var(--space-2); }
.service-card h3 a:hover { text-decoration: underline !important; text-decoration-color: var(--color-accent) !important; }
.service-card p { color: var(--color-text-muted); font-size: var(--fs-sm); flex: 1; }
.service-card__link { font-weight: 700; font-size: var(--fs-sm); color: var(--color-primary); }

/* ---------------------------------------------------------------- benefits */
.feature { position: relative; padding-left: 2.6rem; }
.feature__icon {
  position: absolute; left: 0; top: .1rem; width: 1.8rem; height: 1.8rem;
  display: grid; place-items: center; background: var(--color-primary); color: var(--color-accent-hero);
  font-weight: 800; font-size: .95rem; border-radius: 2px;
}
.feature p { margin: 0; }

/* ---------------------------------------------------------------- process: a real sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-top: 3.6rem; border-top: 2px solid var(--color-primary); }
.step::before {
  content: counter(step); position: absolute; top: .5rem; left: 0;
  font-size: 2.6rem; font-weight: 800; font-stretch: 120%; line-height: 1; color: var(--color-accent-dark);
  font-variant-numeric: tabular-nums;
}
.step p { margin: 0; }
.steps.grid--3 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- cards, sidebar */
.card { background: var(--color-stone); padding: var(--space-5); border-top: 4px solid var(--color-accent); }
.card h2, .card h3 { margin-top: 0; }
.panel { padding: var(--space-5); border: 1px solid var(--color-border); }
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.sidebar .footer-list li { padding-block: .3rem; border-bottom: 1px solid var(--color-border); font-size: var(--fs-sm); }
.sidebar .footer-list a { text-decoration: none; }
.sidebar .footer-list a:hover { text-decoration: underline; }
.footer-phone { display: inline-block; font-size: var(--fs-lg); font-weight: 800; font-stretch: 112%; text-decoration: none; }
.cta-inline { margin-block: var(--space-6); padding: var(--space-5); background: var(--color-stone); border-left: 4px solid var(--color-accent); }
.cta-inline p { font-weight: 600; font-size: var(--fs-md); margin: 0; }
.cta-inline .btn-row { margin-top: var(--space-4); }

/* ---------------------------------------------------------------- CTA band */
.cta-band { background: var(--color-primary); color: var(--color-on-dark); padding-block: var(--space-8); position: relative; }
.cta-band h2 { color: #fff; font-size: var(--fs-2xl); max-width: 24ch; }
.cta-band p { max-width: 62ch; font-size: var(--fs-md); }
.cta-band a:not(.btn) { color: var(--color-accent-hero); }
.cta-band .btn-row.is-centered { justify-content: flex-start; }
.cta-band .container { text-align: left; }

/* ---------------------------------------------------------------- service area + map */
.areas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; }
.map-frame { position: relative; aspect-ratio: 4 / 3.4; background: var(--color-stone-deep); border: 1px solid var(--color-border-strong); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-frame--side { margin-top: var(--space-5); aspect-ratio: 1 / 1; }

/* ---------------------------------------------------------------- gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.gallery__btn { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; font: inherit; color: inherit; }
.gallery__btn img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.gallery__caption { display: block; font-size: var(--fs-sm); color: var(--color-text-muted); padding-top: .6rem; }
.gallery__btn:hover .gallery__caption { color: var(--color-text); }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(20,22,12,.94); display: grid; place-items: center; padding: 4vw; }
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: 1000px; width: 100%; }
.lightbox__img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.lightbox__caption { color: var(--color-on-dark); margin-top: var(--space-3); text-align: center; }
.lightbox__close, .lightbox__nav { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; line-height: 1; padding: .5rem 1rem; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- FAQ */
.faq { max-width: 860px; margin-inline: auto; border-top: 2px solid var(--color-primary); }
.faq__item { border-bottom: 1px solid var(--color-border-strong); }
.faq__question { margin: 0; font-size: var(--fs-md); }
.faq__trigger {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); width: 100%;
  padding: var(--space-4) 0; background: none; border: 0; text-align: left; cursor: pointer;
  font: inherit; font-weight: 700; font-stretch: 106%; color: var(--color-heading);
}
.faq__icon { position: relative; flex: 0 0 22px; height: 22px; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 2px; background: var(--color-accent-dark); transition: transform var(--ease); }
.faq__icon::after { transform: rotate(90deg); }
.faq__trigger[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }
.faq__panel { display: none; padding: 0 0 var(--space-4); max-width: 68ch; }
.faq__panel.is-open { display: block; }
#faq .btn-row { justify-content: center; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--color-primary-dark); color: var(--color-on-dark); padding-top: var(--space-8); font-size: var(--fs-sm); }
.site-footer h3 { color: #fff; font-size: var(--fs-base); margin-bottom: var(--space-3); }
.site-footer a { color: var(--color-on-dark); }
.site-footer a:hover { color: var(--color-accent-hero); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.6fr .8fr 1.1fr; gap: var(--space-6); }
.footer-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-bottom: var(--space-4); }
.footer-logo span { font-weight: 800; font-stretch: 112%; font-size: var(--fs-md); color: #fff; line-height: 1.15; }
.footer-brand p { color: var(--color-on-dark-muted); }
.site-footer .footer-phone { color: var(--color-accent-hero); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { padding-block: .22rem; }
.footer-list--cols { columns: 2; column-gap: var(--space-5); }
.footer-list--cols li { break-inside: avoid; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-7); padding-block: var(--space-5); border-top: 1px solid rgba(231,230,218,.2); color: var(--color-on-dark-muted); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }

/* ---------------------------------------------------------------- floating controls */
.call-bar { display: none; }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--color-primary); border: 0; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity var(--ease);
}
.to-top svg { width: 22px; height: 22px; fill: var(--color-accent-hero); margin: auto; }
.to-top.is-visible { opacity: 1; visibility: visible; }

.ext-link, .body-link { color: var(--color-primary-light); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .nav-burger { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 3px solid var(--color-accent); padding: var(--space-4) clamp(16px, 4vw, 32px) var(--space-5);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__submenu { position: static; grid-template-columns: 1fr; border: 0; padding: 0 0 0 var(--space-4); }
  .header-cta .btn { width: 100%; }
  .grid--3, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-split { grid-template-columns: 1fr; gap: var(--space-6); }
  .sidebar { position: static; }
  .quote-band .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-band .field--full { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero--home { grid-template-columns: 1fr; grid-template-rows: auto 30px auto; min-height: 0; }
  .hero__photo { order: -1; aspect-ratio: 16 / 10; }
  .ruler { flex-direction: row; order: 0; }
  .ruler__in {
    min-height: 0;
    background:
      repeating-linear-gradient(to right, transparent 0 calc(12.5% - 1px), rgba(217,164,40,.75) calc(12.5% - 1px) 12.5%) top / 100% 9px no-repeat,
      linear-gradient(to right, transparent calc(50% - 1px), rgba(217,164,40,.95) calc(50% - 1px) 50%, transparent 50%) top / 100% 15px no-repeat;
  }
  .ruler__in::before { width: 2px; height: 22px; }
  .ruler__in::after { top: auto; bottom: 3px; right: auto; left: 5px; }
  .ruler::after { top: 0; bottom: 0; left: 0; right: auto; width: 33.333%; height: auto; border-top: 0; border-right: 2px solid var(--color-accent-hero); transform-origin: left; animation-name: foam-rise-x; background: linear-gradient(to right, rgba(240,199,90,.16), rgba(240,199,90,.38)); }
  .hero__panel { order: 1; padding-block: var(--space-6) var(--space-7); }
  .hero--split .hero__inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero--split .hero__media { order: -1; }
  .areas { grid-template-columns: 1fr; }
}
@keyframes foam-rise-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .topbar__inner p:first-child { display: none; }
  .logo__tag { display: none; }
  .logo__name { font-size: .95rem; }
  .section { padding-block: var(--space-7); }
  .grid--3, .gallery, .steps.grid--3, .form-grid, .quote-band .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-list--cols { columns: 1; }
  .btn--lg { width: 100%; }
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    padding: 8px; background: var(--color-primary-dark);
  }
  .call-bar .btn { padding: .75rem; }
  .btn--secondary { border-color: rgba(255,255,255,.5); }
  body { padding-bottom: 64px; }
  .to-top { bottom: 76px; }
}

/* ---------------------------------------------------------------- motion + print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .site-header, .call-bar, .to-top, .lead-form, .hero-form, .ruler, iframe { display: none !important; }
  .hero, .cta-band, .site-footer { background: none; color: #000; }
  .hero h1, .cta-band h2 { color: #000; }
}

/* Intro band text lines up with the page container, measure kept by child. */
.intro-band__inner.prose { max-width: var(--container); }
.intro-band__inner > * { max-width: 68ch; }
