/* ==========================================================================
   Toga Roofing — homepage (dark brand theme)
   Brand colors come from the official logo file
   (assets/brand/toga-logo-official-black.png): pure black #000000 ground,
   pure white #FFFFFF marks. Accent: brushed silver #B8C3CE (PROPOSED —
   awaiting Luis's confirmation). Surfaces and borders are charcoal.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Brand (from logo) */
  --brand-black: #000000;
  --brand-white: #ffffff;

  /* Surfaces: black, lifted in small steps to separate sections */
  --bg: #0a0a0a;               /* page — equals the hero clip background as browsers decode it */
  --surface: #15171a;          /* charcoal: alternate sections */
  --surface-2: #1c1f23;        /* charcoal: cards, form panel */
  --surface-lift: #1e2126;     /* lighter charcoal: Home Services and About band */
  --surface-lift-2: #272b31;   /* cards on that band */
  --field: #0f1113;            /* form inputs */

  /* Text */
  --ink: #ffffff;              /* headings, key text */
  --ink-soft: #cfccc6;         /* body copy */
  --muted: #9d9992;            /* labels, meta */

  /* Lines */
  --line: #26292e;             /* charcoal hairline */
  --line-strong: #3a3f46;      /* charcoal border */
  --field-border: #737a83;     /* ≥3:1 against --field and --surface-2 */

  /* Actions */
  --accent: #b8c3ce;           /* brushed silver (proposed) */
  --accent-ink: #0b0b0b;       /* 10.9:1 on the accent */
  --accent-hover: #d3dae2;
  --focus: #ffffff;            /* focus ring: white, offset from controls */


  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 88px);
  --header-h: 80px;
  --logo-h: 58px;   /* monogram's hairline diagonal needs this size to stay crisp */
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  background: var(--bg);
}
html.motion-ok { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; color: var(--ink); }
p { margin: 0; }

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

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brand-white);
  color: var(--brand-black);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }

/* Type -------------------------------------------------------------------- */
.eyebrow {
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-title {
  max-width: 18ch;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.section-intro {
  max-width: 46ch;
  margin-top: 1.25rem;
  color: var(--ink-soft);
}
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.btn--dark { border-color: rgba(255, 255, 255, 0.5); background: transparent; color: var(--ink); }
.btn--dark:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.btn--small { min-height: 42px; padding: 0 1.1rem; font-size: 0.85rem; }
.btn--large { min-height: 58px; padding: 0 2.2rem; font-size: 1rem; }
.btn:focus-visible { outline-offset: 4px; }

/* Header: logo-black surface so the official black-ground logo sits flush */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--brand-black);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-solid { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  padding: 0 var(--gutter);
}
.brand { display: block; flex: none; text-decoration: none; }
.brand img { width: auto; }
.brand--header { display: flex; align-items: center; gap: 0.55rem; }
.brand--header img { height: var(--logo-h); }
.brand__name {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}
.brand__name span { display: block; }
@media (min-width: 901px) and (max-width: 1120px) {
  .site-header__inner { gap: 1rem; }
  .site-nav ul { gap: 1.4rem; }
}
.site-nav { margin-left: auto; }
.site-nav__phone a { font-weight: 600; white-space: nowrap; }
.site-nav ul { display: flex; gap: 2.2rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}
.site-nav a:hover { color: var(--ink); }

/* ==========================================================================
   HERO — copy on black, clip set into a framed display area
   ========================================================================== */
.hero {
  position: relative;
  background: var(--bg);
}
.hero__pin {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
  overflow: hidden;
}

/* Scroll-scrub mode: tall track, sticky stage */
.hero--scrub { height: 260vh; }
.hero--scrub .hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

.hero__copy { position: relative; z-index: 2; grid-column: 1; grid-row: 1; }
.hero__display { grid-column: 2; grid-row: 1; }
.hero__title {
  max-width: 10ch;
  font-size: clamp(2.7rem, 5.2vw, 5.4rem);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.hero__lede {
  max-width: 34ch;
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

/* Display area: the clip and the still share this exact box and crop.
   The clip (toga-hero-dark-clean) is rendered on #0B0B0B, the page colour, so the
   house floats on the hero with no frame, border or shadow; only a short
   edge feather (below) hides any one-shade colour difference.

   Source frame (1920×1080): house incl. chimney and floating shadow spans
   x 25.5–87.3%, y 27.4–82.0%. The box shows x 18–95%, y 13–90% (a 16:9
   crop at 1.2987×), leaving ~10% dark margin on both sides of the house. */
.hero__display {
  position: relative;
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: calc((100svh - var(--header-h) - 8rem) / 0.62);
}
.hero__media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 110%;
  margin-left: -5%;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
  /* Browsers draw video through their own colour path, so the clip's black
     can land a shade off the page's. A short feather inside the house's dark
     margins (house x 9.7–90%, y 18.7–89.6% of this box) hides that seam. */
  --hero-edge:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 92.5%, transparent 100%);
  -webkit-mask-image: var(--hero-edge);
  -webkit-mask-composite: source-in;
  mask-image: var(--hero-edge);
  mask-composite: intersect;
}
.hero__still,
.hero__video {
  position: absolute;
  left: -23.38%;    /* -18 / 77 */
  top: -16.88%;     /* -13 / 77 */
  width: 129.87%;   /* 100 / 77 */
  height: 129.87%;
  max-width: none;
}
.hero__still img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
}
.hero__video { object-fit: fill; opacity: 0; transition: opacity 0.4s var(--ease); }
.hero--scrub .hero__still { opacity: 0; transition: opacity 0.4s var(--ease); }
.hero--scrub .hero__video { opacity: 1; }

.hero__note {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero__note-stage { color: var(--ink); font-variant-numeric: tabular-nums; }

.hero__stages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 2.6rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.hero__stages li {
  position: relative;
  padding-top: 0.7rem;
  transition: color 0.3s var(--ease);
}
.hero__stages li::before,
.hero__stages li::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
}
.hero__stages li::before { background: var(--line-strong); }
.hero__stages li::after {
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.hero__stages li span { margin-right: 0.3rem; font-variant-numeric: tabular-nums; opacity: 0.7; }
.hero__stages li.is-active,
.hero__stages li.is-done { color: var(--ink); }
.hero__stages li.is-active::after,
.hero__stages li.is-done::after { transform: scaleX(1); }
.hero:not(.hero--scrub) .hero__stages li { color: var(--ink); }
.hero:not(.hero--scrub) .hero__stages li::after { transform: scaleX(1); }

.hero__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--line);
}
.hero__progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  opacity: 0;
}
.hero--scrub.hero--ready .hero__progress span { opacity: 1; }

/* Tablet & phone ---------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --header-h: 64px; --logo-h: 48px; }
  .site-header__inner { gap: 0.75rem; }
  .header-cta { margin-left: auto; }

  .hero--scrub { height: 230vh; }
  .hero__pin {
    grid-template-columns: minmax(0, 1fr);
    align-content: space-between;
    gap: 1.5rem;
    padding: calc(var(--header-h) + clamp(1rem, 3.5svh, 2.5rem)) var(--gutter) clamp(1.25rem, 4svh, 2.5rem);
  }
  .hero__copy { max-width: 640px; grid-column: 1; grid-row: 1; }
  .hero__display { grid-column: 1; grid-row: 2; }
  .hero__title { font-size: clamp(2.4rem, 10.5vw, 4rem); }
  .hero__lede { margin-top: 1rem; font-size: 1rem; }
  .hero__actions { margin-top: 1.4rem; flex-wrap: nowrap; }
  .hero__actions .btn { flex: 1 1 0; min-width: 0; padding: 0 0.8rem; }
  .hero__stages { margin-top: 1.4rem; gap: 0.4rem 1rem; font-size: 0.72rem; }

  /* Full-bleed: the house (porch to garage) spans ~6–94% of the screen. */
  .hero__display {
    justify-self: stretch;
    max-width: none;
    margin: 0 calc(-1 * var(--gutter));
    width: auto;
    overflow-x: clip;
  }
  .hero__media { width: 110vw; margin: -4vw 0 -2vw -5vw; }
  .hero__note { margin-top: 0.9rem; padding: 0 var(--gutter); }
}
@media (max-width: 900px) and (min-width: 600px) {
  .hero__media { width: 96vw; margin: -3vw 0 -2vw 2vw; }
}
@media (max-width: 900px) and (max-height: 780px) {
  .hero__stages { display: none; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .hero__lede { display: none; }
}
@media (max-width: 360px) {
  .hero__actions { flex-wrap: wrap; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Photo frames (shared) — no tint or filter, photos keep original colors
   ========================================================================== */
.photo-frame {
  position: relative;
  display: block;
  overflow: hidden;
  /* Each photo slot sets --ratio to the photo's own shape (e.g. 638 / 360)
     so nothing is cropped and rooflines stay whole. */
  aspect-ratio: var(--ratio, 3 / 2);
  background: var(--surface-2);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   FEATURED PROJECT — left-to-right reveal echoing the metal sweep
   ========================================================================== */
.featured {
  padding: clamp(5rem, 14vh, 9rem) 0 clamp(5rem, 12vh, 8rem);
  background: var(--bg);
}
.featured__figure { margin: 0; }
/* Main photo (06) + secondary angle (07). Capped width: the handoff copies
   are 638 px wide, so this keeps upscaling modest until full-res arrives. */
.featured__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: end;
  max-width: 1340px;
}
.featured__secondary { margin: 0; }
@media (max-width: 900px) {
  .featured__grid { grid-template-columns: 1fr; }
  .featured__secondary { max-width: 560px; }
}
[data-reveal-sweep] { --reveal: 1; }
.motion-ok [data-reveal-sweep] { --reveal: 0; }
.motion-ok [data-reveal-sweep].is-revealed { --reveal: 1; }

.featured__frame {
  clip-path: inset(0 calc((1 - var(--reveal)) * 100%) 0 0);
}
.featured__frame::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--reveal) * 100% - 2px);
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95) 30%, rgba(255, 255, 255, 0.95) 70%, transparent);
  box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.35);
  opacity: 0;
  pointer-events: none;
}
.motion-ok [data-reveal-sweep]:not(.is-revealed) .featured__frame::after { opacity: 1; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services {
  padding: clamp(5rem, 12vh, 9rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.services__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 4vw, 4rem) clamp(1.5rem, 3vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.service {
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-strong);
}
.service__num {
  display: block;
  margin-bottom: 1.6rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.service__title {
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.service__text {
  max-width: 34ch;
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.motion-ok [data-rise] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.motion-ok [data-rise].is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .services__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .services__list { grid-template-columns: 1fr; gap: 2.2rem; }
  .service__num { margin-bottom: 0.9rem; }
}

/* ==========================================================================
   FLOATING GALLERY
   ========================================================================== */
.gallery {
  padding: clamp(5rem, 12vh, 9rem) 0 clamp(7rem, 18vh, 12rem);
  background: var(--bg);
}
.gallery__grid {
  position: relative; /* offsetParent for drift math */
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 4fr);
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
  margin: 0 auto;
  list-style: none;
}
.gallery__item { position: relative; will-change: transform; }
/* Equal photo heights: the 3fr / 3fr / 4fr columns match the photos' 4:3, 4:3
   and 16:9 shapes. The middle photo sits lower, then all three drift gently. */
.gallery__item--b { margin-top: clamp(2.5rem, 7vh, 4.5rem); }
.gallery__grid { max-width: 1340px; }

.gallery__open {
  position: relative;
  display: block;
  text-decoration: none;
  cursor: zoom-in;
  outline-offset: 4px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.gallery__open .photo-frame img { transition: transform 0.6s var(--ease); }
.gallery__open:hover .photo-frame img { transform: scale(1.015); }
.gallery__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 0, 0, 0.78);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.gallery__open:hover .gallery__zoom,
.gallery__open:focus-visible .gallery__zoom { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .gallery__grid { display: block; }
  .gallery__item { margin: 0 0 2.75rem !important; transform: none !important; }
  .gallery__item:last-child { margin-bottom: 0 !important; }
  .gallery__zoom { opacity: 1; transform: none; }
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 48px);
  border: 0;
  background: rgba(0, 0, 0, 0.95);
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.lightbox::backdrop { background: transparent; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  min-height: 0;
  transform: scale(0.98);
  transition: transform 0.2s var(--ease);
}
.lightbox.is-open .lightbox__figure { transform: none; }
.lightbox__img {
  /* Fill the viewer at the photo's own aspect ratio (--lb-ratio set by JS),
     limited by screen width and height. */
  width: min(92vw, 1400px, calc((100svh - 170px) * var(--lb-ratio, 1.5)));
  max-width: none;
  height: auto;
  object-fit: contain;
  background: var(--surface-2);
}
.lightbox__controls { display: flex; align-items: center; gap: 0.6rem; }
.lightbox__btn {
  min-width: 48px;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.lightbox__btn:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.lightbox__count { min-width: 4.5em; text-align: center; font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.lightbox__close { margin-left: 0.8rem; }

/* ==========================================================================
   QUOTE
   ========================================================================== */
.quote {
  padding: clamp(5rem, 13vh, 9rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.quote__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact-list { margin: 2.5rem 0 0; display: grid; gap: 1rem; }
.contact-list div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.contact-list dd { margin: 0; font-size: 0.95rem; color: var(--ink); }

.quote__form {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.optional { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #8e8e8e; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.quote__form .btn--large { justify-self: start; margin-top: 0.4rem; }
.form-status { min-height: 1.5em; font-size: 0.92rem; color: var(--ink-soft); }
.form-status.is-warning {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

@media (max-width: 900px) {
  .quote__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .quote__form .btn--large { justify-self: stretch; }
  .contact-list div { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ==========================================================================
   FOOTER — logo-black surface for the full official lockup
   ========================================================================== */
.site-footer {
  padding: 3.5rem 0 3.5rem;
  background: var(--brand-black);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; }
.brand--footer img { width: clamp(220px, 22vw, 280px); height: auto; }
.site-footer__note { flex-basis: 100%; color: var(--muted); }

/* ==========================================================================
   Reduced motion: static layout, same content
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   MULTI-PAGE ADDITIONS
   ========================================================================== */

/* Navigation: current page + mobile menu -------------------------------- */
.site-nav a { position: relative; padding: 0.4rem 0; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--accent);
}
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }
  .nav-toggle__bars,
  .nav-toggle__bars::before {
    display: block;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s var(--ease);
  }
  .nav-toggle__bars { position: relative; transform: translateY(-2.5px); }
  .nav-toggle__bars::before { content: ""; position: absolute; top: 5px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(-5px) rotate(-90deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin: 0;
    background: var(--brand-black);
    border-bottom: 1px solid var(--line-strong);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1.25rem; }
  .site-nav a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav a[aria-current="page"]::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 0.7rem;
    vertical-align: 0.15em;
    background: var(--accent);
  }
  /* No JavaScript: show the links as a second row instead of a menu */
  .no-js .nav-toggle { display: none; }
  .no-js .site-header { height: auto; }
  .no-js .site-header__inner { flex-wrap: wrap; height: auto; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .no-js .site-nav { position: static; display: block; width: 100%; border: 0; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 1.2rem; padding: 0; }
  .no-js .site-nav a { border: 0; padding: 0.4rem 0; font-size: 0.8rem; }
  .no-js main { padding-top: 48px; }
}
/* Keep name, quote button and menu on one line on phones */
@media (max-width: 480px) {
  .site-header__inner { gap: 0.6rem; }
  .nav-toggle { gap: 0; padding: 0 0.75rem; }
  .nav-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 379px) {
  .header-cta { padding: 0 0.7rem; font-size: 0.8rem; }
}
@media (max-width: 340px) {
  .header-cta { display: none; }
  .nav-toggle { margin-left: auto; }
}

/* Inner page heading ----------------------------------------------------- */
.page-head {
  padding: calc(var(--header-h) + clamp(3.5rem, 10vh, 7rem)) 0 clamp(3rem, 8vh, 5rem);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-title {
  max-width: 16ch;
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.page-intro {
  max-width: 52ch;
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.page-intro a { color: var(--ink); text-underline-offset: 3px; }

/* Home: explore links ---------------------------------------------------- */
.explore {
  padding: clamp(5rem, 12vh, 8rem) 0;
  background: var(--surface-lift);
  border-top: 1px solid rgba(184, 195, 206, 0.32); /* thin silver divider */
}
.explore__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}
.explore__card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 190px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line-strong);
  background: var(--surface-lift-2);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.explore__card .eyebrow { margin-bottom: 0.4rem; }
.explore__card:hover { border-color: var(--ink); background: #2b2f36; }
.explore__title {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.explore__more { margin-top: auto; padding-top: 1.5rem; color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
@media (max-width: 720px) {
  .explore__grid { grid-template-columns: 1fr; }
  .explore__card { min-height: 0; }
}

/* Quote call to action band --------------------------------------------- */
.cta-band {
  padding: clamp(4.5rem, 12vh, 8rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 4rem;
}
.cta-band__actions { flex: none; display: grid; gap: 0.75rem; justify-items: center; }
.cta-band__actions .btn { width: 100%; }
.cta-band__email { color: var(--ink-soft); font-size: 0.95rem; text-underline-offset: 3px; overflow-wrap: anywhere; }
.cta-band__email:hover { color: var(--ink); }
@media (max-width: 600px) {
  .cta-band__actions, .cta-band__actions .btn { width: 100%; }
}

/* Services: installation process ---------------------------------------- */
.photo-frame--portrait { aspect-ratio: 4 / 5; }
.process {
  padding: clamp(5rem, 12vh, 9rem) 0;
  background: var(--bg);
}
.process__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.process__photo {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  margin: 0;
}
.process__steps { margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0; list-style: none; }
.step {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-strong);
}
.step:last-child { border-bottom: 1px solid var(--line-strong); }
.step__num { color: var(--ink); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; padding-top: 0.35rem; font-variant-numeric: tabular-nums; }
.step__title { font-size: clamp(1.2rem, 1.6vw, 1.4rem); letter-spacing: -0.015em; }
.step__text { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.98rem; max-width: 46ch; }
@media (max-width: 900px) {
  .process__grid { grid-template-columns: 1fr; }
  .process__photo { position: static; max-width: 520px; }
}

/* About: team ------------------------------------------------------------ */
.team {
  padding: clamp(5rem, 12vh, 8rem) 0;
  background: var(--bg);
}
.team .section-head .eyebrow { display: none; } /* heading already says it */
.team__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-strong);
}
.team-card__name { font-size: clamp(1.3rem, 1.8vw, 1.55rem); letter-spacing: -0.02em; }
.team-card__title { margin-top: 0.25rem; color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
@media (max-width: 900px) {
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .team__grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* Contact ---------------------------------------------------------------- */
.contact {
  padding: calc(var(--header-h) + clamp(2.5rem, 7vh, 5rem)) 0 clamp(5rem, 12vh, 8rem);
  background: var(--bg);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.85fr) minmax(0, 1fr); /* photo 13 matches the two stacked photos */
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact .page-intro { margin-bottom: 2rem; }
.contact__aside { position: sticky; top: calc(var(--header-h) + 2rem); padding-top: 0.5rem; }
/* Direct phone and email, standing in for the quote form */
.direct-contact { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.direct-contact__link {
  display: grid;
  gap: 0.3rem;
  padding: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.direct-contact__link:hover { border-color: var(--ink); background: var(--surface-2); }
.direct-contact__label { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.direct-contact__value { font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 600; overflow-wrap: anywhere; }

.contact__aside .contact-list { margin-top: 1.5rem; }

.quote-form {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.req { font-weight: 400; color: var(--muted); }
.field-hint { color: var(--muted); font-size: 0.85rem; }
.field-error { display: none; color: #ffb4a8; font-size: 0.88rem; font-weight: 500; }
.field-error:not(:empty) { display: block; }
.field-error:not(:empty)::before { content: "! "; font-weight: 700; }
.field [aria-invalid="true"] { border-color: #ff8f7d; outline: 1px solid #ff8f7d; outline-offset: 0; }
.field-group {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.field-group.is-invalid { border-color: #ff8f7d; }
.field-group legend { padding: 0 0.4rem; color: var(--ink); font-size: 0.85rem; font-weight: 600; }
.quote-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quote-form__submit { justify-self: start; }
.quote-form__submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }

.form-notice,
.form-status:not(:empty) {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 0.95rem;
  outline: none;
}
.form-notice strong, .form-status strong { display: block; margin-bottom: 0.2rem; }
.form-notice--preview { border: 1px solid var(--line-strong); border-left-width: 3px; }
.form-status.is-error { border-left-color: #ff8f7d; background: rgba(255, 143, 125, 0.08); }
.form-status.is-success { border-left-color: #8fd6a4; background: rgba(143, 214, 164, 0.08); }
.form-status.is-test { border-left-color: #e8c56f; background: rgba(232, 197, 111, 0.08); }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__aside { position: static; }
}
@media (max-width: 600px) {
  .quote-form .field-row { grid-template-columns: 1fr; }
  .quote-form__submit { justify-self: stretch; }
  .quote-form { padding: 1.25rem; }
}

/* Footer additions ------------------------------------------------------- */
.site-footer__inner { align-items: flex-start; }
.footer-nav ul { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--ink); }
.footer-contact { display: grid; gap: 0.55rem; margin: 0; }
.footer-contact div { display: flex; gap: 0.8rem; }
.footer-contact dt { min-width: 6.5rem; color: var(--muted); }
.footer-contact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.footer-contact a { color: var(--ink); text-underline-offset: 3px; }
.site-footer__legal { flex-basis: 100%; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.site-footer__note { margin-top: -0.75rem; }
@media (max-width: 600px) {
  .hero__note { font-size: 0.72rem; letter-spacing: 0.08em; white-space: nowrap; }
}

/* More completed work (Home): 13 leads, 01 and 05 beside it ---------------- */
.more-work {
  padding: clamp(5rem, 12vh, 8rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.more-work__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.85fr) minmax(0, 1fr); /* photo 13 matches the two stacked photos */
  grid-template-rows: auto auto;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  max-width: 1340px;
  margin: 0 auto;
  list-style: none;
  align-items: start;
}
.more-work__item--lead { grid-column: 1; grid-row: 1 / span 2; }
.more-work__item--a { grid-column: 2; grid-row: 1; }
.more-work__item--b { grid-column: 2; grid-row: 2; }
@media (max-width: 900px) {
  .more-work__grid { grid-template-columns: 1fr; }
  .more-work__item--lead, .more-work__item--a, .more-work__item--b { grid-column: 1; grid-row: auto; }
}

/* Business details read best stacked in the narrow column */
.contact__aside .contact-list div { grid-template-columns: 1fr; gap: 0.2rem; }

/* Touch devices ------------------------------------------------------------ */
a, button { touch-action: manipulation; }
@media (hover: none) {
  .gallery__open:hover .photo-frame img { transform: none; } /* no stuck zoom after a tap */
}
html:has(.lightbox[open]) { overflow: hidden; } /* page stays put behind the viewer */
.lightbox { padding-bottom: max(clamp(16px, 4vw, 48px), env(safe-area-inset-bottom)); }
.site-footer { padding-bottom: max(3.5rem, calc(1.5rem + env(safe-area-inset-bottom))); }

/* Phones: one section rhythm, one photo gap, full-size tap targets --------- */
@media (max-width: 900px) {
  .btn--small { min-height: 44px; }
  .nav-toggle { min-width: 44px; min-height: 44px; justify-content: center; }
  .footer-nav ul { gap: 0; }
  .footer-nav a { display: block; padding: 0.7rem 0; }
  .footer-contact { gap: 0; }
  .footer-contact div { padding: 0.75rem 0; }
  .footer-contact a { display: block; margin: -0.75rem 0; padding: 0.75rem 0; }
  .site-footer__legal { margin-top: 0; }
}
@media (max-width: 720px) {
  .featured, .gallery, .more-work, .explore, .cta-band, .services, .process, .team {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
  .featured { padding-bottom: 0; } /* Featured and Gallery share a background */
  .page-head { padding-bottom: 3rem; }
  .contact { padding-bottom: 4.5rem; }
  .section-head { margin-bottom: 2rem; }
  .featured__grid { gap: 1.25rem; }
  .featured__secondary { max-width: none; }
  .gallery__item { margin-bottom: 1.25rem !important; will-change: auto; }
  .process__photo { max-width: none; }
  .cta-band__email { display: inline-block; padding: 0.65rem 0; }
}
@media (max-width: 480px) {
  .hero__copy .eyebrow { font-size: 0.7rem; letter-spacing: 0.12em; text-wrap: balance; }
  .hero__stages { gap: 0.4rem 0.7rem; font-size: 0.69rem; }
}

/* Small, short phones: drop the second hero button so the house stays in frame */
@media (max-width: 360px) and (max-height: 620px) {
  .hero__actions .btn--ghost { display: none; }
}

/* Phones held sideways: copy beside the house, as on desktop */
@media (max-height: 500px) and (orientation: landscape) {
  .hero__pin {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-content: center;
    gap: 1.5rem;
    padding: calc(var(--header-h) + 0.5rem) var(--gutter) 0.5rem;
  }
  .hero__copy { grid-column: 1; grid-row: 1; }
  .hero__display { grid-column: 2; grid-row: 1; justify-self: stretch; width: 100%; max-width: none; margin: 0; overflow-x: visible; }
  .hero__media { width: 100%; margin: 0; }
  .hero__note { margin-top: 0.4rem; padding: 0; }
  .hero__copy .eyebrow { margin-bottom: 0.5rem; }
  .hero__title { font-size: clamp(1.9rem, 5vw, 2.6rem); }
  .hero__lede, .hero__stages { display: none; }
  .hero__actions { margin-top: 0.9rem; flex-wrap: nowrap; }
  .hero__actions .btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 0 0.6rem; font-size: 0.85rem; }
  .site-nav { max-height: calc(100svh - var(--header-h)); overflow-y: auto; }
  .lightbox__img { width: min(92vw, 1400px, calc((100svh - 110px) * var(--lb-ratio, 1.5))); }
}
