:root {
  --paper: #F5F0E6;
  --paper-2: #ECE4D4;
  --card: #FBF8F2;
  --ink: #1D2A23;
  --ink-2: #4A5A50;
  --muted: #7A867D;
  --forest: #22412F;
  --forest-2: #2F5740;
  --gold: #B8894A;
  --line: rgba(29, 42, 35, .13);
  --shadow: 0 1px 2px rgba(29,42,35,.05), 0 10px 30px -12px rgba(29,42,35,.22);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
body::before { /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  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%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--forest-2); }
[hidden] { display: none !important; }

/* ---------- Ambient neighborhood photos behind hero ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ambient-img {
  position: absolute; inset: -4%; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 2.4s ease; filter: saturate(.7) blur(1px);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 30%, #000 85%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 30%, #000 85%);
}
.ambient-img.on { opacity: .16; animation: drift 24s linear forwards; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ---------- Top bar ---------- */
.topbar {
  position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 44px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 500 19px/1 var(--serif); letter-spacing: .01em; }
.brand-mark { width: 26px; height: 26px; color: var(--forest-2); }
.topnav { display: flex; align-items: center; gap: 4px; }
.navlink {
  background: none; border: 0; padding: 8px 12px; border-radius: 99px; font-size: 13.5px; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.navlink:hover { background: rgba(29,42,35,.06); color: var(--ink); }
.menu-btn {
  width: 42px; height: 42px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  display: grid; place-content: center; gap: 5px;
}
.menu-btn span { display: block; width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; }
@media (max-width: 760px) { .navlink { display: none; } }

/* ---------- Hero ---------- */
main { position: relative; z-index: 1; flex: 1; display: flex; }
.hero {
  width: 100%; max-width: 1080px; margin: 0 auto; text-align: center;
  padding: clamp(28px, 7vh, 80px) 16px clamp(40px, 8vh, 90px);
  display: flex; flex-direction: column; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: rgba(251,248,242,.7);
  backdrop-filter: blur(6px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(184,137,74,.18); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(184,137,74,.06); } }
h1 {
  margin: 0; font: 350 clamp(48px, 9.5vw, 116px)/.98 var(--serif); letter-spacing: -.025em;
  font-variation-settings: "opsz" 144; color: var(--ink);
}
h1 em { font-style: italic; font-weight: 300; color: var(--forest-2); }
.lede { max-width: 560px; margin: 26px auto 0; font-size: clamp(16.5px, 1.6vw, 19px); color: var(--ink-2); text-wrap: balance; }
.lede strong { color: var(--ink); font-weight: 600; }

.cta-wrap { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta {
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  padding: 22px 34px 22px 38px; border: 0; border-radius: 99px;
  background: var(--forest); color: #F7F2E8; font-size: 18px; font-weight: 600; letter-spacing: .01em;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 18px 40px -14px rgba(34,65,47,.7), 0 0 0 0 rgba(34,65,47,.25);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  animation: halo 3.2s ease-out infinite;
}
.cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.cta:hover { background: var(--forest-2); transform: translateY(-2px); }
.cta:hover svg { transform: translateX(4px); }
.cta:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
@keyframes halo { 0% { box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 18px 40px -14px rgba(34,65,47,.7), 0 0 0 0 rgba(34,65,47,.28); }
  70%,100% { box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 18px 40px -14px rgba(34,65,47,.7), 0 0 0 18px rgba(34,65,47,0); } }
.cta-note { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Slate grid ---------- */
.slate {
  list-style: none; margin: clamp(48px, 8vh, 80px) 0 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 2vw, 22px);
}
.cand { text-align: center; }
.portrait {
  position: relative; aspect-ratio: 4/5; border-radius: 18px; overflow: hidden;
  background: var(--tint); box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}
.cand:hover .portrait { transform: translateY(-4px) rotate(-.4deg); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.monogram {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: italic 300 clamp(44px, 6vw, 72px)/1 var(--serif); color: rgba(255,255,255,.92);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.28), transparent 60%),
    linear-gradient(160deg, var(--tint), var(--tint-2));
}
.monogram::after { /* faint botanical watermark */
  content: ""; position: absolute; right: -14%; bottom: -10%; width: 70%; aspect-ratio: 1; opacity: .18;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='white' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M20 37 C20 28 19 20 21 6'/%3E%3Cpath d='M20.3 27 C15 26 11.5 22.5 11 17.5 C16 18 19.5 21.5 20.3 27Z'/%3E%3Cpath d='M20.6 20 C25.5 19 28.5 15.5 28.8 10.5 C24 11.3 21 14.8 20.6 20Z'/%3E%3Cpath d='M20 31 C24.5 30.5 27.5 28 28.5 24 C24.5 24.3 21.3 26.8 20 31Z'/%3E%3Ccircle cx='21' cy='5' r='2.2'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}
.check {
  position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 7px;
  background: rgba(251,248,242,.94); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.check svg { width: 15px; height: 15px; stroke: var(--forest); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.cand-name { margin: 14px 0 0; font: 450 clamp(19px, 2vw, 24px)/1.15 var(--serif); }
.cand-street { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 760px) {
  .slate { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .cand { grid-column: span 2; }
  .cand:nth-child(4) { grid-column: 2 / span 2; }
  .portrait { border-radius: 14px; }
  .cand-street { font-size: 11.5px; }
  .cand-name { margin-top: 10px; }
}

/* ---------- Footer (periphery) ---------- */
.foot {
  position: relative; z-index: 1; border-top: 1px solid var(--line);
  padding: 22px clamp(16px, 4vw, 44px) calc(22px + env(safe-area-inset-bottom));
  display: grid; gap: 10px; font-size: 12.5px; color: var(--muted);
}
.foot-soon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.foot-label { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 11px; color: var(--ink-2); }
.foot-soon ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.foot-soon li { padding: 3px 10px; border: 1px dashed var(--line); border-radius: 99px; }
.disclaimer { margin: 0; max-width: 900px; }

.textlink { background: none; border: 0; padding: 0; color: var(--forest-2); font-weight: 600; text-decoration: none; font-size: 13.5px; }
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.textlink.small { font-size: 13px; }

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(20,28,23,.35); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.drawer {
  position: fixed; z-index: 21; top: 0; right: 0; height: 100dvh; width: min(480px, 100vw);
  background: var(--card); box-shadow: -20px 0 60px -20px rgba(0,0,0,.3);
  transform: translateX(105%); transition: transform .45s var(--ease);
  overflow-y: auto; padding: 64px 32px 40px;
}
.drawer.on { transform: none; }
.drawer .close, .sheet .close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); font-size: 22px; line-height: 1; color: var(--ink-2);
}
.panel { display: none; animation: fadeup .4s var(--ease); }
.panel.on { display: block; }
.panel p { color: var(--ink-2); }
.kicker { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold) !important; }
.panel-title, .step-title { margin: 0 0 14px; font: 400 32px/1.1 var(--serif); letter-spacing: -.01em; }
.menu-item {
  display: flex; justify-content: space-between; width: 100%; padding: 18px 2px; background: none; border: 0; border-bottom: 1px solid var(--line);
  font: 400 21px/1.2 var(--serif); text-align: left;
}
.menu-item span { color: var(--muted); transition: transform .2s; }
.menu-item:hover span { transform: translateX(4px); color: var(--ink); }
.menu-item.primary { color: var(--forest-2); }
.soon-list { list-style: none; counter-reset: s; padding: 0; margin: 22px 0 0; display: grid; gap: 18px; }
.soon-list li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px; }
.soon-list li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font: italic 400 15px/1.6 var(--serif); color: var(--gold); }
.soon-list b { font-weight: 600; }
.soon-list span { color: var(--ink-2); font-size: 14.5px; }

/* Album */
.stage { position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; background: var(--paper-2); margin-top: 8px; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s ease; }
.stage img.on { opacity: 1; }
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; color: var(--muted); }
.stage-empty svg { width: 46px; height: 46px; margin: 0 auto 10px; color: var(--gold); }
.stage-empty p { color: var(--muted) !important; font-size: 14.5px; }
.stage-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(251,248,242,.85); font-size: 22px; line-height: 1; display: none; }
.stage.many .stage-nav { display: block; }
.prev { left: 10px; } .next { right: 10px; }
.stage-caption { min-height: 1.6em; margin: 10px 2px 0; font: italic 400 15px/1.5 var(--serif); }
.share { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.share summary { cursor: pointer; font-weight: 600; color: var(--forest-2); list-style: none; }
.share summary::-webkit-details-marker { display: none; }
.share summary::before { content: "+ "; }
.share[open] summary::before { content: "− "; }
.share form { margin-top: 14px; }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-ui { display: block; padding: 22px; text-align: center; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--ink-2); cursor: pointer; }
.file input:focus-visible + .file-ui { outline: 2px solid var(--gold); }
.hp { position: absolute; left: -9999px; }

/* ---------- Forms & buttons ---------- */
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input:not([type]) {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 16px; font-weight: 500; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(47,87,64,.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 99px; border: 1px solid var(--forest); background: var(--forest); color: #F7F2E8;
  font-weight: 600; font-size: 15px; text-decoration: none; transition: background .2s, transform .2s;
}
.btn:hover { background: var(--forest-2); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--forest); }
.btn.ghost:hover { background: rgba(34,65,47,.06); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.fine { font-size: 12.5px; color: var(--muted) !important; margin: 4px 0 0; }
.msg { margin: 0; font-size: 14px; min-height: 1.2em; }
.msg.ok { color: var(--forest-2) !important; } .msg.err { color: #A2452E !important; }
.muted { color: var(--ink-2); }

/* ---------- Ballot modal ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(20,28,23,.45); backdrop-filter: blur(4px); animation: fade .3s; }
.sheet {
  position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--card); border-radius: 24px; padding: 30px clamp(20px, 5vw, 40px) 30px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.45);
  animation: fadeup .45s var(--ease);
}
@media (max-width: 560px) {
  .modal { padding: 0; place-items: end stretch; }
  .sheet { width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
}
.sheet-head { height: 36px; margin-bottom: 8px; }
.progress { width: calc(100% - 56px); height: 3px; background: var(--paper-2); border-radius: 3px; margin-top: 18px; overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--p); background: var(--forest-2); transition: width .5s var(--ease); }
.step { animation: fadeup .4s var(--ease); }
.step-title { font-size: clamp(28px, 5vw, 34px); }
.step .muted { margin: 0 0 18px; font-size: 14.5px; }
.step-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pick label {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; background: #fff; transition: border-color .2s, background .2s;
}
.pick input { appearance: none; width: 22px; height: 22px; flex: none; border: 1.5px solid #9AA59D; border-radius: 6px; display: grid; place-items: center; margin: 0; }
.pick input:checked { background: var(--forest); border-color: var(--forest); }
.pick input:checked::after { content: ""; width: 10px; height: 6px; border: 2.2px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.pick label:has(input:checked) { border-color: rgba(47,87,64,.45); background: #F2F5EF; }
.pick small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.pick .avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; background: linear-gradient(160deg, var(--tint), var(--tint-2)); color: #fff;
  display: grid; place-items: center; font: italic 400 16px/1 var(--serif); overflow: hidden; }
.pick .avatar img { width: 100%; height: 100%; object-fit: cover; }
.pick.other .avatar { background: var(--paper-2); color: var(--muted); }
.count { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.count.warn { color: #A2452E; font-weight: 600; }
#showAll { margin-top: 12px; }

.sigpad { position: relative; height: 200px; border: 1px solid var(--line); border-radius: 16px; background: #fff; touch-action: none; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 16px; cursor: crosshair; }
.sig-line { position: absolute; left: 28px; right: 28px; bottom: 50px; border-bottom: 1px solid #CFC8BA; pointer-events: none; }
.sig-x { position: absolute; left: 26px; bottom: 54px; font-size: 18px; color: #B6AE9F; pointer-events: none; }
.sig-clear { position: absolute; right: 14px; top: 10px; }

.send-steps { list-style: none; counter-reset: s; margin: 8px 0 0; padding: 0; display: grid; gap: 22px; }
.send-steps > li { counter-increment: s; position: relative; padding-left: 42px; }
.send-steps > li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.send-steps b { display: inline-block; margin-bottom: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.emailbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 10px;
  border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.emailbox code { font: 600 14.5px/1.3 var(--sans); word-break: break-all; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; }
.inline input { flex: 1 1 200px; }
.inline .msg { flex-basis: 100%; }
.thanks { margin: 28px 0 0; text-align: center; font: 400 20px/1.3 var(--serif); }
.thanks em { color: var(--forest-2); }

/* ---------- Motion ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } }
.reveal { opacity: 0; transform: translateY(16px); animation: rise .9s var(--ease) forwards; }
.reveal:nth-child(2) { animation-delay: .08s; } .reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .26s; } .reveal:nth-child(5) { animation-delay: .4s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
