/* Concerned Citizens for Niagara Falls
   Three registers: Anton for verdicts, Plex Sans for argument, Plex Mono for the record.
   One accent: red is reserved for her NO votes and the second half of the headline. */

:root {
  --ink: #0f1012;
  --ink-2: #16181b;
  --slab: #1d2024;
  --line: #2c3036;
  --fog: #8a9099;
  --paper: #ece9e2;
  --paper-dim: #b9b6af;
  --red: #d62828;
  --red-deep: #8f1a1a;

  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --top: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--top); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 clamp(17px, 1.05vw + 12px, 20px)/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
::selection { background: var(--red); color: #fff; }

/* Film grain over everything. Static, so it costs nothing on scroll. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.wrap--narrow { max-width: 760px; }

/* ---------- progress + top bar ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--top);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.is-solid {
  background: rgba(15, 16, 18, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: var(--line);
}
.wordmark {
  font: 400 15px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.wordmark span { color: var(--fog); }
@media (max-width: 559px) {
  .topbar .wordmark { font-size: 14px; line-height: 1.05; }
  .topbar .wordmark span { display: block; }
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  background: transparent; color: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.share-btn:hover { border-color: var(--paper); background: rgba(255,255,255,.04); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero__photo { position: absolute; inset: 0; z-index: -1; }
.hero__photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  animation: settle 2.4s var(--ease) both;
}
.hero__photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,16,18,.55) 0%, rgba(15,16,18,0) 22%, rgba(15,16,18,0) 38%, rgba(15,16,18,.88) 64%, var(--ink) 100%);
}
.hero__copy { padding: 0 var(--gutter) calc(88px + env(safe-area-inset-bottom)); }
.hero__title {
  margin: 0;
  font: 400 clamp(44px, 12.6vw, 150px)/.9 var(--display);
  text-transform: uppercase;
  letter-spacing: -.005em;
}
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.line:nth-child(2) > span { animation-delay: .1s; }
.line:nth-child(3) > span { animation-delay: .45s; }
.line:nth-child(4) > span { animation-delay: .55s; }
.line--red { color: var(--red); }
.hero__sub {
  margin: 22px 0 0;
  max-width: 30ch;
  font: 600 13px/1.5 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper-dim);
  padding-left: 14px;
  border-left: 3px solid var(--red);
}
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: calc(22px + env(safe-area-inset-bottom));
  width: 1px; height: 48px; background: var(--line); overflow: hidden;
}
.scroll-cue span { position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: var(--paper); animation: drip 2s ease-in-out infinite; }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero__photo { inset: 0 0 0 auto; width: 54%; }
  .hero__photo::after {
    background:
      linear-gradient(90deg, var(--ink) 0%, rgba(15,16,18,.6) 18%, rgba(15,16,18,0) 45%),
      linear-gradient(0deg, var(--ink) 0%, rgba(15,16,18,0) 30%);
  }
  .hero__copy { padding: calc(var(--top) + 40px) 0 60px var(--gutter); max-width: 900px; grid-column: 1; position: relative; z-index: 1; }
  .hero__title { font-size: clamp(64px, 6.6vw, 124px); }
}

@keyframes rise { to { transform: none; } }
@keyframes settle { from { transform: scale(1.12); filter: brightness(.4); } to { transform: scale(1); filter: none; } }
@keyframes drip { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- shared type ---------- */
.display {
  margin: 0 0 .5em;
  font: 400 clamp(44px, 9vw, 112px)/.92 var(--display);
  text-transform: uppercase;
  letter-spacing: -.005em;
}
.display em { font-style: normal; color: var(--fog); display: block; }
.display--sm { font-size: clamp(34px, 6vw, 64px); }
.lede { font-size: clamp(20px, 1.6vw + 12px, 28px); line-height: 1.4; color: var(--paper); max-width: 34ch; }
.kicker {
  font: 600 13px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper-dim); margin-top: 2.4em; max-width: 46ch;
}
.body { max-width: 62ch; color: var(--paper-dim); }

/* ---------- decisions ---------- */
.decisions { padding: clamp(96px, 14vw, 180px) 0 clamp(72px, 10vw, 140px); background: var(--ink); }
.cols { display: grid; gap: 0 48px; color: var(--paper-dim); margin-top: 2em; max-width: 980px; }
@media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; } }

.issues { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.issues li { border-bottom: 1px solid var(--line); }
.issues a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 26px 0; text-decoration: none;
  transition: padding .35s var(--ease), background .35s;
}
.issues__num { font: 400 clamp(36px, 6vw, 64px)/1 var(--display); color: var(--red); min-width: 1.4em; }
.issues__text { font: 500 clamp(19px, 1.4vw + 12px, 26px)/1.3 var(--sans); }
.issues__arrow { font: 400 24px/1 var(--sans); color: var(--fog); transition: transform .35s var(--ease), color .35s; }
.issues a:hover { padding-left: 12px; background: linear-gradient(90deg, rgba(214,40,40,.08), transparent 60%); }
.issues a:hover .issues__arrow { transform: translateY(6px); color: var(--paper); }

/* ---------- vote sections ---------- */
.vote {
  position: relative;
  padding: clamp(110px, 16vw, 220px) 0 clamp(90px, 12vw, 160px);
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
}
/* Art sits as a banner behind each section's headline and fades into the page. */
.vote__art, .closing__art {
  position: absolute; inset: 0 0 auto 0; z-index: -1; overflow: hidden;
  height: clamp(520px, 92vh, 980px);
}
.vote__art img, .closing__art img {
  width: 100%; height: 125%; object-fit: cover; opacity: .62;
  will-change: transform;
}
.vote__art::after, .closing__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(15,16,18,.2) 22%, rgba(15,16,18,.45) 55%, var(--ink) 100%);
}
.vote--hospital .vote__art::after {
  background: linear-gradient(180deg, var(--ink-2) 0%, rgba(22,24,27,.2) 22%, rgba(22,24,27,.45) 55%, var(--ink-2) 100%);
}
.vote--hospital { background: var(--ink-2); }
.vote__head { margin-bottom: 36px; }
.vote__index {
  font: 400 clamp(90px, 22vw, 260px)/.8 var(--display);
  color: transparent; -webkit-text-stroke: 1px rgba(236,233,226,.22);
  margin: 0 0 -.18em;
}

.ruling {
  display: grid; gap: 0;
  border: 1px solid var(--line);
  background: rgba(15,16,18,.72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  max-width: 720px;
  margin-bottom: 44px;
}
.ruling__line {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px;
  margin: 0; padding: 18px 20px;
  font: 500 clamp(18px, 1.2vw + 12px, 23px)/1.35 var(--sans);
}
.ruling__line + .ruling__line { border-top: 1px solid var(--line); }
.tag {
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--fog); padding: 6px 8px; border: 1px solid var(--line); min-width: 80px; text-align: center;
}
.nowrap { white-space: nowrap; }
@media (max-width: 559px) {
  .ruling__line { grid-template-columns: 1fr; gap: 10px; }
  .tag { justify-self: start; }
}
.ruling__line--no .tag { color: var(--red); border-color: var(--red-deep); }
.stamp {
  display: inline-block;
  font: 400 1.5em/1 var(--display); letter-spacing: .04em;
  color: var(--red);
  border: 3px solid var(--red);
  padding: .08em .3em 0;
  transform: rotate(-6deg) scale(1);
  margin-left: .1em;
}
.ruling.in .stamp { animation: slam .55s cubic-bezier(.3,1.6,.5,1) .45s both; }
@keyframes slam { from { transform: rotate(-14deg) scale(2.6); opacity: 0; } to { transform: rotate(-6deg) scale(1); opacity: 1; } }

.pull {
  margin: 44px 0;
  padding: 0 0 0 22px;
  border-left: 4px solid var(--red);
}
.pull p {
  margin: 0;
  font: 400 clamp(34px, 6.4vw, 76px)/1 var(--display);
  text-transform: uppercase;
  max-width: 16ch;
}

/* issue video slot: phone-shaped, sits beside the argument on desktop */
.clip { margin: 0 0 44px; max-width: 340px; }
.clip[hidden] { display: none; }
.clip__frame {
  position: relative; aspect-ratio: 9 / 16; width: 100%;
  background: #000; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
}
.clip__frame video, .clip__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: #000; }
.clip__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill--sm { min-height: 40px; padding: 0 14px; font-size: 11px; text-decoration: none; }
.pill[hidden] { display: none; }
@media (max-width: 559px) { .clip { max-width: none; margin-left: auto; margin-right: auto; width: min(100%, 360px); } }
@media (min-width: 1000px) {
  .has-clip > .wrap:last-child { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 64px; align-items: start; }
  .has-clip > .wrap:last-child > * { grid-column: 1; }
  .has-clip > .wrap:last-child > .clip { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: calc(var(--top) + 24px); margin: 0; }
}

/* tally */
.tally { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 12px); flex-wrap: wrap; margin: 0 0 44px; }
.dot {
  width: clamp(22px, 4.6vw, 40px); aspect-ratio: 1; border-radius: 50%;
  background: var(--paper-dim);
  transform: scale(0); transition: transform .4s cubic-bezier(.3,1.6,.5,1);
}
.dot--no { background: var(--red); box-shadow: 0 0 0 4px rgba(214,40,40,.2); margin-left: clamp(8px, 2vw, 20px); }
.tally.in .dot { transform: scale(1); }
.tally__score { font: 400 clamp(32px, 5vw, 52px)/1 var(--display); margin-left: 12px; color: var(--paper); }

/* figures */
.figures { margin: 40px 0 48px; display: grid; gap: 4px; }
.figure { margin: 0; display: flex; align-items: baseline; gap: .25em; font: 400 clamp(56px, 13vw, 120px)/.95 var(--display); }
.figure__unit { font-size: .38em; color: var(--fog); letter-spacing: .04em; text-transform: uppercase; }
.figure--big { font-size: clamp(84px, 22vw, 220px); }
.figure--big .figure__num { color: var(--paper); }
.figure__for { margin: 0; font: 600 13px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--fog); }
.figure__cap { margin: 14px 0 0; font: 500 clamp(17px, 1vw + 12px, 21px)/1.4 var(--sans); color: var(--paper-dim); max-width: 40ch; }

/* buttons */
.record-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 60px; padding: 0 22px;
  background: var(--paper); color: var(--ink);
  font: 600 13px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none;
  position: relative; overflow: hidden;
  transition: color .3s;
  margin-top: 12px;
}
.record-btn::before {
  content: ""; position: absolute; inset: 0; background: var(--red);
  transform: translateX(-101%); transition: transform .45s var(--ease); z-index: 0;
}
.record-btn > * { position: relative; z-index: 1; }
.record-btn:hover, .record-btn:focus-visible { color: #fff; }
.record-btn:hover::before, .record-btn:focus-visible::before { transform: none; }
.record-btn svg { transition: transform .35s var(--ease); }
.record-btn:hover svg { transform: translate(3px, -3px); }
@media (max-width: 559px) { .record-btn { display: flex; width: 100%; } }

/* ---------- closing ---------- */
.closing {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(120px, 18vw, 240px) 0 clamp(90px, 12vw, 160px);
  border-top: 1px solid var(--line);
}
.triad { margin: 0 0 48px; font: 400 clamp(44px, 10vw, 128px)/.92 var(--display); text-transform: uppercase; }
.triad span { display: block; }
.triad span:nth-child(2) { color: var(--fog); }
.triad span:nth-child(3) { color: transparent; -webkit-text-stroke: 1.5px var(--paper); }
.statement {
  margin: 56px 0 36px;
  font: 400 clamp(38px, 7.5vw, 92px)/.95 var(--display); text-transform: uppercase;
}
.statement span { color: var(--red); }

.records { display: grid; gap: 14px; margin: 44px 0 28px; }
@media (min-width: 760px) { .records { grid-template-columns: 1fr 1fr; } }
.record-card {
  display: grid; gap: 10px;
  padding: 24px; min-height: 180px;
  background: rgba(22,24,27,.85);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .3s, transform .4s var(--ease), background .3s;
}
.record-card:hover { border-color: var(--red); transform: translateY(-4px); background: rgba(29,32,36,.95); }
.record-card__num { font: 400 40px/1 var(--display); color: var(--red); }
.record-card__title { font: 400 clamp(26px, 3vw, 34px)/1 var(--display); text-transform: uppercase; }
.record-card__cta { align-self: end; font: 600 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  background: transparent; color: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.pill:hover { border-color: var(--paper); background: rgba(255,255,255,.05); }

/* ---------- footer ---------- */
.footer { padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ink); }
.wordmark--foot { font-size: 20px; line-height: 1.1; margin-bottom: 18px; }
.wordmark--foot span { display: block; }
.authorization { margin: 0; font: 400 14px/1.6 var(--sans); color: var(--fog); max-width: 70ch; }
.authorization a { color: var(--paper-dim); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--paper); color: var(--ink);
  font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 18px; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .line > span { transform: none; }
  .js .reveal { opacity: 1; transform: none; }
  .dot { transform: scale(1); }
}
