/* ==========================================================================
   Homes 101 Developments Inc. — shared styles
   Theme carried over from the repairs & maintenance page.
   ========================================================================== */

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

:root {
  --bg:        #f7f4ef;   /* cream page background */
  --stone:     #f0ece4;   /* alternate band */
  --stone-dk:  #e4ddcf;
  --ink:       #1c1c1c;
  --slate:     #3a3a3a;
  --muted:     #6b665e;   /* darkened from #888 for readable contrast */
  --gold:      #c8922a;   /* lines, fills, large type */
  --gold-lt:   #e8b050;   /* gold on dark backgrounds */
  --gold-ink:  #8f620f;   /* gold for small text on cream */
  --line:        rgba(28,28,28,0.12);
  --line-strong: rgba(28,28,28,0.28);
  --white:     #ffffff;
  --success:   #2a7a52;
  --error:     #b83232;

  --display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --display-width: 84%;   /* Archivo's width axis: a slightly narrow cut for headings */
  --sans:  'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap:   1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h:  84px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; border-radius: 2px; }
.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold-lt); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 300;
  background: var(--ink); color: var(--white); padding: 10px 16px;
  border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-stone { background: var(--stone); }
.section-dark  { background: var(--ink); color: rgba(255,255,255,0.9); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.66); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px 64px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head p { color: var(--muted); max-width: 34em; }
.section-dark .section-head p { color: rgba(255,255,255,0.62); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; align-items: start; } }

/* ── Type ───────────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-stretch: var(--display-width); color: var(--ink); }
h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.75rem); font-weight: 700;
  line-height: 1.02; letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(2rem, 3.6vw, 3.1rem); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.015em;
}
h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; }
p { max-width: 65ch; text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
.lede { font-size: clamp(1.08rem, 1.4vw, 1.22rem); line-height: 1.65; color: var(--slate); max-width: 34em; }

.text-link {
  font-weight: 600; color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--gold); text-decoration-thickness: 1.5px;
  text-underline-offset: 5px; transition: color .2s;
}
.text-link:hover { color: var(--gold-ink); }
.section-dark .text-link { color: var(--white); text-decoration-color: var(--gold-lt); }
.section-dark .text-link:hover { color: var(--gold-lt); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600; line-height: 1;
  padding: 16px 24px; border-radius: 6px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--gold); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-lt); }
.section-dark .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.3); }
.section-dark .btn-outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-sm { padding: 11px 18px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,244,239,0.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--nav-h); display: flex; align-items: center; gap: 40px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.brand-logo { display: block; height: 70px; width: auto; }

.site-nav nav { margin-left: auto; }
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a {
  display: block; padding: 6px 0; text-decoration: none;
  color: var(--slate); font-size: 0.94rem; font-weight: 500;
  border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s;
}
.nav-links a:hover { color: var(--ink); border-color: var(--line-strong); }
.nav-links a[aria-current="page"] { color: var(--ink); border-color: var(--gold); }

.nav-actions { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1.5px solid var(--line-strong);
  border-radius: 6px; background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  position: relative; transition: transform .25s, background .25s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after  { top: 6px; }
.site-nav.is-open .nav-toggle .bars { background: transparent; }
.site-nav.is-open .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .nav-toggle .bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-actions { display: flex; align-items: center; }
  .nav-toggle { display: inline-flex; }
  .site-nav nav { margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
    box-shadow: 0 18px 30px rgba(28,28,28,0.08);
  }
  .site-nav.is-open .nav-links { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--line); color: var(--gold-ink); }
  .nav-links li:last-child a { border-bottom: 0; }
}
@media (max-width: 520px) {
  :root { --nav-h: 76px; }
  .brand-logo { height: 62px; }
}
@media (max-width: 400px) {
  .nav-inner { gap: 12px; }
}

/* ── Line drawings ──────────────────────────────────────────────────────── */
.drawing { width: 100%; height: auto; overflow: visible; }
.drawing * { vector-effect: non-scaling-stroke; }
.drawing .ln-heavy { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: square; }
.drawing .ln       { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.drawing .ln-light { fill: none; stroke: var(--ink); stroke-width: 0.75; stroke-opacity: 0.5; }
.drawing .ln-hidden{ fill: none; stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.55; stroke-dasharray: 6 4; }
.drawing .ln-dim   { fill: none; stroke: var(--ink); stroke-width: 0.8; stroke-opacity: 0.65; }
.drawing .paper    { fill: var(--bg); }
.drawing .solid    { fill: var(--ink); stroke: none; }
.drawing .dim-text { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.drawing .new.ln-heavy, .drawing .new.ln, .drawing .new .ln-heavy, .drawing .new .ln { stroke: var(--gold); }
.drawing .new.ln-light, .drawing .new .ln-light { stroke: var(--gold); stroke-opacity: 0.7; }
.drawing .leader { fill: none; stroke: var(--gold); stroke-width: 1.2; }
.drawing .leader-dot { fill: var(--gold); }
.drawing .ln-heavy, .drawing .ln, .drawing .ln-light { transition: stroke .25s, stroke-opacity .25s; }

/* Drawings "rise" once on load: foundation first, roof last */
@keyframes rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes riseUpper { from { clip-path: inset(44% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.js .rise-in      { animation: rise 1.6s cubic-bezier(.3,.6,.2,1) .1s both; }
.js .rise-upper   { animation: riseUpper 1.3s cubic-bezier(.3,.6,.2,1) .6s both; }
.js .fade-late    { animation: fadeIn .6s ease 1.5s both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 26px; border-top: 2px solid var(--ink); }
.legend .is-new i { border-color: var(--gold); }
figcaption.drawing-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* ── Page hero (sub-pages) ──────────────────────────────────────────────── */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px); }
.page-hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(36px, 5vw, 72px); align-items: center;
}
.page-hero h1 { margin-bottom: 24px; font-size: clamp(2.4rem, 4.3vw, 3.85rem); }
.page-hero .lede { margin-bottom: 36px; }
.page-hero figure { margin: 0; }
@media (max-width: 980px) {
  .page-hero-grid { grid-template-columns: 1fr; }
}

/* ── Home hero with annotated elevation ─────────────────────────────────── */
.home-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 120px); }
.home-hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  gap: clamp(32px, 4vw, 64px); align-items: center;
}
.home-hero h1 { margin-bottom: 24px; font-size: clamp(2.4rem, 4.4vw, 3.9rem); }
.home-hero .lede { margin-bottom: 36px; }
@media (max-width: 1020px) { .home-hero-grid { grid-template-columns: 1fr; } }

.elevation { margin: 0; }
.elevation-box { position: relative; aspect-ratio: 760 / 520; }
.elevation-box > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.callout {
  position: absolute; left: var(--x); top: var(--y); transform: translateY(-50%);
  max-width: 25%; padding: 4px 0; text-decoration: none; color: var(--ink);
}
.callout strong {
  display: block; font-family: var(--display); font-stretch: var(--display-width); font-weight: 700;
  font-size: clamp(0.8rem, 1.3vw, 1.08rem); line-height: 1.15;
  text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 4px; text-decoration-thickness: 1.5px;
  transition: color .2s, text-decoration-color .2s;
}
.callout span { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.callout:hover strong, .callout:focus-visible strong { color: var(--gold-ink); text-decoration-color: var(--gold); }
@media (max-width: 640px) { .callout span { display: none; } }

/* Hovering a callout lights up the part of the house it refers to */
.elevation:has(.callout-new:is(:hover, :focus-visible)) .g-house :is(.ln-heavy, .ln, .ln-light, .ln-hidden),
.elevation:has(.callout-reno:is(:hover, :focus-visible)) .g-reno :is(.ln-heavy, .ln, .ln-light, .ln-hidden),
.elevation:has(.callout-fix:is(:hover, :focus-visible)) .g-fix :is(.ln-heavy, .ln, .ln-light, .ln-hidden) {
  stroke: var(--gold); stroke-opacity: 1;
}
.elevation .dim-layer { transition: opacity .25s; }
.elevation:has(.callout:is(:hover, :focus-visible)) .dim-layer { opacity: .35; }

/* ── Divisions (home page) ──────────────────────────────────────────────── */
.divisions { border-top: 1.5px solid var(--ink); }
.division {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 1fr) 9.5rem;
  gap: 16px 48px; align-items: start;
  padding: 40px 0; border-bottom: 1px solid var(--line-strong);
}
.division h3 { font-size: clamp(1.6rem, 2.5vw, 2.15rem); font-weight: 700; letter-spacing: -0.01em; }
.division h3 a { text-decoration: none; transition: color .2s; }
.division h3 a::after { content: ''; position: absolute; inset: 0; }
.division:hover h3 a { color: var(--gold-ink); }
.division p { color: var(--slate); }
.division .text-link { position: relative; z-index: 1; align-self: start; justify-self: end; white-space: nowrap; }
@media (max-width: 980px) { .division .text-link { justify-self: start; } }
.tick-list { list-style: none; font-size: 0.94rem; color: var(--muted); display: grid; gap: 6px; }
.tick-list li { position: relative; padding-left: 20px; }
.tick-list li::before {
  content: ''; position: absolute; left: 0; top: 0.75em; width: 10px; height: 1.5px; background: var(--gold);
}
@media (max-width: 980px) {
  .division { grid-template-columns: 1fr 1fr; }
  .division h3 { grid-column: 1 / -1; }
}
@media (max-width: 620px) { .division { grid-template-columns: 1fr; } }

/* ── Two-column statement ───────────────────────────────────────────────── */
.statement { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 80px; }
.statement p + p { margin-top: 16px; }
.statement .tick-list { margin-top: 28px; font-size: 1rem; color: var(--slate); }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; } }

/* ── Contact ────────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 80px; align-items: start; }
.contact-grid h2 { margin-bottom: 20px; }
.contact-grid > div > p { color: var(--slate); }
.contact-list { display: grid; gap: 26px; }
.contact-list dt { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.contact-list dd { font-size: 1.1rem; }
.contact-list dd a { text-decoration: none; }
.contact-email { overflow-wrap: anywhere; }
.contact-list dd a:hover { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 4px; }
.contact-phone {
  font-family: var(--display); font-stretch: var(--display-width); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.8rem);
  letter-spacing: -0.02em; line-height: 1.05;
}
.hero-aside { margin-top: 22px; font-size: 0.95rem; color: var(--slate); }
.program-how { margin: 64px 0 4px; font-size: 1.3rem; }
.contact-note { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-strong); font-size: 0.95rem; color: var(--slate); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ── Process sequence (drawn like a dimension string) ───────────────────── */
.sequence {
  list-style: none; display: grid; position: relative;
  grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr));
  border-top: 1.5px solid var(--ink); margin-top: 56px; counter-reset: step;
}
.sequence::after, .sequence li::before {
  content: ''; position: absolute; top: -10px; width: 1.5px; height: 19px;
  background: var(--ink); transform: rotate(45deg);
}
.sequence::after { right: 0; }
.sequence li { position: relative; padding: 28px 32px 0 0; counter-increment: step; }
.sequence li::before { left: 0; }
.sequence li::after {
  content: counter(step); position: absolute; left: 16px; top: -2.2em;
  font-family: var(--display); font-stretch: var(--display-width); font-size: 1.2rem; font-weight: 700; color: var(--gold-ink);
}
.sequence h3 { font-size: 1.15rem; margin-bottom: 8px; }
.sequence p { font-size: 0.95rem; color: var(--muted); line-height: 1.6; }
.section-dark .sequence { border-color: rgba(255,255,255,0.85); }
.section-dark .sequence::after, .section-dark .sequence li::before { background: rgba(255,255,255,0.85); }
.section-dark .sequence li::after { color: var(--gold-lt); }
@media (max-width: 900px) {
  .sequence {
    grid-template-columns: 1fr; border-top: 0; border-left: 1.5px solid var(--ink);
    margin: 32px 0 0 9px;
  }
  .sequence::after { display: none; }
  .sequence li { padding: 2px 0 32px 32px; display: flex; flex-direction: column; }
  .sequence li:last-child { padding-bottom: 0; }
  .sequence li::before { top: 4px; left: -10px; width: 19px; height: 1.5px; transform: rotate(-45deg); }
  .sequence li::after { position: static; order: -1; display: block; margin-bottom: 6px; line-height: 1; }
}

/* ── Offer lists (what we build / renovate) ─────────────────────────────── */
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; }
.offer { padding: 28px 0 36px; border-top: 1.5px solid var(--ink); }
.offer h3 { margin-bottom: 10px; }
.offer p { color: var(--slate); font-size: 1rem; }
.offer .example { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.offer-grid.is-compact .offer { border-top-width: 1px; border-top-color: var(--line-strong); }
.offer-grid.is-compact h3 { font-size: 1.2rem; }
@media (max-width: 900px) { .offer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .offer-grid { grid-template-columns: 1fr; } }

/* ── Project gallery (js/gallery.js + js/gallery-data.js) ───────────────── */
.gallery {
  display: grid; grid-template-columns: minmax(200px, 0.32fr) minmax(0, 1fr);
  gap: 32px 56px; align-items: start;
}
.gallery.is-single { grid-template-columns: 1fr; }
.gallery-index {
  position: sticky; top: calc(var(--nav-h) + 24px);
  display: flex; flex-direction: column; border-top: 1.5px solid rgba(255,255,255,0.85);
}
.gallery-tab {
  position: relative; display: grid; gap: 3px; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,0.14);
  padding: 15px 0 15px 18px; color: var(--white);
}
.gallery-tab::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  background: transparent; transition: background .2s;
}
.gallery-tab strong { font-family: var(--display); font-stretch: var(--display-width); font-size: 1.2rem; font-weight: 700; line-height: 1.2; transition: color .2s; }
.gallery-tab span { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.gallery-tab:hover strong { color: var(--gold-lt); }
.gallery-tab[aria-pressed="true"]::before { background: var(--gold-lt); }
.gallery-tab[aria-pressed="true"] strong { color: var(--gold-lt); }
.gallery-heading { margin-bottom: 24px; }
.gallery-heading h3 { font-size: 1.7rem; margin-bottom: 8px; }
.gallery-heading p { color: rgba(255,255,255,0.72); }
.gallery-heading .gallery-meta { margin-top: 6px; font-size: 0.88rem; color: rgba(255,255,255,0.5); }
.gallery-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery-grid li:first-child:nth-last-child(n+3) { grid-column: span 2; grid-row: span 2; }
.gallery-item {
  position: relative; display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3;
  padding: 0; border: 0; border-radius: 2px; overflow: hidden; cursor: zoom-in; background: #2a2a2a;
}
.gallery-grid li:first-child:nth-last-child(n+3) .gallery-item { aspect-ratio: auto; min-height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-label {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 4px;
  background: rgba(28,28,28,0.75); color: var(--white); font-size: 0.78rem; font-weight: 500;
}
.gallery-more { margin-top: 24px; }
.gallery-empty { color: rgba(255,255,255,0.55); padding: 8px 0 24px; }
.section-links { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 48px; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr; gap: 24px; }
  .gallery-index {
    position: static; flex-direction: row; gap: 8px; overflow-x: auto; border-top: 0;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none;
  }
  .gallery-index::-webkit-scrollbar { display: none; }
  .gallery-tab { flex: 0 0 auto; padding: 9px 16px; border: 1px solid rgba(255,255,255,0.25); border-radius: 50px; }
  .gallery-tab::before, .gallery-tab span { display: none; }
  .gallery-tab strong { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; }
  .gallery-tab[aria-pressed="true"] { background: var(--gold-lt); border-color: var(--gold-lt); }
  .gallery-tab[aria-pressed="true"] strong { color: var(--ink); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* Full-screen photo viewer */
.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgba(18,18,18,0.97); color: var(--white);
}
.viewer::backdrop { background: rgba(18,18,18,0.9); }
.viewer-figure {
  margin: 0; width: 100%; height: 100%; padding: 68px 88px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.viewer-img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }
.viewer-caption {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px 16px;
  font-size: 0.9rem; color: rgba(255,255,255,0.72);
}
.viewer-caption strong { font-family: var(--display); font-stretch: var(--display-width); font-size: 1.15rem; color: var(--white); }
.viewer-count { font-style: normal; color: rgba(255,255,255,0.45); }
.viewer-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(28,28,28,0.6); color: var(--white);
  transition: background .2s, color .2s, border-color .2s;
}
.viewer-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.viewer :focus-visible { outline-color: var(--gold-lt); }
.viewer-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 20px; top: 50%; transform: translateY(-50%); }
.viewer-close { top: 16px; right: 20px; font-size: 1rem; }
@media (max-width: 640px) {
  .viewer-figure { padding: 68px 12px 92px; }
  .viewer-prev, .viewer-next { top: auto; bottom: 22px; transform: none; }
  .viewer-prev { left: calc(50% - 60px); }
  .viewer-next { right: calc(50% - 60px); }
}

/* ── Cross-links ────────────────────────────────────────────────────────── */
.cross { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 40px; align-items: start; }
@media (max-width: 1080px) { .cross { grid-template-columns: 1fr 1fr; } }
.cross h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.cross-item { position: relative; padding-top: 20px; border-top: 1.5px solid var(--ink); }
.cross-item h3 a { text-decoration: none; }
.cross-item h3 a::after { content: ''; position: absolute; inset: 0; }
.cross-item:hover h3 a { color: var(--gold-ink); }
.cross-item p { margin-top: 8px; color: var(--slate); font-size: 0.98rem; }
@media (max-width: 860px) { .cross { grid-template-columns: 1fr; } }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 10px 48px rgba(28,28,28,0.09); padding: clamp(24px, 3.5vw, 40px);
}
.form-title { font-family: var(--display); font-stretch: var(--display-width); font-size: 1.55rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.form-subtitle { font-size: 0.9rem; color: var(--muted); margin-bottom: 28px; }

.field { margin-bottom: 18px; border: 0; min-width: 0; }
.field > label, .field > legend, .field-label {
  display: block; font-size: 0.85rem; font-weight: 600; color: var(--slate); margin-bottom: 7px;
}
.field .optional { font-weight: 400; color: var(--muted); }
.field input:not([type=file]):not([type=radio]), .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--bg);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233a3a3a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold); background-color: var(--white); box-shadow: 0 0 0 3px rgba(200,146,42,0.15);
}
.field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.field-row { display: flex; gap: 14px; }
.field-row > .field { flex: 1; min-width: 0; }
.field-error { display: none; font-size: 0.82rem; color: var(--error); margin-top: 6px; }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--error); }
.form-error-msg {
  display: none; background: rgba(184,50,50,0.07); border: 1px solid rgba(184,50,50,0.22);
  border-radius: 8px; padding: 12px 14px; font-size: 0.88rem; color: var(--error); margin-top: 14px;
}
.form-error-msg.show { display: block; }
.form-error-msg a { color: var(--error); font-weight: 600; }
.form-fineprint { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }
.form-fineprint button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.turnstile-slot { min-height: 0; }
@media (max-width: 560px) { .field-row { flex-direction: column; gap: 0; } }

.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: var(--white);
  border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
.is-busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-card { text-align: center; padding: 12px 0; }
.success-card:focus { outline: none; }
.success-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(42,122,82,0.1); color: var(--success);
}
.success-card h3 { font-size: 1.7rem; font-weight: 700; margin-bottom: 10px; }
.success-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; margin: 0 auto; }
.ref-badge {
  display: inline-block; background: var(--stone); border-radius: 8px; padding: 10px 20px;
  font-weight: 700; letter-spacing: 0.04em; margin: 18px 0;
}
.ref-badge:empty { display: none; }

/* Inquiry section (new homes + renovations) */
.inquiry-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px 72px; align-items: start; }
.inquiry-grid h2 { margin-bottom: 18px; }
.inquiry-grid .contact-list { margin-top: 36px; }
@media (max-width: 960px) { .inquiry-grid { grid-template-columns: 1fr; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.62); padding: 72px 0 32px; font-size: 0.94rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; }
.footer-logo { display: block; height: 108px; width: auto; filter: invert(1); }
.footer-blurb { margin-top: 18px; max-width: 30ch; }
.site-footer h2 {
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600; letter-spacing: 0;
  color: var(--white); margin-bottom: 14px;
}
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: rgba(255,255,255,0.78); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 0.85rem;
}
.footer-bottom p { max-width: none; }
.footer-legal { display: flex; gap: 22px; }
.footer-legal button {
  background: none; border: 0; padding: 0; cursor: pointer; color: rgba(255,255,255,0.78); font-size: inherit;
}
.footer-legal button:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Legal dialogs ──────────────────────────────────────────────────────── */
.legal-dialog {
  border: 0; border-radius: 18px; padding: 0; margin: auto;
  width: calc(100% - 32px); max-width: 740px; max-height: calc(100dvh - 48px);
  color: var(--slate); background: var(--white); box-shadow: 0 24px 64px rgba(28,28,28,0.22);
}
.legal-dialog::backdrop { background: rgba(28,28,28,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.legal-dialog[open] { animation: dialogIn .25s ease both; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.legal-head {
  position: sticky; top: 0; z-index: 1; background: var(--white);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 32px 18px; border-bottom: 1px solid var(--line);
}
.legal-head h2 { font-size: 1.4rem; }
.legal-close {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--stone); color: var(--slate); font-size: 0.95rem;
}
.legal-close:hover { background: var(--stone-dk); }
.legal-body { padding: 24px 32px 32px; font-size: 0.93rem; line-height: 1.75; }
.legal-body h3 { font-size: 1.02rem; margin: 26px 0 8px; }
.legal-body p, .legal-body ul { margin-bottom: 12px; }
.legal-body ul { padding-left: 20px; }
.legal-body a { color: var(--gold-ink); }
.legal-updated {
  display: inline-block; background: var(--stone); border-radius: 50px; padding: 4px 14px;
  font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 18px;
}
@media (max-width: 600px) { .legal-head, .legal-body { padding-left: 22px; padding-right: 22px; } }

/* ==========================================================================
   Repairs & maintenance page
   ========================================================================== */
.repair-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 112px); }
.repair-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px); align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px;
  background: var(--white); border: 1px solid rgba(200,146,42,0.35); border-radius: 50px;
  padding: 8px 18px; font-size: 0.85rem; font-weight: 600; color: var(--slate);
  box-shadow: 0 2px 14px rgba(200,146,42,0.12);
}
.badge svg { color: var(--gold); flex-shrink: 0; }
.repair-hero h1 { margin-bottom: 24px; }
.repair-hero .lede { margin-bottom: 32px; }
.checks { list-style: none; display: grid; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--slate); }
.checks svg { color: var(--gold); flex-shrink: 0; }
@media (max-width: 1020px) { .repair-hero-grid { grid-template-columns: 1fr; } }

/* Step indicator */
.steps-bar { display: flex; margin-bottom: 30px; }
.step-pill {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  padding: 8px 10px 10px 0; border-bottom: 2px solid var(--line); transition: color .3s, border-color .3s;
}
.step-pill.active { color: var(--gold-ink); border-bottom-color: var(--gold); }
.step-pill.done   { color: var(--success); border-bottom-color: var(--success); }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--stone); font-size: 0.7rem; font-weight: 700; transition: background .3s, color .3s;
}
.step-pill.active .step-dot { background: var(--gold); color: var(--white); }
.step-pill.done   .step-dot { background: var(--success); color: var(--white); }

.form-step { display: none; }
.form-step.active { display: block; animation: stepIn .3s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Trade selector (real radio buttons, styled as tiles) */
.trade-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.trade-opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg);
  padding: 11px 4px 10px; cursor: pointer; text-align: center; transition: border-color .2s, background .2s;
}
.trade-opt input { position: absolute; opacity: 0; pointer-events: none; }
.trade-opt:hover { border-color: var(--gold-lt); background: rgba(200,146,42,0.05); }
.trade-opt:has(input:checked), .trade-opt.selected { border-color: var(--gold); background: rgba(200,146,42,0.09); }
.trade-opt:has(input:focus-visible) { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.t-icon { display: flex; color: var(--slate); }
.t-label { font-size: 0.74rem; font-weight: 600; color: var(--slate); line-height: 1.2; }
.trade-opt:has(input:checked) :is(.t-icon, .t-label), .trade-opt.selected :is(.t-icon, .t-label) { color: var(--gold-ink); }

/* Photo upload */
.upload-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload-btn {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg);
  padding: 20px 12px; text-align: center; cursor: pointer; transition: border-color .25s, background .25s;
}
.upload-btn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-btn:hover, .upload-btn.dragover { border-color: var(--gold); background: rgba(200,146,42,0.06); }
.upload-btn:focus-within { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.upload-btn.camera-btn { border-color: rgba(200,146,42,0.35); background: rgba(200,146,42,0.05); }
.upload-btn.drag-zone { border-style: dashed; border-width: 2px; }
.upload-btn-icon { display: flex; color: var(--slate); }
.camera-btn .upload-btn-icon { color: var(--gold); }
.upload-btn-label { font-size: 0.86rem; font-weight: 600; color: var(--slate); }
.upload-btn-sub { font-size: 0.75rem; color: var(--muted); }
.photo-count-badge {
  display: inline-block; margin-top: 12px; background: var(--stone); border-radius: 50px;
  padding: 3px 12px; font-size: 0.76rem; font-weight: 600; color: var(--muted);
}
.photo-count-badge.has-photos { background: rgba(200,146,42,0.14); color: var(--gold-ink); }
.upload-warning { font-size: 0.8rem; color: var(--gold-ink); margin-top: 6px; min-height: 0; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb-wrap { position: relative; }
.photo-thumb {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover; border: 2px solid var(--line);
}
.photo-thumb.is-file {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--stone); font-size: 0.62rem; font-weight: 700; color: var(--muted);
}
.thumb-remove {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--white); background: var(--error); color: var(--white);
  font-size: 0.65rem; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.form-help { font-size: 0.86rem; color: var(--muted); line-height: 1.6; margin: 14px 0 4px; }
.form-buttons { display: flex; gap: 10px; margin-top: 24px; }
.form-buttons .btn-dark { flex: 1; }
.btn-back {
  background: transparent; color: var(--muted); border: 1.5px solid var(--line); border-radius: 6px;
  padding: 14px 20px; font-size: 0.9rem; cursor: pointer; transition: border-color .2s, color .2s;
}
.btn-back:hover { border-color: var(--ink); color: var(--ink); }

/* Trades covered (dark band) */
.trades-table {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,0.14); border-left: 1px solid rgba(255,255,255,0.14);
}
.trade-cell {
  padding: 26px 22px; border-right: 1px solid rgba(255,255,255,0.14); border-bottom: 1px solid rgba(255,255,255,0.14);
  transition: background .25s;
}
.trade-cell:hover { background: rgba(200,146,42,0.1); }
.trade-cell .s-icon { display: flex; color: var(--gold-lt); margin-bottom: 14px; }
.trade-cell strong { display: block; color: var(--white); font-size: 1rem; margin-bottom: 4px; }
.trade-cell span { color: rgba(255,255,255,0.55); font-size: 0.86rem; }
@media (max-width: 900px) { .trades-table { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .trade-grid { gap: 6px; } .t-label { font-size: 0.68rem; } }

/* Two stacked drawings (renovations: existing + new work) */
.layered { position: relative; aspect-ratio: 760 / 330; }
.layered.is-section { aspect-ratio: 760 / 400; }
.drawing .wall-new { fill: var(--gold); stroke: none; }
.drawing .new .solid { fill: var(--gold); }
.drawing .new .ln-dim { stroke: var(--gold); }
.drawing .new .dim-text { fill: var(--gold-ink); }
.js .fade-new { animation: fadeIn .9s ease .5s both; }
.layered > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
