/* Next Project Leads: a subdivision plat printed as a county blueline.
   Plan paper, diazo-blue linework, survey-flag orange for leads and the one action. Dark mode is a cyanotype. */

:root {
  --paper: #E4EBE6;
  --paper-2: #EEF2EF;
  --paper-3: #D8E1DB;
  --line: #2B3F8C;
  --line-soft: rgba(43, 63, 140, 0.32);
  --line-faint: rgba(43, 63, 140, 0.12);
  --ink: #1A1F2B;
  --mute: #4A5878;
  --flag: #E0612A;
  --flag-fill: rgba(224, 97, 42, 0.16);
  --flag-text: #A8400E;
  --action: #F07A3A;
  --action-hover: #F38F55;
  --error: #A3123F;
  --focus: #E0612A;
  --on-action: #1A1F2B;

  --lettering: "Overpass", ui-sans-serif, sans-serif;
  --figures: "Overpass Mono", ui-monospace, monospace;
  --reading: "Source Serif 4", Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --sheet: 1240px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10295A;
    --paper-2: #14316A;
    --paper-3: #0C214B;
    --line: #D4E3F7;
    --line-soft: rgba(212, 227, 247, 0.38);
    --line-faint: rgba(212, 227, 247, 0.12);
    --ink: #EEF4FC;
    --mute: #A9C0E2;
    --flag: #FF8F57;
    --flag-fill: rgba(255, 143, 87, 0.2);
    --flag-text: #FFAE85;
    --action: #FF8F57;
    --action-hover: #FFA574;
    --error: #FFB3C8;
    --focus: #FF8F57;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--line-soft) var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--reading);
  caret-color: var(--flag);
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--flag-fill); color: var(--ink); }

a { color: var(--line); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--flag-text); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--lettering);
  color: var(--line);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin-bottom: 0.5em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }

.figure, .num { font-family: var(--figures); font-variant-numeric: tabular-nums; }

/* ---------- the sheet ---------- */
.sheet {
  max-width: var(--sheet);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sheet-frame {
  border: 1.5px solid var(--line);
  outline: 1px solid var(--line-soft);
  outline-offset: 6px;
  margin: 28px 0 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1.5px solid var(--line);
  font-family: var(--lettering);
  color: var(--line);
}
.wordmark {
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wordmark svg { width: 26px; height: 26px; }
.masthead nav { display: flex; gap: 20px; flex-wrap: wrap; }
.masthead nav a { font-weight: 600; font-size: 0.92rem; text-decoration: underline; text-decoration-color: var(--line-soft); padding: 8px 0; }
.masthead nav a:hover { text-decoration-color: currentColor; }

/* ---------- first view: lot plan + title block ---------- */
.first {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.plan {
  border-right: 1.5px solid var(--line);
  padding: 18px 18px 12px;
  position: relative;
}
.plan svg { display: block; width: 100%; height: auto; }

.title-block {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}
.tb-cell {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}
.tb-cell:last-child { border-bottom: 0; }
.tb-label {
  display: block;
  font: 600 0.8rem/1 var(--figures);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
}
.tb-row { display: grid; grid-template-columns: 1fr 1fr; }
.tb-row .tb-cell + .tb-cell { border-left: 1px solid var(--line); }
.tb-value { font: 600 0.95rem/1.3 var(--figures); color: var(--line); }

.lede { font-size: 1.12rem; margin: 14px 0 0; }

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 22px;
  background: var(--action);
  color: var(--on-action);
  font: 800 1.05rem/1.1 var(--lettering);
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.action:hover { background: var(--action-hover); color: var(--on-action); }
.action:active { transform: translateY(1px); }
.action[disabled] { opacity: 0.6; cursor: progress; }
.action svg { width: 18px; height: 18px; }
.action-note { font-size: 0.95rem; color: var(--mute); margin: 10px 0 0; }

/* trade picker: survey-tag buttons */
.trades { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag {
  min-height: 44px;
  padding: 10px 14px;
  font: 700 0.92rem/1 var(--lettering);
  color: var(--line);
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.tag:hover { background: var(--paper-3); }
.tag[aria-pressed="true"] { background: var(--flag); border-color: var(--flag); color: var(--on-action); }
.trade-summary { margin: 12px 0 0; font-size: 0.98rem; min-height: 3.2em; }

/* ---------- lot plan drawing ---------- */
.lp-line { stroke: var(--line); fill: none; stroke-width: 1.5; }
.lp-thin { stroke: var(--line); fill: none; stroke-width: 0.8; }
.lp-dash { stroke: var(--line); fill: none; stroke-width: 0.9; stroke-dasharray: 6 4; }
.lp-text { fill: var(--line); font: 600 13px var(--figures); letter-spacing: 0.04em; }
.lp-label { fill: var(--line); font: 800 16px var(--lettering); letter-spacing: 0.12em; }
.lp-street { fill: var(--line); font: 700 14px var(--lettering); letter-spacing: 0.05em; }
.lp-hatch { stroke: var(--line); stroke-width: 0.7; }
.lp-water { fill: var(--line-faint); }

.part { cursor: pointer; outline: none; }
.part .hit { fill: transparent; stroke: none; }
.part .shape { stroke: var(--line); stroke-width: 1.5; fill: transparent; transition: fill 220ms ease-out, stroke 220ms ease-out; }
.part:hover .shape { fill: var(--line-faint); }
.part:hover .key circle { fill: var(--flag); stroke: var(--flag); }
.part:hover .key text { fill: var(--on-action); }
.part.is-flagged .shape { stroke: var(--flag); stroke-width: 2.4; fill: var(--flag-fill); }
.part:focus-visible .shape { stroke: var(--focus); stroke-width: 2.4; }

.key circle { fill: var(--line); stroke: var(--line); stroke-width: 1.5; transition: fill 200ms ease-out; }
.key text { fill: var(--paper); font: 800 15px var(--figures); text-anchor: middle; dominant-baseline: central; }
.key line { stroke: var(--line); stroke-width: 0.9; }
.part.is-flagged .key circle { fill: var(--flag); stroke: var(--flag); }
.part.is-flagged .key text { fill: var(--on-action); }

/* the one authored moment: a flag of survey tape drops onto the tapped part */
.flagpin { opacity: 0; transform: translateY(-14px) scaleY(0.4); transform-box: fill-box; transform-origin: 50% 100%; transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1), transform 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.flagpin path { fill: var(--flag); }
.flagpin line { stroke: var(--line); stroke-width: 1.5; }
.part.is-active .flagpin { opacity: 1; transform: none; }

@keyframes nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.part.is-hint .key circle { animation: nudge 900ms cubic-bezier(0.16, 1, 0.3, 1) 2; transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .flagpin, .part .shape, .key circle { transition: none; }
  .part.is-hint .key circle { animation: none; }
}

.callout {
  border-top: 1px solid var(--line);
  margin: 10px -18px -12px;
  padding: 14px 18px;
  min-height: 170px;
  background: var(--paper-2);
}
.callout h3 { margin-bottom: 4px; }
.callout .next { font-family: var(--lettering); font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.callout .note { color: var(--mute); margin: 0; font-size: 0.96rem; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.legend button {
  background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: 2px; padding: 4px 10px 4px 5px; cursor: pointer;
  font: 600 0.9rem/1.2 var(--lettering); color: var(--line);
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
}
.legend button:hover { border-color: var(--line); background: var(--paper-3); }
.legend .k { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--line); color: var(--paper); font: 800 0.8rem/1 var(--figures); }
.legend button[aria-pressed="true"] .k { background: var(--flag); border-color: var(--flag); color: var(--on-action); }

.illustrative { font: 600 0.85rem/1.3 var(--figures); color: var(--mute); }

/* ---------- sections below the first view ---------- */
.band {
  border-top: 1.5px solid var(--line);
  padding: 56px 36px;
}
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.band-head h2 { margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }

/* the block */
.block-plan svg { display: block; width: 100%; height: auto; }
.blot .shape { stroke: var(--line); stroke-width: 1.2; fill: transparent; transition: fill 260ms ease-out, stroke 260ms ease-out; }
.blot.is-flagged .shape { stroke: var(--flag); stroke-width: 2.2; fill: var(--flag-fill); }
.blot .tagmark { opacity: 0; transition: opacity 260ms ease-out; }
.blot.is-flagged .tagmark { opacity: 1; }
.tagmark path { fill: var(--flag); }

.counts { margin: 0; padding: 0; list-style: none; border: 1.5px solid var(--line); }
.counts li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: baseline; }
.counts li:last-child { border-bottom: 0; }
.counts .city { font: 700 1rem/1.2 var(--lettering); color: var(--line); }
.counts .n { font: 600 1.6rem/1 var(--figures); color: var(--flag-text); font-variant-numeric: tabular-nums; }
.counts .fresh { font: 600 0.8rem/1 var(--figures); color: var(--mute); margin-left: 8px; }
.band-action { margin: 22px 0 0; }
.counts-caption { font-size: 0.95rem; color: var(--mute); margin: 10px 0 0; }

/* not shared: a ruled comparison, not cards */
.compare { width: 100%; border-collapse: collapse; border: 1.5px solid var(--line); }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.compare th { width: 32%; font: 700 1rem/1.3 var(--lettering); color: var(--line); background: var(--paper-2); border-right: 1px solid var(--line); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .ours th { color: var(--flag-text); }

/* freshness: a scale bar */
.scalebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border: 1.5px solid var(--line); }
.scalebar > div { padding: 12px 14px 14px; border-right: 1px solid var(--line); position: relative; }
.scalebar > div:last-child { border-right: 0; }
.scalebar > div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--line) 0 12px, transparent 12px 24px); }
.scalebar .span { white-space: nowrap; display: block; margin-top: 10px; font: 700 0.95rem/1.2 var(--figures); color: var(--line); }
.scalebar .where { display: block; margin-top: 6px; font-size: 0.95rem; }
.fresh-note { margin: 12px 0 0; color: var(--mute); font-size: 0.96rem; }

/* the Monday list: a schedule, drawn like a plat's lot table */
.schedule { width: 100%; border-collapse: collapse; border: 1.5px solid var(--line); font-family: var(--figures); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.schedule caption { caption-side: bottom; text-align: left; padding-top: 8px; font: 400 0.92rem/1.4 var(--reading); color: var(--mute); }
.schedule th, .schedule td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.schedule thead th { background: var(--paper-2); color: var(--line); font-weight: 600; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; }
.schedule-wrap { overflow-x: auto; }
.never { margin: 14px 0 0; }
.never strong { font-family: var(--lettering); color: var(--flag-text); }

/* price: a title-block table */
.price { width: 100%; border-collapse: collapse; border: 1.5px solid var(--line); }
.price th, .price td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.price thead th { background: var(--paper-2); font: 600 0.8rem/1.2 var(--figures); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.price tbody th { font: 700 1.05rem/1.2 var(--lettering); color: var(--line); }
.price td { font: 600 1.05rem/1.2 var(--figures); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price td.found { color: var(--flag-text); }
.price caption { caption-side: bottom; text-align: left; padding-top: 8px; font: 400 0.92rem/1.4 var(--reading); color: var(--mute); }
.price tr:last-child th, .price tr:last-child td { border-bottom: 0; }
.price-notes { margin: 14px 0 0; padding-left: 1.1em; }
.price-notes li { margin-bottom: 6px; max-width: 68ch; }

/* note from James: a recording stamp */
.note-card { border: 1.5px solid var(--line); padding: clamp(20px, 3vw, 32px); position: relative; background: var(--paper-2); max-width: 760px; }
.note-card blockquote { margin: 0; font-size: 1.2rem; line-height: 1.55; }
.note-card .sig { margin: 14px 0 0; font: 700 1rem/1.2 var(--lettering); color: var(--line); }
.stamp {
  position: absolute; top: -18px; right: 18px;
  padding: 6px 10px; border: 1.5px solid var(--flag-text); color: var(--flag-text);
  font: 700 0.8rem/1.2 var(--figures); letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--paper); transform: rotate(-3deg);
}

/* ---------- area lookup and form ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .field legend { font: 700 0.95rem/1.2 var(--lettering); color: var(--line); }
input[type="text"], input:not([type]), input[type="email"], input[type="tel"], select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: 400 1rem/1.3 var(--reading);
  color: var(--ink);
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  border-radius: 2px;
}
input::placeholder { color: var(--mute); opacity: 1; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--error); }
.err { color: var(--error); font-size: 0.92rem; margin: -8px 0 12px; min-height: 0; }
.err:empty { display: none; }

#lookup { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
#lookup .field { margin: 0; }
#lookup button { min-height: 48px; }
.secondary {
  min-height: 48px; padding: 10px 18px;
  font: 700 1rem/1 var(--lettering); color: var(--line);
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 2px; cursor: pointer;
}
.secondary:hover { background: var(--paper-3); }

#lookup-result { margin-top: 16px; }
#lookup-result:empty { display: none; }
.quote-line { font-family: var(--figures); font-size: 0.95rem; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.quote-total { font: 800 1.15rem/1.3 var(--lettering); color: var(--flag-text); margin: 12px 0 4px; }
.quote-note { color: var(--mute); font-size: 0.95rem; margin: 4px 0 0; }
#lookup-to-form { margin-top: 14px; }

.coverage { font-size: 1.02rem; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
fieldset { border: 1.5px solid var(--line); padding: 12px 14px 6px; margin: 0 0 14px; }
fieldset label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
input[type="radio"] { accent-color: var(--flag); width: 20px; height: 20px; margin-top: 3px; flex: none; }
#promise { font: 700 1rem/1.4 var(--lettering); color: var(--line); margin: 6px 0 14px; }
#sample-status { margin-top: 14px; font: 700 1.02rem/1.4 var(--lettering); }
#sample-status:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font: 700 1.05rem/1.3 var(--lettering); color: var(--line); list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 48px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.3rem/1 var(--figures); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 14px; }

/* footer: the recording block */
.record {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  border-top: 1.5px solid var(--line);
}
.record > div { padding: 18px 22px; }
.record > div + div { border-left: 1px solid var(--line); }
.record p { margin: 0 0 6px; font-size: 0.95rem; }
.below { padding: 18px 0 40px; font: 400 0.85rem/1.4 var(--figures); color: var(--mute); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .sheet-frame { margin-top: 12px; outline-offset: 4px; }
  .masthead { flex-wrap: wrap; padding: 10px 14px; }
  .masthead nav { gap: 14px; }
  .first { grid-template-columns: 1fr; }
  .title-block { order: -1; border-bottom: 1.5px solid var(--line); }
  .plan { border-right: 0; padding: 12px 12px 10px; }
  .callout { margin: 8px -12px -10px; padding: 12px; min-height: 210px; }
  .schedule-wrap { overflow: visible; }
  .schedule thead { display: none; }
  .schedule tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .schedule tr:last-child { border-bottom: 0; }
  .schedule td { display: flex; justify-content: space-between; gap: 12px; white-space: normal; border: 0; padding: 4px 12px; text-align: right; }
  .schedule td::before { content: attr(data-label); color: var(--mute); text-align: left; }
  .split, .form-grid, .record { grid-template-columns: 1fr; }
  .record > div + div { border-left: 0; border-top: 1px solid var(--line); }
  #lookup { grid-template-columns: 1fr; }
  .scalebar > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .scalebar > div:last-child { border-bottom: 0; }
  .compare th { width: 38%; }
  .tb-cell { padding: 16px; }
  .masthead nav a:not(:last-child) { display: none; }
  .band { padding: 32px 14px; }
  .price th, .price td { padding: 10px 6px; font-size: 0.92rem; }
  .price thead th { letter-spacing: 0.04em; font-size: 0.72rem; }
  /* the plan prints at about half size on a phone: letter it larger */
  .plan .lp-text { font-size: 17px; }
  .plan .lp-label { font-size: 20px; }
  .plan .lp-street { font-size: 20px; }
  .plan .key circle { r: 19px; }
  .plan .key text { font-size: 21px; }
}
