/* Ironclad Realty Group — site.css
   Brand: Ironclad Red #EC3013 · Ink #201E1D · Ground #F3F2F2 · Deep Red #AE1800
   Type: Archivo only. 800 for headlines and numbers, 600 for labels, 400 for everything else.
   Square corners. Flush left. Red is a signal, not a wash. */

@font-face { font-family: "Archivo"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-800-normal.woff2") format("woff2"); }

:root {
  --red: #EC3013;
  --deep: #AE1800;
  --ink: #201E1D;
  --ground: #F3F2F2;
  --white: #FFFFFF;
  --line: rgba(32, 30, 29, 0.16);
  --line-strong: rgba(32, 30, 29, 0.42);
  --muted: rgba(32, 30, 29, 0.64);
  --muted-on-ink: rgba(255, 255, 255, 0.66);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --header-h: 72px;
}

*, *::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 { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-weight: 400; font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }
.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; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }
.display { font-size: clamp(2.6rem, 6.2vw, 5.4rem); }
.h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); letter-spacing: -0.01em; }
.label { font-weight: 600; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.label.red { color: var(--red); }
.label.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.5; max-width: 34em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.num { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 2px solid transparent; border-radius: 0; font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--deep); border-color: var(--deep); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-on-ink { background: transparent; color: var(--white); border-color: var(--white); }
.btn-on-ink:hover { background: var(--white); color: var(--ink); }
.btn-on-red { background: var(--white); color: var(--red); border-color: var(--white); }
.btn-on-red:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn .ic { width: 16px; height: 16px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.on-ink { background: var(--ink); color: var(--white); }
.on-red { background: var(--red); color: var(--white); }
.on-white { background: var(--white); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rule-ink { border-top: 3px solid var(--ink); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(28px, 4vw, 64px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(24px, 3vw, 48px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: clamp(20px, 2.5vw, 40px); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: var(--stack, 16px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--ground); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.nav a { font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .btn { min-height: 44px; }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink); }
@media (max-width: 960px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--ground); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 20px; gap: 0; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn-secondary { display: none; }
}
@media (max-width: 420px) { .brand img { height: 28px; } }

/* ---------- Sample data notice ---------- */
.notice { display: none; background: var(--ink); color: var(--white); font-size: 0.8125rem; padding: 10px var(--gutter); }
.notice.show { display: block; }
.notice strong { font-weight: 600; }

/* ---------- Pulse hero ---------- */
.pulse { --panel-w: 460px; position: relative; background: var(--ground); }
.pulse-grid { display: grid; grid-template-columns: var(--panel-w) minmax(0,1fr); grid-template-rows: auto 1fr; grid-template-areas: "intro map" "side map"; }
.pulse-intro { grid-area: intro; padding: clamp(28px, 4vw, 44px) var(--gutter) 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.pulse-intro .display { font-size: clamp(2.2rem, 3.4vw, 3.15rem); }
.pulse-side { grid-area: side; padding: 0 var(--gutter) clamp(28px, 4vw, 44px); border-right: 1px solid var(--line); }
.pulse-map { grid-area: map; position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); }
.pulse-meta { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pulse-meta .period { font-weight: 800; }
.area-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.area-detail { padding-top: 6px; scroll-margin-top: calc(var(--header-h) + 16px); }
.area-list li { border-bottom: 1px solid var(--line); }
.area-list button { width: 100%; display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 12px; padding: 11px 0; background: none; border: 0; text-align: left; cursor: pointer; }
.area-list button:hover .area-name, .area-list button[aria-pressed="true"] .area-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.area-list .swatch { width: 14px; height: 14px; background: var(--red); }
.area-list .area-name { font-weight: 600; font-size: 0.9375rem; }
.area-list .area-name small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.area-list .area-median { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.area-list .group-head td, .area-list li.group-head { padding: 12px 0 4px; font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); border-bottom: 0; }
.legend { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; font-size: 0.75rem; color: var(--muted); }
.legend .bar { display: flex; height: 10px; }
.legend .bar i { flex: 1; background: var(--red); }
.legend .bar i:nth-child(1) { opacity: .12; } .legend .bar i:nth-child(2) { opacity: .28; } .legend .bar i:nth-child(3) { opacity: .45; } .legend .bar i:nth-child(4) { opacity: .65; } .legend .bar i:nth-child(5) { opacity: .88; }
.legend .ends { display: flex; justify-content: space-between; grid-column: 2; }

.pulse-map { min-height: 420px; background: #e9e8e7; }
#map { position: absolute; inset: 0; }
.leaflet-container { font-family: var(--font); background: #e9e8e7; }
.leaflet-container a { color: var(--ink); }
.leaflet-control-attribution { font-size: 10px; background: rgba(243,242,242,.85) !important; color: var(--muted); }
.leaflet-bar { border-radius: 0 !important; border: 1px solid var(--ink) !important; box-shadow: none !important; }
.leaflet-bar a { border-radius: 0 !important; color: var(--ink) !important; border-bottom-color: var(--ink) !important; background: var(--ground) !important; font-weight: 400; }
.leaflet-bar a:hover { background: var(--ink) !important; color: var(--white) !important; }
.leaflet-tooltip { background: var(--ink); color: var(--white); border: 0; border-radius: 0; box-shadow: none; font-weight: 600; font-size: 12px; letter-spacing: .04em; padding: 5px 8px; }
.leaflet-tooltip::before { display: none; }
.map-hint { position: absolute; z-index: 500; left: 16px; top: 16px; background: var(--ink); color: var(--white); font-size: 0.75rem; font-weight: 600; letter-spacing: .06em; padding: 8px 12px; pointer-events: none; }
.map-hint.hidden { display: none; }

/* Area detail (replaces list when a neighbourhood is chosen) */
.area-detail { display: none; flex-direction: column; gap: 18px; }
.area-detail.show { display: flex; }
.area-list-wrap.hide { display: none; }
.back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; font-size: 0.75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.back:hover { color: var(--ink); }
.back .ic { width: 12px; height: 12px; transform: rotate(180deg); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--ink); }
.stat { padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.stat:nth-child(odd) { padding-right: 14px; border-right: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 14px; }
.stat .num { font-size: 1.6rem; line-height: 1; }
.stat .num .unit { font-size: 0.875rem; font-weight: 600; letter-spacing: 0; margin-left: 2px; }
.stat .k { font-size: 0.6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.up { color: var(--red); }
.activity { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: 0.8125rem; }
.activity .meter { display: flex; gap: 3px; height: 10px; }
.activity .meter i { flex: 1; background: var(--line); }
.activity .meter i.on { background: var(--red); }
.read { font-size: 0.9375rem; }
.snapshot-cta { background: var(--ink); color: var(--white); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.snapshot-cta p { color: var(--muted-on-ink); font-size: 0.875rem; }
.snapshot-cta .h3 { color: var(--white); }

@media (max-width: 1080px) { .pulse { --panel-w: 400px; } }
@media (max-width: 860px) {
  .pulse-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; grid-template-areas: "intro" "map" "side"; }
  .pulse-intro { border-right: 0; padding-bottom: 20px; }
  .pulse-intro .display { font-size: clamp(2rem, 8.5vw, 2.6rem); }
  .pulse-side { border-right: 0; padding-top: 22px; }
  .pulse-map { position: relative; top: auto; height: 58svh; min-height: 360px; }
}

/* ---------- Ticker strip (region numbers) ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip .cell { padding: 20px 20px 18px 0; border-right: 1px solid var(--line); }
.strip .cell + .cell { padding-left: 20px; }
.strip .cell:last-child { border-right: 0; }
.strip .num { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1; }
.strip .k { font-size: 0.6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 720px) { .strip .wrap { grid-template-columns: 1fr 1fr; } .strip .cell:nth-child(2) { border-right: 0; } .strip .cell:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); } .strip .cell:nth-child(4) { border-top: 1px solid var(--line); } }

/* ---------- Content blocks ---------- */
.eyebrow-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.feature { border-top: 3px solid var(--ink); padding-top: 18px; }
.feature .ic { width: 32px; height: 32px; margin-bottom: 18px; }
.feature .h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.9375rem; }
.on-ink .feature { border-top-color: var(--white); }
.on-ink .feature p { color: var(--muted-on-ink); }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.step:first-child { border-top: 3px solid var(--ink); }
.step .n { font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: -0.02em; color: var(--red); }
.step p { color: var(--muted); font-size: 0.9375rem; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.proof .num { font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; }
.proof .k { font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-on-ink); margin-top: 8px; }
@media (max-width: 640px) { .proof { grid-template-columns: 1fr; } }
.quote { border-left: 3px solid var(--red); padding-left: 20px; }
.quote p { font-size: 1.0625rem; }
.quote cite { display: block; font-style: normal; font-weight: 600; font-size: 0.8125rem; letter-spacing: .06em; color: var(--muted); margin-top: 10px; }
.placeholder { outline: 2px dashed rgba(32,30,29,.35); outline-offset: -2px; background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(32,30,29,.05) 12px 24px); }
.photo { aspect-ratio: 4/5; background: #dcdad9; display: grid; place-items: center; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.photo.wide { aspect-ratio: 16/9; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; }
.field input, .field select, .field textarea { border: 2px solid var(--ink); background: var(--white); padding: 12px 14px; border-radius: 0; min-height: 48px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--red); outline-offset: 0; }
.on-ink .field input, .on-ink .field select { border-color: var(--white); background: var(--white); color: var(--ink); }
.field .hint { font-size: 0.75rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choices label { position: relative; display: block; border: 2px solid var(--ink); padding: 12px 14px; font-weight: 600; font-size: 0.8125rem; cursor: pointer; background: var(--white); text-align: left; }
.choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices input:checked + span { color: var(--white); }
.choices input:checked ~ .fill { position: absolute; inset: 0; background: var(--ink); z-index: 0; }
.choices span { position: relative; z-index: 1; }
.choices input:focus-visible ~ .fill, .choices input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.8125rem; color: var(--muted); }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--red); flex: none; }
.form-msg { display: none; padding: 14px 16px; font-size: 0.9375rem; border-left: 3px solid var(--red); background: var(--white); }
.form-msg.show { display: block; }
.form-msg.ok { border-left-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Modal for the snapshot form */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; }
.modal.open { display: block; }
.modal-bg { position: absolute; inset: 0; background: rgba(32,30,29,.72); }
.modal-card { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--ground); overflow: auto; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; background: none; border: 2px solid var(--ink); cursor: pointer; font-size: 22px; line-height: 1; }
.modal-close:hover { background: var(--ink); color: var(--white); }
.modal-card .h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); padding-right: 48px; }

/* ---------- Pulse signup band ---------- */
.signup { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.signup form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.signup .field { grid-column: 1; }
.signup .btn { grid-column: 2; align-self: end; }
@media (max-width: 800px) { .signup { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .signup form { grid-template-columns: 1fr; } .signup .btn { grid-column: 1; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--white); }
.footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer .lockup img { height: 44px; width: auto; }
.footer .k { font-size: 0.6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-ink); margin-bottom: 12px; }
.footer .contact { font-size: 0.9375rem; line-height: 1.7; }
.footer .contact strong { font-weight: 800; }
.footer .contact a:hover { text-decoration: underline; }
.footer .partners { display: flex; align-items: center; gap: 28px; justify-content: flex-end; }
.footer .partner-mark { height: 56px; width: auto; }
.footer .partner-box { height: 44px; min-width: 96px; border: 1px dashed rgba(255,255,255,.4); display: grid; place-items: center; font-size: 0.625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-on-ink); padding: 0 12px; text-align: center; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.18); padding: 18px 0 28px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 0.75rem; color: var(--muted-on-ink); }
.footer .bottom a:hover { color: var(--white); }
.footer .tagline { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--white); margin-top: 18px; }
@media (max-width: 800px) { .footer .top { grid-template-columns: 1fr; gap: 28px; } .footer .partners { justify-content: flex-start; } }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; grid-template-columns: 1fr 1fr; }
.callbar a { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 0.8125rem; letter-spacing: .1em; text-transform: uppercase; }
.callbar .call { background: var(--red); color: var(--white); }
.callbar .text { background: var(--ink); color: var(--white); }
.callbar .ic { width: 16px; height: 16px; }
@media (max-width: 860px) { .callbar { display: grid; } body { padding-bottom: 56px; } }
