/* Mandate. The logo builds at night, the scroll dives through the A into
   daylight, and one made-up project runs through five scenes, each its own
   kind of picture. Hearing night returns to navy. */

:root {
  --navy: #09182b;
  --navy-2: #0f2238;
  --slate: #3a4d66;
  --snow: #f5f3ee;
  --mute: rgba(245, 243, 238, 0.7);
  --line-n: rgba(245, 243, 238, 0.16);

  --day: #f4f5f7;
  --ink: #09182b;
  --ink-2: #4a5568;
  --rule: #dde1e7;

  --gold: #b49a53;
  --gold-hi: #e2cd8f;
  --gold-ink: #806a2f;

  --sans: "Archivo", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(20px, 5vw, 64px);
  --wrap: 1200px;
  --logo-w: min(80vw, 760px);
  --mark-y: 40svh;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--navy); color: var(--snow);
  font: 400 18px/1.6 var(--sans); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h2 { font-weight: 780; font-stretch: 78%; font-size: clamp(38px, 3.4vw + 14px, 70px); line-height: 0.98; letter-spacing: -0.015em; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 60; padding: 10px 16px; background: var(--gold); color: var(--navy); text-decoration: none; transform: translateY(-160%); }
.skip:focus-visible { transform: none; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px;
  border-radius: 4px; border: 1px solid transparent; font-weight: 600; font-size: 16px; line-height: 1;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--line { border-color: rgba(245, 243, 238, 0.32); color: var(--snow); }
.btn--small { min-height: 38px; padding: 0 16px; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .btn--gold:hover { background: var(--gold-hi); }
  .btn--line:hover { border-color: rgba(245, 243, 238, 0.6); }
}

/* Top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40; height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); background: rgba(9, 24, 43, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-n); color: var(--snow);
}
.bar__home img { width: 112px; height: auto; }
.bar__nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.bar__nav a:not(.btn) { text-decoration: none; color: var(--mute); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .bar__nav a:not(.btn):hover { color: var(--snow); } }
.motion .bar { transform: translateY(-101%); visibility: hidden; transition: transform 280ms var(--ease-out), visibility 0s linear 280ms; }
.motion .bar.is-shown { transform: none; visibility: visible; transition: transform 280ms var(--ease-out), visibility 0s; }

/* ---------- Hero ---------- */

.mark { width: 100%; height: auto; overflow: visible; }
.mark path { fill: #fff; }
.mark .mk-dome { fill: var(--navy); }
.mark .mk-rule { fill: var(--gold); }
.mark .mk-scan { fill: var(--gold-hi); opacity: 0; }

.hero__pin { position: relative; min-height: 92svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 110px var(--gutter) 72px; text-align: center; overflow: hidden; }
.hero__mark { width: var(--logo-w); }
.hero__copy { max-width: 640px; margin-top: 44px; }
.hero__line { font-weight: 650; font-stretch: 85%; font-size: clamp(22px, 1.4vw + 14px, 34px); line-height: 1.15; text-wrap: balance; }
.hero__sub { margin: 14px auto 0; max-width: 52ch; color: var(--mute); font-size: 17px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero__day { display: none; }

/* Motion: the hero is a pinned stage. The logo sits on --mark-y; the dive
   scales the whole mark around a point inside the A's left leg. */
.motion .hero__pin { height: 100svh; min-height: 0; display: block; padding: 0; }
.motion .hero__mark { position: absolute; z-index: 1; left: 50%; width: var(--logo-w); margin-left: calc(var(--logo-w) / -2); top: calc(var(--mark-y) - var(--logo-w) * 0.0947); }
.motion .mark { transform-origin: 21.28% 58.25%; }
.motion .hero__copy { position: absolute; z-index: 1; left: 0; right: 0; width: min(640px, 100% - 2 * var(--gutter)); margin: 0 auto; top: calc(var(--mark-y) + var(--logo-w) * 0.0947 + 40px); }
.motion .hero__day { display: block; position: absolute; inset: 0; z-index: 2; background: var(--day); opacity: 0; pointer-events: none; }
/* Held back until main.js sets the first frame of the build. */
.motion .hero__mark { visibility: hidden; }
.motion .hero__copy > * { opacity: 0; }

/* ---------- Day ---------- */

.day { background: var(--day); color: var(--ink); }
.opening { padding: clamp(110px, 16vh, 200px) 0 clamp(40px, 6vw, 80px); }
.opening__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: end; }

/* The project's public notice sign, posted on the lot */
.notice { position: relative; justify-self: end; width: min(380px, 100%); padding-bottom: 84px; transform: rotate(-1.5deg); }
.notice__board { position: relative; z-index: 1; padding: 24px 24px 20px; border: 3px solid var(--navy); border-radius: 4px; background: #fff; box-shadow: 0 40px 60px -36px rgba(9, 24, 43, 0.45); }
.notice__head { padding-bottom: 8px; border-bottom: 3px solid var(--gold); font-weight: 800; font-stretch: 75%; font-size: 28px; line-height: 1; text-transform: uppercase; letter-spacing: 0.03em; }
.notice__what { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.notice__name { font-weight: 820; font-stretch: 72%; font-size: clamp(40px, 3.6vw, 54px); line-height: 0.95; letter-spacing: -0.01em; }
.notice__facts { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.notice__hearing { margin-top: 16px; padding: 12px 14px; border-radius: 2px; background: var(--navy); color: var(--snow); font-size: 15px; font-weight: 600; line-height: 1.35; }
.notice__hearing span { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--gold-hi); }
.notice__by { margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.notice__post { position: absolute; bottom: 0; width: 10px; height: 100px; border-radius: 2px; background: linear-gradient(90deg, #8f98a4, #b7bec7 50%, #8f98a4); }
.notice__post:first-of-type { left: 24%; }
.notice__post:last-of-type { right: 24%; }
.opening__line { font-weight: 820; font-stretch: 72%; font-size: clamp(52px, 7.4vw, 128px); line-height: 0.9; letter-spacing: -0.02em; max-width: 11ch; }
.opening__sub { margin-top: 28px; max-width: 52ch; color: var(--ink-2); }

.scene { padding: clamp(80px, 11vw, 170px) 0; }
.scene__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 110px); align-items: center; }
.scene--flip .scene__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.scene--flip .scene__text { order: 2; }
.scene__text p:not(.kicker) { margin-top: 20px; color: var(--ink-2); max-width: 46ch; }
.scene__text h2 { max-width: 15ch; }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 15px; font-weight: 600; color: var(--gold-ink); }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--gold); }
.scene__hint { font-weight: 600; color: var(--ink) !important; }
.scene__visual { position: relative; display: flex; flex-direction: column; align-items: center; }

.cite { display: flex; gap: 10px; align-items: baseline; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.cite::before { content: ""; flex: 0 0 18px; height: 2px; background: var(--gold); transform: translateY(-4px); }

.replay { margin-top: 18px; padding: 8px 2px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.still .replay { display: none; }

/* 1. Dais */
.dais { width: 100%; max-width: 620px; }
.dais__seats { display: flex; justify-content: space-between; width: 100%; padding: 0 4px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform 200ms var(--ease-out); }
.seat:nth-child(1), .seat:nth-child(5) { transform: translateY(38px); }
.seat:nth-child(2), .seat:nth-child(4) { transform: translateY(12px); }
.seat__dot {
  display: grid; place-items: center; width: clamp(54px, 7vw, 78px); aspect-ratio: 1; border-radius: 50%;
  font-weight: 700; font-size: clamp(15px, 1.3vw, 19px); letter-spacing: 0.02em;
  transition: box-shadow 200ms var(--ease-out), background-color 300ms ease;
}
.seat--for .seat__dot { background: var(--gold); color: var(--navy); }
.seat--undecided .seat__dot { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--gold); background-image: repeating-linear-gradient(135deg, rgba(180, 154, 83, 0.18) 0 4px, transparent 4px 9px); }
.seat--against .seat__dot { background: var(--navy); color: var(--snow); }
.seat__name { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seat[aria-pressed="true"] .seat__dot { box-shadow: 0 0 0 4px var(--day), 0 0 0 7px var(--navy); }
.seat--undecided[aria-pressed="true"] .seat__dot { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 4px var(--day), 0 0 0 7px var(--navy); }
.seat[aria-pressed="true"] .seat__name { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .seat:hover .seat__name { color: var(--ink); } }
.dais__desk { width: 100%; margin-top: 44px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dais__desk::before { content: ""; display: block; height: 30px; margin-bottom: 10px; border-top: 3px solid var(--navy); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }

.dossier { display: grid; width: 100%; margin-top: 28px; }
.dossier__card {
  grid-area: 1 / 1; padding: 26px 28px 24px; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 0 rgba(9, 24, 43, 0.06), 0 30px 60px -36px rgba(9, 24, 43, 0.35);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 150ms ease, transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
.dossier__card.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s; }
.dossier__who { font-size: 20px; font-weight: 700; }
.dossier__who span { margin-left: 8px; font-weight: 400; font-size: 15px; color: var(--ink-2); }
.lean { display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.lean--for { background: var(--gold); color: var(--navy); }
.lean--undecided { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--gold); }
.lean--against { background: var(--navy); color: var(--snow); }
.dossier__record { margin-top: 14px; font-weight: 600; font-stretch: 92%; font-size: clamp(20px, 1.2vw + 12px, 26px); line-height: 1.28; }


/* 2. Neighborhood */
.hood { width: 100%; height: auto; overflow: visible; }
.block { cursor: pointer; outline: none; }
.block__ground { fill: #e8ebf0; transition: fill 200ms ease; }
.block.is-picked .block__ground, .block:focus-visible .block__ground { fill: #dde3eb; stroke: var(--navy); stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .block:hover .block__ground { fill: #dde3eb; } }
.lot--s { fill: var(--gold); }
.lot--u { fill: #fff; stroke: var(--navy); stroke-width: 1.2; }
.lot--n { fill: #c9d0da; }
.parcel { fill: var(--navy); }
.parcel__label { fill: #fff; font: 700 13px var(--sans); text-anchor: middle; }
.street { fill: var(--ink-2); font: 600 11px var(--sans); text-anchor: middle; letter-spacing: 0.03em; }
.hood__key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 7px; }
.key::before { content: ""; width: 12px; height: 12px; border-radius: 2px; }
.key--s::before { background: var(--gold); }
.key--u::before { background: #fff; box-shadow: inset 0 0 0 1.2px var(--navy); }
.key--n::before { background: #c9d0da; }
.hood__readout { margin-top: 10px; min-height: 1.6em; font-size: 15px; font-weight: 600; color: var(--ink); }

.tally { margin-top: 34px; }
.tally__big { font-size: 20px; font-weight: 500; color: var(--ink-2) !important; margin-top: 0 !important; }
.tally__big b { display: block; font-weight: 800; font-stretch: 75%; font-size: clamp(56px, 5vw, 80px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.sources { margin-top: 20px; display: grid; gap: 10px; max-width: 380px; }
.sources li { display: grid; grid-template-columns: 82px 1fr 44px; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.sources i { height: 8px; border-radius: 4px; background: #e2e6ec; position: relative; overflow: hidden; }
.sources i::before { content: ""; position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(var(--w)); }
.motion .sources i::before { transform: scaleX(0); transition: transform 900ms var(--ease-out); }
.motion .is-in .sources i::before { transform: scaleX(var(--w)); }
.motion .is-in .sources li:nth-child(2) i::before { transition-delay: 80ms; }
.motion .is-in .sources li:nth-child(3) i::before { transition-delay: 160ms; }
.motion .is-in .sources li:nth-child(4) i::before { transition-delay: 240ms; }
.sources b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 3. Canvass phone */
.phone {
  width: min(340px, 100%); aspect-ratio: 9 / 18.4; padding: 11px; border-radius: 48px; background: #0d1422;
  box-shadow: inset 0 0 0 1.5px #2b3446, 0 50px 80px -40px rgba(9, 24, 43, 0.55);
}
.phone__screen { position: relative; height: 100%; overflow: hidden; border-radius: 38px; background: #fff; color: var(--ink); display: flex; flex-direction: column; }
.phone--cv .phone__screen { background: #f3f5f8; }
.cv__top { padding: 40px 18px 16px; background: var(--navy); color: var(--snow); }
.cv__top p:first-child { font-size: 15px; font-weight: 700; }
.cv__count { margin-top: 2px; font-size: 12.5px; color: var(--mute); }
.cv__count b { color: var(--snow); font-variant-numeric: tabular-nums; }
.cv__bar { display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: rgba(245, 243, 238, 0.18); overflow: hidden; }
.cv__bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(var(--p)); transition: transform 420ms var(--ease-out); }
.cv__stage { position: relative; flex: 1; padding: 16px; }
.cv__door { padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 1px 0 rgba(9, 24, 43, 0.06), 0 16px 30px -22px rgba(9, 24, 43, 0.35); }
.cv__addr { font-weight: 800; font-stretch: 82%; font-size: 26px; line-height: 1.05; }
.cv__voters { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.cv__script { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f3f5f8; font-size: 13px; }
.cv__script summary { cursor: pointer; font-weight: 600; color: var(--gold-ink); }
.cv__script p { margin-top: 6px; line-height: 1.45; }
.cv__ask { margin: 16px 0 10px; font-size: 14px; font-weight: 700; }
.cv__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv__opts--3 { grid-template-columns: 1fr 1fr 1fr; }
.cv__opts button {
  min-height: 50px; padding: 0 8px; border-radius: 12px; border: 1px solid #d6dce5; background: #fff;
  font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer; touch-action: manipulation;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.cv__opts button:active { transform: scale(0.96); background: var(--navy); color: var(--snow); border-color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .cv__opts button:hover { border-color: var(--navy); } }
.cv__next { padding: 4px 18px 0; }
.cv__next p { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cv__next ol { margin: 6px 0 0; padding: 0; list-style: none; }
.cv__next li { padding: 9px 0; border-top: 1px solid #e1e5eb; font-size: 14px; color: var(--ink-2); }
.cv__saved { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: var(--navy); color: var(--snow); font-size: 12.5px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.cv__saved.is-shown { opacity: 1; }

/* ---------- 5. Hearing night ---------- */

.night { padding: clamp(90px, 12vw, 180px) 0; background: var(--navy); color: var(--snow); }
.night .scene__text p:not(.kicker) { color: var(--mute); }
.kicker--night { color: var(--gold-hi); }
.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; max-width: 420px; }
.counters dt { font-size: 14px; color: var(--mute); }
.counters dd { font-weight: 800; font-stretch: 75%; font-size: clamp(48px, 4.4vw, 68px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.night__visual { align-items: stretch; }
.chamber { width: 100%; height: auto; }
.chamber .dais { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.cm circle { stroke-width: 2; }
.cm--for circle { fill: var(--gold); stroke: var(--gold); }
.cm--against circle { fill: var(--navy); stroke: var(--slate); }
.cm text { fill: var(--mute); font: 600 12px var(--sans); text-anchor: middle; }
.seat-pub { fill: var(--gold); }
.verdict { margin-top: 18px; }
.verdict__word { display: inline-block; position: relative; font-weight: 820; font-stretch: 72%; font-size: clamp(64px, 7vw, 112px); line-height: 0.95; color: var(--snow); }
.verdict__word::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 5px; background: var(--gold); transform-origin: left; transform: scaleX(var(--rule, 1)); }
.verdict__score { margin-top: 18px; color: var(--mute); max-width: 42ch; }
.replay--night { align-self: flex-start; color: var(--mute); }

/* ---------- Request ---------- */

.request { padding: clamp(90px, 10vw, 150px) 0; background: var(--navy-2); border-top: 1px solid var(--line-n); }
.request__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.request__intro p { margin-top: 20px; color: var(--mute); max-width: 44ch; }
.form { display: grid; gap: 18px; max-width: 520px; }
.form__field { display: grid; gap: 8px; }
.form label { font-size: 14px; color: var(--mute); }
.form label span { color: rgba(245, 243, 238, 0.45); }
.form input { height: 54px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--line-n); background: var(--navy); font-size: 17px; transition: border-color 200ms ease; }
.form input::placeholder { color: rgba(245, 243, 238, 0.35); }
.form input:focus { outline: none; border-color: var(--gold); }
.form input:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.form input[aria-invalid="true"] { border-color: #e9998c; }
.form .btn { justify-self: start; margin-top: 6px; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.6em; font-size: 15px; }
.form__status.is-error { color: #f2b3a8; }
.form__status.is-ok { color: var(--gold-hi); }

.foot { padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); background: var(--navy-2); border-top: 1px solid var(--line-n); font-size: 14px; color: var(--mute); }
.foot__grid { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 36px; }
.foot img { width: 138px; height: auto; margin-right: auto; }
.foot a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--snow); } }

/* ---------- Phones and tablets ---------- */

@media (max-width: 860px) {
  .scene__grid, .request__grid, .opening__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .notice { justify-self: center; }
  .scene--flip .scene__text { order: 0; }
  .scene--flip .scene__grid { grid-template-columns: minmax(0, 1fr); }
  .bar__nav a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  :root { --logo-w: 84vw; --mark-y: 34svh; }
  body { font-size: 17px; }
  .hero__sub { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .motion .hero__copy { top: calc(var(--mark-y) + var(--logo-w) * 0.0947 + 30px); }
  .seat:nth-child(1), .seat:nth-child(5) { transform: translateY(26px); }
  .seat:nth-child(2), .seat:nth-child(4) { transform: translateY(8px); }
  .seat__name { font-size: 12.5px; }
  .dossier__card { padding: 20px; }
  .phone { width: min(320px, 100%); }
  .counters { gap: 16px; }
}
