/* Integrity Construction & Design: public site.
   Palette from the job site: charcoal (the logo's ground), plaster white, framing lumber, and
   a red-cedar accent for anything you can press. Zilla Slab for headings (sturdy, a little
   workshop), Public Sans for reading. The memorable element is the tape-measure rule: tick marks
   under the hero and above the footer, and the numbered steps. No em dashes. */

:root {
  --ink: #1d2220;
  --ink-2: #545b57;
  --night: #1c201e;
  --night-2: #262b28;
  --paper: #f6f2ea;
  --plaster: #fbf9f5;
  --rule: #e2dbcd;
  --lumber: #c99b5f;
  --lumber-2: #e7c793;
  --cedar: #a3421f;
  --cedar-2: #84341a;
  --ok: #2f6b45;
  --slab: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--plaster); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cedar); text-underline-offset: 3px; }
a:hover { color: var(--cedar-2); }
h1, h2, h3 { font-family: var(--slab); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--lumber); outline-offset: 2px; }

.kicker { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cedar); margin: 0 0 .8em; }
.kicker-light { color: var(--lumber-2); }
.h-xl { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 22ch; }

/* tape-measure tick rule */
.rule-ticks, .hero::after {
  height: 14px;
  background:
    repeating-linear-gradient(90deg, var(--lumber) 0 2px, transparent 2px 80px) top left / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--lumber) 0 1px, transparent 1px 40px) top left / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, rgba(201,155,95,.7) 0 1px, transparent 1px 10px) top left / 100% 5px no-repeat;
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--cedar); color: #fff; border: 2px solid var(--cedar); border-radius: var(--radius); padding: 10px 18px; font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--cedar-2); border-color: var(--cedar-2); color: #fff; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-ghost { background: transparent; border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.arrow { font-weight: 600; text-decoration: none; color: var(--cedar); }
.arrow::after { content: " \2192"; transition: margin .15s; }
.arrow:hover::after { margin-left: 4px; }
.arrow-light { color: var(--lumber-2); }
.arrow-light:hover { color: #fff; }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--night); color: #fff; border-bottom: 1px solid #000; }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { width: 64px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--slab); font-weight: 700; font-size: 1.45rem; letter-spacing: .06em; text-transform: uppercase; }
.brand-sub { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--lumber-2); margin-top: 3px; }
.nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.nav a { color: #e9e5dd; text-decoration: none; font-size: .95rem; font-weight: 500; padding: 24px 0; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--lumber); }
.head-phone { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.head-phone span { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--lumber-2); }
.nav-m { display: none; position: relative; }
.nav-m summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; }
.nav-m summary::-webkit-details-marker { display: none; }
.nav-m summary span { display: block; height: 2px; background: #fff; }
.nav-m ul { position: absolute; right: 0; top: 52px; background: var(--night); list-style: none; margin: 0; padding: 8px 0; min-width: 220px; border: 1px solid #000; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.nav-m a { display: block; padding: 12px 20px; color: #fff; text-decoration: none; }
.nav-m a[aria-current="page"] { color: var(--lumber-2); }
@media (max-width: 1060px) { .head-phone { display: none; } }
@media (max-width: 900px) { .nav, .btn-head { display: none; } .nav-m { display: block; } }

/* hero */
.hero { position: relative; color: #fff; background: var(--night); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,23,21,.92) 0%, rgba(20,23,21,.65) 55%, rgba(20,23,21,.2) 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; }
.hero-inner { position: relative; padding-top: clamp(64px, 11vw, 140px); padding-bottom: 40px; }
.hero h1 { max-width: 16ch; }
.hero-sub { max-width: 56ch; font-size: 1.12rem; color: #ece7dd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding-bottom: 54px; padding-top: 28px; }
.hero-facts div { border-left: 2px solid var(--lumber); padding: 4px 16px; }
.hero-facts b { display: block; font-family: var(--slab); font-size: 1.6rem; font-weight: 600; }
.hero-facts span { font-size: .85rem; color: #d8d2c6; }
@media (max-width: 760px) { .hero-facts { grid-template-columns: 1fr 1fr; row-gap: 18px; } }

/* sections */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-tight { padding-top: 36px; }
.section-tint { background: var(--paper); }
.section-dark { background: var(--night); color: #f1ede5; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.section-head h2 { margin-bottom: .2em; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split-center { align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* services list (home) */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.svc-list a { display: grid; grid-template-columns: 220px 1fr; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; transition: padding .15s, background .15s; }
.svc-list a:hover { background: var(--paper); padding-left: 12px; }
.svc-list b { font-family: var(--slab); font-size: 1.2rem; font-weight: 600; }
.svc-list span { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 600px) { .svc-list a { grid-template-columns: 1fr; } }

/* category tiles */
.cat-tiles { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cat-tiles a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--night); color: #fff; text-decoration: none; }
.cat-tiles img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .3s; opacity: .85; }
.cat-tiles a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(15,17,16,.85)); }
.cat-tiles a:hover img { transform: scale(1.04); opacity: 1; }
.cat-name { position: absolute; left: 18px; bottom: 34px; z-index: 1; font-family: var(--slab); font-size: 1.5rem; font-weight: 600; }
.cat-count { position: absolute; left: 18px; bottom: 14px; z-index: 1; font-size: .8rem; color: var(--lumber-2); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 560px) { .cat-tiles { grid-template-columns: 1fr 1fr; } .cat-tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; } .cat-tiles li:last-child:nth-child(odd) a { aspect-ratio: 16 / 9; } }
.sub-h { font-size: 1.1rem; margin: 0 0 14px; color: var(--ink-2); font-family: var(--sans); font-weight: 600; letter-spacing: .02em; }

/* gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .gallery-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; gap: 8px; } }
.gallery a { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--rule); }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery a::after { content: ""; position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; border-top: 3px solid var(--lumber); border-left: 3px solid var(--lumber); opacity: 0; transition: opacity .2s; }
.gallery a:hover::after { opacity: 1; }
.work-group { margin-bottom: 64px; }
.work-group:last-child { margin-bottom: 0; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.cat-tabs a { padding: 8px 16px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .92rem; background: #fff; }
.cat-tabs a:hover { border-color: var(--ink-2); }
.cat-tabs a[aria-current="page"] { background: var(--night); border-color: var(--night); color: #fff; }

/* lightbox */
dialog.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12,13,12,.96); color: #fff; }
dialog.lb::backdrop { background: rgba(0,0,0,.6); }
.lb figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 48px; }
.lb img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lb figcaption { margin-top: 12px; color: #ddd; font-size: .95rem; min-height: 1.2em; text-align: center; }
.lb button { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; cursor: pointer; font-size: 2.2rem; line-height: 1; width: 52px; height: 52px; border-radius: 50%; }
.lb button:hover { background: rgba(255,255,255,.2); }
.lb-x { top: 12px; right: 12px; }
.lb-p { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-c { position: absolute; top: 22px; left: 0; right: 0; text-align: center; margin: 0; font-size: .85rem; color: #aaa; letter-spacing: .08em; }
@media (max-width: 600px) { .lb figure { padding: 56px 8px 40px; } .lb-p, .lb-n { top: auto; bottom: 10px; transform: none; } }

/* steps */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps li { position: relative; padding-top: 30px; border-top: 2px solid var(--ink); }
.steps li::before { content: ""; position: absolute; top: -9px; left: 0; width: 2px; height: 16px; background: var(--ink); }
.step-n { display: block; font-family: var(--slab); font-size: 2.6rem; font-weight: 700; color: var(--lumber); line-height: 1; margin-bottom: 12px; }
.steps h3 { margin-bottom: .4em; }
.steps p { color: var(--ink-2); font-size: .97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* quotes */
.stars { color: var(--lumber); letter-spacing: 2px; font-size: 1rem; }
.quote { margin: 0; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 26px; display: flex; flex-direction: column; }
.quote blockquote { margin: 10px 0 16px; font-size: 1.02rem; flex: 1; }
.quote blockquote p:last-child { margin: 0; }
.quote figcaption { display: flex; flex-direction: column; font-size: .9rem; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 12px; }
.quote figcaption b { color: var(--ink); font-size: 1rem; }
.quote-dark { background: var(--night-2); border-color: #333a36; }
.quote-dark blockquote { color: #ece7dd; }
.quote-dark figcaption { color: #b9b3a7; border-color: #3a413c; }
.quote-dark figcaption b { color: #fff; }
.quote-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote-grid { columns: 2 380px; column-gap: 18px; }
.quote-grid .quote { break-inside: avoid; margin-bottom: 18px; }
@media (max-width: 900px) { .quote-row { grid-template-columns: 1fr; } }

/* about */
.about-teaser-img img, .about-side img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.about-teaser-img { position: relative; }
.about-teaser-img::before { content: ""; position: absolute; left: -14px; top: -14px; width: 70px; height: 70px; border-top: 4px solid var(--lumber); border-left: 4px solid var(--lumber); }
.area { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-2); }
.area b { color: var(--ink); margin-right: 6px; }
.prose { max-width: 66ch; font-size: 1.06rem; }
.prose a { overflow-wrap: anywhere; }
.pull { margin: 32px 0 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--lumber); font-family: var(--slab); font-size: 1.45rem; line-height: 1.3; color: var(--ink); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 20px 0 8px; font-size: .95rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 500; }

/* page head */
.page-head { background: var(--paper); border-bottom: 1px solid var(--rule); padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.page-head h1 { max-width: 20ch; }
.lede { max-width: 62ch; font-size: 1.1rem; color: var(--ink-2); }

/* services detail */
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding: 40px 0; border-bottom: 1px solid var(--rule); }
.svc:last-child { border-bottom: 0; }
.svc-flip .svc-img { order: 2; }
.svc-img img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.svc-sum { font-size: 1.1rem; font-weight: 500; }
.svc-noimg { grid-template-columns: 1fr; max-width: 70ch; }
@media (max-width: 760px) { .svc { grid-template-columns: 1fr; } .svc-flip .svc-img { order: 0; } }

/* cta band */
.cta-band { background: var(--cedar); color: #fff; padding: clamp(40px, 6vw, 64px) 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-row h2 { margin-bottom: .3em; }
.cta-row p { margin: 0; max-width: 54ch; color: #fbe9e0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band .btn { background: #fff; color: var(--cedar-2); border-color: #fff; }
.cta-band .btn:hover { background: var(--paper); }
.cta-band .btn-ghost { background: transparent; color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.form-row { margin-bottom: 16px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .form-2 { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.form label small { font-weight: 400; color: var(--ink-2); }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 1rem; padding: 11px 12px; border: 1px solid #c9c1b1; border-radius: var(--radius); background: var(--plaster); color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); background: #fff; outline: 2px solid var(--lumber); outline-offset: 0; }
.form .btn { width: 100%; margin-top: 4px; }
.form .muted { margin: 12px 0 0; text-align: center; }
.hp { position: absolute; left: -5000px; }
.notice { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.notice-ok { background: #e6efe7; border: 1px solid #b6cdb9; padding: 28px; }
.notice-ok h2 { color: var(--ok); }
.notice-err { background: #f8e6df; border: 1px solid #dfb3a3; color: #6d2a14; }
.contact-side .person { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.contact-side .person:last-child { border: 0; }
.contact-side h2 { font-size: 1.35rem; margin-bottom: .1em; }
.big-link { font-family: var(--slab); font-size: 1.6rem; font-weight: 600; text-decoration: none; }

/* footer */
.site-foot { background: var(--night); color: #cfc9be; padding-bottom: 24px; font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.foot-grid h2 { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lumber-2); margin-bottom: 14px; }
.foot-brand img { width: 200px; margin-bottom: 14px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid #333a36; padding-top: 18px; font-size: .82rem; color: #9d978c; }
.foot-base a { color: #cfc9be; }
.foot-base .quiet { color: #6f6a62; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* mobile call bar */
.mobile-bar { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: 64px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1.4fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--night); border-top: 1px solid #000; padding: 8px; gap: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: var(--radius); font-weight: 600; text-decoration: none; color: #fff; border: 2px solid #59605b; }
  .mobile-bar .mb-primary { background: var(--cedar); border-color: var(--cedar); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
