/* site.css - the website factory design system, extracted verbatim from the reference
   (toiturespg.ca, ANATOMY.md §1). Per-client swap = the :root brand vars ONLY (80/20).
   Craft floor: DESIGN-BASELINE spacing scale (4·8·12·16·20·24·32·40·48·64), one effect not three. */

:root {
  /* per-client swap point (gen-site.js writes these) */
  --accent: #CF5F1D;
  --accent-hover: #E8722A;
  --ink: #15171B;
  /* fixed system (never swapped) */
  --ink-2: #191C21;
  --ink-3: #292C31;
  --canvas: #F6F3EC;
  --canvas-deep: #EFE9DD;
  --accent-tint: #F6E3D3;
  --muted: #6B7075;        /* a11y audit 2026-07-24: was #878B90 (3.09:1 on canvas); now 4.5+ */
  --accent-text: #B4531A;  /* accent for TEXT on light bg (links/eyebrows) - gen-site derives per client to clear 4.5:1 */
  --muted-dark: #CFCDCD;
  --white: #ffffff;
  --radius: 10px;
  --radius-lg: 15px;
  --container: 1140px;
  --pad: 96px;
  --display: "Bricolage Grotesque", sans-serif;
  --textfont: "Hanken Grotesk", sans-serif;
  --mono: "Space Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--ink); }  /* overscroll bounce matches header/footer, not white */
body {
  font-family: var(--textfont);
  font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── type roles ─────────────────────────────────────────────── */
h1, h2, .display { font-family: var(--display); font-weight: 700; line-height: 1.28; letter-spacing: normal; } /* pixel-audit 2026-07-24: reference is 700/1.3, airier not heavier */
h1 { font-size: clamp(40px, 5.6vw, 60px); }
.rf-hl-b { color: var(--accent); } /* headline second clause: color separation, never a dash */
h2 { font-size: clamp(30px, 3.6vw, 41px); }
h3 { font-family: var(--textfont); font-weight: 700; font-size: 22px; line-height: 1.3; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; }
.on-dark { color: var(--white); }
.on-dark .lede { color: var(--muted-dark); }

/* the eyebrow - Space Mono, accent, every section head (ANATOMY §1) */
.eyebrow {
  font-family: var(--mono); font-size: 17px; font-weight: 600; /* pixel-audit: reference 18px/600 */
  color: var(--accent-text); letter-spacing: 0.02em; margin-bottom: 16px; display: block;
}
/* on dark bands the LIGHT accent has the contrast (reference: #E8722A on ink) */
.band-ink .eyebrow, .hero-photo .eyebrow, .cta-band .eyebrow, .stat-strip .eyebrow { color: var(--accent-hover); }

/* ── layout ─────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.band { padding: var(--pad) 0; }
.band-ink { background: var(--ink-2); color: var(--white); }
.band-ink .lede, .band-ink p { color: var(--muted-dark); }
.band-deep { background: var(--canvas-deep); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { margin-top: 16px; }

/* ── buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--textfont); font-weight: 700; font-size: 17px;
  padding: 15px 30px; border-radius: var(--radius); cursor: pointer;
  background: var(--accent); color: var(--white); border: 2px solid var(--accent);
  box-shadow: 0 4px 10px rgba(207, 95, 29, 0.28); /* pixel-audit: reference uses a subtle drop, not a glow */
  transition: background .18s ease, border-color .18s ease;
}
.btn { transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(207, 95, 29, 0.32); }
.btn:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(207, 95, 29, 0.28); }
.btn-outline {
  background: transparent; color: inherit; border-color: currentColor; box-shadow: none;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ── header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--ink-2); color: var(--white);
  position: sticky; top: 0; z-index: 50;
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.site-header .container { display: flex; align-items: center; gap: 32px; height: 84px; transition: height .25s ease; }
.site-header.scrolled .container { height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 48px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; margin: 0 auto; }
.nav a { font-weight: 600; font-size: 16px; opacity: .92; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-hover); opacity: 1; }
.nav .has-menu { position: relative; }
.nav .menu {
  display: none; position: absolute; top: 100%; left: -16px; min-width: 240px;
  background: var(--ink-3); border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 0; box-shadow: 0 16px 32px rgba(0,0,0,.35);
}
/* hover-open ONLY on hover-capable pointers - on touch, a sticky :hover state would keep the
   submenu open after the accordion collapses it ("won't go back up" bug, 2026-07-24) */
@media (hover: hover) and (pointer: fine) {
  .nav .has-menu:hover .menu, .nav .has-menu:focus-within .menu { display: block; }
}
.nav .menu a { display: block; padding: 10px 20px; }
.submenu-toggle {
  background: none; border: 0; color: inherit; cursor: pointer;
  font-family: inherit; font-size: 13px; line-height: 1; padding: 0 0 0 4px;
}
.header-cta { margin-left: 0; }
.header-phone {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px; white-space: nowrap;
}
.header-phone svg { width: 16px; height: 16px; fill: currentColor; }
.header-phone:hover { color: var(--accent-hover); }

/* a11y: skip link (visible on keyboard focus only) + focus styles */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--white); padding: 10px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-hover); outline-offset: 2px;
}
.nav-toggle { display: none; background: none; border: 0; color: var(--white); cursor: pointer; }
.nav-toggle svg { width: 30px; height: 30px; fill: currentColor; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-bars { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: inline; }

/* ── heroes ─────────────────────────────────────────────────── */
.hero-photo {
  position: relative; color: var(--white); overflow: hidden;
  background: var(--ink-2);
  padding: 128px 0 96px;
}
/* photo on its own layer so it can drift (Ken Burns - the static stand-in for the
   reference's background video); overlay rides above it, content above both */
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--hero-img) center/cover no-repeat;
  animation: heroDrift 26s ease-in-out infinite alternate;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(13,14,17,.62);
}
@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-photo .container { max-width: var(--container); position: relative; z-index: 2; }
.hero-photo h1 { max-width: 780px; margin-bottom: 24px; }
.hero-photo .lede { color: #ffffff; font-size: 20px; line-height: 1.65; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 48px; }
.trust-chips { display: flex; gap: 28px; flex-wrap: wrap; }
.trust-chips li { display: flex; align-items: center; gap: 10px; list-style: none; font-weight: 600; font-size: 16px; }
.trust-chips .check { color: var(--accent-hover); font-weight: 800; }

.hero-flat { padding: 64px 0 56px; }
.breadcrumb { font-size: 15px; color: var(--muted); margin-bottom: 32px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.hero-flat h1 { max-width: 800px; margin-bottom: 20px; }
.hero-flat .lede { margin-bottom: 32px; }

/* ── cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: 0 2px 10px rgba(21,23,27,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(21,23,27,.10); }
.band-ink .card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.band-ink .card { background: var(--ink-3); box-shadow: none; }
.card .icon { color: var(--accent); margin-bottom: 16px; }
.card .icon svg { width: 34px; height: 34px; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }
.band-ink .card p { color: var(--muted-dark); }

.service-card { padding: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.service-card img, .service-card .ph { height: 220px; width: 100%; object-fit: cover; }
.service-card img { transition: transform .5s ease; }
.service-card:hover img { transform: scale(1.05); }
.project-card img { transition: transform .5s ease; }
.project-card:hover img { transform: scale(1.05); }
/* body is a flex column so every card's "See the service" pins to the bottom, aligning
   across the row no matter how long each blurb runs */
.service-card .body { padding: 28px 32px 32px; display: flex; flex-direction: column; flex: 1; }
.service-card .link { font-weight: 700; color: var(--accent-text); margin-top: auto; padding-top: 16px; }
.service-card .link:hover { color: var(--accent-hover); }

/* photo placeholder (dashed slot until a real asset lands) */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--muted); color: var(--muted);
  font-size: 14px; font-family: var(--mono); padding: 12px; min-height: 160px;
}

/* ── process steps (ghost numerals) ─────────────────────────── */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
  display: block; margin-bottom: 12px; opacity: .85;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted-dark); font-size: 16px; }
.band-light .step p { color: var(--muted); }

/* ── chips (cities) ─────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; }
.chips li {
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 10px 22px;
  font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px;
}
.band-ink .chips li { border-color: rgba(255,255,255,.35); }
.chips .pin { color: var(--accent); }

/* ── reviews / trust band ───────────────────────────────────── */
.review-card p.quote { color: var(--ink); font-size: 17px; margin-bottom: 20px; }
.band-ink .review-card p.quote { color: var(--white); }
.review-card .who { font-weight: 700; font-size: 15px; }
.review-card .src { color: var(--muted); font-size: 14px; }
.stars { color: var(--accent); letter-spacing: 3px; margin-bottom: 14px; font-size: 15px; }

/* ── checklist (what's included) ────────────────────────────── */
.checklist { list-style: none; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; font-weight: 500; }
.checklist .check { color: var(--accent); font-weight: 800; flex-shrink: 0; }

/* ── form section ───────────────────────────────────────────── */
.form-split { align-items: start; gap: 48px; }
.form-points { list-style: none; display: grid; gap: 18px; margin-top: 32px; }
.form-points li { display: flex; gap: 14px; font-weight: 600; }
.form-points .check { color: var(--accent); font-weight: 800; }
.form-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  box-shadow: 0 12px 40px rgba(21,23,27,.10);
}
.form-card .form-note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.form-slot {
  border: 2px dashed var(--muted); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 14px;
}
.form-slot-pending { text-align: center; padding: 8px 0; }
.form-slot-pending .fsp-title { font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 16px; color: var(--ink); }
.form-slot-pending .btn { width: 100%; justify-content: center; }
.form-card iframe { width: 100%; border: 0; }

/* ── FAQ (native accordion) ─────────────────────────────────── */
.faq-list { display: grid; gap: 14px; max-width: 840px; }
.faq-list details {
  background: var(--white); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: 0 2px 10px rgba(21,23,27,.05);
}
.band-ink .faq-list details { background: var(--ink-3); box-shadow: none; }
.faq-list summary {
  font-weight: 700; font-size: 18px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--mono); font-size: 22px; color: var(--accent-text); transition: transform .25s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { animation: faqIn .3s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.faq-list details p { margin-top: 14px; color: var(--muted); }
.band-ink .faq-list details p { color: var(--muted-dark); }

/* ── final CTA band ─────────────────────────────────────────── */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 640px; margin: 0 auto 20px; }
.cta-band .lede { margin: 0 auto 36px; }

/* ── stat strip (home, under hero) ──────────────────────────── */
.stat-strip { background: var(--ink); color: var(--white); padding: 40px 0; }
.stat-strip .grid { align-items: center; }
.stat { text-align: center; }
.stat .big { font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--accent-hover); }
.stat .small { font-size: 15px; color: var(--muted-dark); }

/* ── projects ───────────────────────────────────────────────── */
.project-card { padding: 0; overflow: hidden; }
.project-card img, .project-card .ph { height: 260px; width: 100%; object-fit: cover; }
.project-card h3 { font-size: 18px; padding: 20px 24px 24px; }

/* ── footer ─────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--white); padding: 64px 0 32px; }
.site-footer .grid { gap: 48px; }
.site-footer h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-dark); margin-bottom: 16px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--accent-hover); }
.site-footer .nap { display: grid; gap: 8px; font-size: 16px; }
.site-footer .socials { list-style: none; display: flex; gap: 18px; margin-top: 20px; }
.site-footer .socials a { font-weight: 600; font-size: 15px; color: var(--muted-dark); }
.site-footer .socials a:hover { color: var(--accent-hover); }
.site-footer .legal {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 24px;
  font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ── sticky mobile call bar (OUR graft - ANATOMY §5) ────────── */
.callbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--accent); color: var(--white);
  font-weight: 700; font-size: 18px; text-align: center; padding: 16px;
  animation: callbarUp .45s ease .4s backwards;
}
@keyframes callbarUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translateX(-50%); } }
.callbar:active { background: var(--accent-hover); }

/* ── signs + price sections (homeowner-depth, 2026-07-24) ───── */
.signs .mark {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
}
.price-note { margin-top: 24px; }

/* specialty chip: a badge ON the photo (not in the body), so the featured card's text
   stays aligned with its row-mates. Solid accent so it reads over any image. */
.specialty-chip {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--white); background: var(--accent); border-radius: 999px;
  padding: 5px 14px; box-shadow: 0 2px 8px rgba(21,23,27,.25);
}

/* hero background video (config-gated; photo poster fallback). The video replaces the
   drifting photo layer: kill the base ::before photo + ::after overlay (has-video keeps
   its own single overlay), so the video is never double-darkened. */
.hero-photo.has-video { position: relative; overflow: hidden; }
.hero-photo.has-video::after { content: none; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-photo.has-video::before {
  content: ""; position: absolute; inset: 0; background: rgba(13,14,17,.62); z-index: 1;
  animation: none;
}
.hero-photo.has-video .container { position: relative; z-index: 2; }

/* scroll reveals (subtle; script no-ops under prefers-reduced-motion; per-card stagger set
   inline by the script via transition-delay) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* motion off switch - every dynamic effect dies here, not just the reveals */
@media (prefers-reduced-motion: reduce) {
  .hero-photo::before, .callbar, .faq-list details p { animation: none !important; }
  .card, .btn, .service-card img, .project-card img, .site-header .container { transition: none !important; }
  .card:hover, .btn:hover, .service-card:hover img, .project-card:hover img { transform: none !important; }
}

/* ── prose pages (privacy / terms) ──────────────────────────── */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink); margin-bottom: 12px; }
.prose ul { padding-left: 22px; }

/* ── responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  :root { --pad: 48px; }
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .grid { gap: 16px; }
  .grid-2, .grid-3, .grid-4, .form-split { grid-template-columns: 1fr; }
  .stat-strip .grid, .band-ink .grid-4 { grid-template-columns: 1fr 1fr; }  /* short stats read fine 2-up */
  .section-head { margin-bottom: 28px; }
  .card { padding: 24px; }

  /* header + slide-down menu (auto-height dropdown, like the reference - hero stays visible below) */
  .nav, .header-cta, .header-phone { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-header .container { height: 72px; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 72px; left: 0; right: 0;
    max-height: calc(100dvh - 72px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;                              /* the MENU scrolls, never the page */
    background: var(--ink-2); padding: 8px 0 16px; margin: 0; z-index: 55;
    box-shadow: 0 18px 34px rgba(0,0,0,.4);
  }
  body.nav-lock { overflow: hidden; }
  .nav.open a { padding: 14px 20px; font-size: 17px; width: 100%; }
  .nav.open a[aria-current="page"] { background: var(--accent); color: #fff; }  /* active bar, ref-style */
  .nav.open .has-menu { width: 100%; display: flex; flex-wrap: wrap; align-items: center; }
  .nav.open .has-menu > a { width: auto; }
  .nav.open .submenu-toggle { margin-left: auto; font-size: 20px; padding: 14px 20px; transition: transform .2s ease; }
  .nav.open .has-menu.expanded .submenu-toggle { transform: rotate(180deg); }
  .nav.open .menu { display: none; width: 100%; position: static; background: rgba(0,0,0,.2); box-shadow: none; padding: 4px 0; min-width: 0; }
  .nav.open .menu a { padding: 12px 20px 12px 34px; font-size: 16px; }
  .nav.open .has-menu.expanded .menu { display: block; }

  /* hero */
  .hero-photo { padding: 56px 0 48px; }
  .hero-photo h1 { font-size: 36px; }
  .hero-flat { padding: 40px 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .trust-chips { flex-direction: column; gap: 12px; }

  /* the call CTA: a compact floating pill that only appears AFTER the hero scrolls off
     (the hero already has a call button - no need to double it at the top) */
  .callbar {
    align-items: center; gap: 8px;
    left: 50%; right: auto; bottom: 16px; transform: translateX(-50%);
    width: auto; padding: 13px 24px; font-size: 15px; border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
  }
  .callbar.show { display: inline-flex; }
}

/* per-client brand (generated by gen-site.js - edit the .site.client.js, not this) */
:root {
  --accent: #D2711F;
  --accent-hover: #e88735;
  --accent-text: #a45819;
  --ink: #12263E;
}
.btn { box-shadow: 0 4px 10px rgba(210, 113, 31, 0.28); }
.btn.btn-outline { box-shadow: none; }
