/* ==========================================================================
   Zysko Carpentry Services LLC
   Brand: Draftsman Indigo / Slate Blue / Brick Red / Warm Chalk
   Type:  DM Serif Display (headings) + Source Sans 3 (body & UI)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette (from zysko-brand-sheet.png) */
  --indigo:        #14283F;
  --slate:         #3E5568;
  --brick:         #9E4636;
  --chalk:         #EDE7D8;

  /* Derived surfaces */
  --chalk-raised:  #F5F1E7;
  --bright:        #FAF8F4;
  --band:          #F1ECE1;
  --chalk-sunk:    #E3DCCA;
  --paper:         #FBF9F4;
  --indigo-soft:   #1C3450;
  --brick-hover:   #8A3C2D;

  /* Semantic */
  --bg:            var(--bright);
  --surface:       #FFFFFF;
  --text:          var(--indigo);
  --text-muted:    var(--slate);
  --accent:        var(--brick);
  --on-accent:     #FFFFFF;
  --on-dark:       var(--chalk);
  --border:        rgba(20, 40, 63, .10);
  --border-strong: rgba(20, 40, 63, .22);

  /* Radii — the reference leans on large, soft corners */
  --r-hero: 30px;
  --r-lg:   22px;
  --r-md:   16px;
  --r-sm:   10px;
  --r-pill: 999px;

  /* Elevation — soft, warm-tinted (never neutral grey) */
  --sh-card:  0 1px 2px rgba(20,40,63,.04), 0 10px 30px -10px rgba(20,40,63,.11);
  --sh-float: 0 2px 8px rgba(20,40,63,.06), 0 24px 56px -16px rgba(20,40,63,.24);
  --sh-lift:  0 4px 14px rgba(20,40,63,.08), 0 40px 90px -24px rgba(20,40,63,.30);

  /* Rhythm */
  --gutter:  clamp(1rem, 4vw, 3rem);
  --maxw:    1320px;
  --section: clamp(5.5rem, 11vw, 11rem);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur:  260ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 0;
  letter-spacing: -.015em;
  line-height: 1.06;
}
p { margin: 0; }
::selection { background: var(--brick); color: #fff; }

/* Visible focus everywhere — never removed */
:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  background: var(--indigo); color: var(--chalk);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  z-index: 200; transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brick);
  margin: 0 0 1.1rem;
}
.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.section-head p:not(.eyebrow) { margin-top: 1.1rem; color: var(--text-muted); font-size: 1.125rem; max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.5rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: .95rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-dark  { background: var(--indigo); color: var(--chalk); }
.btn-dark:hover  { background: #0D1B2C; }
.btn-brick { background: var(--brick); color: var(--on-accent); }
.btn-brick:hover { background: var(--brick-hover); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(20,40,63,.06); border-color: var(--indigo); }
.btn-light { background: var(--chalk); color: var(--indigo); }
.btn-light:hover { background: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding-block: .85rem;
  background: rgba(250, 248, 244, .86);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; margin-right: auto; }
.brand img { width: 42px; height: 42px; border-radius: 7px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.4rem; letter-spacing: .04em;
}
.brand-sub {
  font-size: .58rem; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brick); margin-top: .28rem;
}

.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  padding: .55rem .95rem; border-radius: var(--r-pill);
  font-size: .95rem; font-weight: 500; color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-links a:hover { background: rgba(20,40,63,.07); color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: .5rem; }
.nav-phone {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  font-weight: 600; font-size: .95rem;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-phone:hover { background: rgba(20,40,63,.06); border-color: var(--indigo); }

.nav-toggle { display: none; }

/* ---------- Hero: scroll-driven sequence ---------- */
.hero { padding: 0; }
/* Runway the sticky card scrubs through — one screen per frame. */
.hero-scroll { position: relative; height: 420vh; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center;
  padding-block: clamp(4.5rem, 8vh, 7rem) clamp(1rem, 3vh, 2rem);
}
.hero-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--r-hero);
  overflow: hidden;
  display: flex; align-items: flex-end;
  box-shadow: var(--sh-lift);
  background: var(--indigo);
}

/* Frame stack — crossfade + slow push-in, like a film dissolve */
.seq { position: absolute; inset: 0; z-index: 0; }
.seq img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  opacity: 0;
  /* Overscanned so the parallax drift never exposes an edge. Transform is driven
     by scroll position in JS, so it must NOT be transitioned — a transition here
     makes the image lag the scroll and the parallax reads as mush. */
  transform: scale(1.14);
  transition: opacity 900ms var(--ease);
}
/* will-change only on the frame currently being moved. Leaving it on all five
   pins ~23MB of GPU layers permanently, which shows up as blank/white tiles
   once the compositor starts evicting them. */
.seq img.is-active { opacity: 1; will-change: transform; }

.hero-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top,   rgba(10,22,36,.88) 0%, rgba(10,22,36,.55) 30%, rgba(10,22,36,.10) 60%, transparent 80%),
    linear-gradient(to right, rgba(10,22,36,.55) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 2; padding: clamp(1.75rem, 4vw, 3.5rem); max-width: 40rem; color: #fff; }
.hero h1 {
  font-size: clamp(2.7rem, 6.8vw, 5.2rem);
  color: #fff; line-height: 1.0; text-wrap: balance;
}
.hero-sub {
  margin-top: 1.35rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(255,255,255,.90);
  max-width: 34rem; line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Frame counter — top-left, opposite the trust card */
.seq-nav {
  position: absolute; z-index: 3;
  top: clamp(1.25rem, 3vw, 2.25rem); left: clamp(1.25rem, 3vw, 2.25rem);
  color: #fff; display: flex; align-items: center; gap: .85rem;
}
.seq-ticks { display: flex; gap: .32rem; }
.seq-ticks span {
  display: block; width: 26px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.34);
  transition: background var(--dur) var(--ease);
}
.seq-ticks span.on { background: #fff; }
.seq-label {
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(10,22,36,.6);
}
.seq-label b { font-weight: 700; color: #E0A088; margin-right: .5rem; }

/* Floating cards — the signature move from the reference */
.float {
  position: absolute; z-index: 4;
  background: #FFFFFF;
  border-radius: var(--r-md);
  box-shadow: var(--sh-float);
  padding: .85rem 1rem;
  animation: floatIn .7s var(--ease) both;
}
.float-trust {
  top: clamp(1.25rem, 3vw, 2.25rem); right: clamp(1.25rem, 3vw, 2.25rem);
  display: flex; align-items: center; gap: .75rem; max-width: 17rem;
  animation-delay: .25s;
}
.float-trust img { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.float-trust .ft-title { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.float-trust .ft-sub { font-size: .8rem; color: var(--text-muted); line-height: 1.3; }

.float-project {
  bottom: clamp(1.25rem, 3vw, 2.25rem); right: clamp(1.25rem, 3vw, 2.25rem);
  display: flex; align-items: center; gap: .8rem; max-width: 19rem;
  animation-delay: .45s;
}
.float-project img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.float-project .fp-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brick);
}
.float-project .fp-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }

.float-review {
  top: 46%; right: clamp(1.25rem, 3vw, 2.25rem);
  max-width: 15.5rem;
  animation-delay: .6s;
}
.float-review .stars { color: var(--brick); letter-spacing: .12em; font-size: .85rem; }
.float-review p { font-size: .88rem; line-height: 1.45; margin-top: .3rem; }
.float-review .rv-by { font-size: .76rem; color: var(--text-muted); margin-top: .4rem; }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Manifesto ---------- */
.manifesto { padding-block: clamp(3.5rem, 8vw, 7rem); }
.manifesto p {
  font-size: clamp(1.45rem, 3.1vw, 2.55rem);
  line-height: 1.34;
  color: var(--slate);
  max-width: 34ch;
  font-weight: 300;
  text-wrap: pretty;
}
.manifesto strong { color: var(--indigo); font-weight: 500; }

/* ---------- Stat strip ---------- */
.stats {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--border);
  border-block: 1px solid var(--border);
}
.stat { background: var(--bg); padding: 1.75rem 1.5rem; }
.stat dt { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brick); }
.stat dd {
  margin: .5rem 0 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
  /* long single-token values (and {{PLACEHOLDERS}}) must reflow, not overflow the cell */
  overflow-wrap: anywhere;
}
.stat .stat-note { display: block; font-family: "Source Sans 3", sans-serif; font-size: .9rem; color: var(--text-muted); margin-top: .45rem; line-height: 1.4; }

/* ---------- Services ---------- */
.services-grid {
  display: grid; gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.service {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--indigo);
  min-height: 470px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.service:hover { transform: translateY(-5px); box-shadow: var(--sh-lift); }
.service img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  transition: transform 600ms var(--ease);
}
.service:hover img { transform: scale(1.045); }
.service::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(10,22,36,.93) 2%, rgba(10,22,36,.62) 30%, rgba(10,22,36,.22) 58%, rgba(10,22,36,0) 86%);
}
.service-body { position: relative; z-index: 2; padding: 1.5rem; }
.service h3 { font-size: 1.6rem; color: #fff; }
.service p { margin-top: .5rem; font-size: .95rem; color: rgba(255,255,255,.86); line-height: 1.5; }
.service .svc-tags {
  margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .4rem;
}
.service .svc-tags span {
  font-size: .74rem; font-weight: 600;
  padding: .28rem .6rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,.16); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter {
  padding: .55rem 1.1rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: transparent;
  font-size: .92rem; font-weight: 600; cursor: pointer; min-height: 44px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.filter:hover { background: rgba(20,40,63,.06); }
.filter[aria-pressed="true"] { background: var(--indigo); color: var(--chalk); border-color: var(--indigo); }

.masonry { columns: 4 260px; column-gap: clamp(.75rem, 1.6vw, 1.15rem); }
.masonry figure {
  margin: 0 0 clamp(.75rem, 1.6vw, 1.15rem);
  break-inside: avoid;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: var(--chalk-sunk);
  box-shadow: var(--sh-card);
}
.masonry button.shot {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
}
.masonry img { width: 100%; transition: transform 500ms var(--ease); }
.masonry figure:hover img { transform: scale(1.04); }
.masonry figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.6rem .9rem .8rem;
  background: linear-gradient(to top, rgba(10,22,36,.86), transparent);
  color: #fff; font-size: .85rem; font-weight: 600; text-align: left;
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.masonry figure:hover figcaption,
.masonry button.shot:focus-visible + figcaption { opacity: 1; }
.masonry figure.is-hidden { display: none; }

/* ---------- Process ---------- */
.process { background: var(--indigo); color: var(--on-dark); }
.process .eyebrow { color: #C97B62; }
.process h2 { color: #fff; }
.process .section-head p:not(.eyebrow) { color: rgba(237,231,216,.78); }
.steps { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step {
  border: 1px solid rgba(237,231,216,.18);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.4rem 1.75rem;
  background: var(--indigo-soft);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.4rem; color: #C97B62; line-height: 1; display: block; margin-bottom: .8rem;
}
.step h3 { font-size: 1.3rem; color: #fff; }
.step p { margin-top: .5rem; font-size: .95rem; color: rgba(237,231,216,.78); line-height: 1.55; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.review {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  box-shadow: var(--sh-card);
  display: flex; flex-direction: column; gap: .85rem;
}
.review .stars { color: var(--brick); letter-spacing: .14em; }
.review blockquote { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.review figcaption { margin-top: auto; font-size: .9rem; color: var(--text-muted); font-weight: 600; }

/* ---------- Service area ---------- */
.area-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .area-wrap { grid-template-columns: 1fr 1fr; align-items: center; } }
.town-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.town-list li {
  padding: .45rem 1rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); font-size: .92rem; font-weight: 500;
}
.area-photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-card); }
.area-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Contact ---------- */
.contact { background: var(--indigo); color: var(--on-dark); }
.contact-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .contact-wrap { grid-template-columns: .85fr 1.15fr; } }
.contact .eyebrow { color: #C97B62; }
.contact h2 { color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
.contact-lead { margin-top: 1.1rem; color: rgba(237,231,216,.80); font-size: 1.1rem; max-width: 42ch; }
.contact-direct { margin-top: 2rem; display: flex; flex-direction: column; gap: .9rem; }
.contact-direct a { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.15rem; font-weight: 600; }
.contact-direct a:hover { color: #C97B62; }
.contact-direct small { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(237,231,216,.55); }

.form { background: var(--indigo-soft); border: 1px solid rgba(237,231,216,.18); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .04em; margin-bottom: .45rem; color: var(--chalk); }
.field .req { color: #C97B62; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .95rem; min-height: 48px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(237,231,216,.28);
  background: rgba(10,22,36,.45);
  color: #fff; font: inherit;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(237,231,216,.45); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #C97B62; background: rgba(10,22,36,.65); }
.field .hint { display: block; margin-top: .4rem; font-size: .82rem; color: rgba(237,231,216,.62); }
.field-row { display: grid; gap: 1.15rem; grid-template-columns: minmax(0,1fr); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form .btn { width: 100%; justify-content: center; margin-top: .35rem; }
.form-note { margin-top: 1rem; font-size: .85rem; color: rgba(237,231,216,.62); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: #0D1B2C; color: rgba(237,231,216,.75); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-top { display: grid; gap: 2.5rem; grid-template-columns: minmax(0,1fr); }
@media (min-width: 760px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand-name { color: var(--chalk); }
.footer h4 { font-family: "Source Sans 3", sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #C97B62; margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer a:hover { color: var(--chalk); }
.footer-blurb { margin-top: 1.1rem; max-width: 34ch; font-size: .95rem; line-height: 1.6; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(237,231,216,.15);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .85rem; color: rgba(237,231,216,.55);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 17, 28, .94);
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.lightbox[open], .lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(94vw, 900px); max-height: 86vh; width: auto; border-radius: var(--r-md); box-shadow: var(--sh-lift); }
.lightbox-cap { color: rgba(237,231,216,.85); text-align: center; margin-top: 1rem; font-size: .95rem; }
.lightbox-close {
  position: absolute; top: clamp(.75rem, 2vw, 1.5rem); right: clamp(.75rem, 2vw, 1.5rem);
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(237,231,216,.3); background: rgba(237,231,216,.08);
  color: var(--chalk); cursor: pointer; display: grid; place-items: center;
}
.lightbox-close:hover { background: rgba(237,231,216,.18); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(237,231,216,.3); background: rgba(237,231,216,.08);
  color: var(--chalk); cursor: pointer; display: grid; place-items: center;
}
.lightbox-nav:hover { background: rgba(237,231,216,.18); }
.lightbox-prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox-next { right: clamp(.5rem, 2vw, 1.5rem); }
body.is-locked { overflow: hidden; }

/* ---------- Scroll reveal ----------
   Gated behind .js so the page is fully readable if JavaScript fails,
   is blocked, or hasn't run yet. Without this, .reveal content is invisible forever. */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .float-review { display: none; }
}
@media (max-width: 860px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 46px; height: 46px; border-radius: var(--r-pill);
    border: 1px solid var(--border-strong); background: transparent; cursor: pointer;
  }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + .5rem);
    background: var(--paper); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: .6rem; box-shadow: var(--sh-float);
  }
  .nav.is-open .nav-links a { padding: .85rem 1rem; }
  .float-trust { max-width: 13.5rem; padding: .7rem .8rem; }
  .float-trust .ft-sub { display: none; }
  .float-project { max-width: none; left: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
}
@media (max-width: 560px) {
  .hero-scroll { height: 320vh; }
  .seq-label span { display: none; }
  .float-project img { width: 44px; height: 44px; }
  .masonry { columns: 2 140px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .float { animation: none; }
  .hero-scroll { height: auto; }
  .hero-sticky { position: static; height: auto; min-height: 82vh; }
  .seq img { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .lightbox, .hero-actions, .form { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Interactive cutaway house — a blueprint section, on-brand with the
   drafting brackets and ruler in the logo mark.
   ========================================================================== */
.house { background: var(--indigo); color: var(--on-dark); }
.house .eyebrow { color: #C97B62; }
.house h2 { color: #fff; }
.house .section-head p:not(.eyebrow) { color: rgba(237,231,216,.78); }

.house-wrap { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); grid-template-columns: minmax(0,1fr); align-items: start; }
@media (min-width: 1000px) { .house-wrap { grid-template-columns: 1.6fr .9fr; } }

.house-figure {
  position: relative;
  border: 1px solid rgba(237,231,216,.16);
  border-radius: var(--r-lg);
  background: rgba(10,22,36,.42);
  padding: clamp(.5rem, 1.5vw, 1.25rem);
}
.house-figure svg { width: 100%; height: auto; display: block; }

/* Hotspots are real buttons laid over the drawing — free focus, keyboard and ARIA. */
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(237,231,216,.5);
  background: rgba(13,27,44,.82);
  color: #fff;
  font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.hotspot:hover { background: var(--brick); border-color: #fff; transform: translate(-50%,-50%) scale(1.12); }
.hotspot[aria-current="true"] {
  background: var(--brick); border-color: #fff;
  transform: translate(-50%,-50%) scale(1.16);
  box-shadow: 0 0 0 6px rgba(158,70,54,.28);
}
/* Slow beacon so the drawing reads as interactive without a "click me" label */
.hotspot::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(201,123,98,.75);
  animation: beacon 2.8s var(--ease) infinite;
}
.hotspot[aria-current="true"]::before, .hotspot:hover::before { animation: none; opacity: 0; }
@keyframes beacon {
  0%   { transform: scale(1);    opacity: .8; }
  70%  { transform: scale(1.75); opacity: 0; }
  100% { transform: scale(1.75); opacity: 0; }
}

.house-panel {
  background: var(--indigo-soft);
  border: 1px solid rgba(237,231,216,.18);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  position: sticky; top: 6rem;
}
.house-panel img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-md); margin-bottom: 1.15rem;
}
.house-panel .hp-kicker {
  font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #C97B62; display: block; margin-bottom: .5rem;
}
.house-panel h3 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.house-panel p { margin-top: .7rem; color: rgba(237,231,216,.80); font-size: 1rem; line-height: 1.6; }
.house-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.house-tags span {
  font-size: .74rem; font-weight: 600; padding: .3rem .7rem; border-radius: var(--r-pill);
  background: rgba(237,231,216,.12); border: 1px solid rgba(237,231,216,.2); color: #fff;
}
.house-hint {
  margin-top: 1rem; font-size: .85rem; color: rgba(237,231,216,.55);
  display: flex; align-items: center; gap: .5rem;
}

/* Drawing line-work */
.bp-wall  { fill: rgba(237,231,216,.92); }
.bp-line  { fill: none; stroke: rgba(237,231,216,.85); stroke-width: 3.2; stroke-linejoin: round; }
.bp-thin  { fill: none; stroke: rgba(237,231,216,.45); stroke-width: 2.2; stroke-linecap: round; }
.bp-faint { fill: none; stroke: rgba(237,231,216,.22); stroke-width: 1.7; }
.bp-accent{ fill: none; stroke: #C97B62; stroke-width: 3.2; stroke-linecap: round; }
.bp-fill  { fill: rgba(237,231,216,.07); }
.bp-label { fill: rgba(237,231,216,.5); font: 700 19px "Source Sans 3", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.bp-zone  { fill: transparent; transition: fill var(--dur) var(--ease); }
.bp-zone.on { fill: rgba(201,123,98,.18); }

@media (max-width: 999px) {
  .house-panel { position: static; }
  .hotspot { width: 34px; height: 34px; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hotspot::before { animation: none; opacity: 0; }
}
/* hotspot positioning context must match the SVG box exactly */
.house-svg { position: relative; display: block; }
.house-panel img[hidden] { display: none; }

/* Lightbox: hold the previous frame until the next one has actually decoded */
.lightbox img { transition: opacity 200ms var(--ease); }
.lightbox.is-loading img { opacity: .25; }
.lightbox.is-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 3px solid rgba(237,231,216,.25);
  border-top-color: var(--chalk);
  border-radius: 50%;
  animation: lbSpin .7s linear infinite;
}
@keyframes lbSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lightbox.is-loading::after { animation: none; } }

/* ==========================================================================
   Phone refinements — verified at 375x812, where the desktop layout broke:
   the nav wrapped to ~200px tall, the blueprint drawing rendered 325px wide
   with 3.5px labels, and the 16:9 hero over-cropped into a tall portrait box.
   ========================================================================== */
@media (max-width: 640px) {

  /* --- NAV: keep it one tidy row --- */
  .nav { padding-block: .55rem; }
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub  { font-size: .5rem; letter-spacing: .14em; white-space: nowrap; }
  /* the wide "Get an estimate" pill wrapped to two lines and doubled nav height;
     on a phone, calling is the action that matters anyway */
  .nav-cta .btn-dark { display: none; }
  .nav-call {
    display: inline-grid; place-items: center;
    width: 46px; height: 46px; border-radius: var(--r-pill);
    background: var(--brick); color: #fff; flex: none;
  }
  .nav-call:hover { background: var(--brick-hover); }

  /* --- HERO: a 16:9 frame in a tall portrait box crops to a keyhole --- */
  .hero-card { min-height: 62vh; }
  .hero h1 { font-size: clamp(2.4rem, 10vw, 3.1rem); }
  .hero-sub { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .float-trust { max-width: none; left: auto; right: .75rem; top: .75rem; padding: .55rem .7rem; }
  .float-trust .ft-title { font-size: .82rem; }

  /* --- CUTAWAY HOUSE: hold a legible drawing width and let it pan --- */
  .house-figure {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .house-svg { min-width: 720px; }          /* below this the line-work turns to mush */
  .house-scrollhint { display: flex; }
  .hotspot { width: 34px; height: 34px; font-size: .78rem; }
}

/* Labels are sized in viewBox units, so they shrink with the drawing.
   17 keeps them readable once the SVG is panned at its 720px floor. */
.bp-label { font-size: 17px; }

.house-scrollhint {
  display: none;
  align-items: center; gap: .45rem;
  margin-top: .6rem; font-size: .8rem; color: rgba(237,231,216,.55);
}
/* <picture> must not introduce a layout box — the frames are absolutely
   positioned by `.seq img`, so the wrapper has to disappear entirely. */
.seq picture { display: contents; }

/* Must come after the base `.house-scrollhint { display: none }` above —
   same specificity, so source order decides. */
@media (max-width: 640px) {
  .house-scrollhint { display: flex; }
}

/* Inline icons inside flex rows: without an explicit size + flex:none the
   flex container stretches the SVG to fill the line (the swipe hint rendered
   ~250px tall). Applies to every flex row that carries an icon. */
.house-scrollhint svg,
.house-hint svg,
.contact-direct svg,
.nav-phone svg,
.nav-call svg,
.btn svg { flex: none; }
.house-scrollhint svg { width: 14px; height: 14px; }
.house-hint svg      { width: 15px; height: 15px; }

/* ---------- Service-area imagery ---------- */
.area-photo { position: relative; }
.area-inset {
  position: absolute;
  left: clamp(.75rem, 3.5%, 1.25rem);
  bottom: clamp(.75rem, 3.5%, 1.25rem);
  width: clamp(118px, 36%, 210px);
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: var(--sh-float);
}
.area-inset img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ==========================================================================
   Phone hero: show the frames WHOLE.
   Two things cropped them — the card's tall portrait box against a 16:9
   frame, and the `scale(1.14)` overscan the parallax relies on. On phones the
   card becomes image-over-text (so the photo owns its own box) and the frame
   is `contain`ed, so nothing is ever cut off. The JS drops the parallax
   transform to match; see the hero scroll sequence block.
   ========================================================================== */
@media (max-width: 640px) {
  .hero-sticky { padding-block: 4.75rem .9rem; }
  .hero-card {
    height: 100%;
    display: flex; flex-direction: column; gap: 1rem;
    background: transparent; box-shadow: none; border-radius: 0;
    overflow: visible;
  }
  .seq {
    position: relative;
    flex: 1 1 auto; min-height: 0; width: 100%;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--indigo);
    box-shadow: var(--sh-lift);
  }
  .seq img { object-fit: contain; object-position: 50% 50%; transform: none; }
  .hero-card::after { display: none; }        /* no scrim: text is off the photo now */

  .hero-content {
    position: static; flex: none;
    padding: 0; max-width: none;
    color: var(--text);
  }
  .hero h1     { color: var(--text); font-size: clamp(2rem, 8.4vw, 2.5rem); }
  .hero-sub    { color: var(--text-muted); font-size: .98rem; margin-top: .7rem; }
  .hero-actions{ margin-top: 1.1rem; }
  .seq-nav     { top: .75rem; left: .75rem; }
}

/* ---------- Service-area: two equal images ---------- */
/* Supersedes the earlier main-plus-inset treatment: the client wanted both
   pictures the same size, so they stack as an equal pair. */
.area-photos { display: grid; gap: clamp(.75rem, 1.6vw, 1.1rem); }
.area-photos figure {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-card);
}
.area-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
