/* Fluid scale (same system as /matrix): everything is sized in rem. 1rem = 16px up to a 1440px-wide
   screen; beyond that the whole page scales up proportionally — limited by screen height so
   ultrawides don't get huge. Media queries stay in px so breakpoints don't move. */
html { font-size: max(16px, min(100vw / 90, 100vh / 45)); }

:root {
  --green: #082F26;
  --green-dk: #041F1A;
  --green-lt: #12463A;
  --cream: #F7F4EC;
  --cream-dk: #ECE6D6;
  --gold: #E9B64A;
  --gold-lt: #F3CD78;
  --charcoal: #222222;
  --white: #FFFFFF;
  --muted: #5B5A52;
  --line: rgba(8,47,38,0.14);
  --serif: 'Young Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --script: 'Caveat', 'Bradley Hand', cursive;
  --max: 87.5rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --header-h: 5.5rem;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
h2 { text-wrap: balance; }
p { margin: 0; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 0.1875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 1rem; top: -3.75rem; z-index: 300;
  background: var(--green); color: #fff; padding: 0.625rem 1rem; font-size: 0.875rem;
}
.skip-link:focus { top: 1rem; }
.gold { color: var(--gold); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Small section headings — set like a lumber stamp, led by the Diamond D mark */
.kicker {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.8125rem; font-weight: 650; font-stretch: 82%;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green);
}
.kicker-gold { color: var(--gold); }
.diamond {
  width: 0.5625rem; height: 0.5625rem; flex-shrink: 0;
  border: 1.5px solid currentColor; transform: rotate(45deg);
  position: relative;
}
.diamond::after { content: ''; position: absolute; inset: 2px; background: currentColor; }

/* Diamond badge for icons — the brand's shape, not a generic circle */
.badge {
  position: relative; display: grid; place-items: center; flex-shrink: 0;
  width: 3rem; height: 3rem; color: var(--gold);
}
.badge::before {
  content: ''; position: absolute; inset: 0.4375rem;
  background: var(--green); transform: rotate(45deg);
  box-shadow: 0 0 0 0.25rem #fff;
  transition: background .35s var(--ease), transform .5s var(--ease-out);
}
.badge .ico { position: relative; width: 1.25rem; height: 1.25rem; }
.badge-gold { color: var(--green); }
.badge-gold::before { background: var(--gold); box-shadow: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 2.875rem; padding: 0 1.375rem;
  border: 1.5px solid transparent; border-radius: 0.25rem;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 650; letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .1s; }
.btn-lg { min-height: 3.375rem; padding: 0 1.875rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-gold {
  background: var(--gold); color: var(--green-dk);
  box-shadow: inset 0 -3px 0 rgba(120,80,10,.22), 0 0.75rem 1.5rem -0.875rem rgba(233,182,74,.7);
}
.btn-gold:hover { background: var(--gold-lt); box-shadow: inset 0 -3px 0 rgba(120,80,10,.22), 0 1rem 2rem -0.875rem rgba(233,182,74,.85); }
.btn-green { background: var(--green); color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.btn-green:hover { background: var(--green-lt); }
.btn-outline { background: rgba(4,31,26,.25); color: #fff; border-color: rgba(255,255,255,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-outline:hover { background: #fff; color: var(--green); border-color: #fff; }
.text-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 650; color: var(--green); text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* ============ IMAGE PLACEHOLDER FALLBACK ============ */
.ph { position: relative; background: var(--cream-dk); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.img-error img { display: none; }
.ph.img-error::before {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0.75rem;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em;
  color: #8a8274;
  background: repeating-linear-gradient(135deg, #ebe5d6, #ebe5d6 0.625rem, #e1d9c7 0.625rem, #e1d9c7 1.25rem);
}
.ph.ph-dark { background: var(--green-dk); }
.ph.ph-dark.img-error::before {
  color: rgba(255,255,255,.45);
  background: repeating-linear-gradient(135deg, #072a22, #072a22 0.625rem, #0a3329 0.625rem, #0a3329 1.25rem);
}
.ph.ph-corner.img-error::before { align-items: flex-start; justify-content: flex-end; padding: 1.25rem 1.5rem; }
.ph.ph-left.img-error::before { justify-content: flex-start; padding-left: 8%; }
.ph.ph-right.img-error::before { justify-content: flex-end; padding-right: 8%; }
.ph.ph-clear { background: transparent; }
.ph.ph-clear.img-error::before {
  color: rgba(255,255,255,.75);
  background: rgba(4,31,26,.35);
  border: 1.5px dashed rgba(255,255,255,.4); border-radius: 0.375rem;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: var(--cream);
  transition: height .45s var(--ease), box-shadow .45s var(--ease), background .45s;
}
.site-header.scrolled {
  height: 4.5rem;
  background: rgba(247,244,236,.9);
  backdrop-filter: blur(0.875rem) saturate(1.2); -webkit-backdrop-filter: blur(0.875rem) saturate(1.2);
  box-shadow: 0 1px 0 var(--line), 0 0.75rem 1.75rem -1.25rem rgba(4,31,26,.35);
}
.header-inner { display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.875rem; flex-shrink: 0; margin-right: auto; }
.brand-logo { width: 11.25rem; height: 3.5rem; background: transparent; transition: height .45s var(--ease); }
.brand-logo img { object-fit: contain; object-position: left center; }
.site-header.scrolled .brand-logo { height: 3rem; }
.brand-sub {
  padding-left: 0.875rem; border-left: 1px solid rgba(8,47,38,.25);
  font-size: 0.8125rem; font-weight: 650; font-stretch: 82%;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--green);
  line-height: 1.8;
}

.main-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.375rem); }
.main-nav a {
  position: relative; padding: 0.5rem 0;
  font-size: 0.9688rem; font-weight: 500; color: var(--charcoal);
  transition: color .25s;
}
.main-nav a::after {
  content: ''; position: absolute; left: 50%; bottom: -0.125rem;
  width: 0.375rem; height: 0.375rem; margin-left: -0.1875rem;
  background: var(--gold); transform: rotate(45deg) scale(0);
  transition: transform .35s var(--ease-out);
}
.main-nav a:hover, .main-nav a.active { color: var(--green); }
.main-nav a:hover::after, .main-nav a.active::after { transform: rotate(45deg) scale(1); }
.header-call { margin-left: 0.5rem; }

.menu-toggle {
  display: none; position: relative; z-index: 120;
  width: 2.875rem; height: 2.875rem; border: 0;
  background: transparent; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 0.75rem; right: 0.75rem; height: 2px;
  background: var(--green); transition: transform .4s var(--ease-out), top .4s var(--ease-out), left .4s var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 1.0625rem; }
.menu-toggle span:nth-child(2) { top: 1.6875rem; left: 1.25rem; }
.menu-open .menu-toggle span:nth-child(1) { top: 1.375rem; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 1.375rem; left: 0.75rem; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
  background: var(--cream);
  display: flex; flex-direction: column; gap: 2rem;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .55s var(--ease-out), visibility 0s .55s;
  overflow-y: auto;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--ease-out); }
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a {
  padding: 0.875rem 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.875rem; color: var(--green);
  opacity: 0; transform: translateY(0.75rem);
  transition: opacity .45s var(--ease), transform .45s var(--ease-out);
}
.menu-open .mobile-nav a { opacity: 1; transform: none; }
.menu-open .mobile-nav a:nth-child(1) { transition-delay: .12s; }
.menu-open .mobile-nav a:nth-child(2) { transition-delay: .16s; }
.menu-open .mobile-nav a:nth-child(3) { transition-delay: .2s; }
.menu-open .mobile-nav a:nth-child(4) { transition-delay: .24s; }
.menu-open .mobile-nav a:nth-child(5) { transition-delay: .28s; }
.mobile-menu-cta { display: grid; gap: 0.75rem; }
.mobile-menu-cta .btn { min-height: 3.375rem; font-size: 1rem; }
.mobile-menu-meta { font-size: 0.875rem; color: var(--muted); }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(40rem, calc(100svh - var(--header-h)), 60rem);
  display: flex; align-items: stretch;
  background: var(--green-dk); color: #fff;
}
.layer { will-change: transform; }
.hero-photo { position: absolute; inset: 0; z-index: -4; }
.hero-bg { width: 100%; height: 100%; }
.hero-bg img { object-position: 50% 62%; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-video.ready { opacity: 1; }
.hero-sun {
  position: absolute; z-index: -3; right: -10%; top: -20%; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(233,182,74,.28), rgba(233,182,74,.08) 55%, transparent);
  mix-blend-mode: screen; pointer-events: none;
}
.ridge { position: absolute; left: 0; width: 100%; pointer-events: none; }
.ridge-far { z-index: -2; bottom: 0; height: 36%; }
.ridge-far path { fill: var(--green-dk); opacity: .38; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(4,31,26,.9) 0%, rgba(4,31,26,.66) 32%, rgba(4,31,26,.16) 60%, rgba(4,31,26,0) 78%),
    linear-gradient(180deg, rgba(4,31,26,.3) 0%, rgba(4,31,26,0) 20%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem;
  align-items: end;
}
.hero-content { align-self: center; padding: 4rem 0 7rem; }
.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.875rem, 4.9vw, 4.375rem); line-height: 1.02; letter-spacing: -0.02em;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .line > span { display: block; }
.hero-lead { margin-top: 1.75rem; max-width: 30rem; font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; color: rgba(255,255,255,.86); }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.875rem; }

.hero-dave { position: relative; align-self: end; justify-self: end; width: min(100%, 32rem); }
.dave-cutout { width: 100%; aspect-ratio: 4 / 5; }
.dave-cutout img { object-fit: contain; object-position: bottom center; }
.dave-note {
  position: absolute; left: -9rem; top: 46%;
  font-family: var(--script); font-size: 1.875rem; font-weight: 600; line-height: 1;
  color: var(--gold); white-space: nowrap; transform: rotate(-7deg);
  text-shadow: 0 2px 0.875rem rgba(4,31,26,.7);
}
.note-text { display: block; }
.note-text > span { display: inline; }
.btn-arrow { display: none; }
.note-arrow {
  position: absolute; left: 58%; top: 1.5rem; width: 4.75rem; height: 3.125rem;
  fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 4px rgba(4,31,26,.6));
}
.ridge-near { z-index: 3; bottom: -1px; height: 7.5rem; }
.rn-back { fill: var(--green); opacity: .55; }
.rn-front { fill: var(--green); }
.hero-coords {
  position: absolute; z-index: 4; right: var(--gutter); bottom: 1.125rem;
  font-size: 0.75rem; font-weight: 500; font-stretch: 85%; letter-spacing: 0.12em;
  color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums;
}

/* Page-load sequence: photo settles, headline lines rise out of their masks, Dave steps up,
   then the handwritten note writes itself in. Only runs when JS is on (html.js). */
.js .hero-bg img { animation: heroSettle 2s var(--ease-out) both; }
@keyframes heroSettle { from { filter: brightness(.6); } to { filter: none; } }
.js .load { opacity: 0; transform: translateY(1rem); animation: rise 1s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * .11s + .15s); }
.js .load-line { transform: translateY(105%); animation: lineUp 1.1s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * .11s + .15s); }
.js .load-rise { opacity: 0; transform: translateY(3rem); animation: rise 1.4s var(--ease-out) .55s forwards; }
.js .ridge-near { transform: translateY(40%); animation: ridgeUp 1.6s var(--ease-out) .1s forwards; }
.js .note-text { clip-path: inset(-20% 100% -20% 0); animation: write 1.1s steps(18, end) 1.6s forwards; }
.js .note-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s var(--ease) 2.6s forwards; }
.js .note-arrow path + path { animation-delay: 3.1s; animation-duration: .3s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes lineUp { to { transform: none; } }
@keyframes ridgeUp { to { transform: none; } }
@keyframes write { to { clip-path: inset(-20% -5% -20% 0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============ TRUST BAR ============ */
.trust { position: relative; z-index: 2; background: var(--green); color: #fff; padding: 0.75rem 0 2.25rem; }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-list li {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.9688rem; font-weight: 600; font-stretch: 92%; line-height: 1.3;
}
.trust-list li + li { border-left: 1px solid rgba(255,255,255,.16); }
.trust-list .ico { width: 2.125rem; height: 2.125rem; stroke-width: 1.3; }
.t-text > span { display: block; }

/* ============ TOPO TEXTURE ============ */
.topo-bg { position: relative; isolation: isolate; }
.topo-bg::before {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: var(--green); opacity: .075;
  -webkit-mask: url(/assets/topo.svg) center / cover no-repeat;
  mask: url(/assets/topo.svg) center / cover no-repeat;
}
.topo-bg::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--cream) 0%, rgba(247,244,236,0) 30%, rgba(247,244,236,0) 70%, var(--cream) 100%);
}

/* ============ SECTION HEADS ============ */
.section-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(3rem, 5vw, 4.25rem); }
.section-head h2 { margin-top: 1.125rem; font-size: clamp(2.125rem, 3.8vw, 3.375rem); color: var(--green); }
.section-sub { margin-top: 1.125rem; font-size: 1.125rem; color: var(--muted); }

/* ============ SERVICES ============ */
.services { padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(6rem, 10vw, 9rem); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.2vw, 2rem); }
.service-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border-radius: 0.25rem; overflow: hidden;
  border: 1px solid rgba(8,47,38,.09);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.service-card:hover { transform: translateY(-0.375rem); box-shadow: 0 1.75rem 2.5rem -1.5rem rgba(4,31,26,.4); }
.service-img { aspect-ratio: 4 / 3; }
.service-img img { transition: transform 1.2s var(--ease-out); }
.service-card:hover .service-img img { transform: scale(1.07); }
.service-img::after { /* matted-print inner frame */
  content: ''; position: absolute; inset: 0.625rem; pointer-events: none;
  border: 1px solid rgba(255,255,255,.55);
}
.service-body { position: relative; padding: 2.5rem 1.75rem 2rem; flex: 1; }
.service-body::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.service-card:hover .service-body::before { transform: scaleX(1); }
.service-body .badge { position: absolute; top: -1.5rem; left: 1.375rem; }
.service-card:hover .badge::before { background: var(--gold); transform: rotate(135deg); }
.service-card:hover .badge { color: var(--green); }
.service-body h3 { font-size: 1.5rem; color: var(--green); }
.service-body p { margin-top: 0.5rem; color: var(--muted); font-size: 1rem; }

.services-cta {
  margin-top: clamp(3rem, 5vw, 4rem); padding-top: 2rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
}
.services-cta p { font-family: var(--serif); font-size: clamp(1.25rem, 1.7vw, 1.5rem); line-height: 1.35; color: var(--green); max-width: 38rem; }

/* ============ MOUNTAIN EDGES between sections ============ */
.edge { position: absolute; left: 0; width: 100%; height: clamp(2.5rem, 5vw, 5rem); pointer-events: none; z-index: 1; }
.edge path { fill: var(--cream); }
.edge-top { top: -1px; }
.edge-bottom { bottom: -1px; }

/* ============ RECENT PROJECTS ============ */
.work { position: relative; overflow: hidden; isolation: isolate; padding: clamp(7rem, 11vw, 10rem) 0 clamp(6rem, 9vw, 8rem); background: var(--green); color: #fff; }
.topo-lines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--gold); opacity: .07;
  -webkit-mask: url(/assets/topo.svg) center / cover no-repeat;
  mask: url(/assets/topo.svg) center / cover no-repeat;
}
.work-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 4.5vw, 3.75rem); }
.work-head h2 { margin-top: 1.125rem; font-size: clamp(2.375rem, 4.6vw, 4.25rem); }
.work-sub { font-size: 1.125rem; color: rgba(255,255,255,.72); max-width: 28rem; padding-bottom: 0.5rem; }

/* Projects grid — rows pair a 4:3 photo (7 cols) with a near-square one (5 cols) at equal height */
.projects { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 3.5vw, 3rem) clamp(1.25rem, 2.2vw, 2rem); align-items: start; }
.p-wide { grid-column: span 7; }
.p-narrow { grid-column: span 5; }
.p-wide .ba-slider, .p-wide .g-item { aspect-ratio: 4 / 3; }
.p-narrow .ba-slider, .p-narrow .g-item { aspect-ratio: 15 / 16; }
.project-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding-top: 1.125rem; }
.project-cap h3 { font-size: clamp(1.375rem, 1.9vw, 1.75rem); }
.project-cap span { font-size: 0.75rem; font-weight: 650; font-stretch: 85%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

.ba-slider {
  --pos: 50%;
  position: relative; overflow: hidden; border-radius: 0.25rem;
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  box-shadow: 0 1.75rem 3rem -1.75rem rgba(0,0,0,.6);
}
.ba-img { position: absolute; inset: 0; }
.ba-img img { pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-tag {
  position: absolute; top: 1rem; z-index: 2;
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem; font-weight: 700; font-stretch: 85%; letter-spacing: 0.16em; text-transform: uppercase;
  background: rgba(4,31,26,.8); color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}
.ba-tag-before { left: 1rem; }
.ba-tag-after { right: 1rem; background: var(--gold); color: var(--green-dk); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--gold); z-index: 3; pointer-events: none; box-shadow: 0 0 1rem rgba(0,0,0,.4); }
.ba-knob {
  position: absolute; top: 50%; left: 50%;
  width: 3.5rem; height: 3.5rem;
  display: grid; place-items: center; color: var(--green-dk);
  transform: translate(-50%, -50%);
}
.ba-knob::before {
  content: ''; position: absolute; inset: 0.5rem;
  background: var(--gold); transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0.5rem 1.25rem rgba(0,0,0,.4);
  transition: transform .4s var(--ease-out);
}
.ba-knob svg { position: relative; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ba-slider.dragging .ba-knob::before, .ba-slider:hover .ba-knob::before { transform: rotate(45deg) scale(1.1); }
.ba-range { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ba-slider:has(.ba-range:focus-visible) .ba-knob::before { outline: 2px solid #fff; outline-offset: 4px; }

/* Single photo tile (opens in the lightbox) */
.g-item {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 0.25rem;
  overflow: hidden; background: var(--green-dk); cursor: zoom-in;
  box-shadow: 0 1.75rem 3rem -1.75rem rgba(0,0,0,.6);
}
.g-item::after {
  content: ''; position: absolute; inset: 0.75rem; pointer-events: none;
  border: 1px solid rgba(233,182,74,0); transition: border-color .5s var(--ease), inset .5s var(--ease-out);
}
.g-item:hover::after, .g-item:focus-visible::after { border-color: rgba(233,182,74,.75); inset: 1rem; }
.g-img { position: absolute; inset: 0; }
.g-img img { transition: transform 1.4s var(--ease-out); }
.g-item:hover .g-img img { transform: scale(1.05); }
.g-zoom {
  position: absolute; right: 1rem; bottom: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center; background: rgba(4,31,26,.75); color: var(--gold);
  transition: background .3s, color .3s;
}
.g-item:hover .g-zoom { background: var(--gold); color: var(--green-dk); }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: 4.5rem clamp(0.75rem, 3vw, 2rem) 2rem;
  background: rgba(4,20,16,.95);
  opacity: 0; transition: opacity .35s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox.single { grid-template-columns: 1fr; }
.lightbox.single .lb-nav, .lightbox.single .lb-count { display: none; }
.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 1.125rem; min-width: 0; }
.lb-frame { width: min(100%, 75rem); height: min(78vh, 50rem); background: transparent; }
.lb-frame img { object-fit: contain; transform: scale(.96); transition: transform .5s var(--ease-out); }
.lightbox.open .lb-frame img { transform: none; }
.lb-figure figcaption { display: flex; gap: 1.25rem; align-items: baseline; font-family: var(--serif); font-size: 1.3125rem; color: #fff; }
.lb-count { font-family: var(--sans); font-size: 0.875rem; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.lb-close, .lb-nav {
  display: grid; place-items: center; border: 0; cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; transition: background .25s, color .25s;
}
.lb-close:hover, .lb-nav:hover { background: var(--gold); color: var(--green-dk); }
.lb-close { position: absolute; top: 1rem; right: 1rem; }
.lb-close svg, .lb-nav svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============ ABOUT ============ */
.about { position: relative; padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(3.5rem, 6vw, 5rem); background: var(--cream); }
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
.about-photo { position: relative; padding: 1rem 1.5rem 2rem 0.5rem; }
.print {
  position: relative; padding: 0.875rem 0.875rem 3.5rem;
  background: #fffdf8;
  box-shadow: 0 0.125rem 0.25rem rgba(60,40,10,.08), 0 2rem 3rem -1.5rem rgba(60,40,10,.4);
  transform: rotate(-2.25deg);
  transition: transform .8s var(--ease-out);
}
.about-photo:hover .print { transform: rotate(-0.75deg); }
.about-img { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #F2D899; } /* matches dave-about.png */
/* Dave's cutout (dave-about.png), full frame width, in front of a drawn golden-hour ridge scene */
.about-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-cutout { position: absolute; inset: 0; }
.about-cutout img { object-fit: contain; object-position: bottom center; filter: saturate(.94) contrast(1.04); }
.about-img::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 3.5rem rgba(60,40,10,.3);
  background: linear-gradient(180deg, rgba(233,182,74,.06), rgba(4,31,26,.12));
}
.print figcaption {
  position: absolute; left: 0; right: 0; bottom: 0.75rem;
  text-align: center; font-family: var(--script); font-size: 1.625rem; line-height: 1; color: #3a3a33;
}
.seal { position: absolute; right: -1.75rem; bottom: -2.5rem; width: 9.5rem; height: 9.5rem; filter: drop-shadow(0 0.75rem 1.25rem rgba(4,31,26,.3)); }
.seal-bg { fill: var(--green); }
.seal-line { fill: none; stroke: var(--gold); stroke-width: 1.2; }
.seal-text { fill: var(--cream); font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; transform-origin: 100px 100px; transform: rotate(var(--seal-rot, 0deg)); }
.seal-diamond { fill: none; stroke: var(--gold); stroke-width: 2.5; }
.seal-d { fill: var(--cream); font-family: var(--serif); font-size: 40px; }

.about-copy h2 { margin-top: 1.125rem; font-size: clamp(2.375rem, 4.4vw, 4rem); color: var(--green); }
.about-text { margin-top: 1.75rem; display: grid; gap: 1.125rem; font-size: 1.125rem; line-height: 1.65; color: #3b3a35; max-width: 37rem; }
.signature { margin-top: 2rem; display: grid; justify-items: start; }
.sig-script { font-family: var(--script); font-size: 2.75rem; line-height: 1; color: var(--green); transform: rotate(-4deg); transform-origin: left; margin-bottom: 0.625rem; }
.sig-name { font-weight: 700; color: var(--green); }
.sig-title { font-size: 0.9375rem; color: var(--muted); }

.values { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: clamp(1rem, 2vw, 2rem); }
.values li { display: flex; gap: 1.125rem; align-items: flex-start; padding: 2.25rem 2rem 0 0; }
.values li + li { padding-left: 2rem; border-left: 1px solid var(--line); }
.values h3 { font-size: 1.375rem; color: var(--green); margin-top: 0.5rem; }
.values p { margin-top: 0.5rem; font-size: 1rem; color: var(--muted); line-height: 1.55; }

/* ============ CONTACT ============ */
.contact { position: relative; overflow: hidden; isolation: isolate; padding: clamp(6.5rem, 9vw, 8.5rem) 0 clamp(2.5rem, 4vw, 3.5rem); color: #fff; background: var(--green-dk); }
.contact .edge { z-index: 2; }
.contact-media { position: absolute; inset: -12% 0; z-index: -2; }
.contact-bg { width: 100%; height: 100%; }
.contact-bg img { object-position: 50% 40%; }
.contact-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, var(--green-dk) 0%, var(--green-dk) 6%, rgba(4,31,26,.85) 18%, rgba(4,31,26,0) 45%), /* fades into the footer */
    linear-gradient(90deg, rgba(4,31,26,.94) 0%, rgba(4,31,26,.82) 45%, rgba(4,31,26,.64) 100%);
}
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(3rem, 6vw, 6rem); align-items: center; }
.contact-intro h2 { margin-top: 1.125rem; font-size: clamp(2.375rem, 4.4vw, 4rem); }
.contact-lead { margin-top: 1.5rem; font-size: 1.125rem; color: rgba(255,255,255,.82); max-width: 30rem; }
.contact-list { margin-top: 2.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 2rem; max-width: 34rem; }
.contact-list > div { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.16); }
.contact-list dt { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 650; font-stretch: 85%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.contact-list dt .ico { width: 1rem; height: 1rem; }
.contact-list dd { margin-top: 0.375rem; font-size: 1.125rem; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a { transition: color .25s; }
.contact-list a:hover { color: var(--gold); }

.form-card {
  position: relative; padding: clamp(1.75rem, 3.4vw, 3rem);
  background: var(--cream); color: var(--charcoal);
  border-radius: 0.375rem; box-shadow: 0 3rem 5rem -2.5rem rgba(0,0,0,.7);
}
.form-card::before { /* gold band along the top edge */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 0.375rem 0.375rem 0 0;
  background: var(--gold);
}
.form-head { margin-bottom: 0.5rem; }
.form-title { font-size: clamp(1.75rem, 2.6vw, 2.25rem); color: var(--green); }
.form-intro { margin-top: 0.625rem; font-size: 0.9688rem; color: var(--muted); }
#estimateForm { display: grid; gap: 1.125rem; }
#estimateForm[hidden] { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
.field { display: grid; gap: 0.375rem; align-content: start; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--charcoal); }
.req { color: #a8650f; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3.125rem; padding: 0.75rem 0.9375rem;
  border: 1.5px solid #d6cfbd; border-radius: 0.25rem; background: #fff;
  font-family: var(--sans); font-size: 1rem; color: var(--charcoal);
  transition: border-color .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 8.5rem; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #9b968a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,47,38,.14); }
.field.invalid input, .field.invalid textarea { border-color: #b3261e; }
.field.invalid input:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 3px rgba(179,38,30,.14); }
.field-error { font-size: 0.8438rem; color: #b3261e; }
.field-error:empty { display: none; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 1rem; top: 50%; width: 0.5rem; height: 0.5rem; margin-top: -0.375rem;
  border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); pointer-events: none;
}
.select-wrap select { padding-right: 2.5rem; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-submit { margin-top: 0.5rem; min-height: 3.625rem; font-size: 1.0625rem; }
.spinner {
  display: none; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 2.5px solid rgba(4,31,26,.25); border-top-color: var(--green-dk);
  animation: spin .8s linear infinite;
}
.btn-submit.loading { pointer-events: none; opacity: .85; }
.btn-submit.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { font-size: 0.9375rem; }
.form-status:empty { display: none; }
.form-status.error { padding: 0.875rem 1rem; border-left: 3px solid #b3261e; background: #fbeae8; color: #7d1a14; }
.form-status.error a { font-weight: 600; text-decoration: underline; }

.form-success { text-align: center; padding: 2.5rem 0.5rem; }
.form-success:focus { outline: none; }
.success-mark { position: relative; display: inline-grid; place-items: center; width: 5rem; height: 5rem; color: var(--green); }
.success-mark::before { content: ''; position: absolute; inset: 0.75rem; background: var(--gold); transform: rotate(45deg); animation: pop .7s var(--ease-out); }
.success-mark svg { position: relative; width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .5s var(--ease) .35s forwards; }
.form-success h3 { margin-top: 1.25rem; font-size: 2rem; color: var(--green); }
.form-success p { margin: 0.75rem auto 1.75rem; max-width: 26rem; font-size: 1.0625rem; color: #3b3a35; }
@keyframes pop { from { transform: rotate(45deg) scale(.4); opacity: 0; } to { transform: rotate(45deg); opacity: 1; } }

/* ============ FOOTER ============ */
.site-footer { background: var(--green-dk); color: rgba(255,255,255,.72); padding: clamp(3.5rem, 6vw, 5rem) 0 0; }
.footer-motto { font-family: var(--serif); font-size: clamp(1.875rem, 4vw, 3.5rem); line-height: 1.1; color: #fff; padding-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid rgba(255,255,255,.12); text-wrap: balance; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 2.5rem; padding: 2.5rem 0 3rem; }
.footer-logo { display: block; width: 11rem; height: 2.5rem; background: transparent; }
.footer-logo img { object-fit: contain; object-position: left center; filter: brightness(0) invert(1); } /* regular logo, rendered white */
.footer-brand p { margin-top: 1rem; font-size: 0.9688rem; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.9688rem; }
.footer-nav a, .footer-contact a { width: fit-content; transition: color .25s; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-bottom { padding: 1.5rem 0 1.75rem; border-top: 1px solid rgba(255,255,255,.1); font-size: 0.8438rem; color: rgba(255,255,255,.5); }

/* ============ MOBILE ACTION BAR ============ */
.mobile-bar { display: none; }

/* ============ REVEAL ============ */
.js .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 1s var(--ease), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * .09s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .header-inner { gap: 0.75rem; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .dave-note { left: -3.5rem; font-size: 1.5rem; }
  .values { grid-template-columns: 1fr; }
  .values li, .values li + li { padding: 1.5rem 0 0; border-left: 0; }
}

@media (max-width: 960px) {
  .work-head { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .p-wide, .p-narrow { grid-column: auto; }
  .p-narrow .ba-slider, .p-narrow .g-item { aspect-ratio: 4 / 4.2; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 26rem; margin: 0 auto; width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .services-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) {
  :root { --header-h: 4.25rem; }
  body { font-size: 1rem; }
  .site-header.scrolled { height: 3.875rem; }
  /* call button collapses to a green square with just the phone icon */
  .header-call { display: inline-flex; width: 2.75rem; min-height: 2.75rem; padding: 0; margin-left: 0; }
  .header-call span { display: none; }
  .brand-logo { width: 8.5rem; height: 2.75rem; }
  .site-header.scrolled .brand-logo { height: 2.5rem; }
  .brand-sub { font-size: 0.6875rem; padding-left: 0.625rem; letter-spacing: 0.2em; }

  /* Hero: text first, then Dave rising up on the right beside the buttons — never under the headline */
  .hero { min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-content { padding: 2.25rem 0 0; position: relative; z-index: 2; }
  .hero h1 { margin-top: 1.125rem; font-size: clamp(2rem, 9.5vw, 2.875rem); }
  .hero-lead { margin-top: 1.25rem; font-size: 1rem; max-width: 22rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-top: 1.75rem; }
  .hero-actions .btn { width: min(13.5rem, 58%); min-height: 3.125rem; padding: 0 1.125rem; justify-content: space-between; font-size: 0.9375rem; }
  .btn-arrow { display: block; width: 1.125rem; height: 1.125rem; }
  .hero-shade { background: linear-gradient(180deg, rgba(4,31,26,.88) 0%, rgba(4,31,26,.62) 48%, rgba(4,31,26,.1) 78%, rgba(4,31,26,.3) 100%); }
  .hero-bg img, .hero-video { object-position: 62% 50%; }
  .hero-sun { width: 130%; right: -50%; top: auto; bottom: 0; }
  .ridge-far { height: 30%; }
  .hero-dave { justify-self: end; width: 80%; margin-top: -4.5rem; margin-right: -3rem; z-index: 1; }
  .dave-note { left: -12%; top: 36%; font-size: 1.375rem; line-height: 1.05; transform: rotate(-8deg); }
  .note-text > span { display: block; }
  .note-dash { display: none !important; }
  .note-role { padding-left: 1.75rem; }
  .note-arrow { width: 2.75rem; height: 2rem; top: 1.75rem; left: auto; right: -2.5rem; transform: rotate(10deg); }
  .ridge-near { height: 3.75rem; }
  .hero-coords { display: none; }

  /* Trust bar: 2×2, icon on the left, small label over a bold line */
  .trust { padding: 0.25rem 0 0.75rem; }
  .trust-list { grid-template-columns: 1fr 1fr; }
  .trust-list li { justify-content: flex-start; gap: 0.75rem; padding: 1rem 0.25rem 1rem 0; }
  .trust-list li:nth-child(2) { order: -2; }
  .trust-list li:nth-child(3) { order: -1; }
  .trust-list li + li { border-left: 0; }
  .trust-list li:nth-child(3), .trust-list li:nth-child(4) { border-left: 1px solid rgba(255,255,255,.16); padding-left: 1rem; }
  .trust-list li:nth-child(1), .trust-list li:nth-child(4) { border-top: 1px solid rgba(255,255,255,.16); }
  .trust-list .ico { width: 1.75rem; height: 1.75rem; color: var(--gold); }
  .t-top { font-size: 0.6875rem; font-weight: 600; font-stretch: 85%; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
  .t-main { margin-top: 0.125rem; font-size: 0.75rem; font-weight: 700; font-stretch: 80%; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.2; }

  .section-sub, .work-sub, .about-text, .contact-lead { font-size: 1.0625rem; }
  .service-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .services-cta .btn { width: 100%; }

  .ba-knob { width: 3.25rem; height: 3.25rem; }

  .about-photo { padding-right: 2rem; }
  .seal { width: 7rem; height: 7rem; right: -0.25rem; }

  .contact-list { grid-template-columns: 1fr; gap: 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 1.75rem 1.25rem 1.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-contact { grid-column: 1 / -1; }
  .site-footer { padding-bottom: 4.75rem; } /* room for the mobile action bar */

  .lightbox { grid-template-columns: 1fr; padding: 4rem 0.75rem 5.5rem; }
  .lb-nav { position: absolute; bottom: 1.25rem; }
  .lb-prev { left: calc(50% - 3.75rem); }
  .lb-next { right: calc(50% - 3.75rem); }
  .lb-frame { height: 65vh; }

  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 0.625rem;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
    background: rgba(4,31,26,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -0.5rem 1.5rem rgba(0,0,0,.2);
    transform: translateY(110%); transition: transform .45s var(--ease-out);
  }
  .mobile-bar.show { transform: none; }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 3rem; border-radius: 0.25rem; font-weight: 650; font-size: 0.9375rem;
  }
  .mb-call { border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
  .mb-est { background: var(--gold); color: var(--green-dk); }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .hero-bg img { animation: none; }
  .js .reveal, .js .load, .js .load-line, .js .load-rise, .js .ridge-near { opacity: 1; transform: none; }
  .js .note-text { clip-path: none; }
  .js .note-arrow path { stroke-dashoffset: 0; }
}
