:root {
  --paper: #f4f1ea;
  --stone: #e9e4d8;
  --ink: #1f241c;
  --text: #36372f;
  --muted: #5a5649;
  --moss: #2f5d3a;
  --moss-dark: #244a2d;
  --soil: #2a251f;
  --soil-text: #ece6da;
  --rule: #a99d84;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--moss); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--moss-dark); }
:focus-visible { outline: 3px solid #c58b2c; outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 500; line-height: 1.1; margin: 0; font-optical-sizing: auto; }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.35rem; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; }
.skip:focus { top: 1rem; }

/* Buttons: one square corner style everywhere */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: .7rem 1.25rem;
  font: 600 1rem/1.2 var(--sans); white-space: nowrap; text-decoration: none;
  border: 1.5px solid transparent; border-radius: 0;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1.0625rem; }
.btn-solid { background: var(--moss); color: #fff; }
.btn-solid:hover { background: var(--moss-dark); color: #fff; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { color: var(--moss); border-color: var(--moss); }
.btn-outline:hover { background: var(--moss); color: #fff; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid #d9d2c2; }
.header-row { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.12rem; letter-spacing: .1em;
  color: var(--ink); text-decoration: none; margin-right: auto; line-height: 1.15;
}
.wordmark:hover { color: var(--moss); }
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem; padding: .5rem 0; }
.nav-links a:hover { color: var(--moss); text-decoration: underline; }
.call-short { display: none; }

/* Hero */
.hero { position: relative; min-height: min(calc(100svh - 72px), 760px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,22,16,.30) 0%, rgba(18,22,16,.55) 45%, rgba(18,22,16,.82) 100%); }
.hero-inner { position: relative; padding-block: 6rem 3.5rem; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4.2rem); font-weight: 500; letter-spacing: -.02em; max-width: 26ch; line-height: 1.04; }
.hero-lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); max-width: 40rem; margin: 1.3rem 0 2rem; color: #f3f0e8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-meta { margin: 1.6rem 0 0; font-size: .98rem; color: #ece8de; display: flex; flex-wrap: wrap; gap: .3rem .7rem; }
.rating { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.6); }
.rating:hover { color: #fff; border-bottom-color: #fff; }
.rating span { color: #f1c65b; }

/* Hand-drawn style section rules */
.rule { display: block; width: min(100% - 2.5rem, var(--wrap)); height: 20px; margin: 0 auto; }
.rule path { fill: none; stroke: var(--rule); stroke-width: 1.4; stroke-linecap: round; }

.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: 2.6rem; }
.section-head p { margin: 0; color: var(--muted); max-width: 32rem; justify-self: end; }

/* Gallery */
.work { padding: 6rem 0 5rem; }
.gallery {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 300px 300px 400px;
  grid-template-areas:
    "a a a a a b b b b b b b"
    "a a a a a c c c d d d d"
    "e e e e e e e e f f f f";
}
.gallery-note { grid-area: f; align-self: center; padding: 0 0 2rem 1.5rem; }
.gallery-note p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; color: var(--ink); }
.gallery-note .btn { margin-top: .6rem; }
.gallery figure { display: flex; flex-direction: column; min-height: 0; }
.gallery img { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.gallery figcaption, .basements-photo figcaption { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted); padding-top: .5rem; }
.g-a { grid-area: a; } .g-b { grid-area: b; } .g-c { grid-area: c; } .g-d { grid-area: d; } .g-e { grid-area: e; }
.g-a img { object-position: 50% 70%; }
.g-e img { object-position: 50% 45%; }

/* Services: the one grid of cards */
.services { padding: 5rem 0 6rem; }
.service-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: svc; }
.service-grid li { background: #fbf9f4; border: 1px solid #ddd6c6; padding: 1.8rem 1.6rem 1.6rem; counter-increment: svc; display: flex; flex-direction: column; }
.service-grid li::before { content: counter(svc, decimal-leading-zero); font-family: var(--serif); font-style: italic; color: var(--moss); font-size: 1.05rem; margin-bottom: .9rem; }
.service-grid h3 { margin-bottom: .7rem; }
.service-grid p { font-size: 1rem; }
.service-grid .incl { margin: auto 0 0; padding-top: .9rem; border-top: 1px solid #e2dccd; font-size: .92rem; color: var(--muted); }

/* Wet basements */
.basements { background: var(--soil); color: var(--soil-text); padding: 6rem 0; }
.basements h2 { color: #fff; }
.basements a:not(.btn) { color: #fff; }
.basements-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 4rem; align-items: center; }
.basements .lede { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin: 1rem 0 1.4rem; }
.ticks { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.5rem; margin: .4rem 0 2.2rem; }
.ticks li { padding-left: 1.2rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: .55rem; height: 1px; background: #b9ae95; }
.basements-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.basements-photo figcaption { color: #cfc6b4; }

/* Process */
.process { padding: 6.5rem 0 5.5rem; }
.process-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }
.process-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0%; }
.steps { list-style: none; counter-reset: step; margin: 2rem 0 2.4rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; padding: 1.2rem 0; border-top: 1px solid #d6cfbe; }
.steps li:last-child { border-bottom: 1px solid #d6cfbe; }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--moss); }
.steps h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--muted); }

/* About */
.about { padding: 5rem 0; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }
.about-lede { font-family: var(--serif); font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.5; color: var(--ink); }
.creds { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin-top: 1.6rem; font-weight: 500; font-size: .98rem; }
.creds li { padding-left: 1.1rem; position: relative; }
.creds li::before { content: ""; position: absolute; left: 0; top: .72em; width: .5rem; height: 1px; background: var(--moss); }

/* Contact */
.contact { background: var(--stone); padding: 5.5rem 0; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
.contact h2 { margin-bottom: 1rem; }
.contact-copy > p { color: var(--muted); max-width: 30rem; }
.contact-phone { font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 2.6rem); margin: .2rem 0 1rem; }
.contact-phone a { color: var(--ink); text-decoration: none; }
.contact-phone a:hover { color: var(--moss); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }
.contact-list { display: grid; grid-template-columns: 6rem 1fr; gap: .9rem 1rem; margin: 0 0 2rem; border-top: 1px solid #cfc7b5; padding-top: 1.4rem; }
.contact-list dt { font-weight: 600; color: var(--ink); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.hours { border-collapse: collapse; }
.hours th { text-align: left; font-weight: 400; padding: 0 1.2rem .2rem 0; }
.hours td { padding: 0 0 .2rem; }
.map iframe { display: block; min-height: 360px; height: 100%; background: #dcd5c5; }

/* Social links (from templates/social-icons.html) */
.social { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; min-height: 44px; font-weight: 500; }
.social svg { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.socials { display: flex; flex-wrap: wrap; gap: .2em 1.6em; list-style: none; margin: 0; padding: 0; }

/* Footer */
.site-footer { background: #1d241c; color: #d8d3c6; padding: 3.5rem 0 2.5rem; font-size: .97rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-name { font-family: var(--serif); font-weight: 600; letter-spacing: .1em; color: #fff; margin-bottom: .6rem; }
.footer-h { color: #fff; font-weight: 600; margin-bottom: .6rem; }
.footer-small { grid-column: 1 / -1; border-top: 1px solid #3a4437; padding-top: 1.4rem; margin: .5rem 0 0; font-size: .92rem; }

/* Privacy page */
.legal { padding: 4.5rem 0 5rem; }
.legal-wrap { max-width: 44rem; }
.legal h1 { font-size: clamp(2.3rem, 4vw, 3.2rem); margin-bottom: 2.2rem; }
.legal h2 { font-size: 1.7rem; margin: 2.4rem 0 .9rem; }
.legal .updated { margin-top: 2.6rem; color: var(--muted); font-size: .95rem; }

/* Mobile call bar */
.call-bar { display: none; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .section-head, .basements-grid, .process-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .basements-grid, .process-grid { gap: 2.5rem; }
  .basements-photo img { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .header-row { min-height: 62px; gap: 1rem; }
  .wordmark { font-size: .92rem; letter-spacing: .08em; }
  .call-long { display: none; }
  .call-short { display: inline; }
  .header-call { min-height: 44px; padding: .55rem 1.1rem; }
  .hero { min-height: calc(100svh - 62px - 76px); }
  .hero-inner { padding-block: 4rem 2rem; }
  .hero h1 { font-size: 2.45rem; }
  .hero-lede { margin: 1rem 0 1.5rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .work, .services, .process, .about, .contact { padding-block: 3.8rem; }
  .basements { padding: 4rem 0; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: none; gap: 1.6rem; }
  .gallery figure, .gallery-note { grid-area: auto; }
  .gallery-note { padding: 0; }
  .gallery-note p { font-size: 1.15rem; }
  .hero-meta .dot { display: none; }
  .hero-meta { flex-direction: column; gap: .5rem; align-items: flex-start; }
  .gallery img { flex: none; aspect-ratio: 4 / 3; }
  .g-a img { aspect-ratio: 4 / 5; }
  .service-grid { grid-template-columns: 1fr; }
  .ticks { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .call-bar {
    display: flex; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--soil);
  }
  .call-bar .btn-solid { flex: 1; }
  .call-bar .btn-light { flex: 0 0 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
