/* ==========================================================================
   Help The Poor Initiative — Donate page
   Page-specific only. Tokens, header, footer, form controls and the accordion
   all come from css/style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Give — the form + sticky summary
   -------------------------------------------------------------------------- */
.give { padding: 68px 0 84px; }

.give-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 34px;
  align-items: start;
}

/* Numbered steps down the left column */
.give-step + .give-step { margin-top: 38px; }

.step-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 18px;
}

.step-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 800;
}

.step-title {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink);
}

.step-note {
  margin: -8px 0 18px 43px;
  font-size: .875rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   2. Frequency toggle
   -------------------------------------------------------------------------- */
.freq {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 7px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.freq label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  transition: background-color var(--speed) var(--ease),
              color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}

.freq input { position: absolute; opacity: 0; pointer-events: none; }

.freq label:hover { color: var(--green); }

.freq input:checked + span {
  color: #fff;
}

.freq label:has(input:checked) {
  background: var(--green);
  color: #fff;
  box-shadow: 0 5px 14px rgba(30, 92, 38, .28);
}

.freq label:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.freq .tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.freq label:has(input:checked) .tag { background: var(--orange-warm); }

/* --------------------------------------------------------------------------
   3. Currency switch
   -------------------------------------------------------------------------- */
.currency {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.currency-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
}

.currency-switch {
  display: flex;
  padding: 4px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.currency-switch label {
  position: relative;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--muted);
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.currency-switch input { position: absolute; opacity: 0; pointer-events: none; }

.currency-switch label:has(input:checked) {
  background: var(--ink);
  color: #fff;
}

.currency-switch label:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   4. Amount grid
   -------------------------------------------------------------------------- */
.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.amount {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 17px 16px;
  min-height: 108px;
  cursor: pointer;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              transform var(--speed) var(--ease),
              background-color var(--speed) var(--ease);
}

.amount input { position: absolute; opacity: 0; pointer-events: none; }

.amount:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.amount:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(30, 92, 38, .14);
}

.amount:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.amount-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.amount:has(input:checked) .amount-value { color: var(--green); }

.amount-impact {
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Tick badge on the selected card */
.amount::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 11px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m5 13 4 4L19 7' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .3s var(--ease), transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.amount:has(input:checked)::after { opacity: 1; transform: scale(1); }

/* Custom amount */
.amount--custom { justify-content: center; }

.custom-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.custom-prefix {
  position: absolute;
  left: 15px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--muted);
  pointer-events: none;
}

#customAmount { padding-left: 38px; }

/* --------------------------------------------------------------------------
   5. Designation chips
   -------------------------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  position: relative;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--speed) var(--ease);
}

.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  color: var(--green);
}

.chip:has(input:checked) {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 600;
}

.chip:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   6. Payment methods
   -------------------------------------------------------------------------- */
.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pay {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: all var(--speed) var(--ease);
}

.pay input { position: absolute; opacity: 0; pointer-events: none; }

.pay:hover { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }

.pay:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(30, 92, 38, .12);
}

.pay:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.pay-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--green);
}

.pay:has(input:checked) .pay-icon { background: #fff; }

.pay-name {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
}

.pay-note {
  display: block;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 400;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   7. Summary card (sticky on desktop)
   -------------------------------------------------------------------------- */
.summary {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.summary-title {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  font-size: .875rem;
  color: var(--muted);
}

.summary-row dd {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.summary-row--fee { display: none; }
.summary-row--fee.is-shown { display: flex; }

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 2px solid var(--line);
}

.summary-total dt {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 800;
  color: var(--ink);
}

.summary-total dd {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.summary-cadence {
  margin-top: 4px;
  font-size: .8125rem;
  color: var(--muted);
  text-align: right;
}

.summary-cta { margin-top: 20px; }

.summary-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  font-size: .78rem;
  color: var(--muted);
}

.summary-secure svg { flex: none; color: var(--green); }

.summary-status-link {
  margin-top: 8px;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}
.summary-status-link a { color: var(--green); font-weight: 600; text-decoration: underline; }

.summary-impact {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--green);
}

.summary-impact strong { font-weight: 700; }

/* --------------------------------------------------------------------------
   8. Mobile total bar — replaces the sticky card below 992px
   -------------------------------------------------------------------------- */
.total-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 140;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(14px, 4vw, 22px);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(16, 32, 20, .10);
  transform: translateY(102%);
  transition: transform .45s var(--ease);
}

.total-bar.is-visible { transform: translateY(0); }

.total-bar-figure { line-height: 1.2; }

.total-bar-label {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.total-bar-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.total-bar .btn { margin-left: auto; }

/* --------------------------------------------------------------------------
   9. Impact tiers strip
   -------------------------------------------------------------------------- */
.tiers { padding: 76px 0; background: var(--surface-alt); }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tier {
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}

.tier:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.tier-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  color: var(--orange);
}

.tier-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.tier-text {
  margin-top: 7px;
  font-size: .9375rem;
  line-height: 1.62;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   10. Transparency / allocation
   -------------------------------------------------------------------------- */
.transparency { padding: 84px 0; }

.trans-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 54px;
  align-items: center;
}

.trans-copy p {
  margin-top: 16px;
  line-height: 1.78;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.trust {
  display: flex;
  gap: 14px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.trust h3 {
  font-size: .9375rem;
  font-weight: 800;
  color: var(--ink);
}

.trust p {
  margin-top: 5px;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   11. Other ways to give
   -------------------------------------------------------------------------- */
.other { padding: 78px 0; background: var(--surface-alt); }

.other-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.way {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}

.way:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.way-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
}

.way h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.way p {
  flex: 1;
  margin: 9px 0 16px;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.bank-details {
  margin-top: 4px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  line-height: 1.85;
  color: var(--muted);
}

.bank-details strong {
  display: inline-block;
  min-width: 96px;
  font-family: var(--font-display);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   12. FAQ + closing
   -------------------------------------------------------------------------- */
.faq { padding: 84px 0; }

.faq-wrap { max-width: 800px; margin-inline: auto; }

.faq-head { text-align: center; margin-bottom: 34px; }

/* The closing band now lives in style.css as .cta-band — it is shared by
   every inner page. */

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .give-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .trans-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 992px) {
  .give-grid { grid-template-columns: 1fr; }
  /* The sticky card becomes a fixed bottom bar — the running total stays in
     view without eating a third of a small screen. */
  .summary { position: static; }
  .total-bar { display: flex; }
  body.has-total-bar { padding-bottom: 78px; }
  .other-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .give { padding: 52px 0 68px; }
  .tiers, .transparency, .other, .faq { padding: 58px 0; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: 1fr; }
  .freq { grid-template-columns: 1fr; border-radius: var(--radius); }
  .freq label { border-radius: var(--radius-sm); }
  .trust-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .amounts { grid-template-columns: 1fr; }
  .amount { min-height: 0; }
  .other-grid { grid-template-columns: 1fr; }
  .step-note { margin-left: 0; }
  .currency { margin-left: 0; width: 100%; justify-content: space-between; }
}
