/* ============================================================
   Sage Built — marketing site
   Brand: deep forest green (#0B340C) sampled from the SB logo,
   warm cream neutrals, Cinzel / Cormorant Garamond / Inter.
   Matches the Sage Built Ops app theme.
   ============================================================ */

:root {
  /* Brand */
  --forest: #0B340C;
  --forest-deep: #06210A;
  --forest-tint: #E9F0E7;
  --forest-soft: #C3D6C0;

  /* Neutrals (matched to the app) */
  --cream: #F5EFE6;
  --cream-deep: #EDE5D8;
  --cream-light: #FAF6EF;
  --white: #FFFFFF;
  --warm-white: #FCFAF6;

  --ink: #1A1A1A;
  --ink-soft: #2D2D2D;
  --stone: #6B6B6B;
  --stone-soft: #9B9B9B;
  --line: #E5DFD6;
  --line-soft: #EDE7DD;

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cinzel', 'Cormorant Garamond', Georgia, serif;

  /* Rhythm */
  --wrap: 1180px;
  --gap: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --radius: 3px;
  --shadow: 0 18px 50px -24px rgba(11, 52, 12, 0.35);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-light);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; color: var(--forest); letter-spacing: 0.01em; }
.serif { font-family: var(--font-serif); }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { color: var(--ink-soft); }
.lead { font-family: var(--font-serif); font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.5; color: var(--ink-soft); font-weight: 400; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--forest);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--forest-soft); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
section { padding-block: var(--section-y); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-head h2 + p { margin-top: 1.1rem; }
.divider { width: 54px; height: 2px; background: var(--forest); margin: 1.4rem 0; }
.section-head.center .divider { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 1.05em 2.1em; border-radius: var(--radius);
  border: 1.5px solid var(--forest); background: var(--forest); color: var(--cream-light);
  transition: all 0.3s var(--ease);
}
.btn:hover { background: var(--forest-deep); border-color: var(--forest-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--forest); }
.btn.ghost:hover { background: var(--forest); color: var(--cream-light); }
.btn.on-dark { background: var(--white); color: var(--forest); border-color: var(--white); }
.btn.on-dark:hover { background: transparent; color: var(--white); border-color: var(--white); }
.btn.ghost.on-dark { background: transparent; color: var(--cream-light); border-color: rgba(245,239,230,0.5); }
.btn.ghost.on-dark:hover { background: var(--cream-light); color: var(--forest); border-color: var(--cream-light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 239, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s var(--ease);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header.scrolled { box-shadow: 0 6px 26px -18px rgba(11,52,12,0.5); }
.site-header .wrap { padding-inline: clamp(0.85rem, 2vw, 1.4rem); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 98px; }
.brand { display: flex; align-items: center; gap: 0.7rem; margin-left: -0.6rem; }
.brand img { height: 68px; width: auto; }
.brand .brand-name { display: none; }
.nav-links { display: flex; align-items: center; gap: 2.1rem; list-style: none; }
.nav-links a {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-soft); position: relative; padding-block: 0.4rem;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px;
  background: var(--forest); transition: width 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--forest); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 1.2rem; }
.nav-phone { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: var(--forest); }
.nav-phone svg { width: 15px; height: 15px; }
.nav-login { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--forest); color: var(--cream-light); border: 1.5px solid var(--forest); border-radius: 3px; padding: 0.62em 1.05em; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; transition: all 0.25s var(--ease); }
.nav-login:hover { background: var(--forest-deep); border-color: var(--forest-deep); transform: translateY(-1px); }
.nav-login svg { width: 14px; height: 14px; }
@media (max-width: 680px) { .nav-login { padding: 0.5em 0.75em; font-size: 0.64rem; letter-spacing: 0.08em; } }
.nav-toggle { display: none; background: none; border: none; width: 30px; height: 24px; position: relative; }
.nav-toggle span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--forest); transition: all 0.3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 20px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 11px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-start; background: var(--cream); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background:
    linear-gradient(180deg, rgba(38,27,16,0.40) 0%, rgba(38,27,16,0.06) 28%, rgba(38,27,16,0.10) 52%, rgba(38,27,16,0.70) 80%, rgba(38,27,16,0.95) 100%),
    linear-gradient(100deg, rgba(38,27,16,0.55) 0%, rgba(38,27,16,0.20) 48%, rgba(38,27,16,0.02) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 620px; padding-block: 0 3rem; align-self: flex-start; text-align: center; }
.hero .eyebrow { color: var(--forest-soft); }
.hero h1 { color: var(--cream-light); margin: 0; font-size: clamp(2.6rem, 5.6vw, 4.4rem); }
.hero h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.hero-tag { font-family: var(--font-serif); font-size: clamp(1.2rem, 2.6vw, 1.9rem); color: var(--cream); margin-top: 1.2rem; font-weight: 400; letter-spacing: 0.02em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; justify-content: center; }
.hero-scroll { position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%); z-index: 1; color: var(--cream); font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.85; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.hero-scroll::after { content: ""; width: 1px; height: 40px; background: linear-gradient(var(--cream), transparent); animation: scrollpulse 2s var(--ease) infinite; }
@keyframes scrollpulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- Photo slots (swap for real photos) ---------- */
.photo-slot {
  position: relative; background:
    linear-gradient(135deg, rgba(11,52,12,0.10), rgba(11,52,12,0.02)),
    repeating-linear-gradient(45deg, var(--cream-deep) 0 22px, var(--cream) 22px 44px);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.photo-slot::before {
  content: attr(data-label); position: absolute; z-index: 1;
  font-family: var(--font-body); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--stone); padding: 0.5em 1em; border: 1px solid var(--line); border-radius: 40px; background: rgba(255,255,255,0.6);
}
.hero-media.photo-slot { background:
    linear-gradient(120deg, var(--forest-deep), var(--forest) 55%, #16401a);
}
.hero-media.photo-slot::before { display: none; }

/* ---------- Intro / statement ---------- */
.statement { background: var(--warm-white); }
.statement .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.statement-body .lead { margin-top: 1.2rem; }
.statement-body p + p { margin-top: 1.1rem; }
.statement-img { aspect-ratio: 4 / 5; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.statement-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Stats ---------- */
.stats { background: var(--forest); color: var(--cream-light); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--cream-light); line-height: 1; }
.stat .label { display: block; margin-top: 0.7rem; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--forest-soft); }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 2rem); }
.service-card {
  background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-card .photo-slot { aspect-ratio: 3 / 2; }
.service-card .card-photo { aspect-ratio: 3 / 2; overflow: hidden; }
.service-card .card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.service-card:hover .card-photo img { transform: scale(1.04); }
.service-card .card-body { padding: 1.8rem 1.8rem 2rem; }
.service-card .card-num { font-family: var(--font-serif); font-style: italic; color: var(--forest-soft); font-size: 1.1rem; }
.service-card h3 { margin: 0.4rem 0 0.7rem; }
.service-card p { font-size: 0.95rem; }
.service-card .card-link { margin-top: 1.2rem; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--forest); }
.service-card .card-link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.service-card:hover .card-link svg { transform: translateX(4px); }

/* ---------- Values ---------- */
.values { background: var(--cream); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); margin-top: 1rem; }
.value { }
.value .v-mark { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--forest); border-radius: 50%; color: var(--forest); margin-bottom: 1.2rem; }
.value .v-mark svg { width: 20px; height: 20px; }
.value h3 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 0.5rem; }
.value p { font-size: 0.96rem; }

/* ---------- Featured projects ---------- */
.projects-preview .wrap { }
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); }
.proj-grid.gallery { grid-template-columns: repeat(3, 1fr); }
.proj-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.proj-tile.tall { aspect-ratio: 3 / 4; }
.proj-tile .photo-slot { position: absolute; inset: 0; transition: transform 0.6s var(--ease); }
.proj-tile:hover .photo-slot { transform: scale(1.05); }
.proj-tile .tile-photo { position: absolute; inset: 0; overflow: hidden; }
.proj-tile .tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.proj-tile:hover .tile-photo img { transform: scale(1.05); }
.proj-tile .proj-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.4rem; background: linear-gradient(transparent, rgba(11,52,12,0.72)); color: var(--cream-light); opacity: 1; transform: translateY(0); transition: all 0.35s var(--ease); }
.proj-tile .proj-cap .p-name { font-family: var(--font-display); font-size: 1.2rem; }
.proj-tile .proj-cap .p-meta { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--forest-soft); margin-top: 0.2rem; }

/* Project cards (Projects page — caption always visible) */
.proj-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); }
.proj-card { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
a.proj-card, a.proj-card:hover { text-decoration: none; color: inherit; }
.proj-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.proj-card .photo-slot { aspect-ratio: 4 / 3; }

/* Real project photo cover + gallery trigger */
.proj-card .pc-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer; }
.proj-card .pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.proj-card:hover .pc-photo img { transform: scale(1.05); }
.proj-card .pc-photo:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.pc-count { position: absolute; right: 0.7rem; bottom: 0.7rem; z-index: 2; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--cream-light); background: rgba(11,52,12,0.72); padding: 0.4em 0.8em; border-radius: 40px; pointer-events: none; }

/* Project detail page — hero back-link, meta, and photo gallery grid */
.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--forest); text-decoration: none; }
.back-link:hover { color: var(--forest-deep, var(--forest)); }
.project-meta { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.6rem; }
.gallery-section { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
/* Masonry layout — photos keep their natural proportions (portraits tall, landscapes wide) */
.gallery-grid { column-count: 3; column-gap: clamp(0.6rem, 1.5vw, 1rem); }
.gallery-grid .g-item { display: block; width: 100%; margin: 0 0 clamp(0.6rem, 1.5vw, 1rem); padding: 0; border: none; background: none; cursor: pointer; overflow: hidden; border-radius: var(--radius); line-height: 0; break-inside: avoid; -webkit-column-break-inside: avoid; }
.gallery-grid .g-item img { width: 100%; height: auto; display: block; transition: transform 0.5s var(--ease); }
.gallery-grid .g-item:hover img { transform: scale(1.03); }
.gallery-grid .g-item:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
@media (max-width: 780px) { .gallery-grid { column-count: 2; } }
@media (max-width: 480px) { .gallery-grid { column-count: 1; } }
/* Feature photo spans the full width of the masonry, breaking the uniform grid */
.gallery-grid .g-item.feature { -webkit-column-span: all; column-span: all; }
/* Even grid variant — for galleries whose photos are all the same shape (no masonry gaps).
   Feature spans 2 columns as a wide banner so every row fills completely. */
.gallery-grid.even { column-count: initial; display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: clamp(0.6rem, 1.5vw, 1rem); }
.gallery-grid.even .g-item { margin: 0; }
.gallery-grid.even .g-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery-grid.even .g-item.feature { grid-column: span 2; }
.gallery-grid.even .g-item.feature img { aspect-ratio: 8 / 3; }
@media (max-width: 780px) { .gallery-grid.even { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid.even { grid-template-columns: 1fr; } .gallery-grid.even .g-item.feature { grid-column: span 1; } .gallery-grid.even .g-item.feature img { aspect-ratio: 4 / 3; } }
/* Before / After divider banner on renovation galleries */
.ba-label { text-align: center; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; font-size: clamp(1rem, 2.2vw, 1.3rem); color: var(--forest); background: var(--forest-tint); padding: 0.75em 1em; border-radius: 6px; margin: 0 0 clamp(1rem, 2.5vw, 1.5rem); }
.ba-label.after { margin-top: clamp(1.6rem, 4vw, 2.6rem); }

/* Photo lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(11,20,11,0.93); }
.lightbox.open { display: flex; }
.lb-img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 4px; box-shadow: 0 12px 44px rgba(0,0,0,0.55); }
.lb-close, .lb-prev, .lb-next { position: absolute; background: none; border: none; color: var(--cream-light); cursor: pointer; opacity: 0.82; transition: opacity 0.2s var(--ease); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 1rem; right: 1.4rem; font-size: 2.4rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 1rem; }
.lb-prev { left: 0.6rem; } .lb-next { right: 0.6rem; }
.lb-caption { position: absolute; bottom: 1.2rem; left: 0; right: 0; text-align: center; color: var(--cream-light); font-size: 0.9rem; letter-spacing: 0.05em; }
.lb-caption .lb-count { color: var(--forest-soft); }
@media (max-width: 680px) { .lb-prev, .lb-next { font-size: 2.2rem; padding: 0.5rem; } .lb-close { font-size: 2rem; } }
.proj-card .pc-body { padding: 1.25rem 1.4rem 1.5rem; }
.proj-card .pc-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--forest); line-height: 1.2; }
.proj-card .pc-loc { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.4rem; }
.proj-card .pc-status { display: inline-block; margin-top: 0.9rem; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--forest); background: var(--forest-tint); padding: 0.4em 0.85em; border-radius: 40px; }
.proj-card .pc-status.building { color: #7A5A16; background: #FAF1DD; }
@media (max-width: 900px) { .proj-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .proj-list { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--forest); color: var(--cream-light); text-align: center; }
.cta-band h2 { color: var(--cream-light); }
.cta-band h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.cta-band p { color: var(--forest-soft); max-width: 560px; margin: 1.2rem auto 0; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Page header (interior pages) ---------- */
.page-hero { background: var(--forest); color: var(--cream-light); padding-block: clamp(3.5rem, 8vw, 6rem); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -6%; top: -30%; width: 420px; height: 420px; border: 1px solid rgba(195,214,192,0.16); border-radius: 50%; }
.page-hero .eyebrow { color: var(--forest-soft); }
.page-hero h1 { color: var(--cream-light); margin-top: 1rem; }
.page-hero p { color: var(--forest-soft); max-width: 620px; margin-top: 1.2rem; font-family: var(--font-serif); font-size: 1.25rem; }
.crumbs { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--forest-soft); margin-bottom: 1.4rem; }
.crumbs a:hover { color: var(--cream-light); }

/* ---------- About ---------- */
.about-story .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-img { aspect-ratio: 4 / 5; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.about-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.about-story p + p { margin-top: 1.1rem; }
.signature { margin-top: 2rem; }
.signature .s-name { font-family: var(--font-serif); font-size: 1.5rem; color: var(--forest); }
.signature .s-title { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin-top: 0.2rem; }

/* ---------- Process ---------- */
.process { background: var(--warm-white); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 3vw, 2rem); margin-top: 1rem; counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 0; left: 0; font-family: var(--font-display); font-size: 1.6rem; color: var(--forest-soft); }
.step::after { content: ""; position: absolute; top: 0.9rem; left: 3.4rem; right: -1rem; height: 1px; background: var(--line); }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.92rem; }

/* ---------- Services detail ---------- */
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.svc-row + .svc-row { margin-top: clamp(3rem, 7vw, 6rem); }
.svc-row.flip .svc-media { order: 2; }
.svc-media { aspect-ratio: 5 / 4; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-copy .eyebrow { margin-bottom: 0.9rem; }
.svc-copy ul { list-style: none; margin-top: 1.4rem; display: grid; gap: 0.7rem; }
.svc-copy li { position: relative; padding-left: 1.7rem; font-size: 0.96rem; color: var(--ink-soft); }
.svc-copy li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; background: var(--forest); border-radius: 50%; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.contact-info .info-item { display: flex; gap: 1rem; padding-block: 1.3rem; border-bottom: 1px solid var(--line-soft); }
.contact-info .info-item:first-of-type { border-top: 1px solid var(--line-soft); }
.info-item .i-mark { flex-shrink: 0; width: 42px; height: 42px; border: 1.5px solid var(--forest); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--forest); }
.info-item .i-mark svg { width: 18px; height: 18px; }
.info-item .i-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone); }
.info-item .i-value { font-family: var(--font-serif); font-size: 1.25rem; color: var(--forest); margin-top: 0.15rem; }
.info-item .i-value:hover { color: var(--forest-deep); }

.contact-form { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.98rem; color: var(--ink);
  padding: 0.85em 1em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream-light);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-tint); }
.field textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.contact-form .btn { width: 100%; justify-content: center; margin-top: 0.4rem; }
.form-note { font-size: 0.8rem; color: var(--stone); margin-top: 1rem; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: var(--forest-soft); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(195,214,192,0.16); }
.footer-brand img { height: 54px; filter: brightness(0) invert(1) sepia(0.2) saturate(2) hue-rotate(60deg); opacity: 0.92; }
.footer-brand p { color: var(--forest-soft); margin-top: 1.1rem; max-width: 320px; font-family: var(--font-serif); font-size: 1.15rem; }
.footer-col h4 { color: var(--cream-light); font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.7rem; }
.footer-col a, .footer-col p { color: var(--forest-soft); font-size: 0.92rem; }
.footer-col a:hover { color: var(--cream-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; font-size: 0.8rem; color: rgba(195,214,192,0.7); }
.footer-bottom a:hover { color: var(--cream-light); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services-grid, .values-grid, .steps, .proj-grid.gallery { grid-template-columns: repeat(2, 1fr); }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .statement .wrap, .about-story .wrap, .svc-row, .contact-grid { grid-template-columns: 1fr; }
  .svc-row.flip .svc-media { order: 0; }
  .statement-img, .about-img, .svc-media { aspect-ratio: 16 / 10; max-height: 420px; width: 100%; }
  .step::after { display: none; }
}
@media (max-width: 680px) {
  /* Compact header so the logo + buttons fit on one clean row on phones */
  .nav { height: 64px; }
  .brand { margin-left: 0; }
  .brand img { height: 42px; }
  .nav-cta { gap: 1.15rem; }
  .nav-links { position: fixed; inset: calc(64px + env(safe-area-inset-top, 0px)) 0 auto 0; background: var(--cream-light); flex-direction: column; align-items: flex-start; gap: 0; padding: 1rem var(--gap) 2rem; border-bottom: 1px solid var(--line); transform: translateY(-140%); transition: transform 0.4s var(--ease); box-shadow: var(--shadow); }
  body.nav-open .nav-links { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
  .nav-toggle { display: block; }
  .nav-phone span { display: none; }
  .services-grid, .values-grid, .steps, .proj-grid, .proj-grid.gallery { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  /* Footer: brand/tagline on top, the two link columns side-by-side so it isn't one long stack */
  .site-footer { padding-block: clamp(2.4rem, 8vw, 3.5rem) 1.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 1.6rem 1.4rem; padding-bottom: 1.8rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand img { height: 44px; }
  .footer-brand p { margin-top: 0.6rem; font-size: 1.05rem; max-width: none; }
  .footer-col h4 { margin-bottom: 0.7rem; }
  .footer-col ul { gap: 0.55rem; }
  .footer-bottom { padding-top: 1.4rem; }
  .hero-actions .btn, .cta-band .btn { flex: 1 1 100%; justify-content: center; }

  /* Home hero — heading + tagline pinned to the top above the house; buttons stay at the bottom over the grass */
  .hero { min-height: 82vh; align-items: stretch; }
  /* Zoom in from the lower frame: crops some sky off the top and brings the house up bigger */
  .hero-media img { object-position: 50% 45%; transform: scale(1.3); transform-origin: 50% 74%; }
  .hero-inner { display: flex; flex-direction: column; width: 100%; align-self: stretch; padding-block: 2.2rem 2.4rem; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.5rem); }
  .hero-tag { font-size: clamp(1.2rem, 5.4vw, 1.65rem); margin-top: 0.9rem; }
  /* margin-top:auto pushes the buttons down to the bottom, separating them from the top text */
  .hero-actions { margin-top: auto; }
  /* Darken the top (behind the heading over the sky) and the bottom (behind the buttons over the grass); keep the house clear in the middle */
  .hero-media::after { background:
      linear-gradient(180deg, rgba(38,27,16,0.55) 0%, rgba(38,27,16,0.14) 22%, rgba(38,27,16,0) 42%, rgba(38,27,16,0.34) 66%, rgba(38,27,16,0.86) 100%); }

  /* Interior page hero — tighter */
  .page-hero { padding-block: clamp(2.5rem, 12vw, 4rem); }
  .page-hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }

  /* Masonry galleries single column on phones */
  .gallery-grid { column-count: 1; }

  /* Tighten section rhythm a touch on phones */
  section { padding-block: clamp(3rem, 11vw, 5rem); }

  /* Portrait photos (staircase, Jon & Nicole) keep their tall shape and center on phones */
  .statement-img, .about-img { aspect-ratio: 4 / 5; max-height: none; max-width: 440px; margin-inline: auto; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
