/* AWRP Pledge: matches the current site's look (proxima-soft headings, Titillium body, Thalia purple). */

:root {
  --plum: #79679a;      /* brand purple from the current site */
  --lilac: #a395c8;     /* inner panel */
  --card: #7a68a0;      /* pledge cards */
  --ink: #2b2e38;
  --white: #fff;
  --error: #ffe3df;
  --radius: 22px;
  --head: "proxima-soft", "Titillium Web", system-ui, sans-serif;
  --body: "Titillium Web", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--plum);
  color: var(--white);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  position: relative;
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
  margin: 16px;
  padding: 72px 20px 96px;
  background: var(--lilac);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 104px;
}
.badge img { width: 100%; height: auto; display: block; }
.badge-fallback {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--white); color: var(--plum);
  display: grid; place-items: center;
  font: italic 900 15px/1 var(--head); text-transform: uppercase;
  padding: 10px;
}

h1, h2 {
  font-family: var(--head);
  font-weight: 900;
  font-style: italic;
  line-height: 1.05;
  margin: 24px 0 8px;
}
h1 { font-size: clamp(40px, 9vw, 64px); }
h2 { font-size: clamp(32px, 7vw, 46px); }

.lead { font-size: 22px; margin: 0 0 24px; }
.hint { font-size: 14px; opacity: .9; margin: 0 0 16px; }

.total {
  margin: 24px 0 8px;
  font: italic 900 clamp(56px, 14vw, 96px)/1 var(--head);
}
.total-caption { margin: 0 0 32px; font-size: 20px; }

.btn {
  display: inline-block;
  min-width: 200px;
  margin: 12px 6px;
  padding: 12px 32px;
  border: 0;
  border-radius: 1000px;
  background: var(--white);
  color: var(--plum);
  font: 700 22px/1.2 var(--head);
  text-decoration: none;
  cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.dark { background: var(--plum); color: var(--white); }

.home-btn {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--white);
  display: grid; place-items: center;
}
.home-btn svg { width: 34px; height: 34px; fill: var(--plum); }

/* Forms */
form.details { width: 100%; max-width: 460px; text-align: left; }
label { display: block; font-weight: 700; font-size: 20px; margin: 20px 0 6px; }
select, input[type=text] {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  font: 18px var(--body);
  color: var(--ink);
  background: var(--white);
}
.field-error { display: block; min-height: 1.3em; color: var(--error); font-size: 15px; margin-top: 4px; }
.form-error { color: var(--error); text-align: center; min-height: 1.4em; margin: 8px 0; }
.btn-row { text-align: center; margin-top: 16px; }

/* Pledge carousel */
.carousel { position: relative; width: 100%; max-width: 640px; margin: 8px 0 16px; }
.track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 4px;
}
.track::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: var(--card);
  border: 5px solid var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  min-height: 210px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
.card.selected { background: var(--white); color: var(--plum); border-color: var(--plum); }
.card-title { font: italic 900 22px/1.25 var(--head); margin: 0 0 18px; }
.card-more {
  background: none; border: 0; color: inherit; cursor: pointer;
  font: 700 20px var(--head); text-transform: uppercase;
}
.card-chosen { font: 700 16px var(--head); margin-top: 10px; }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 0; color: var(--white); cursor: pointer;
  font-size: 34px; line-height: 1;
}
.arrow.prev { left: -46px; }
.arrow.next { right: -46px; }
@media (max-width: 760px) {
  .arrow.prev { left: -14px; }
  .arrow.next { right: -14px; }
  .card { flex-basis: 84%; }
}

/* Fact dialog */
dialog {
  width: min(560px, calc(100vw - 32px));
  border: 0;
  border-radius: 16px;
  padding: 36px 28px 24px;
  color: var(--ink);
  text-align: left;
}
dialog::backdrop { background: rgba(43, 46, 56, .65); }
dialog ul { margin: 0 0 20px; padding-left: 20px; font-size: 18px; }
dialog li { margin-bottom: 8px; }
.dialog-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: 0; font-size: 32px; color: var(--plum); cursor: pointer;
}
.dialog-actions { text-align: center; }

.turnstile { min-height: 70px; margin: 8px 0; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .track { scroll-behavior: smooth; }
}
.hint.left { text-align: left; }
