/* ==========================================================
   Hope Little Hearts — design system
   Palette: deep dusk #023047 · sky #219EBC · sun #FFB703 · coral #FB8500
   Type: Bricolage Grotesque (display) · Figtree (body) · Caveat (handwritten notes)
   ========================================================== */
:root {
  --deep: #023047;
  --sky: #219EBC;
  --sky-soft: #E4F3F8;
  --sun: #FFB703;
  --sun-soft: #FFF3D6;
  --coral: #FB8500;
  --ink: #22333B;
  --muted: #5C6B73;
  --paper: #FDFDFA;
  --line: #E4E4DC;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(2, 48, 71, .10);
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Figtree", sans-serif;
  --font-hand: "Caveat", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16.5px;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
img { max-width: 100%; display: block; }
a { color: var(--sky); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--deep); color: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--deep); line-height: 1.12; letter-spacing: -.01em; }

/* ---------- header ---------- */
.site-header { background: rgba(253,253,250,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--deep); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--sky); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--deep); margin: 5px 0; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; border: 0; cursor: pointer; text-decoration: none; font-family: var(--font-body); font-weight: 700; font-size: 1rem; padding: 13px 26px; border-radius: 999px; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sun); color: var(--deep); box-shadow: 0 4px 14px rgba(255,183,3,.4); }
.btn-sun:hover { color: var(--deep); }
.btn-deep { background: var(--deep); color: #fff; }
.site-nav .nav-donate { color: var(--deep); padding: 10px 22px; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, var(--sky-soft) 0%, var(--paper) 90%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; padding: 64px 0 72px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; margin-bottom: 18px; }
.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: 0; bottom: -.18em; width: 100%; height: .38em; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 26px; }
.hero-points { list-style: none; display: grid; gap: 10px; margin-bottom: 8px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.hero-points .dot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--sun-soft); color: var(--coral); display: grid; place-items: center; font-size: .8rem; margin-top: 2px; }

/* ---------- donation panel (signature element) ---------- */
.donate-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; position: relative; }
.donate-panel::before { content: ""; position: absolute; inset: -6px auto auto -6px; width: 54px; height: 54px; background: var(--sun); border-radius: 50%; z-index: -1; opacity: .9; }
.panel-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
.panel-sub { color: var(--muted); font-size: .93rem; margin-bottom: 18px; }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.amount-btn { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; padding: 14px 4px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--deep); cursor: pointer; transition: all .13s ease; }
.amount-btn:hover { border-color: var(--sky); }
.amount-btn.active { background: var(--deep); border-color: var(--deep); color: var(--sun); }
.custom-wrap { display: none; margin-bottom: 12px; }
.custom-wrap.show { display: block; }
.custom-input { position: relative; }
.custom-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.custom-input input { width: 100%; padding: 13px 14px 13px 30px; border: 2px solid var(--line); border-radius: 14px; font-size: 1.05rem; font-weight: 700; font-family: var(--font-body); }
.custom-input input:focus { border-color: var(--sky); outline: none; }
.impact-line { font-family: var(--font-hand); font-size: 1.45rem; color: var(--coral); min-height: 2.1rem; margin: 4px 0 14px; transform: rotate(-1deg); }
.donor-fields { display: grid; gap: 10px; margin-bottom: 16px; }
.donor-fields input { padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font-size: .98rem; font-family: var(--font-body); width: 100%; }
.donor-fields input:focus { border-color: var(--sky); outline: none; }
.donor-fields input.err { border-color: #E63946; }
.field-note { font-size: .8rem; color: var(--muted); margin-top: -4px; }
#paypal-button-container { min-height: 45px; }
.panel-error { display: none; background: #FDECEC; color: #B3261E; border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin-bottom: 12px; }
.panel-error.show { display: block; }
.panel-trust { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 14px; color: var(--muted); font-size: .82rem; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--sky-soft); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.section-head p { color: var(--muted); }

.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.impact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.impact-card .amt { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--deep); }
.impact-card .amt small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.impact-card h3 { font-size: 1.1rem; margin: 8px 0 6px; }
.impact-card p { color: var(--muted); font-size: .95rem; }
.impact-card .hand { font-family: var(--font-hand); color: var(--coral); font-size: 1.25rem; display: block; margin-top: 10px; transform: rotate(-1deg); }

.stats-band { background: var(--deep); color: #fff; padding: 52px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--sun); }
.stat span { font-size: .92rem; opacity: .85; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.step-card .step-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--sun-soft); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px; }
.step-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: .95rem; }

.cta-band { text-align: center; padding: 80px 0; background: linear-gradient(180deg, var(--paper), var(--sun-soft)); }
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }

/* ---------- content pages ---------- */
.page-hero { background: var(--sky-soft); padding: 56px 0 48px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 10px; }
.page-hero p { color: var(--muted); max-width: 60ch; }
.prose { max-width: 760px; margin: 0 auto; padding: 56px 22px 76px; }
.prose h2 { font-size: 1.45rem; margin: 34px 0 12px; }
.prose p, .prose li { color: #3d4a52; margin-bottom: 14px; }
.prose ul { padding-left: 22px; }
.prose .updated { font-size: .85rem; color: var(--muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 60px 0 80px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 14px; }
.form-grid label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 5px; }
.form-grid input, .form-grid textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font-family: var(--font-body); font-size: .98rem; }
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--sky); outline: none; }
.alert-ok { background: #E7F6EC; color: #1B7A3D; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.alert-bad { background: #FDECEC; color: #B3261E; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.contact-info h2 { font-size: 1.4rem; margin-bottom: 14px; }
.contact-info p { color: var(--muted); margin-bottom: 18px; }
.info-row { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.info-row .ico { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; background: var(--sun-soft); display: grid; place-items: center; }

/* ---------- thank you ---------- */
.thanks-wrap { max-width: 620px; margin: 0 auto; text-align: center; padding: 90px 22px 100px; }
.thanks-wrap .big-heart { font-size: 4rem; }
.thanks-wrap h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 14px 0; }
.thanks-wrap p { color: var(--muted); margin-bottom: 14px; }
.thanks-hand { font-family: var(--font-hand); font-size: 1.6rem; color: var(--coral); transform: rotate(-1.5deg); display: block; margin: 18px 0 26px; }
.receipt-box { background: var(--sky-soft); border-radius: var(--radius); padding: 20px; text-align: left; margin: 26px 0; font-size: .95rem; }
.receipt-box b { color: var(--deep); }

/* ---------- footer ---------- */
.site-footer { background: var(--deep); color: #CFE3EC; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 34px; padding: 56px 22px 30px; }
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.footer-tag { font-family: var(--font-hand); font-size: 1.3rem; color: var(--sun); margin-bottom: 12px; }
.footer-legal, .footer-addr { font-size: .82rem; opacity: .75; line-height: 1.55; }
.footer-h { font-weight: 700; color: #fff; margin-bottom: 12px; }
.site-footer a { display: block; color: #CFE3EC; text-decoration: none; margin-bottom: 9px; font-size: .93rem; }
.site-footer a:hover { color: var(--sun); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 22px 26px; font-size: .84rem; opacity: .85; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 56px; }
  .impact-grid, .steps-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 18px 22px; gap: 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
