/* ============================================================
   Grace for HD51 — Survey v3
   Warm pastel pinks & reds · Oversized side numbers · Bold separators
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

/* ── TOKENS ── */
:root {
  /* Brand */
  --pink:          #D50080;
  --pink-pastel:   #f7c4e0;
  --pink-soft:     #fde8f4;
  --pink-mid:      #f9a8d4;
  --crimson:       #B31942;
  --crimson-pastel:#fbc4c4;
  --crimson-soft:  #fdeaea;
  --crimson-hover: #9a1536;
  --gold:          #c9a84c;
  --navy:          #0A3161;

  /* Backgrounds — warm rosy tint instead of blue */
  --bg:            #f5e8ef;
  --bg-light:      #fdf0f6;
  --bg-mid:        #f0dcea;
  --bg-dark:       #3d1428;

  /* Text */
  --text:          #2a0f1a;
  --text-muted:    #6b3a4e;

  /* Inputs */
  --input-bg:      rgba(255,255,255,0.85);
  --input-border:  rgba(179,25,66,0.2);
  --input-focus:   #B31942;

  /* Shadows */
  --shadow-sm:     0 2px 8px rgba(179,25,66,0.07);
  --shadow-md:     0 6px 24px rgba(179,25,66,0.12);

  --radius:        12px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -52px; left: 1rem;
  background: var(--crimson); color: #fff;
  padding: 10px 20px; border-radius: 0 0 8px 8px;
  font-size: 0.9rem; text-decoration: none;
  z-index: 9999; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── RETURN BAR ── */
.return-bar {
  background: var(--bg-dark);
  padding: 10px clamp(1rem, 5vw, 3rem);
}
.return-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.65); text-decoration: none;
  font-size: 0.82rem; font-family: 'Source Serif 4', serif;
  transition: color 0.2s;
}
.return-link:hover { color: #fff; }

/* ── HERO BAND ── */
.hero-band {
  background: var(--bg-dark);
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 3rem) clamp(2.5rem, 5vw, 4rem);
  position: relative; overflow: hidden;
}
.hero-band::before {
  content: '';
  position: absolute; left: -10%; top: -30%;
  width: 60%; height: 160%;
  background: radial-gradient(ellipse, rgba(213,0,128,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero-band::after {
  content: '';
  position: absolute; right: -5%; bottom: -20%;
  width: 45%; height: 120%;
  background: radial-gradient(ellipse, rgba(179,25,66,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.hero-band-inner {
  max-width: 820px; margin: 0 auto;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--pink-pastel); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--pink-pastel); flex-shrink: 0;
}
.hero-band h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -0.03em; color: #fff;
  margin-bottom: 1.25rem;
}
.hero-band h1 em { font-style: italic; color: var(--pink-pastel); }
.hero-sub {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: rgba(255,255,255,0.65);
  max-width: 580px; line-height: 1.8;
}

/* ── STICKY PROGRESS BAR ── */
.progress-sticky {
  position: sticky; top: 0; z-index: 50;
  background: var(--crimson);
  padding: 0.55rem clamp(1rem, 5vw, 3rem);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.progress-sticky-inner {
  max-width: 820px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
}
.progress-wrap {
  flex: 1; height: 5px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: #fff;
  border-radius: 3px; width: 0%;
  transition: width 0.5s ease;
}
.progress-label {
  font-size: 0.75rem; color: rgba(255,255,255,0.75);
  white-space: nowrap; flex-shrink: 0;
  font-family: 'Source Serif 4', serif;
}

/* ── BANDS ── */
.band {
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1rem, 5vw, 3rem);
  position: relative;
}
.band + .band {
  border-top: 3px solid var(--pink-pastel);
}
.band-light { background: var(--bg-light); }
.band-mid   { background: var(--bg-mid); }
.band-navy  { background: var(--bg-dark); }
.band-submit {
  background: var(--bg);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 5vw, 3rem);
  border-top: 3px solid var(--pink-pastel);
}

.band-inner {
  max-width: 820px; margin: 0 auto;
}
.band-inner-center {
  text-align: center; display: flex;
  flex-direction: column; align-items: center;
}

/* ── SECTION HEADERS ── */
.band-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1.5px solid var(--pink-pastel);
}
.band-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--pink-pastel);
  flex-shrink: 0;
  user-select: none;
  /* no background, no badge — just raw big number */
  background: none;
  padding: 0;
  border-radius: 0;
  width: auto;
  opacity: 1;
}
.band-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--crimson);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Light variants for navy band */
.band-num-light  { color: rgba(255,255,255,0.2); }
.band-title-light { color: var(--pink-pastel); }
.band-label-light { border-bottom-color: rgba(255,255,255,0.15); }

/* ── FORM GROUPS ── */
.band-fields { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group  { display: flex; flex-direction: column; gap: 0.45rem; }

.form-group label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.01em;
}
.required-star { color: var(--crimson); }

.form-group input,
.form-group textarea {
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 1rem; color: var(--text);
  font-family: 'Source Serif 4', serif;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(179,25,66,0.1);
}
.form-group input.error,
.form-group textarea.error {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(179,25,66,0.12);
}
.form-group textarea { resize: vertical; min-height: 110px; }

.band-mid .form-group input,
.band-mid .form-group textarea { background: rgba(255,255,255,0.65); }
.band-mid .form-group input:focus,
.band-mid .form-group textarea:focus { background: #fff; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field-error {
  font-size: 0.8rem; color: var(--crimson);
  font-weight: 600; min-height: 1em; display: block;
}
.field-hint {
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
}
.top-hint { margin-bottom: 0.25rem; }

/* ── PETITION BLOCK ── */
.petition-block {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
}
.petition-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.petition-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem; font-weight: 900;
  color: #fff; margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}
.petition-sub {
  font-size: 1rem; color: rgba(255,255,255,0.7);
  max-width: 440px; margin: 0 auto 1.75rem;
  line-height: 1.7;
}
.petition-error {
  display: block; margin-top: 0.75rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--crimson-pastel); min-height: 1em;
}

/* ── RADIO BUTTONS ── */
.radio-group {
  display: flex; gap: 0.75rem;
  justify-content: center; flex-wrap: wrap;
}
.radio-item {
  display: flex; align-items: center; gap: 0.65rem;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  font-size: 0.95rem; font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: all 0.2s; user-select: none;
}
.radio-item:hover {
  background: rgba(255,255,255,0.16);
  border-color: var(--pink-pastel);
  color: #fff;
}
.radio-item input[type="radio"] { display: none; }
.radio-box {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background: transparent; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.radio-item input:checked ~ .radio-box {
  border-color: var(--pink-pastel);
  background: var(--pink-pastel);
}
.radio-item input:checked ~ .radio-box::after {
  content: ''; display: block;
  width: 5px; height: 5px;
  border-radius: 50%; background: var(--bg-dark);
}
.radio-item:has(input:checked) {
  background: rgba(247,196,224,0.18);
  border-color: var(--pink-pastel);
  color: #fff;
}

/* ── SUBMIT BUTTON ── */
.btn-submit {
  background: var(--crimson); color: #fff;
  padding: 16px 56px; border-radius: 100px;
  font-family: 'Source Serif 4', serif;
  font-weight: 600; font-size: 1.05rem;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 0.75rem;
  box-shadow: var(--shadow-md);
  touch-action: manipulation;
}
.btn-submit:hover {
  background: var(--crimson-hover);
  box-shadow: 0 8px 28px rgba(179,25,66,0.28);
  transform: translateY(-1px);
}
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: none; flex-shrink: 0;
}
.btn-submit.loading .btn-spinner { display: block; }
.btn-submit.loading .btn-text { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-legal {
  font-size: 0.78rem; color: var(--text-muted);
  margin-top: 0.75rem; max-width: 360px; line-height: 1.6;
  text-align: center;
}

/* ── SUCCESS STATE ── */
.success-band {
  background: var(--bg-light);
  padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 5vw, 3rem);
  text-align: center;
}
.success-band[hidden] { display: none; }
.success-inner { max-width: 560px; margin: 0 auto; }
.success-icon { font-size: 3.5rem; margin-bottom: 1.25rem; display: block; }
.success-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 900;
  color: var(--crimson); margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.success-inner p {
  font-size: 1.05rem; color: var(--text-muted);
  margin-bottom: 2rem; line-height: 1.75;
}
.success-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.btn-primary {
  background: var(--crimson); color: #fff;
  padding: 13px 32px; border-radius: 100px;
  font-family: 'Source Serif 4', serif;
  font-weight: 600; font-size: 1rem;
  text-decoration: none; display: inline-block;
  transition: background 0.2s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--crimson-hover); }
.btn-outline {
  background: transparent; color: var(--crimson);
  padding: 13px 32px; border-radius: 100px;
  font-family: 'Source Serif 4', serif;
  font-weight: 600; font-size: 1rem;
  border: 2px solid var(--crimson); cursor: pointer;
  transition: all 0.2s; touch-action: manipulation;
}
.btn-outline:hover { background: var(--crimson); color: #fff; }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg-dark);
  padding: 2.5rem clamp(1rem, 5vw, 3rem);
}
.footer-inner {
  max-width: 820px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: #fff;
}
.footer-brand em { font-style: italic; color: var(--pink-pastel); }
.footer-legal {
  font-size: 0.75rem; color: rgba(255,255,255,0.45);
  line-height: 1.6; text-align: center;
}
.footer-email {
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  text-decoration: none; transition: color 0.2s;
}
.footer-email:hover { color: #fff; }

/* ── CONFETTI CANVAS ── */
#confettiCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.band { animation: fadeUp 0.5s ease both; }
.band-mid    { animation-delay: 0.06s; }
.band-navy   { animation-delay: 0.12s; }
.band-submit { animation-delay: 0.18s; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .band-num { font-size: clamp(3.5rem, 15vw, 5rem); }
  .band-title { font-size: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .radio-group { flex-direction: column; align-items: center; }
}