/* Blackwood Construction, site styles.
   Palette and type come from the Blackwood logo kit: Inter at display size for headlines (the wordmark face), Inter for text. */

:root {
  --black: #0E0D0C;
  --olive: #474032;
  --olive-deep: #2E2A21;
  --saddle: #643A22;
  --saddle-hi: #7A4829;
  --taupe: #A98E78;
  --sand: #D5C4B2;
  --paper: #ECE4DB;
  --paper-hi: #F5F0EA;
  --ink: var(--black);
  --muted: #5A5245;
  --line: 1.5px;
  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 48px);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: clamp(72px, 10vw, 136px);
  --f: "Inter", "Helvetica Neue", Arial, sans-serif;
  --fd: "Inter Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --opsz: "opsz" 32;
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 1.9vw, 3.3rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.8vw, 5.6rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--f); font-size: var(--step-0); line-height: 1.6; color: var(--ink); background: var(--paper-hi); }
img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--saddle); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--sand); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* Type */
h1, h2, h3 { margin: 0; font-family: var(--fd); font-variation-settings: var(--opsz); font-weight: 800; line-height: 1.04; letter-spacing: -0.022em; }
h4 { margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 52ch; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.on-dark .muted { color: var(--sand); }
.kicker { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 var(--s2); }
.on-dark .kicker { color: var(--taupe); }

/* Sections */
.section { padding: var(--s6) 0; }
.section.tight { padding: var(--s5) 0; }
.on-dark { background: var(--black); color: var(--paper); }
.on-olive { background: var(--olive); color: var(--paper); }
.on-paper { background: var(--paper); }
.head { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
@media (min-width: 900px) { .head.split { grid-template-columns: 7fr 5fr; align-items: end; } }
.rule { border: 0; border-top: var(--line) solid currentColor; opacity: .25; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 26px; font: 700 1rem/1.1 var(--f); text-decoration: none; border: var(--line) solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.btn:hover { background: rgba(255,255,255,.06); }
.btn.primary { background: var(--saddle); border-color: var(--saddle); color: var(--paper); }
.btn.primary:hover { background: var(--saddle-hi); border-color: var(--saddle-hi); }
.btn.dark { background: var(--black); border-color: var(--black); color: var(--paper); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); color: var(--paper); border-bottom: 1px solid rgba(213,196,178,.18); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.98rem; padding: 6px 0; border-bottom: var(--line) solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--sand); }
.nav .btn { min-height: 44px; padding: 10px 18px; border-bottom: var(--line) solid var(--saddle); }
.nav-toggle { display: none; background: none; border: var(--line) solid var(--sand); color: var(--paper); font: 600 0.95rem var(--f); padding: 10px 14px; cursor: pointer; }
@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--black); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gut) 24px; border-bottom: 1px solid rgba(213,196,178,.18); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(213,196,178,.14); font-size: 1.1rem; }
  .nav .btn { margin-top: 16px; }
  .brand img { height: 34px; }
}

/* Hero */
.hero { position: relative; background: var(--black); color: var(--paper); overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; padding-top: clamp(72px, 12vw, 150px); padding-bottom: clamp(220px, 30vw, 380px); }
.hero h1 { font-size: clamp(2.7rem, 1.6rem + 5.4vw, 7rem); line-height: 0.96; letter-spacing: -0.03em; max-width: 13ch; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--sand); font-weight: 300; letter-spacing: -0.035em; }
.hero .lede { margin: var(--s4) 0; color: var(--sand); }
.hero-draw { position: absolute; left: 0; right: 0; bottom: -2px; z-index: 1; color: var(--sand); }
.hero-draw svg { width: 100%; height: auto; }
.hero-draw path { fill: none; stroke: currentColor; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: miter; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s cubic-bezier(.6,.05,.25,1) .25s forwards; }
.elev path, .elev line, .elev rect, .elev polyline { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: miter; }
.elev .thin { stroke-width: 1; opacity: .7; }
.elev .dash { stroke-dasharray: 4 5; stroke-width: 1; opacity: .7; }
.hero-draw .ground { opacity: .4; }
/* Photo banners: a genuine project photo behind the headline, darkened so text stays readable */
.hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; filter: saturate(.85) contrast(1.05); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14,13,12,.92) 0%, rgba(14,13,12,.78) 40%, rgba(14,13,12,.42) 100%), linear-gradient(0deg, rgba(14,13,12,.9) 0%, rgba(14,13,12,0) 45%); }
.hero.has-photo .hero-draw { opacity: .55; }
.hero.has-photo .wrap { padding-bottom: clamp(160px, 22vw, 300px); }
.page-hero.has-photo { min-height: clamp(360px, 42vw, 560px); display: grid; align-items: end; }
.page-hero.has-photo .hero-photo::after { background: linear-gradient(100deg, rgba(14,13,12,.9) 0%, rgba(14,13,12,.7) 45%, rgba(14,13,12,.35) 100%), linear-gradient(0deg, rgba(14,13,12,.85) 0%, rgba(14,13,12,0) 50%); }
@media (prefers-reduced-motion: reduce) { .hero-draw path { animation: none; stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.page-hero { background: var(--black); color: var(--paper); padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.page-hero h1 { font-size: var(--step-4); max-width: 16ch; }
.page-hero .lede { margin-top: var(--s3); color: var(--sand); max-width: 42ch; }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .crumbs { font-size: 0.9rem; color: var(--taupe); margin-bottom: var(--s3); }
.page-hero .crumbs a { color: var(--sand); }
.page-hero .elev { position: absolute; right: var(--gut); bottom: 0; width: min(46vw, 560px); color: var(--olive); opacity: .9; }
@media (max-width: 760px) { .page-hero .elev { display: none; } }

/* Market rows (What we build) */
.markets { border-top: var(--line) solid rgba(213,196,178,.3); }
.market { display: grid; grid-template-columns: 1fr; gap: var(--s3); padding: var(--s4) 0; border-bottom: var(--line) solid rgba(213,196,178,.3); text-decoration: none; color: inherit; }
@media (min-width: 900px) { .market { grid-template-columns: 5fr 4fr 3fr; align-items: center; } }
.market h3 { font-size: var(--step-2); }
.market p { margin: 0; color: var(--sand); }
.market .elev { color: var(--taupe); width: 100%; max-width: 260px; justify-self: end; transition: color .3s; }
.market:hover h3, .market:focus-visible h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.market:hover .elev { color: var(--paper); }
@media (max-width: 899px) { .market .elev { justify-self: start; max-width: 200px; } }

/* Grids */
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s4) var(--s4); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.point { border-top: var(--line) solid currentColor; padding-top: var(--s3); }
.point h4 { margin-bottom: 10px; }
.point p { margin: 0; }
.on-dark .point, .on-olive .point { border-top-color: rgba(213,196,178,.45); }
.split { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } .split.even { grid-template-columns: 1fr 1fr; } .split.rev { grid-template-columns: 7fr 5fr; } }
.stack > * + * { margin-top: var(--s3); }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 12px 0; border-bottom: 1px solid rgba(14,13,12,.14); }
.on-dark .list li, .on-olive .list li { border-bottom-color: rgba(213,196,178,.22); }

/* Process (a real sequence, so numbered) */
.process { counter-reset: step; display: grid; gap: 0; margin: 0; padding: 0; }
@media (min-width: 1000px) { .process { grid-template-columns: repeat(6, 1fr); } }
.process li { list-style: none; counter-increment: step; position: relative; padding: var(--s4) var(--s3) var(--s4) 0; border-top: var(--line) solid currentColor; }
.process li::before { content: counter(step); display: block; font-family: var(--fd); font-weight: 300; font-size: var(--step-3); line-height: 1; margin-bottom: var(--s2); color: var(--saddle); }
.on-dark .process li::before, .on-olive .process li::before { color: var(--taupe); }
.process h4 { margin-bottom: 8px; }
.process p { font-size: 0.95rem; margin: 0; }
@media (max-width: 999px) { .process { padding: 0; } }

/* Photo / drawing frames */
.frame { position: relative; background: var(--paper); border: var(--line) solid var(--sand); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; color: var(--olive); }
.frame.wide { aspect-ratio: 16 / 9; }
.frame.tall { aspect-ratio: 4 / 5; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; background: var(--black); }
.frame.span { grid-column: 1 / -1; }
.frame video + figcaption { color: var(--sand); background: rgba(14,13,12,.6); padding: 2px 8px; }
.hero-photo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.frame .elev { width: 76%; }
.frame figcaption { position: absolute; left: 12px; bottom: 10px; font-size: 0.8rem; color: var(--muted); }
.on-dark .frame { background: var(--olive-deep); border-color: rgba(213,196,178,.25); color: var(--taupe); }
.on-dark .frame figcaption { color: var(--taupe); }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--s4); }
.filters button { font: 600 0.95rem var(--f); padding: 10px 16px; background: transparent; border: var(--line) solid var(--sand); color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--black); color: var(--paper); border-color: var(--black); }
.proj { text-decoration: none; display: block; }
.proj h4 { margin-top: var(--s2); }
.proj .meta { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
.proj .tag { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 3px 8px; border: 1px solid var(--olive); color: var(--olive); margin-top: 10px; }
.empty { border: var(--line) dashed var(--taupe); padding: var(--s5) var(--s4); }
.empty h3 { margin-bottom: var(--s2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border-top: var(--line) solid currentColor; }
.facts div { padding: var(--s3) var(--s3) var(--s3) 0; }
.facts dt { font-size: 0.85rem; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--fd); font-weight: 800; font-size: var(--step-1); }

/* Notice for placeholders (preview only) */
.ph { background: #fff7d6; color: #4a3b00; border: 1px dashed #b39500; padding: 2px 6px; font-size: 0.85em; }
.on-dark .ph, .on-olive .ph { background: rgba(255,247,214,.12); color: #f3e3a0; border-color: #b39500; }

/* Article */
.article { max-width: 760px; }
.article h2 { font-size: var(--step-2); margin: var(--s5) 0 var(--s2); }
.article h3 { font-size: var(--step-1); margin: var(--s4) 0 var(--s2); }
.article ul, .article ol { padding-left: 1.2em; max-width: 68ch; }
.article li { margin-bottom: 8px; }
.cards-text { display: grid; gap: 0; }
.cards-text a { display: grid; gap: 6px; padding: var(--s4) 0; border-top: var(--line) solid var(--sand); text-decoration: none; }
.cards-text a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Forms */
.form { display: grid; gap: var(--s3); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.form legend { font-weight: 800; font-size: var(--step-1); margin-bottom: var(--s2); padding: 0; }
.row { display: grid; gap: var(--s3); }
@media (min-width: 700px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.field input, .field select, .field textarea { width: 100%; font: 400 1rem/1.4 var(--f); padding: 13px 14px; background: #fff; color: var(--ink); border: var(--line) solid #b9ab9b; border-radius: 0; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--saddle); outline-offset: 0; border-color: var(--saddle); }
.field [aria-invalid="true"] { border-color: #9b1c1c; }
.field .err { color: #9b1c1c; font-size: 0.88rem; margin-top: 4px; }
.req { color: var(--saddle); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: var(--s3); border: var(--line) solid var(--olive); background: var(--paper); }
.form-status.error { border-color: #9b1c1c; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--saddle); }
.aside-box { border-top: var(--line) solid var(--ink); padding-top: var(--s3); }

/* CTA band */
.cta-band { background: var(--olive); color: var(--paper); }
.cta-band .wrap { display: grid; gap: var(--s4); padding-top: var(--s6); padding-bottom: var(--s6); }
@media (min-width: 900px) { .cta-band .wrap { grid-template-columns: 7fr 5fr; align-items: end; } }
.cta-band h2 { max-width: 15ch; }
.cta-band p { color: var(--sand); }

/* Footer */
.site-footer { background: var(--black); color: var(--sand); font-size: 0.95rem; }
.site-footer .wrap { padding-top: var(--s5); padding-bottom: var(--s4); }
.foot-grid { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 4fr 2fr 2fr 3fr; } }
.site-footer h4 { color: var(--paper); font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-logo img { height: 46px; width: auto; margin-bottom: var(--s3); }
.legal { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid rgba(213,196,178,.2); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--taupe); font-size: 0.85rem; }

/* Preview banner */
.preview-bar { background: #fff1b8; color: #3d3100; font-size: 0.85rem; text-align: center; padding: 6px 12px; }
@media (max-width: 700px) { .hero-photo video { display: none; } }
/* video hero: full colour, lighter overlay where the footage shows */
.hero-photo video { filter: none; }
.hero.has-photo .hero-photo::after { background: linear-gradient(100deg, rgba(14,13,12,.88) 0%, rgba(14,13,12,.62) 38%, rgba(14,13,12,.18) 75%, rgba(14,13,12,.1) 100%), linear-gradient(0deg, rgba(14,13,12,.85) 0%, rgba(14,13,12,0) 35%); }
