/* therealestatestats.com — the public marketing site (Platform nav 13c / P6).
   Static, no build step. The palette is COPIED from
   packages/core/src/styles/tokens.css (Inspire, dark) because a static page
   cannot import it; if the platform palette changes, change these values too. */
:root {
  --bg: #0a0a0a;        /* brand-950 */
  --panel: #111111;     /* brand-900 */
  --panel-2: #1c1c1c;   /* brand-800 */
  --line: #2a2a2a;      /* brand-700 */
  --muted: #a0a0a0;     /* brand-300 */
  --soft: #c8c8c8;      /* brand-200 */
  --text: #f7f7f7;      /* brand-50 */
  --accent: #dc2626;    /* accent-500 */
  --accent-600: #b91c1c;
  --accent-300: #fca5a5;
  --radius: 14px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px; line-height: 1.6;
}
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* ── nav ─────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 5; background: rgba(10,10,10,.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 22px; width: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav li a { text-decoration: none; color: var(--soft); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav li a:hover, .nav li a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.nav li a.login { border: 1px solid var(--line); color: var(--text); }

/* ── buttons ─────────────────────────────────────────────────────── */
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px; padding: 13px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── sections ────────────────────────────────────────────────────── */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }
.eyebrow { color: var(--accent-300); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; letter-spacing: -.01em; }
h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; max-width: 16ch; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; }
.lede { font-size: 20px; color: var(--soft); max-width: 60ch; margin: 0 0 32px; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }

.hero { padding: 112px 0 96px; background: radial-gradient(900px 420px at 85% 0%, rgba(220,38,38,.18), transparent 70%); }

.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.proof div { background: var(--panel); padding: 28px 24px; }
.proof b { display: block; font-size: 34px; font-weight: 800; }
.proof span { color: var(--muted); font-size: 15px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--soft); margin: 0; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(220,38,38,.14); color: var(--accent-300); display: grid; place-items: center; margin-bottom: 18px; font-weight: 800; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature + .feature { margin-top: 72px; }
.feature.flip .shot { order: -1; }
.shot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.shot figcaption { color: var(--muted); font-size: 13px; margin-top: 10px; }

.cta { text-align: center; }
.cta h2 { margin-left: auto; margin-right: auto; max-width: 22ch; }
.cta .actions { justify-content: center; }

.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 12px; }

/* ── offices (about) ─────────────────────────────────────────────── */
.offices h3 { margin-top: 0; }
.offices ul { list-style: none; margin: 0; padding: 0; }
.offices li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.offices li span { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ── form (join) ─────────────────────────────────────────────────── */
form.join { display: grid; gap: 18px; max-width: 560px; }
form.join label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
form.join label small { font-weight: 400; color: var(--muted); }
form.join input, form.join select, form.join textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; width: 100%;
}
form.join input:focus, form.join select:focus, form.join textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
form.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; display: none; }
.status.show { display: block; }
.status.ok { background: rgba(22,163,74,.14); border: 1px solid rgba(22,163,74,.5); }
.status.err { background: rgba(220,38,38,.14); border: 1px solid rgba(220,38,38,.5); }

/* ── ownership groups → i² (every page) ─────────────────────────────
   One card, the same on all five pages (#ownership), plus a nav link and the
   footer's "Powered by i²" credit. The i² mark is the brand kit's white mark
   (docs/i2/brand/mark-white-red.svg): never recoloured, and shown WITH its 2
   only above 44px (brand guide) — 64px here, 48px in the footer. */
.note a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
#ownership { scroll-margin-top: 88px; }
.owners {
  display: grid; grid-template-columns: auto 1fr minmax(240px, auto); gap: 36px; align-items: center; padding: 44px;
  background: radial-gradient(720px 340px at 100% 0%, rgba(220,38,38,.22), transparent 70%), var(--panel);
  border-color: rgba(220,38,38,.45);
  box-shadow: 0 30px 80px -40px rgba(220,38,38,.55);
}
.owners-mark { height: 64px; width: auto; align-self: start; }
.owners h2 { margin-bottom: 12px; }
.owners p { max-width: 60ch; }
.owners .eyebrow { color: var(--accent-300); margin-bottom: 12px; }
.owners .actions { flex-direction: column; }
.owners .actions .btn { text-align: center; }
.nav li a.owners-link { color: var(--accent-300); }
.nav li a.owners-link:hover { color: var(--text); }

.powered { flex-basis: 100%; display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.powered img { height: 48px; width: auto; }
.powered-domain { color: var(--soft); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.powered:hover .powered-domain { color: var(--text); }

/* ── already one of ours (join) + beyond our markets (markets) ─────── */
.member { margin-bottom: 24px; padding: 32px; border-color: rgba(220,38,38,.45); }
.member h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.member p { margin-bottom: 20px; max-width: 62ch; }
.member .eyebrow { color: var(--accent-300); margin-bottom: 12px; }
.beyond { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 36px; }
.beyond h2 { margin-bottom: 12px; }
.beyond p { max-width: 60ch; }
.beyond .eyebrow { color: var(--accent-300); margin-bottom: 12px; }

/* ── footer ──────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer a { color: var(--soft); }
/* The links sit with no whitespace between them, so only flex-wrap lets the row
   break on a narrow phone (it pushed every page 22px wide at 360px). */
footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

@media (max-width: 860px) {
  /* minmax(0,…): a grid item's min-content (the About page's nowrap office
     labels) must not push the page wider than the phone. */
  .grid-3, .grid-2, .feature { grid-template-columns: minmax(0, 1fr); }
  .offices li { flex-wrap: wrap; gap: 2px 12px; }
  .feature.flip .shot { order: 0; }
  .proof { grid-template-columns: repeat(2, 1fr); }
  .owners, .beyond { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .member { padding: 24px; }
  #ownership { scroll-margin-top: 140px; }
  section { padding: 64px 0; }
  .nav .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: flex-start; }
}
