/* Support the village (#85 / #24) — the contribute page's own stylesheet.
 *
 * The page shipped with markup that named .contribute-* classes and a
 * stylesheet that did not exist, so it rendered as browser defaults: square
 * inputs, native radio dots, and glass-light cards invisible against a flat
 * white page. Everything below is the EXISTING brand system applied — the
 * store's gradient ground, .glass-light cards, .form-control-brand fields,
 * .btn-brand-primary CTAs — not a second design language.
 */

.contribute-page {
  /* Identical ramp to .store-page so the two commerce surfaces read as one
     site. Do not fork this value; if the store's ground changes, this
     follows it. */
  background: linear-gradient(180deg, #f7f3fc 0%, #f2f7fb 55%, #eef7f4 100%);
  min-height: calc(100vh - 64px);
  padding-bottom: 3.5rem;
}

/* ---- Hero ---- */
.contribute-hero {
  padding: 2.75rem 0 1.5rem;
  text-align: center;
}

.contribute-hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  color: var(--slate-darkest);
  margin-bottom: 0.75rem;
}

.contribute-lead {
  max-width: 46rem;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--slate-medium);
}

/* ---- The two lanes ---- */
.contribute-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 0.5rem;
}

@media (min-width: 860px) {
  .contribute-grid {
    /* Money is the wider column. Craft is a single email field; support
       carries tiers, a free amount, a credit name and the legal line. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.contribute-lane {
  padding: 1.6rem 1.65rem 1.75rem;
}

.contribute-lane h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  color: var(--slate-darkest);
  margin-bottom: 0.6rem;
}

.contribute-lane > p {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--slate-medium);
  margin-bottom: 1.25rem;
}

/* ---- Amount tiers ----
   Native radios are the single worst thing on the unstyled page: a row of
   grey dots where the primary decision is made. These are chips - the whole
   label is the hit target, which also makes them thumb-sized on a phone. */
.contribute-tiers {
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
  min-width: 0; /* fieldset defaults to min-content and breaks the grid */
}

.contribute-tiers legend {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.9rem;
  text-transform: lowercase;
  color: var(--slate-medium);
  margin-bottom: 0.6rem;
  padding: 0;
  width: auto;
  float: none;
}

.contribute-tier-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contribute-tier {
  position: relative;
  margin: 0;
  cursor: pointer;
}

/* Visually hidden, NOT display:none - the radio must stay focusable and
   reachable by keyboard and screen reader. */
.contribute-tier input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.contribute-tier span {
  display: inline-block;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(123, 68, 193, 0.25);
  background: rgba(255, 255, 255, 0.55);
  font-family: 'Merriweather', Georgia, serif;
  color: var(--slate-darkest);
  transition: all 0.2s ease;
}

.contribute-tier:hover span {
  border-color: rgba(123, 68, 193, 0.5);
  transform: translateY(-1px);
}

.contribute-tier input[type="radio"]:checked + span {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-blue) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(123, 68, 193, 0.55);
}

/* Focus must be visible on the CHIP, since the input itself is hidden. */
.contribute-tier input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ---- Fields ---- */
.contribute-field {
  display: block;
  margin-bottom: 1rem;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.9rem;
  text-transform: lowercase;
  color: var(--slate-medium);
}

.contribute-field input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
}

.contribute-optional {
  color: var(--slate-light);
}

.contribute-submit {
  width: 100%;
  margin-top: 0.35rem;
}

/* ---- The not-a-donation line ----
   Muted but NOT fine print, and it sits directly under the button where the
   decision is made. A supporter who thinks they made a tax-deductible gift
   was misled by us. */
.contribute-legal {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--slate-light);
}

.contribute-error,
.contribute-note {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md, 12px);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.contribute-error {
  background: rgba(220, 38, 38, 0.08);
  border-left: 3px solid #dc2626;
  color: #991b1b;
}

.contribute-note {
  background: rgba(30, 150, 252, 0.08);
  border-left: 3px solid var(--color-blue);
  color: var(--slate-dark);
}

/* ---- Craft lane capture ---- */
.contribute-capture .launch-list-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contribute-capture .launch-list-row input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
}

.contribute-capture .launch-list-privacy {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--slate-light);
}

.contribute-capture .launch-list-thanks {
  margin-top: 0.6rem;
  color: var(--color-purple);
}

.contribute-capture .launch-list-error {
  margin-top: 0.6rem;
  color: #991b1b;
}

/* ---- Thanks page ---- */
.contribute-thanks-card {
  max-width: 34rem;
  margin: 2.5rem auto;
  padding: 2rem 1.9rem;
  text-align: center;
}
