/* Integrity Builders PH
   Layout: a builder's drawing set. Concrete-paper ground, navy ink, amber safety accent,
   hazard stripe at the top, architectural title block as the footer. */
:root {
  --bg: #f1f0ec;          /* concrete paper */
  --surface: #ffffff;
  --ink: #12233f;         /* navy ink */
  --ink-2: #44506a;
  --line: #d5d2c8;
  --grid: rgba(18, 35, 63, 0.07);
  --amber: #f2a900;       /* safety amber, fills only */
  --on-amber: #12233f;
  --band: #12233f;
  --on-band: #f1ede4;
  --on-band-2: #b8c3d8;
  --band-soft: #e6e4dd;
  --focus: #1f6fd1;

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(2.75rem, 7vw, 5rem);
  --radius: 6px;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1829; --surface: #13233d; --ink: #ece8df; --ink-2: #b3bdd0; --line: #253a5c;
    --grid: rgba(236, 232, 223, 0.06); --amber: #f4b21b; --on-amber: #0d1829;
    --band: #172c4f; --on-band: #ece8df; --on-band-2: #b3bdd0; --band-soft: #111f37; --focus: #7cb0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1829; --surface: #13233d; --ink: #ece8df; --ink-2: #b3bdd0; --line: #253a5c;
  --grid: rgba(236, 232, 223, 0.06); --amber: #f4b21b; --on-amber: #0d1829;
  --band: #172c4f; --on-band: #ece8df; --on-band-2: #b3bdd0; --band-soft: #111f37; --focus: #7cb0ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
  padding-bottom: 64px; /* room for the phone action bar */
}
@media (min-width: 860px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: 0.005em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); text-transform: uppercase; }
h2 { font-size: var(--step-3); text-transform: uppercase; }
h3 { font-size: var(--step-2); font-weight: 700; }
p { margin: 0; }
.mono { font-family: var(--mono); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 700px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.narrow { max-width: 820px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--on-amber); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.eyebrow { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.75rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius); font: 700 1rem/1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.12s ease, background-color 0.12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--on-amber); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { font-weight: 700; white-space: nowrap; }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-top: 8px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--amber) 0 14px, var(--ink) 14px 28px) 8; border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.04em; text-transform: uppercase; margin-right: auto; }
.brand b { font-weight: 800; }
.mark { width: 34px; height: 34px; }
.site-header nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 26px; }
.site-header nav a { text-decoration: none; font-weight: 600; }
.site-header nav a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
@media (min-width: 860px) { .site-header nav ul { display: flex; } }
@media (max-width: 420px) { .brand span { font-size: 1.1rem; } .site-header .btn-sm { display: none; } }

/* hero */
.hero { border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 46px 46px; }
.hero-grid { display: grid; gap: 32px; padding-block: 56px 48px; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr 1fr; padding-block: 88px 72px; } }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 36em; }
.hero-art { min-width: 0; }
.drawing { width: 100%; height: auto; display: block; color: var(--ink); }
.drawing .d-grid path { stroke: var(--grid); stroke-width: 1; }
.drawing .d-ground { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.drawing .d-hatch { stroke: var(--ink-2); stroke-width: 2; opacity: 0.5; }
.drawing .d-wall, .drawing .d-found { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; }
.drawing .d-found { fill: var(--band-soft); }
.drawing .d-pad { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.drawing .d-canal { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.drawing .d-house { fill: var(--surface); stroke: var(--ink); stroke-width: 5; }
.drawing .d-roof { fill: none; stroke: var(--amber); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.drawing .d-check { fill: none; stroke: var(--amber); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.drawing .d-water { fill: none; stroke: var(--focus); stroke-width: 3; stroke-dasharray: 9 8; color: var(--focus); }
.drawing .d-dim, .drawing .d-dim-ext { fill: none; stroke: var(--ink-2); stroke-width: 1.5; color: var(--ink-2); }
.drawing .d-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; fill: var(--ink-2); }

/* facts strip */
.facts { background: var(--band); color: var(--on-band); }
.facts-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; padding-block: 32px; }
@media (min-width: 860px) { .facts-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--amber); padding-left: 14px; }
.fact-num { font-family: var(--display); font-weight: 800; font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.fact-label { color: var(--on-band-2); font-size: 0.98rem; line-height: 1.35; }

/* sections */
.section { padding-block: 72px; }
@media (min-width: 860px) { .section { padding-block: 96px; } }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 40px; min-width: 0; }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: var(--step-1); }
.row-head { flex-direction: row; flex-wrap: wrap; align-items: end; justify-content: space-between; max-width: none; gap: 16px; }
.band { background: var(--band); color: var(--on-band); }
.band .eyebrow, .band p { color: var(--on-band-2); }
.band h3 { color: var(--on-band); }
.band-soft { background: var(--band-soft); }
.split { display: grid; gap: 32px; }
@media (min-width: 940px) { .split { grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; } .split .section-head { margin-bottom: 0; } }

.services { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service { background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.service p { color: var(--ink-2); }
.trades { margin-top: 32px; display: grid; gap: 16px; }
.trades-title { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.trades ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trades li { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 600; }
.trades-note { color: var(--ink-2); max-width: 46em; }

.local-list { display: grid; gap: 28px; }
@media (min-width: 600px) { .local-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.local-list > div { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--amber); padding-top: 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 24px 0; border-top: 3px solid var(--ink); position: relative; min-width: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); }
.steps li p { color: var(--ink-2); }
.steps h3 { font-size: 1.5rem; }

.quote-section { padding-block: 0 24px; }
.client-quote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 28px; display: grid; gap: 16px; position: relative; }
.client-quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, var(--ink) 10px 20px); border-radius: var(--radius) 0 0 var(--radius); }
.client-quote blockquote { margin: 0; }
.client-quote blockquote p { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.15; max-width: 30em; }
.client-quote figcaption { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); }

.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.areas li { display: flex; align-items: center; gap: 12px; padding: 18px 4px; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 1.6rem; text-transform: uppercase; min-width: 0; }
.pin { width: 14px; height: 14px; border-radius: 50% 50% 50% 0; background: var(--amber); transform: rotate(-45deg); flex-shrink: 0; }

/* posts */
.post-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .post-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.post-card h3 { font-size: 1.55rem; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.post-card p:last-child { color: var(--ink-2); }
.post-card-big { margin-bottom: 20px; padding: 32px; border-top: 6px solid var(--amber); }
.post-card-big h3 { font-size: var(--step-3); text-transform: uppercase; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); }
.tag { background: var(--amber); color: var(--on-amber); padding: 3px 8px; border-radius: 3px; text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; }

.page-head { padding-block: 64px 24px; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 46px 46px; }
.page-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.page-head + .section { padding-top: 48px; }

.cta-box { margin-top: 40px; background: var(--band); color: var(--on-band); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.cta-box .eyebrow { color: var(--amber); margin: 0; }
.cta-box .cta-title { color: var(--on-band); font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1.05; text-transform: uppercase; }
.cta-box p { color: var(--on-band-2); }
.cta-box .btn-row { margin-top: 8px; }
.cta-box .btn-ghost { color: var(--on-band); }

/* article */
.post-head { padding-block: 56px 32px; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 46px 46px; }
.post-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.post-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.byline { font-size: 0.95rem; color: var(--ink-2); }
.post-layout { display: grid; gap: 32px; padding-block: 48px 72px; }
@media (min-width: 1000px) { .post-layout { grid-template-columns: 240px minmax(0, 720px); gap: 64px; } .toc { position: sticky; top: 96px; align-self: start; } }
.toc { font-size: 0.95rem; border-left: 3px solid var(--amber); padding-left: 16px; min-width: 0; }
.toc-title { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.prose { min-width: 0; max-width: 68ch; font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); margin-top: 2em; scroll-margin-top: 96px; }
.prose h3 { font-size: 1.45rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--ink-2); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--amber); font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose .table-wrap { overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.prose .cta-box { margin-top: 2em; font-size: 1rem; line-height: 1.55; }
.post-end .cta-box { margin-top: 3em; }

/* contact + form */
.contact { background: var(--band-soft); }
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; } }
.contact-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.contact-copy > p { color: var(--ink-2); font-size: var(--step-1); }
.contact-direct { margin: 12px 0 0; display: grid; gap: 14px; }
.contact-direct div { display: grid; gap: 2px; }
.contact-direct dt { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.contact-direct dd { margin: 0; font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }
.lead-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; min-width: 0; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; padding: 0; }
.opt { font-weight: 400; color: var(--ink-2); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius); padding: 11px 12px; width: 100%; min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 45%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-error { color: #b3261e; font-weight: 600; }
:root[data-theme="dark"] .form-error { color: #ffb4a9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { color: #ffb4a9; } }
.send-panel { display: grid; gap: 12px; border-top: 1px dashed var(--line); padding-top: 18px; }
.send-title { font-weight: 700; }
.send-preview { margin: 0; font: 0.95rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.send-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.send-note { font-size: 0.95rem; color: var(--ink-2); }

/* footer as an architectural title block */
.site-footer { background: var(--band); color: var(--on-band); padding-block: 48px 40px; }
.titleblock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--on-band-2); }
@media (min-width: 860px) { .titleblock { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tb-cell { display: grid; gap: 4px; padding: 12px 14px; border-right: 1px solid var(--on-band-2); border-bottom: 1px solid var(--on-band-2); min-width: 0; }
.tb-wide { grid-column: span 2; }
.tb-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-band-2); }
.tb-value { font-weight: 600; overflow-wrap: anywhere; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.footer-links a { color: var(--on-band); font-weight: 600; }
.footer-links .sheet { margin-left: auto; font-size: 0.8rem; color: var(--on-band-2); }

/* phone action bar */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: 1fr 1fr 1.3fr; background: var(--band); border-top: 3px solid var(--amber); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.action-bar a { display: flex; align-items: center; justify-content: center; min-height: 56px; color: var(--on-band); font-weight: 700; text-decoration: none; }
.action-bar .action-primary { background: var(--amber); color: var(--on-amber); }
@media (min-width: 860px) { .action-bar { display: none; } }
