/* ── Community Choice Awards — civic gala elegance ──────────────────
   Midnight plum + spotlight glow, brushed gold dividers, tall serif,
   award-envelope category plates. Hand-coded. */

:root {
  --plum: #241a2e;
  --plum-2: #2f2240;
  --card: #35284a;
  --gold: #d8b25f;
  --gold-soft: rgba(216, 178, 95, 0.35);
  --ivory: #f5efe4;
  --ivory-soft: #b4a9c4;
  --line: rgba(216, 178, 95, 0.22);
  --err: #e07a6a;
  --font-display: 'Prata', serif;
  --font-body: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background-color: var(--plum);
  background-image:
    radial-gradient(55% 38% at 50% 0%, rgba(216, 178, 95, 0.14), transparent 70%),
    radial-gradient(40% 30% at 8% 90%, rgba(216, 178, 95, 0.05), transparent 70%);
  color: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 700px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 70px 0 40px; }

.year-line {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  line-height: 1.1;
}

.hero h1 .gold { color: var(--gold); }

.hero .sub {
  max-width: 520px;
  margin: 16px auto 0;
  color: var(--ivory-soft);
  font-size: 1.04rem;
}

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 10px;
  background: rgba(216, 178, 95, 0.1);
  border: 1px solid var(--gold-soft);
  text-align: center;
  font-size: 0.96rem;
}

/* ── Ballot card ──────────────────────────────────────────────────── */
.ballot-card {
  background: linear-gradient(180deg, var(--plum-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 32px 38px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  margin-top: 8px;
}

/* Progress */
.progress-row { margin-bottom: 28px; }

.progress-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  text-align: center;
}

.progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(245, 239, 228, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #eecf8a);
  transition: width 0.4s ease;
}

/* Pages */
.survey-page-title,
.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  text-align: center;
  margin-bottom: 6px;
}

.page-sub { text-align: center; color: var(--ivory-soft); font-size: 0.95rem; margin-bottom: 24px; }

/* Question blocks */
.q-block { margin-bottom: 28px; }

.q-num {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.q-text { font-weight: 600; font-size: 1.12rem; margin-bottom: 4px; }

.q-desc { color: var(--ivory-soft); font-size: 0.88rem; margin-bottom: 12px; }

.q-options { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  background: rgba(245, 239, 228, 0.05);
  border: 1.5px solid rgba(245, 239, 228, 0.15);
  border-radius: 10px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ivory);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.opt-btn .dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
  position: relative;
}

.opt-btn:hover { border-color: var(--gold); }

.opt-btn.is-selected {
  border-color: var(--gold);
  background: rgba(216, 178, 95, 0.12);
}

.opt-btn.is-selected .dot { border-color: var(--gold); }
.opt-btn.is-selected .dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}

/* Text inputs */
.field { margin-bottom: 18px; }

label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; }

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ivory);
  background: rgba(245, 239, 228, 0.06);
  border: 1.5px solid rgba(245, 239, 228, 0.18);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 178, 95, 0.15);
}

input::placeholder { color: var(--ivory-soft); opacity: 0.6; }

input.error { border-color: var(--err); }

/* Nav */
.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.nav-row .btn:only-child { margin-left: auto; }

.form-error { color: var(--err); font-weight: 500; font-size: 0.92rem; text-align: center; margin-top: 16px; }

/* Done */
.done-card { text-align: center; }

.done-seal {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: rgba(216, 178, 95, 0.14);
  border: 1.5px solid var(--gold-soft);
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  padding: 14px 34px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  line-height: 1.2;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(120deg, var(--gold), #c19a45);
  color: var(--plum);
  box-shadow: 0 14px 32px rgba(216, 178, 95, 0.3);
}

.btn-ghost {
  background: rgba(245, 239, 228, 0.06);
  border: 1px solid rgba(245, 239, 228, 0.2);
  color: var(--ivory);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(36, 26, 46, 0.35);
  border-top-color: var(--plum);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--err);
  color: #fff;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 120;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  max-width: 92vw;
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 26px 20px;
  color: var(--ivory-soft);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

#wbx-powered-by-slot { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
