/* Zenith 2027. Same visual language as the ballot: plum hall, paper form.
   No webfonts — every asset comes off your own box. */

:root {
  --night-deep: #14091F;
  --night:      #241539;
  --plum:       #38215A;
  --gold:       #E8B33C;
  --gold-deep:  #B8841F;
  --paper:      #FAF6EC;
  --paper-edge: #EFE7D5;
  --ink:        #2B2317;
  --ink-soft:   #6B6152;
  --rule:       #CDC2A9;
  --muted:      #A092BE;
  --stamp:      #4A7C59;

  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  --sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
           'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night-deep);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.wrap { width: 100%; max-width: 38rem; margin: 0 auto; padding: 0 22px; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  padding: 66px 0 58px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse 130% 80% at 50% 0%,
    var(--plum) 0%, var(--night) 44%, var(--night-deep) 100%);
}

/* Stage beams, drifting on unrelated cycles so the pattern never repeats.
   Shape from clip-path, falloff from a gradient: no blur filter, because
   blurring a viewport-sized element is what stutters on an older phone. */
.rig { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.beam {
  position: absolute;
  top: -6%;
  left: 50%;
  height: 128%;
  transform-origin: 50% 0;
  -webkit-clip-path: polygon(47.5% 0, 52.5% 0, 100% 100%, 0 100%);
  clip-path: polygon(47.5% 0, 52.5% 0, 100% 100%, 0 100%);
  will-change: transform;
}

.beam.a {
  width: 52vmax; margin-left: -26vmax;
  background: linear-gradient(180deg,
    rgba(255,226,163,0.18), rgba(255,226,163,0.06) 42%, transparent 76%);
  animation: sweepA 19s ease-in-out infinite alternate;
}

.beam.b {
  width: 44vmax; margin-left: -22vmax;
  background: linear-gradient(180deg,
    rgba(232,179,60,0.15), rgba(232,179,60,0.04) 45%, transparent 78%);
  animation: sweepB 26s ease-in-out infinite alternate;
}

.beam.c {
  width: 38vmax; margin-left: -19vmax;
  background: linear-gradient(180deg,
    rgba(186,158,255,0.13), rgba(186,158,255,0.03) 46%, transparent 74%);
  animation: sweepC 31s ease-in-out infinite alternate;
}

@keyframes sweepA { from { transform: rotate(-14deg); } to { transform: rotate(3deg); } }
@keyframes sweepB { from { transform: rotate(11deg); }  to { transform: rotate(-5deg); } }
@keyframes sweepC { from { transform: rotate(-4deg); }  to { transform: rotate(16deg); } }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 54% at 50% 46%,
    rgba(20,9,31,0.76) 0%, rgba(20,9,31,0.38) 56%, transparent 82%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.kicker {
  margin: 0 0 8px;
  font-size: 0.74rem;
  letter-spacing: 0.19em;
  color: var(--muted);
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 13vw, 5.2rem);
  line-height: 0.95;
  margin: 0;
  text-shadow: 0 6px 34px rgba(0,0,0,0.5);
}

.sub {
  margin: 12px 0 0;
  font-size: 0.96rem;
  letter-spacing: 0.09em;
  color: var(--gold);
}

.blurb {
  max-width: 30rem;
  margin: 20px auto 0;
  color: #CFC3E4;
  font-size: 1rem;
  text-wrap: balance;
}

.winner {
  display: inline-block;
  margin: 22px 0 0;
  padding: 13px 24px;
  border: 1px solid rgba(232,179,60,0.3);
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
}

.winner .label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: 3px;
}

.winner strong { font-family: var(--serif); font-size: 1.3rem; color: var(--gold); font-weight: 400; }
.winner .act { display: block; font-size: 0.86rem; color: #CFC3E4; }

.jump {
  display: inline-block;
  margin-top: 26px;
  padding: 14px 30px;
  background: var(--gold);
  color: #2A1B06;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 26px rgba(232,179,60,0.2);
}

.jump:hover { background: #F3C55B; }
.jump:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

/* ---------------- the form, as paper ---------------- */

main { padding: 46px 0 20px; }

.card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 32px 24px 28px;
  box-shadow: 0 18px 44px rgba(10, 4, 22, 0.45);
}

/* Torn from a pad — the same cue as the ballot slip. */
.card::before {
  content: '';
  position: absolute;
  top: -9px; left: 0; right: 0;
  height: 10px;
  background:
    linear-gradient(45deg,  transparent 50%, var(--paper) 51%) 0 0/12px 10px repeat-x,
    linear-gradient(-45deg, transparent 50%, var(--paper) 51%) 6px 0/12px 10px repeat-x;
}

.card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 6px;
}

.lede { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 22px; }

.field-label {
  display: block;
  margin: 16px 0 5px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink);
}

.field-label span { font-weight: 400; color: var(--ink-soft); }

.field {
  width: 100%;
  padding: 12px;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
}

.field:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 1px; }

textarea.field { resize: vertical; min-height: 8rem; }

.two { display: flex; flex-wrap: wrap; margin: 0 -7px; }
.two > div { flex: 1 1 12rem; min-width: 0; padding: 0 7px; }

/* Bots fill this in, people never see it. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-block;
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:hover { background: #443A28; }
.btn:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--rule); }
.btn.ghost:hover { background: var(--paper-edge); }

.fineprint { margin: 16px 0 0; font-size: 0.82rem; color: var(--ink-soft); }

.notice {
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  border-left: 3px solid var(--gold-deep);
  background: var(--paper-edge);
}

.notice.bad { border-left-color: #A62B3D; color: #7A1B29; }

.stamp {
  display: inline-block;
  margin: 4px 0 16px;
  padding: 9px 20px;
  color: var(--stamp);
  border: 3px double var(--stamp);
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.09em;
  transform: rotate(-4deg);
  animation: press 0.32s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

@keyframes press {
  from { transform: rotate(-4deg) scale(1.7); opacity: 0; }
  to   { transform: rotate(-4deg) scale(1);   opacity: 1; }
}

.tally { text-align: center; margin: 20px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------------- admin extras ---------------- */

.entry {
  padding: 16px 0;
  border-top: 1px solid var(--paper-edge);
}

.entry:first-of-type { border-top: none; }

.entry .meta { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 4px; }
.entry .topic { color: var(--gold-deep); font-weight: 600; }
.entry .idea { margin: 0; white-space: pre-wrap; overflow-wrap: break-word; }
.entry .who { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }

.filters { display: flex; flex-wrap: wrap; margin: 0 -4px 18px; }
.filters a {
  margin: 0 4px 7px;
  padding: 6px 13px;
  font-size: 0.83rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
}
.filters a.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------------- footer ---------------- */

footer {
  padding: 40px 0 54px;
  text-align: center;
  color: #6F6390;
  font-size: 0.82rem;
}

footer .name { font-family: var(--serif); font-size: 1.15rem; color: #9F91BE; margin: 0 0 2px; }
footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beam, .stamp { animation: none !important; }
}
