/* Driftwood Architectural Millwork — local concept stylesheet.
   One family (Archivo), width as the expressive axis. Colors from limestone, driftwood, walnut and bluestone. */

:root {
  --limestone: #E5E3DC;
  --limestone-2: #D9D6CD;
  --driftwood: #B8B1A4;
  --walnut: #4A3326;
  --walnut-deep: #3B281E;
  --bluestone: #4E5D62;
  --graphite: #24231E;
  --graphite-2: #4D4B44;
  --sapwood: #D8C29C;
  --white: #FFFFFF;

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1320px;
  --section-pad: clamp(72px, 10vw, 136px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--limestone);
  color: var(--graphite);
  font-family: var(--font);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 960px) { body { font-size: 18px; } }

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

:focus-visible {
  outline: 2px solid var(--walnut);
  outline-offset: 3px;
}

.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: 12px; top: -60px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--graphite);
  color: var(--white);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-title {
  text-wrap: balance;
  font-stretch: 112%;
  font-weight: 380;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-stretch: 100%;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.button-light { background: var(--white); color: var(--graphite); }
.button-light:hover { background: var(--limestone); }
.button-outline { border-color: rgba(255,255,255,.7); color: var(--white); background: rgba(36,35,30,.12); }
.button-outline:hover { background: rgba(255,255,255,.14); border-color: var(--white); }
.button-dark { background: var(--graphite); color: var(--white); }
.button-dark:hover { background: var(--walnut); }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  color: var(--white);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header::before {
  /* soft top shade so the overlay nav reads on bright ceilings */
  content: "";
  position: absolute;
  inset: 0 0 -40px 0;
  background: linear-gradient(to bottom, rgba(30, 22, 16, .42), rgba(30, 22, 16, 0));
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.site-header.is-solid {
  background: rgba(229, 227, 220, .97);
  color: var(--graphite);
  box-shadow: 0 1px 0 rgba(36, 35, 30, .14);
}
.site-header.is-solid::before { opacity: 0; }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 36px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.header-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  font-stretch: 125%;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .02em;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.site-header.is-solid .header-brand { opacity: 1; pointer-events: auto; }
.hb-sub { display: none; }

.header-nav { display: none; gap: clamp(18px, 2.4vw, 34px); }
.header-nav a {
  position: relative;
  padding: 12px 0;
  font-stretch: 100%;
  font-weight: 450;
  font-size: 16px;
  text-decoration: none;
}
.header-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.header-nav a:hover::after, .header-nav a:focus-visible::after { transform: scaleX(1); }

.header-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.header-call-text { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 2px 0 8px;
  border: 0;
  background: none;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
}
.menu-toggle-bars { position: relative; top: -3px; }
.menu-toggle-bars::before { content: ""; position: relative; top: 6px; }

@media (min-width: 960px) {
  .header-nav { display: flex; }
  .menu-toggle { display: none; }
  .header-call { padding: 0 2px 0 14px; border-left: 1px solid currentColor; border-left-color: rgba(255,255,255,.45); }
  .site-header.is-solid .header-call { border-left-color: rgba(36,35,30,.25); }
  .header-call-text { display: inline; }
}
@media (min-width: 600px) and (max-width: 959px) {
  .header-call-text { display: inline; }
}

/* ---------- Site menu (dialog) ---------- */
.site-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--graphite);
  overflow: hidden;
}
.site-menu::backdrop { background: rgba(36, 35, 30, .5); }
.site-menu[open] { display: flex; justify-content: flex-end; }
.site-menu-panel {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--limestone);
  padding:
    max(14px, env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    var(--gutter);
}
.site-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--header-h) - 14px);
}
.site-menu-brand { font-stretch: 125%; font-size: 19px; letter-spacing: .02em; }
.site-menu-close, .lb-close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px 0 10px;
  border: 0;
  background: none;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
}
.menu-close-x { position: relative; width: 20px; height: 20px; }
.menu-close-x::before, .menu-close-x::after {
  content: "";
  position: absolute;
  left: 0; top: 9.25px;
  width: 20px; height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}
.menu-close-x::after { transform: rotate(-45deg); }

.site-menu-links { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid rgba(36,35,30,.18); }
.site-menu-links li { border-bottom: 1px solid rgba(36,35,30,.18); }
.site-menu-links a {
  display: block;
  padding: 16px 0;
  font-stretch: 112%;
  font-weight: 380;
  font-size: clamp(1.7rem, 7vw, 2.2rem);
  line-height: 1.1;
  text-decoration: none;
}
.site-menu-contact { display: grid; gap: 8px; margin-top: auto; padding-top: 32px; }
.site-menu-contact a { min-height: 44px; display: flex; align-items: center; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.site-menu-phone { font-size: 1.25rem; font-weight: 500; text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
  .site-menu[open] .site-menu-panel { animation: panel-in .38s var(--ease); }
  .site-menu[open]::backdrop { animation: fade-in .3s var(--ease); }
  .site-menu.is-closing .site-menu-panel { animation: panel-out .24s var(--ease) forwards; }
  .site-menu.is-closing::backdrop { animation: fade-out .24s var(--ease) forwards; }
}
@keyframes panel-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes panel-out { to { transform: translateX(32px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  color: var(--white);
  background: var(--walnut);
  overflow: hidden;
  isolation: isolate;
}
@media (min-height: 1100px) and (min-width: 960px) { .hero { min-height: 1000px; } }

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide.is-entering { z-index: 2; animation: hero-in 2.4s var(--ease) forwards; }
.hero-slide.is-failed { display: none; }
@keyframes hero-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-slide.is-active img, .hero-slide.is-entering img {
    animation: hero-drift 13s linear forwards;
  }
}
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.045); } }

/* art direction per slide */
.hero-slide[data-index="0"] { --pos: 64% 50%; }
.hero-slide[data-index="1"] { --pos: 50% 50%; }
.hero-slide[data-index="2"] { --pos: 42% 50%; }
@media (max-aspect-ratio: 4/5) {
  .hero-slide[data-index="0"] { --pos: 36% 50%; }
  .hero-slide[data-index="1"] { --pos: 56% 50%; }
  .hero-slide[data-index="2"] { --pos: 34% 50%; }
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(28, 20, 14, .78) 0%, rgba(28, 20, 14, .52) 26%, rgba(28, 20, 14, .14) 52%, rgba(28, 20, 14, 0) 66%);
  pointer-events: none;
}
.hero[data-tone="bright"] .hero-shade {
  background:
    linear-gradient(to top, rgba(28, 20, 14, .82) 0%, rgba(28, 20, 14, .58) 30%, rgba(28, 20, 14, .2) 56%, rgba(28, 20, 14, .04) 72%);
}

.hero-content {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding:
    calc(var(--header-h) + 24px)
    max(var(--gutter), env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.wordmark {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(20px, 3.2vw, 40px);
  text-shadow: 0 1px 24px rgba(20, 14, 10, .25);
}
.wordmark-name {
  font-stretch: 125%;
  font-weight: 280;
  font-size: clamp(3.1rem, 14.4vw, 12.5rem);
  white-space: nowrap;
  line-height: .86;
  letter-spacing: -0.01em;
  margin-left: -0.05em;
}
.wordmark-sub {
  margin-top: clamp(10px, 1.4vw, 18px);
  font-stretch: 125%;
  font-weight: 340;
  font-size: clamp(1rem, 2.3vw, 1.9rem);
  letter-spacing: .04em;
  line-height: 1.2;
}

/* Title block: the one bold device, borrowed from shop-drawing sheets */
.titleblock {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(255, 255, 255, .62);
}
.tb-cell { padding: 14px 0; }
.tb-label {
  display: block;
  font-stretch: 88%;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, .78);
}
.tb-value { display: block; font-size: 15px; line-height: 1.4; }
.tb-label + .tb-value { margin-top: 2px; }
.tb-value + .tb-label { margin-top: 10px; }
.tb-statement p { max-width: 34em; margin: 0 0 14px; font-size: 16px; line-height: 1.5; }
.tb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-office { display: none; }
.tb-scene, .tb-controls { border-top: 1px solid rgba(255, 255, 255, .38); }
.tb-scene { padding-bottom: 0; }
.tb-caption { min-height: 2.8em; }
.tb-controls { display: flex; gap: 4px; padding: 8px 0 4px; border-top: 0; }

.hero-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(28, 20, 14, .18);
  color: var(--white);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.hero-btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--white); }
.hero-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-btn .i-play { display: none; fill: currentColor; stroke: none; }
.hero-btn[aria-pressed="true"] .i-play { display: block; }
.hero-btn[aria-pressed="true"] .i-pause { display: none; }
.hero :focus-visible { outline-color: var(--white); }

@media (min-width: 720px) {
  .titleblock { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto; }
  .tb-cell { padding: 18px 22px 16px; border-top: 0; }
  .tb-cell + .tb-cell { border-left: 1px solid rgba(255, 255, 255, .38); }
  .tb-statement { padding-left: 0; grid-column: 1 / -1; border-bottom: 1px solid rgba(255,255,255,.38); }
  .tb-statement { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .tb-statement p { margin: 0; }
  .tb-actions { flex-wrap: nowrap; flex-shrink: 0; }
  .tb-scene { padding-left: 0; border-left: 0 !important; }
  .tb-controls { align-items: center; padding-right: 0; }
  .tb-office { display: block; }
  .tb-office { order: 3; }
}
@media (min-width: 1100px) {
  .titleblock { grid-template-columns: minmax(0, 2.1fr) minmax(0, .9fr) minmax(0, 1.15fr) auto; }
  .tb-statement { grid-column: auto; border-bottom: 0; display: block; padding-left: 0; }
  .tb-statement p { margin-bottom: 16px; }
  .tb-office { order: 0; }
  .tb-scene { padding-left: 22px; border-left: 1px solid rgba(255,255,255,.38) !important; }
}

/* ---------- Phones (portrait and short landscape) ----------
   Compact logo top-left in the header line, Menu opposite (user default for mobile).
   The photograph keeps a deliberate height and stays clear below the header line.
   Statement, actions, caption and controls sit in a ruled walnut band directly below the photo.
   Tablets and desktop keep the full-bleed overlay above. */
@media (max-width: 719px) {
  .hero { --photo-h: clamp(300px, min(62vh, 132vw), 620px); }
  @supports (height: 1svh) { .hero { --photo-h: clamp(300px, min(62svh, 132vw), 620px); } }
  .hero-slide[data-index="0"] { --pos: 22% 50%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero { --photo-h: max(250px, calc(100vh - 76px)); }
  @supports (height: 1svh) { .hero { --photo-h: max(250px, calc(100svh - 76px)); } }
  .hero-slide[data-index="0"] { --pos: 50% 66%; }
  .hero-slide[data-index="1"] { --pos: 50% 52%; }
  .hero-slide[data-index="2"] { --pos: 50% 72%; }
}
@media (max-width: 719px), (max-height: 520px) and (orientation: landscape) {
  /* header logo: always visible, compact, two lines */
  .header-brand,
  .site-header.is-solid .header-brand {
    opacity: 1;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 1 1 0%;
    contain: inline-size;
    min-height: 44px;
    margin-right: 0;
    letter-spacing: 0;
    white-space: normal;
    overflow: hidden;
  }
  .site-header:not(.is-solid) .header-brand { text-shadow: 0 1px 14px rgba(20, 14, 10, .35); }
  .hb-name { font-stretch: 125%; font-weight: 320; font-size: clamp(1.4rem, 7vw, 1.85rem); line-height: 1; letter-spacing: .005em; white-space: nowrap; }
  .hb-sub { display: block; margin-top: 4px; font-stretch: 100%; font-weight: 450; font-size: 13px; line-height: 1.15; letter-spacing: .01em; }

  .hero { display: block; min-height: 0; }
  .hero .hero-media, .hero .hero-shade { inset: 0 0 auto 0; height: var(--photo-h); }
  .hero .hero-media { overflow: hidden; }
  .hero .hero-shade,
  .hero[data-tone] .hero-shade {
    background: linear-gradient(to bottom, rgba(28, 20, 14, .3) 0%, rgba(28, 20, 14, .1) 18%, rgba(28, 20, 14, 0) 30%);
  }
  .hero .hero-content {
    display: block;
    padding: var(--photo-h) max(var(--gutter), env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  }
  /* the hero h1 stays for assistive tech; the header logo carries the brand visually on phones */
  .hero .wordmark {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: 0; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .hero .titleblock { grid-template-columns: minmax(0, 1fr) auto; border-top: 0; }
  .hero .tb-cell { border: 0; border-left: 0 !important; }
  .hero .tb-scene { order: 1; padding: 14px 12px 14px 0; align-self: center; }
  .hero .tb-controls { order: 2; display: flex; align-items: center; gap: 4px; padding: 14px 0; }
  .hero .tb-caption { min-height: 0; }
  .hero .tb-statement {
    order: 3;
    grid-column: 1 / -1;
    display: block;
    padding: 18px 0 2px;
    border-top: 1px solid rgba(255, 255, 255, .3);
    border-bottom: 0;
  }
  .hero .tb-statement p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
  .hero .tb-actions { flex-wrap: wrap; }
  .hero .tb-office {
    order: 4;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    column-gap: 16px;
    margin-top: 18px;
    padding: 14px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, .3);
  }
  .hero .tb-office .tb-value + .tb-label { margin-top: 0; }

  /* long address and number wrap instead of widening the page under zoom or large text */
  .contact-info .contact-email { display: block; width: fit-content; max-width: 100%; min-height: 0; padding-block: 9px; overflow-wrap: anywhere; }
}
/* very narrow phones, or enlarged text (set by script): icon-only Menu, label kept for assistive tech */
@media (max-width: 359px) {
  .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-toggle { padding: 0; justify-content: center; }
}
/* extreme zoom (about 200% on a phone): the band's Call button replaces the header icon; caption sits above the controls */
@media (max-width: 300px) {
  .header-call { display: none; }
  .hb-name { font-size: 1.2rem; }
  .hero .titleblock { grid-template-columns: minmax(0, 1fr); }
  .hero .tb-scene { padding-bottom: 6px; }
  .hero .tb-controls { padding-top: 6px; }
}
.site-header.is-tight .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header.is-tight .menu-toggle { padding: 0; justify-content: center; }
.site-header.is-tighter .header-call { display: none; }
@media (max-height: 520px) and (orientation: landscape) {
  .hero .tb-statement { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; }
  .hero .tb-statement p { margin: 0; max-width: 30em; }
  .hero .tb-actions { flex-wrap: nowrap; flex-shrink: 0; }
  .hero .tb-office { margin-top: 0; }
}

/* ---------- Intro ---------- */
.intro { padding-block: var(--section-pad); }
.intro-grid { display: grid; gap: 28px; }
.intro-title {
  text-wrap: balance;
  font-stretch: 112%;
  font-weight: 340;
  font-size: clamp(2.1rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 13em;
}
.intro-body { max-width: 38em; }
.intro-body p { color: var(--graphite); }
.facts { margin: 34px 0 0; padding: 0; border-top: 1px solid rgba(36,35,30,.2); }
.facts div { display: grid; grid-template-columns: minmax(0, 7.2em) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(36,35,30,.2); }
.facts dt { font-stretch: 88%; font-weight: 500; font-size: 15px; color: var(--graphite-2); padding-top: 2px; }
.facts dd { margin: 0; font-size: 16px; line-height: 1.5; }
@media (min-width: 960px) {
  .intro-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .intro-title { grid-column: 1 / span 7; }
  .intro-body { grid-column: 8 / span 5; padding-top: 10px; }
}

/* ---------- Services ---------- */
.services { padding-bottom: var(--section-pad); }
.services .section-title { margin-bottom: clamp(32px, 5vw, 64px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid rgba(36,35,30,.2); }

.spread { display: grid; gap: 22px; }
.spread + .spread { margin-top: clamp(64px, 9vw, 128px); }
.spread-figure img { width: 100%; background: var(--limestone-2); }
.spread figcaption, .process figcaption {
  margin-top: 10px;
  font-stretch: 88%;
  font-size: 14px;
  line-height: 1.4;
  color: var(--graphite-2);
}
.spread-copy h3 {
  font-stretch: 112%;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.spread-copy p { max-width: 34em; }
.list-title {
  margin: 26px 0 8px;
  font-stretch: 88%;
  font-weight: 500;
  font-size: 15px;
  color: var(--graphite-2);
}
.piece-list, .material-list { list-style: none; margin: 0; padding: 0; }
.piece-list li {
  padding: 9px 0;
  border-bottom: 1px solid rgba(36,35,30,.16);
  font-size: 16px;
}
.piece-list li:first-child { border-top: 1px solid rgba(36,35,30,.16); }
.material-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: 22px;
  border-top: 1px solid rgba(36,35,30,.16);
}
.material-list li { padding: 11px 0; border-bottom: 1px solid rgba(36,35,30,.16); font-size: 16px; }

/* single-column portrait photos stay portrait and bounded on short screens */
@media (max-width: 959px) {
  .spread-residential .spread-figure img,
  .spread-materials .spread-figure img { width: auto; max-width: 100%; max-height: max(88vh, 460px); }
}

/* phones and portrait tablets: heading, then its photo, then the copy */
@media (max-width: 959px) {
  .spread-copy { display: contents; }
  .spread-copy > * { order: 2; }
  .spread-copy > h3 { order: 0; margin-bottom: 0; }
  .spread { gap: 0; }
  .spread .spread-figure { order: 1; margin: 16px 0 22px; }
}

@media (min-width: 960px) {
  .spread { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .spread-commercial .spread-figure { grid-column: 1 / span 7; }
  .spread-commercial .spread-copy { grid-column: 9 / span 4; align-self: start; }

  .spread-residential .spread-figure { order: 0; grid-column: 7 / span 5; }
  .spread-residential .spread-copy { grid-column: 1 / span 5; align-self: end; padding-bottom: 34px; }

  .spread-materials .spread-figure { grid-column: 1 / span 6; }
  .spread-materials .spread-copy { grid-column: 8 / span 5; align-self: end; padding-bottom: 34px; }
  .spread-residential .spread-figure img { max-height: 680px; width: 100%; object-fit: cover; }
  .spread-materials .spread-figure img { max-height: 760px; width: 100%; object-fit: cover; }
}

/* ---------- Process ---------- */
.process {
  padding-block: var(--section-pad);
  background: var(--walnut);
  color: #F1ECE4;
}
.process :focus-visible { outline-color: var(--sapwood); }
.process-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.process-head p { margin: 0; max-width: 32em; color: rgba(241, 236, 228, .82); }
.process-wide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 60%;
}
.process figcaption { color: rgba(241, 236, 228, .7); }
.process-grid { display: grid; gap: 36px; margin-top: clamp(40px, 6vw, 72px); }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(241, 236, 228, .28); }
.steps li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 14px;
  padding: 18px 0 16px;
  border-bottom: 1px solid rgba(241, 236, 228, .28);
}
.step-num {
  grid-row: span 2;
  font-stretch: 125%;
  font-weight: 300;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--sapwood);
}
.steps h3 { font-stretch: 112%; font-weight: 420; font-size: 1.2rem; line-height: 1.25; margin-bottom: 4px; }
.steps p { margin: 0; color: rgba(241, 236, 228, .84); font-size: 16px; }
@media (min-width: 960px) {
  .process-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .process-head .section-title { grid-column: 1 / span 7; }
  .process-head p { grid-column: 9 / span 4; }
  .process-wide img { aspect-ratio: 21 / 9; }
  .process-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .steps { grid-column: 1 / span 6; }
  .process-figure { grid-column: 8 / span 5; padding-top: 18px; }
}

/* ---------- Gallery ---------- */
.gallery { padding-block: var(--section-pad); background: var(--limestone-2); }
.gallery-head { display: grid; gap: 22px; margin-bottom: clamp(28px, 4vw, 44px); }
.gallery-head p { margin: 12px 0 0; max-width: 32em; color: var(--graphite-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-self: end; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(36,35,30,.32);
  border-radius: 999px;
  background: transparent;
  font-weight: 450;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.filter:hover { border-color: var(--graphite); }
.filter[aria-pressed="true"] { background: var(--graphite); color: var(--limestone); border-color: var(--graphite); }
.filter-count { font-stretch: 88%; opacity: .7; }
@media (min-width: 960px) {
  .gallery-head { grid-template-columns: 1fr auto; align-items: end; }
}

.gallery-grid {
  --row-h: clamp(170px, 26vw, 400px);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 16px;
}
/* justified rows: each item grows with its aspect ratio, capped so a short last row never balloons */
.g-item {
  flex: var(--r) 1 calc(var(--r) * var(--row-h));
  max-width: calc(var(--r) * var(--row-h) * 1.25);
  min-width: 0;
}
.g-item[hidden] { display: none; }
.g-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--driftwood);
  cursor: zoom-in;
}
.g-link img {
  width: 100%;
  aspect-ratio: var(--r);
  object-fit: cover;
  transition: transform .6s var(--ease), opacity .3s var(--ease);
}
.g-link:hover img { transform: scale(1.02); }
.g-caption { display: flex; flex-direction: column; padding-top: 10px; }
.g-title { font-stretch: 100%; font-weight: 500; font-size: 16px; line-height: 1.3; }
.g-detail { font-stretch: 88%; font-size: 14px; line-height: 1.4; color: var(--graphite-2); }
@media (max-width: 719px) {
  .gallery-grid { gap: 24px 12px; }
}
@media (max-width: 539px) {
  .gallery-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
  .g-item { max-width: none; }
  .g-link img { max-height: 72vh; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(26, 19, 14, .97);
  color: #F1ECE4;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(26, 19, 14, .6); }
.lightbox[open] { display: block; }
.lb-frame {
  position: fixed;
  top: var(--vv-top, 0px);
  left: var(--vv-left, 0px);
  width: var(--vv-w, 100%);
  height: var(--vv-h, 100%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding:
    max(10px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}
.lb-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; }
.lb-count { font-stretch: 88%; font-size: 14px; color: rgba(241,236,228,.75); }
.lb-close { color: #F1ECE4; border: 1px solid rgba(241,236,228,.4); border-radius: 999px; padding: 0 16px 0 12px; background: rgba(26,19,14,.6); }
.lb-close:hover { border-color: #F1ECE4; }
.lightbox :focus-visible { outline-color: var(--sapwood); }
.lb-figure {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  min-height: 0;
}
.lb-caption { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lb-caption .g-detail { color: rgba(241,236,228,.72); }
.lb-nav { display: flex; justify-content: center; gap: 14px; padding-top: 10px; }
.lb-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(241,236,228,.4);
  border-radius: 50%;
  background: rgba(26,19,14,.6);
  color: #F1ECE4;
  cursor: pointer;
}
.lb-btn:hover { border-color: #F1ECE4; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-height: 520px) and (orientation: landscape) {
  .lb-frame { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
  .lb-top { grid-column: 1 / -1; min-height: 44px; }
  .lb-figure { grid-column: 2; grid-row: 2; }
  .lb-nav { display: contents; }
  .lb-nav [data-lb-prev] { grid-column: 1; grid-row: 2; align-self: center; margin-right: 10px; }
  .lb-nav [data-lb-next] { grid-column: 3; grid-row: 2; align-self: center; margin-left: 10px; }
  .lb-caption { flex-direction: row; gap: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] .lb-frame { animation: fade-in .25s var(--ease); }
  .lightbox[open]::backdrop { animation: fade-in .25s var(--ease); }
}

/* ---------- Contact ---------- */
.contact {
  padding-block: var(--section-pad);
  background: var(--bluestone);
  color: #EEF0EE;
}
.contact :focus-visible { outline-color: var(--sapwood); }
.contact-grid { display: grid; gap: 48px; }
.contact-info > p { max-width: 30em; margin-top: 16px; color: rgba(238,240,238,.86); }
.contact-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-stretch: 112%;
  font-weight: 340;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  text-decoration: none;
}
.contact-phone:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
.contact-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  font-size: 17px;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.contact-email { display: flex; width: fit-content; max-width: 100%; }
.addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(238,240,238,.28); }
.addresses h3 { font-stretch: 88%; font-weight: 500; font-size: 14px; color: rgba(238,240,238,.9); margin-bottom: 4px; }
.addresses p { margin: 0; font-size: 16px; line-height: 1.5; }
.team { margin-top: 22px; font-size: 15px; color: rgba(238,240,238,.9); }

.callback { background: var(--limestone); color: var(--graphite); padding: clamp(22px, 4vw, 40px); }
.callback :focus-visible { outline-color: var(--walnut); }
.demo-flag {
  margin: 0 0 18px;
  text-align: center;
  font-stretch: 112%;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .02em;
  padding: 8px 0;
  border-top: 1px solid rgba(36,35,30,.25);
  border-bottom: 1px solid rgba(36,35,30,.25);
}
.callback-form h3 { font-stretch: 112%; font-weight: 400; font-size: 1.5rem; line-height: 1.2; margin-bottom: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 15px; font-weight: 500; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(36,35,30,.38);
  border-radius: 2px;
  background: #F4F3EF;
  font-size: 16px;
}
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--walnut); outline-offset: 1px; border-color: var(--walnut); }
.field input[aria-invalid="true"] { border-color: #8A3B26; }
.callback-form .button { width: 100%; margin-top: 6px; }
.form-status { min-height: 1.5em; margin: 14px 0 0; font-size: 15px; font-weight: 500; }
.form-status[data-state="error"] { color: #8A3B26; }
.form-note { margin: 4px 0 0; font-size: 14px; color: var(--graphite-2); }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .contact-info { grid-column: 1 / span 6; }
  .callback { grid-column: 8 / span 5; }
}
@media (max-width: 380px) {
  .addresses { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--walnut-deep);
  color: rgba(241, 236, 228, .8);
  padding-block: 32px max(32px, env(safe-area-inset-bottom));
}
.footer-inner { display: grid; gap: 8px; }
.footer-brand { font-stretch: 125%; font-size: 17px; letter-spacing: .02em; color: #F1ECE4; }
.site-footer p { margin: 0; font-size: 14px; max-width: 60em; }
@media (min-width: 960px) {
  .footer-inner { grid-template-columns: auto 1fr; gap: 32px; align-items: baseline; }
  .site-footer p { justify-self: end; text-align: right; }
}

/* body lock used by menu and lightbox */
body.is-locked { position: fixed; left: 0; right: 0; overflow: hidden; }

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

/* a closing menu must never intercept a fresh tap */
.site-menu.is-closing { pointer-events: none; }

/* robustness under page zoom and enlarged text: long words and numbers wrap instead of widening the page */
h1, h2, h3, dt, dd, .contact-email { overflow-wrap: break-word; }
.intro-grid > *, .spread > *, .contact-grid > *, .process-grid > *, .process-head > *, .gallery-head > * { min-width: 0; }
@media (max-width: 719px) {
  .contact-phone { font-size: clamp(1.9rem, 9vw, 2.2rem); overflow-wrap: anywhere; }
}
