:root {
  --ink: #151a16;        /* deep forest charcoal: the logo's home */
  --ink-2: #1e2620;
  --stone: #f3efe7;
  --stone-2: #e7e0d3;
  --moss: #6f7f5e;
  --brass: #b89a63;
  --text: #2a2e2a;
  --muted: #6b6f68;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 1.0625rem/1.7 var(--sans); color: var(--text); background: var(--stone); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
h3 { font-size: 1.75rem; }
em { font-style: italic; color: var(--brass); }
p { text-wrap: pretty; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.eyebrow { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--moss); margin: 0 0 1rem; }

.btn { display: inline-block; padding: .95rem 1.6rem; background: var(--brass); color: var(--ink); font: 600 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--brass); border-radius: 0; cursor: pointer; transition: background .25s, color .25s; }
.btn:hover { background: transparent; color: var(--brass); }
.btn-ghost { background: transparent; color: var(--stone); border-color: rgb(243 239 231 / .5); }
.btn-ghost:hover { border-color: var(--stone); color: var(--stone); }
.btn-small { padding: .7rem 1.1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem var(--pad); background: rgb(21 26 22 / .92); backdrop-filter: blur(8px); color: var(--stone); }
.brand img { width: 88px; }
.site-header nav { display: flex; align-items: center; gap: clamp(.9rem, 2.5vw, 2.2rem); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.site-header nav a:not(.btn) { text-decoration: none; opacity: .8; transition: opacity .2s; }
.site-header nav a:not(.btn):hover { opacity: 1; }
@media (max-width: 640px) { .site-header nav a:not(.btn) { display: none; } .brand img { width: 64px; } }

/* Hero */
.hero { position: relative; min-height: calc(100svh - 4.6rem); display: grid; align-items: end; background: var(--ink); color: var(--stone); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; opacity: .62; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(21 26 22 / .1) 30%, rgb(21 26 22 / .85)); }
.hero-copy { position: relative; z-index: 1; padding: var(--pad); max-width: 56rem; }
.hero .eyebrow { color: var(--stone-2); }
.hero h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); margin-bottom: .3em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 36rem; opacity: .9; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Intro */
.intro { padding: clamp(4rem, 10vw, 8rem) var(--pad); max-width: 62rem; margin-inline: auto; text-align: center; }
.intro p { font: 400 clamp(1.6rem, 3vw, 2.4rem)/1.35 var(--serif); margin: 0; }

.section-head { padding-inline: var(--pad); margin-bottom: clamp(2rem, 5vw, 4rem); }

/* Projects */
.projects { padding-bottom: clamp(3rem, 8vw, 6rem); }
.project { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding: 0 var(--pad); margin-bottom: clamp(4rem, 10vw, 8rem); }
.project-flip .project-media { order: 2; }
.project-media { display: grid; grid-template-columns: 1fr .62fr; gap: 1rem; align-items: end; }
.project-media img { width: 100%; aspect-ratio: 3 / 4; max-height: 75vh; object-fit: cover; }
.project-media img + img { aspect-ratio: 4 / 5; max-height: 50vh; margin-bottom: -2rem; }
.num { font: italic 400 1.1rem var(--serif); color: var(--brass); display: block; margin-bottom: .6rem; }
.tags { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--stone-2); padding-top: 1rem; }
@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; }
  .project-flip .project-media { order: 0; }
}

/* Services */
.services { background: var(--ink); color: var(--stone); padding: clamp(4rem, 10vw, 8rem) 0; }
.services .eyebrow { color: var(--brass); }
.service-list { list-style: none; counter-reset: s; margin: 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 0 clamp(2rem, 4vw, 4rem); }
.service-list li { counter-increment: s; border-top: 1px solid rgb(243 239 231 / .15); padding: 2rem 0 2.5rem; }
.service-list li::before { content: counter(s, decimal-leading-zero); font: italic 1rem var(--serif); color: var(--brass); }
.service-list h3 { margin-top: .6rem; }
.service-list p { color: rgb(243 239 231 / .7); margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(4rem, 10vw, 8rem) var(--pad); }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.steps li { font-size: .95rem; color: var(--muted); border-left: 1px solid var(--brass); padding-left: 1rem; }
.steps strong { display: block; font: 500 1.4rem var(--serif); color: var(--text); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { background: var(--stone-2); padding: clamp(4rem, 10vw, 8rem) 0; }
.filters { border: 0; margin: 0 0 2.5rem; padding: 0 var(--pad); display: flex; flex-wrap: wrap; gap: .6rem; }
.filters label { cursor: pointer; padding: .55rem 1.1rem; border: 1px solid rgb(21 26 22 / .25); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; transition: background .2s, color .2s; }
.filters input { position: absolute; opacity: 0; }
.filters label:has(:checked) { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.filters label:has(:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.grid { list-style: none; margin: 0; padding: 0 var(--pad); columns: 4 9rem; column-gap: 1rem; }
.grid li { break-inside: avoid; margin-bottom: 1rem; }
.grid button { all: unset; display: block; cursor: zoom-in; overflow: hidden; width: 100%; }
.grid button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.grid img { width: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.grid button:hover img { transform: scale(1.04); }
.gallery:has([value="patio"]:checked)  .grid li:not([data-c~="patio"]),
.gallery:has([value="lawn"]:checked)   .grid li:not([data-c~="lawn"]),
.gallery:has([value="deck"]:checked)   .grid li:not([data-c~="deck"]),
.gallery:has([value="timber"]:checked) .grid li:not([data-c~="timber"]) { display: none; }

/* Lightbox */
#lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: hidden; overscroll-behavior: contain; }
#lightbox::backdrop { background: rgb(21 26 22 / .92); overflow: hidden; overscroll-behavior: contain; }
#lightbox img { max-width: 94vw; max-height: 90vh; width: auto; margin: auto; }
#lightbox button { position: fixed; background: rgb(21 26 22 / .6); color: var(--stone); border: 1px solid rgb(243 239 231 / .3); width: 3rem; height: 3rem; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }
.lb-close { right: 1rem; top: 1rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding: clamp(4rem, 10vw, 8rem) var(--pad); background: var(--ink-2); color: var(--stone); }
.contact .eyebrow { color: var(--brass); }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-list li { display: flex; gap: 1.5rem; padding: 1rem 0; border-top: 1px solid rgb(243 239 231 / .15); overflow-wrap: anywhere; }
.contact-list span { width: 6rem; flex: none; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: rgb(243 239 231 / .55); padding-top: .2rem; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--brass); }
.quote { display: grid; gap: 1.2rem; align-content: start; }
.quote label { display: grid; gap: .4rem; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: rgb(243 239 231 / .7); }
.quote input, .quote textarea { font: 400 1rem var(--sans); color: var(--stone); background: transparent; border: 0; border-bottom: 1px solid rgb(243 239 231 / .3); padding: .6rem 0; border-radius: 0; resize: vertical; }
.quote input:focus, .quote textarea:focus { outline: none; border-bottom-color: var(--brass); }
.quote .btn { justify-self: start; margin-top: .5rem; }
.form-note { font-size: .8rem; color: rgb(243 239 231 / .5); margin: 0; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: rgb(243 239 231 / .6); text-align: center; padding: 4rem var(--pad) 3rem; font-size: .85rem; }
.site-footer img { width: 120px; margin: 0 auto 2rem; }
.site-footer nav { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; letter-spacing: .14em; text-transform: uppercase; font-size: .75rem; }
.site-footer a { text-decoration: none; color: var(--stone); }

/* Decorative reveal: progressive enhancement, no fallback */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes rise { from { opacity: 0; translate: 0 2.5rem; } }
    .reveal { animation: rise auto ease-out backwards; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
