/* Hope for Children donation pages. Mobile-first, plain CSS. */
@font-face { font-family: "Avenir Next"; src: url("/assets/fonts/AvenirNext-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Avenir Next"; src: url("/assets/fonts/AvenirNext-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Neue Helvetica"; src: url("/assets/fonts/NeueHelvetica-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --orange: #ff9600;
  --red: #e34800;
  --red-dark: #c63f00;
  --green: #00af6d;
  --green-dark: #007a4c;
  --yellow: #ffd600;
  --ink: #403f51;
  --paper: #f4f4f7;
  --line: #cfcfd8;
  --error: #b3261e;
  --body-font: "Avenir Next", Avenir, "Century Gothic", Helvetica, Arial, sans-serif;
  --head-font: "Neue Helvetica", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
a { color: var(--green-dark); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; }

h1, h2 { font-family: var(--head-font); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.7rem; color: var(--red); letter-spacing: -.02em; margin-top: 1.2rem; }
h2 { font-size: 1.2rem; color: var(--ink); }
.lead { font-size: 1.05rem; margin: 0 0 1.2rem; }
.muted { color: #5c5b6c; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

.site-header { background: #fff; border-bottom: 4px solid var(--orange); }
.site-header .wrap { padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-block; line-height: 0; }
.logo img { width: 92px; height: auto; }

.banner {
  height: 120px;
  background: #403f51 url("/assets/img/StYaredBanner.jpg") center 40% / cover no-repeat;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 16px;
}
.card.notice { border-left: 6px solid var(--yellow); }
.card.notice h2 { margin-bottom: .3em; }
.card.notice p { margin: 0; }
.notice-box { background: #fff; border-left: 6px solid var(--red); padding: 12px 16px; margin: 0 0 16px; }

h2.step { counter-increment: step; display: flex; align-items: center; gap: 10px; }
form, main { counter-reset: step; }
h2.step::before {
  content: counter(step);
  flex: none;
  width: 1.8em; height: 1.8em; line-height: 1.8em; text-align: center;
  border-radius: 50%; background: var(--green-dark); color: #fff; font-size: .85em;
}
#payment-heading::before { content: "\2713"; }

/* Fields */
.field { margin: 0 0 14px; }
.grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
label { display: block; font-weight: 700; margin-bottom: 4px; }
.req { color: var(--error); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #8b8a99;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 44px;
}
textarea { resize: vertical; }
input[readonly], select:disabled, textarea[readonly] { background: #ececf1; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.error { color: var(--error); font-weight: 700; margin: 4px 0 0; font-size: .95rem; }
.hint { margin: 6px 0 0; font-size: .95rem; color: #5c5b6c; }
.money { position: relative; }
.money-sign { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 700; }
.money input { padding-left: 28px; font-size: 1.15rem; font-weight: 700; }

/* Options */
.option { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; background: #fff; }
.option.is-selected { border-color: var(--green-dark); box-shadow: 0 0 0 1px var(--green-dark); }
.option-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px; margin: 0; cursor: pointer; font-weight: 700; }
.option-body { padding: 0 12px 12px 42px; }
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; font-weight: 500; cursor: pointer; padding: 4px 0; }
.choice input, .option-head input, .check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green-dark); }
.subgroup { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; }
.subgroup > legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.note { font-size: .95rem; margin: 8px 0 0; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; }
.check label { margin: 0; font-weight: 500; }
.turnstile { min-height: 0; margin: 0 0 14px; }

/* Buttons */
.btn {
  display: inline-block; min-height: 48px; padding: 12px 24px;
  font-family: var(--head-font); font-weight: 600; font-size: 1.2rem; line-height: 1.1;
  color: #fff; background: var(--red-dark); border: 2px solid var(--red-dark); border-radius: 8px;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: #a93500; border-color: #a93500; color: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-secondary { background: #fff; color: var(--red-dark); }
.btn-secondary:hover { background: #fff1ea; color: #a93500; }
.btn-link { background: none; border-color: transparent; color: var(--green-dark); font-size: 1rem; text-decoration: underline; font-family: var(--body-font); font-weight: 700; padding: 8px 0; }
.btn-link:hover { background: none; border-color: transparent; color: var(--red-dark); }
#submit { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

/* Status + result */
.status:empty { display: none; }
.status { background: #fff; border-left: 6px solid var(--green); padding: 12px 16px; margin: 0 0 16px; font-weight: 700; }
.status.is-error { border-left-color: var(--error); color: var(--error); }
.result h2 { color: var(--green-dark); }
.result.is-warn h2 { color: var(--red-dark); }
.result p { margin: 0 0 .8em; }
.result .ref { font-size: 1.2rem; }
.mock-panel { background: #fff9d6; border: 3px dashed var(--ink); border-radius: 8px; padding: 16px; margin: 0 0 12px; }
.mock-title { font-family: var(--head-font); font-weight: 600; font-size: 1.25rem; margin: 0 0 6px; }
#fz-payment { min-height: 0; }
#fz-payment iframe { display: block; width: 100%; max-width: 560px; height: 560px; border: 0; }
#payment.is-busy .btn { opacity: .6; pointer-events: none; }

.site-footer { margin-top: 32px; padding: 20px 0; background: var(--ink); color: #fff; font-size: .95rem; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--yellow); }

@media (min-width: 600px) {
  h1 { font-size: 2.1rem; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 24px; }
  .banner { height: 180px; }
  .logo img { width: 116px; }
  #submit { width: auto; min-width: 280px; }
}
@media (min-width: 1000px) {
  .banner { height: 240px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
