/* =========================================================
   PTGOP - Civic Broadsheet
   Peters Township Republican Committee
   ========================================================= */

:root {
  /* Paper */
  --cream: #F3EBD3;
  --cream-2: #EDE1C1;
  --cream-3: #E2D3A6;

  /* Ink (navy) */
  --ink: #0E1B3D;
  --ink-2: #1A2B55;
  --ink-soft: #3A456B;

  /* Accent (oxblood) */
  --blood: #8E1F2C;
  --blood-deep: #6D151F;
  --blood-light: #B23A47;

  /* Secondary accent (brass) */
  --brass: #B89968;
  --brass-deep: #8B6F3E;

  /* Rules */
  --rule: rgba(14, 27, 61, 0.14);
  --rule-2: rgba(14, 27, 61, 0.28);
  --rule-strong: rgba(14, 27, 61, 0.55);

  --max: 1240px;
  --gutter: clamp(1.5rem, 4vw, 4rem);

  --serif: 'Fraunces', 'Newsreader', Georgia, serif;
  --body: 'Newsreader', Georgia, 'Iowan Old Style', serif;
  --ui: 'Archivo', 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* The `hidden` attribute must win over component display rules (flex/grid).
   Without this, display:flex on .finder-loading keeps the spinner visible
   even when hidden=true. */
[hidden] { display: none !important; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
}

img { max-width: 100%; display: block; }
a { color: var(--ink); }

::selection { background: var(--blood); color: var(--cream); }

/* Subtle paper grain overlay */
.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0.055 0 0 0 0 0.106 0 0 0 0 0.239 0 0 0 0.24 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.dot { opacity: 0.5; margin: 0 0.35em; }

/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}

.mark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
}
.mark-star { color: var(--blood); font-size: 0.95rem; line-height: 1; }
.mark-text { font-weight: 700; letter-spacing: 0.32em; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
}
.nav a::after {
  content: '';
  position: absolute; left: 0; bottom: -3px;
  height: 1px; width: 0;
  background: currentColor;
  transition: width 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.nav a:hover::after { width: 100%; }
.nav-cta { color: var(--blood); font-weight: 700; }
.nav-cta::after { background: var(--blood); }

@media (max-width: 720px) {
  .nav { gap: 1rem; }
  .nav a:not(.nav-cta) { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 100vh;
  padding: 9rem var(--gutter) 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* Hairline flag sash - seven oxblood hairlines with six gaps between,
   13 bands total. Content-width, centered. Subtle tribute, purely editorial. */
.flag-sash {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 4rem;
  position: relative;
  z-index: 2;
}
.flag-sash::before {
  content: '';
  display: block;
  height: 25px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--blood) 0 1px,
    transparent 1px 4px
  );
  opacity: 0.42;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 14%,
    black 86%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 14%,
    black 86%,
    transparent 100%
  );
}

.hero::after {
  /* and a bottom-left mirror */
  content: '';
  position: absolute;
  bottom: 3rem; left: 0;
  width: clamp(120px, 18vw, 240px);
  height: clamp(70px, 10vw, 130px);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--ink) 0 3px,
    transparent 3px 18px
  );
  opacity: 0.06;
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max);
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 3.5rem;
}
.hero-meta-star { color: var(--blood); font-size: 0.9rem; }
.hero-meta .dot { font-size: 1rem; }

/* Title */
.hero-title {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0 3rem;
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-weight: 300;
  font-feature-settings: "ss01" 1, "ss02" 1;
}
.hero-title-italic,
.hero-title-roman {
  display: block;
  font-size: clamp(2.5rem, 7.5vw, 7rem);
}
.hero-title-italic {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero-title-roman {
  font-style: normal;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
}
.hero-title .period {
  color: var(--blood);
  font-style: italic;
}

/* Rule with star */
.hero-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.hero-rule-line {
  height: 1px;
  background: var(--rule-strong);
  width: min(140px, 26vw);
}
.hero-eagle {
  width: clamp(80px, 11vw, 120px);
  height: auto;
  color: var(--ink);
  display: block;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.hero-eagle:hover { transform: scale(1.04); }

/* Tagline */
.hero-tagline {
  font-family: var(--body);
  font-size: clamp(1.125rem, 1.7vw, 1.45rem);
  line-height: 1.55;
  max-width: 760px;
  margin: 0 auto 3.5rem;
  color: var(--ink);
}
.hero-tagline em {
  font-style: italic;
  color: var(--blood);
  font-weight: 500;
}
.hero-tagline-lede {
  display: block;
  margin-bottom: 0.6rem;
}

/* CTAs */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 5rem;
}

.btn {
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  padding: 1.2rem 2.3rem;
  box-shadow: 0 2px 0 0 var(--blood);
}
.btn-primary:hover {
  background: var(--blood);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -14px rgba(142, 31, 44, 0.55),
              0 2px 0 0 var(--ink);
}
.btn-primary .btn-arrow { transition: transform 0.3s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(5px); }

.btn-link {
  color: var(--ink);
  background: transparent;
  padding: 1rem 0;
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.3s ease, color 0.3s ease;
}
.btn-link:hover {
  color: var(--blood);
  text-decoration-color: var(--blood);
}

/* 12-star row */
.hero-stars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1.1rem);
  font-size: 0.55rem;
  color: var(--blood);
  opacity: 0.75;
}
.hero-stars span {
  display: inline-block;
  transform-origin: center;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem var(--gutter);
  position: relative;
  z-index: 2;
}

.section-wrap {
  position: relative;
  z-index: 2;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.section-numeral {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3.25rem, 8vw, 6rem);
  color: var(--blood);
  line-height: 0.9;
  letter-spacing: 0.01em;
}
.section-name {
  font-family: var(--ui);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}

/* =========================================================
   ABOUT / COMMITTEE
   ========================================================= */

.about-lede {
  max-width: 820px;
  margin: 0 auto 5rem;
  text-align: center;
}
.about-lede p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.375rem, 2.4vw, 2rem);
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 72;
}
.about-lede em {
  font-style: italic;
  font-weight: 400;
  color: var(--blood);
}

/* Stats */
.stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto 7rem;
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 900px;
}
.stat { text-align: center; flex: 1; }
.stat-numeral {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 5rem);
  color: var(--blood);
  line-height: 1;
  margin-bottom: 0.65rem;
  letter-spacing: 0.02em;
  font-variation-settings: "opsz" 144;
}
.stat-label {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stat-rule {
  height: 64px;
  width: 1px;
  background: var(--rule-2);
}
@media (max-width: 640px) {
  .stats { flex-direction: column; gap: 2.5rem; }
  .stat-rule { width: 60px; height: 1px; }
}

/* Roll call header */
.rollcall-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
  text-align: center;
}
.rollcall-header h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.rollcall-star {
  color: var(--blood);
  font-size: 1.1rem;
}

/* Roll call grid */
.rollcall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule-2);
  border-left: 1px solid var(--rule-2);
}
@media (max-width: 900px) { .rollcall { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rollcall { grid-template-columns: 1fr; } }

.precinct-card {
  padding: 2.25rem 1.9rem 2rem;
  border-right: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
  position: relative;
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
}
.precinct-card:hover {
  background: color-mix(in srgb, var(--cream-2) 65%, transparent);
}

.precinct-code {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--serif);
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--ink);
  line-height: 0.85;
  font-variation-settings: "opsz" 144;
}
.precinct-code-letter {
  font-size: 3.75rem;
  font-style: italic;
}
.precinct-code-number {
  font-size: 2.5rem;
  color: var(--blood);
  font-style: normal;
}

.precinct-persons {
  margin-bottom: 1.5rem;
  flex: 1;
}
.precinct-person {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.18rem;
  line-height: 1.35;
  color: var(--ink);
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-variation-settings: "opsz" 24;
}
.precinct-person::before {
  content: '\2605';
  font-size: 0.5rem;
  color: var(--blood);
  transform: translateY(-2px);
}
.precinct-person.vacant {
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.55;
}
.precinct-person.vacant::before {
  content: '\25CB';
  color: var(--ink-soft);
}

.precinct-email {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blood);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  width: 100%;
  transition: color 0.2s ease;
}
.precinct-email:hover { color: var(--blood-deep); }
.precinct-email .arrow { transition: transform 0.2s ease; }
.precinct-email:hover .arrow { transform: translateX(3px); }

/* =========================================================
   FINDER
   ========================================================= */

.section-finder-wrap {
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--cream-2) 12%,
    var(--cream-2) 88%,
    transparent 100%
  );
  position: relative;
}
.section-finder-wrap::before,
.section-finder-wrap::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}
.section-finder-wrap::before { top: 0; opacity: 0; }
.section-finder-wrap::after { bottom: 0; opacity: 0; }

.finder-lede {
  max-width: 640px;
  margin: 0 auto 4rem;
  text-align: center;
}
.finder-lede p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 72;
}

.finder-app {
  max-width: 760px;
  margin: 0 auto;
}

.finder-search {
  margin-bottom: 1rem;
}

.finder-label {
  display: block;
  font-family: var(--ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.finder-input-wrap {
  position: relative;
  border-bottom: 2px solid var(--ink);
  transition: border-color 0.3s ease;
  padding-right: 2.5rem;
}
.finder-input-wrap:focus-within {
  border-bottom-color: var(--blood);
}

.finder-input {
  width: 100%;
  background: transparent;
  border: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  color: var(--ink);
  padding: 0.45rem 0 0.65rem 0;
  letter-spacing: -0.015em;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  font-variation-settings: "opsz" 144;
}
.finder-input:focus { outline: none; }
.finder-input::placeholder {
  color: var(--ink-soft);
  opacity: 0.38;
  font-style: italic;
}
.finder-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.finder-input-icon {
  position: absolute;
  right: 0.25rem;
  bottom: 0.65rem;
  color: var(--blood);
  font-family: var(--ui);
  font-size: 1.3rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.finder-input-wrap:focus-within .finder-input-icon,
.finder-input:not(:placeholder-shown) + .finder-input-icon {
  opacity: 1;
}

.finder-hint {
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1rem 0 0 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.finder-hint span { color: var(--blood); opacity: 0.7; }

/* Suggestions */
.finder-suggestions {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
}
.suggestion {
  display: block;
  padding: 1.25rem 0 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.05rem;
  transition: padding 0.3s cubic-bezier(0.2, 0.6, 0.2, 1), color 0.25s ease;
  position: relative;
  animation: slideIn 0.45s cubic-bezier(0.2, 0.6, 0.2, 1) both;
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  text-align: left;
}
.suggestion::before {
  content: '\2192';
  position: absolute;
  left: 0; top: 50%;
  transform: translate(-8px, -50%);
  opacity: 0;
  color: var(--blood);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.suggestion:hover,
.suggestion:focus-visible {
  padding-left: 1.75rem;
  color: var(--blood);
  outline: none;
}
.suggestion:hover::before,
.suggestion:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%);
}
.suggestion:nth-child(1) { animation-delay: 0.04s; }
.suggestion:nth-child(2) { animation-delay: 0.08s; }
.suggestion:nth-child(3) { animation-delay: 0.12s; }
.suggestion:nth-child(4) { animation-delay: 0.16s; }
.suggestion:nth-child(5) { animation-delay: 0.20s; }
.suggestion:nth-child(6) { animation-delay: 0.24s; }
.suggestion:nth-child(7) { animation-delay: 0.28s; }
.suggestion:nth-child(8) { animation-delay: 0.32s; }
.suggestion:nth-child(9) { animation-delay: 0.36s; }
.suggestion:nth-child(10) { animation-delay: 0.40s; }

/* Loading */
.finder-loading {
  margin: 3rem 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  font-variation-settings: "opsz" 72;
}
.loading-pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blood);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* Result */
.finder-result {
  margin-top: 3rem;
  animation: fadeRise 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.result-header {
  text-align: center;
  margin-bottom: 2.75rem;
}
.result-top-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.result-top-rule span {
  height: 1px;
  flex: 0 0 80px;
  background: var(--rule-2);
}
.result-top-rule strong {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--blood);
}
.result-precinct {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(4rem, 10vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-variation-settings: "opsz" 144;
}
.result-precinct-letter { font-style: italic; }
.result-precinct-number { color: var(--blood); font-style: normal; }

.result-district-name {
  margin-top: 0.75rem;
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.result-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
@media (max-width: 720px) { .result-body { grid-template-columns: 1fr; } }

.result-card {
  background: var(--cream);
  border: 1px solid var(--rule-2);
  padding: 2.4rem 2rem;
  position: relative;
}
.result-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--blood);
  border-left: 2px solid var(--blood);
}
.result-card::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 14px; height: 14px;
  border-bottom: 2px solid var(--blood);
  border-right: 2px solid var(--blood);
}
.result-card-label {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.result-persons { margin-bottom: 1.5rem; }
.result-person {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  padding: 0.35rem 0;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48;
}
.result-person.vacant {
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.55;
}
.result-email {
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  width: 100%;
  justify-content: space-between;
}
.result-email:hover { color: var(--blood-deep); }
.result-email .arrow { transition: transform 0.2s ease; }
.result-email:hover .arrow { transform: translateX(3px); }

.polling-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48;
}
.polling-address {
  font-family: var(--body);
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.55;
}
.result-reset {
  margin-top: 2.75rem;
  text-align: center;
}

.finder-empty {
  margin-top: 3rem;
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--rule-2);
  background: color-mix(in srgb, var(--cream) 55%, transparent);
}
.finder-empty p {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-size: 1.15rem;
  max-width: 480px;
  margin: 0 auto;
  font-variation-settings: "opsz" 72;
}
.finder-empty a { color: var(--blood); text-decoration: underline; text-underline-offset: 4px; }

/* =========================================================
   GET INVOLVED
   ========================================================= */

.involved-statement {
  max-width: 900px;
  margin: 0 auto 5rem;
  text-align: center;
}
.involved-statement p {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 48;
}
.involved-statement em {
  font-style: normal;
  color: var(--blood);
  font-weight: 500;
}

.involved-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 28rem));
  justify-content: center;
  gap: 1.25rem;
}
@media (max-width: 900px) { .involved-grid { grid-template-columns: 1fr; } }

.action-card {
  background: var(--cream);
  border: 1px solid var(--rule-2);
  padding: 2.75rem 2.25rem 2.25rem;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}
.action-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), background 0.3s ease;
}
.action-card:hover {
  transform: translateY(-6px);
  border-color: var(--blood);
  box-shadow: 0 28px 60px -24px rgba(14, 27, 61, 0.35);
}
.action-card:hover::before {
  background: var(--blood);
  transform: scaleX(1);
}
.action-numeral {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.9rem;
  color: var(--blood);
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.02em;
  font-variation-settings: "opsz" 72;
}
.action-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  letter-spacing: -0.022em;
  margin: 0 0 1.15rem;
  color: var(--ink);
  line-height: 1.05;
  font-variation-settings: "opsz" 72;
}
.action-desc {
  font-family: var(--body);
  color: var(--ink-soft);
  flex: 1;
  margin: 0 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
}
.action-cta {
  font-family: var(--ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blood);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.action-cta span { transition: transform 0.3s ease; display: inline-block; }
.action-card:hover .action-cta span { transform: translateX(5px); }

/* =========================================================
   CONTACT
   ========================================================= */

.contact-lede {
  max-width: 640px;
  margin: 0 auto 4rem;
  text-align: center;
}
.contact-lede p {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 48;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.contact-field {
  margin-bottom: 2.5rem;
}

.contact-label {
  display: block;
  font-family: var(--ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.contact-optional {
  display: block;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: none;
  font-family: var(--body);
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.7;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.contact-input,
.contact-textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--rule-2);
  padding: 0.6rem 0;
  font-family: var(--body);
  font-size: 1.15rem;
  color: var(--ink);
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  line-height: 1.5;
}
.contact-input:focus,
.contact-textarea:focus {
  outline: none;
  border-bottom-color: var(--blood);
}
.contact-textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.contact-submit {
  margin-top: 3rem;
  text-align: center;
}
.contact-submit .btn-primary {
  padding: 1.2rem 2.75rem;
}

.contact-form.is-sending .btn-primary {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
}

.contact-error {
  font-family: var(--body);
  font-style: italic;
  color: var(--blood);
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.contact-success {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  animation: fadeRise 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.contact-success-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  color: var(--blood);
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}
.contact-success-text {
  font-family: var(--body);
  font-size: 1.125rem;
  color: var(--ink);
  margin: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem var(--gutter) 3rem;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-top: 4rem;
}
.footer-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--blood) 0 33.33%,
    var(--cream) 33.33% 66.66%,
    var(--ink-2) 66.66% 100%
  );
}

.footer-inner { max-width: var(--max); margin: 0 auto; }

.footer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-flag {
  display: block;
  width: clamp(44px, 5vw, 56px);
  height: auto;
  margin: 0 auto 2.25rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  transform-origin: left center;
  animation: flagWave 5s ease-in-out infinite;
}
@keyframes flagWave {
  0%, 100% { transform: translateX(0)    rotate(0deg); }
  25%      { transform: translateX(-0.5px) rotate(-0.6deg); }
  50%      { transform: translateX(0.5px)  rotate(0.6deg); }
  75%      { transform: translateX(-0.5px) rotate(-0.3deg); }
}
.footer-star {
  color: var(--blood-light);
  font-size: 1.55rem;
}
.footer-mark-text {
  font-family: var(--serif);
  line-height: 0.95;
  text-align: center;
}
.footer-name-lg {
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--cream);
  font-variation-settings: "opsz" 144;
}
.footer-name-sm {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--cream-2);
  letter-spacing: -0.015em;
  margin-top: 0.25rem;
  font-variation-settings: "opsz" 72;
}

.footer-contact {
  font-family: var(--ui);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-2);
  margin-bottom: 2rem;
}
.footer-contact a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.footer-contact a:hover {
  color: var(--blood-light);
  border-bottom-color: var(--blood-light);
}
.footer-contact .dot { margin: 0 0.85rem; opacity: 0.4; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 4rem;
  font-family: var(--ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.footer-social a {
  color: var(--cream-2);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.footer-social a:hover {
  color: var(--cream);
  border-bottom-color: var(--blood-light);
}

.footer-fineprint {
  font-family: var(--ui);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream-2) 45%, transparent);
  line-height: 2.1;
}
.footer-fineprint p { margin: 0; }

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes fadeRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Hero load sequence */
.topbar             { animation: fadeRise 0.6s ease-out both; }
.hero-meta          { animation: fadeRise 0.8s ease-out 0.10s both; }
.hero-title-italic  { animation: fadeRise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.20s both; }
.hero-title-roman   { animation: fadeRise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.34s both; }
.hero-rule          { animation: fadeRise 0.8s ease-out 0.50s both; }
.hero-tagline       { animation: fadeRise 0.8s ease-out 0.62s both; }
.hero-cta           { animation: fadeRise 0.8s ease-out 0.76s both; }

.hero-stars span {
  animation: fadeRise 0.5s ease-out both;
}
.hero-stars span:nth-child(1)  { animation-delay: 0.90s; }
.hero-stars span:nth-child(2)  { animation-delay: 0.95s; }
.hero-stars span:nth-child(3)  { animation-delay: 1.00s; }
.hero-stars span:nth-child(4)  { animation-delay: 1.05s; }
.hero-stars span:nth-child(5)  { animation-delay: 1.10s; }
.hero-stars span:nth-child(6)  { animation-delay: 1.15s; }
.hero-stars span:nth-child(7)  { animation-delay: 1.20s; }
.hero-stars span:nth-child(8)  { animation-delay: 1.25s; }
.hero-stars span:nth-child(9)  { animation-delay: 1.30s; }
.hero-stars span:nth-child(10) { animation-delay: 1.35s; }
.hero-stars span:nth-child(11) { animation-delay: 1.40s; }
.hero-stars span:nth-child(12) { animation-delay: 1.45s; }

/* Scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Focus-visible */
:focus-visible {
  outline: 2px solid var(--blood);
  outline-offset: 3px;
  border-radius: 2px;
}
