/* homeconstruction.au: network root. A close variation of keironmoore.au:
   same Urbanist/Poppins pairing and layout grammar, slate green instead of navy,
   sandstone instead of gold, 4px corners instead of 10px. */
:root {
  --slate: #1f3a34;         /* ink and dark bands; 12.3:1 on white */
  --slate-deep: #152a25;
  --white: #ffffff;
  --stone: #f4f1ea;
  --line: #e0dacb;
  --ink: #1f3a34;
  --ink-soft: #46574f;
  --sand: #c9ae7c;          /* rules and fills on dark; 5.7:1 on --slate */
  --bronze: #7a5f33;        /* accent text on white/stone; 6.0:1 on white */
  --font-head: "Urbanist", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --radius: 4px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(56px, 8vw, 112px);
  --measure: 64ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.7 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-decoration-color: var(--sand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--bronze); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--ink); }
h1 { font-weight: 800; }
h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2.4em 0 .6em; }
h3 { font-weight: 700; font-size: 1.25rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1.1em; }
li { margin-bottom: .45em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); padding: 8px 12px; }

/* header */
.site-header { background: var(--slate); color: var(--white); border-bottom: 3px solid var(--sand); }
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding-block: 18px; }
.wordmark { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--white); text-decoration: none; letter-spacing: .01em; }
.header-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; }
.header-nav a { color: #e9e4d8; text-decoration: none; }
.header-nav a:hover { color: var(--sand); text-decoration: underline; }

/* hero */
.hero { background: var(--slate); color: var(--white); }
.hero-grid { display: grid; gap: 32px; align-items: center; padding-block: clamp(40px, 7vw, 88px); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; } .hero-plain .hero-grid { grid-template-columns: 1fr; } }
.hero-plain h1 { max-width: 22ch; }
.eyebrow { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sand); margin: 0 0 1em; font-weight: 500; }
.eyebrow-dark { color: var(--bronze); }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 .45em; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: #e9e4d8; max-width: 52ch; margin: 0; }
.hero figure { margin: 0; }
.hero img { border-radius: var(--radius); }
.hero figcaption { font-size: .82rem; color: #cfc8b6; margin-top: 8px; }
.meta-bar { background: var(--stone); border-bottom: 1px solid var(--line); }
.meta-bar p { margin: 0; padding: 14px 0; font-size: .92rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* article */
.article-layout { display: grid; gap: 40px; padding-block: 48px 24px; }
@media (min-width: 980px) { .article-layout { grid-template-columns: 230px minmax(0, 1fr); } }
.toc { font-size: .92rem; }
@media (min-width: 980px) { .toc { position: sticky; top: 24px; align-self: start; } }
.toc-title { font-family: var(--font-head); font-weight: 700; margin-bottom: .4em; }
.toc ol { padding-left: 1.6em; margin: 0; }
.prose { max-width: var(--measure); min-width: 0; }
.prose > h2:first-child { margin-top: 0; }

.stages { counter-reset: stage; list-style: none; padding: 0; margin: 1.4em 0; }
.stages li { counter-increment: stage; position: relative; padding: 14px 16px 14px 60px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: var(--white); }
.stages li::before { content: counter(stage); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--slate); color: var(--sand); font: 700 1rem/32px var(--font-head); text-align: center; }
.stages strong { font-family: var(--font-head); }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
caption { text-align: left; font-family: var(--font-head); font-weight: 700; padding-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--slate); color: var(--white); font-weight: 500; }
tbody th { font-weight: 500; }

.callout { border-left: 4px solid var(--sand); background: var(--stone); padding: 18px 22px; margin: 1.6em 0; border-radius: 0 var(--radius) var(--radius) 0; }
.callout-title { font-family: var(--font-head); font-weight: 700; margin-bottom: .3em; }
.note { font-size: .9rem; color: var(--ink-soft); }
.sources { font-size: .92rem; padding-left: 1.2em; }

.network { display: grid; gap: 12px; margin: 1.2em 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .network { grid-template-columns: 1fr 1fr; } }
.network li { margin: 0; padding: 16px 18px; background: var(--stone); border-radius: var(--radius); border-top: 3px solid var(--sand); }
.network strong { font-family: var(--font-head); display: block; }

.author-card { display: grid; grid-template-columns: 96px 1fr; gap: 18px; background: var(--stone); padding: 20px; border-radius: var(--radius); margin-top: 2.6em; }
.author-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.author-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin: 0 0 .3em; }
.author-card p { font-size: .93rem; }
.author-links { margin: 0; font-size: .88rem; }
@media (max-width: 520px) { .author-card { grid-template-columns: 1fr; } }

/* FAQ */
.faq { background: var(--stone); padding-block: var(--section); margin-top: 32px; }
.faq h2 { margin-top: 0; }
.faq-list { max-width: 840px; }
.faq details { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.faq details p { margin: .8em 0 0; }
.byline { margin-top: 24px; font-size: .92rem; color: var(--ink-soft); }

/* CTA */
.cta { background: var(--slate); color: var(--white); padding-block: var(--section); }
.cta h2 { color: var(--white); margin-top: 0; }
.cta p { color: #e9e4d8; max-width: 60ch; }
.btn { display: inline-block; padding: 13px 22px; border-radius: var(--radius); font-weight: 500; text-decoration: none; margin: 6px 10px 6px 0; }
.btn-sand { background: var(--sand); color: var(--slate-deep); }
.btn-sand:hover { background: #d8c197; color: var(--slate-deep); }
.btn-ghost { border: 2px solid var(--sand); color: var(--white); }
.btn-ghost:hover { color: var(--sand); }

/* footer (DAN colophon) */
.site-footer { background: var(--slate-deep); color: #d8d2c2; padding-block: 44px; font-size: .9rem; }
.site-footer a { color: var(--sand); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1fr 2fr 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.wordmark-name { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--white); }
.footer-sub { color: var(--sand); }
.footer-label { font: 500 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: #a9a391; }
.footer-meta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (min-width: 860px) { .footer-meta { text-align: right; } }
.site-footer p { margin: 0 0 .7em; }

/* reader offer card (markup: src/partials/offer.html, behaviour: /assets/js/offer.js) */
.offer { position: fixed; right: 20px; bottom: 20px; width: min(340px, calc(100vw - 32px)); background: var(--white); color: var(--ink); border: 1px solid var(--slate); border-radius: var(--radius); box-shadow: 0 12px 44px rgba(11, 32, 53, .18); padding: 20px 20px 18px; z-index: 50; font-size: .92rem; }
.offer[hidden] { display: none; }
.offer.in { animation: offer-up .35s ease both; }
@keyframes offer-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .offer.in { animation: none; } }
.offer-lbl { font: 500 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }
.offer-h { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--ink); margin: 0 0 8px; }
.offer-pitch { margin: 0 0 12px; color: var(--ink-soft); }
.offer-x { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--ink-soft); font: 400 1.2rem/1 inherit; cursor: pointer; padding: 6px 8px; }
.offer-x:hover { color: var(--ink); }
.offer-btn { display: inline-block; background: var(--slate); color: var(--white); text-decoration: none; font-weight: 600; padding: 10px 16px; border-radius: var(--radius); }
.offer-btn:hover { opacity: .9; color: var(--white); }
.offer-cta { margin: 0 0 9px; }
.offer-alt { margin: 0; font-size: .84rem; }
@media (max-width: 520px) { .offer { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; } }
