/* Open Hands Community Fund — sample non-profit site by North Arc Studio
   Layout: photo hero with a live campaign tracker, a donation picker that shows impact, honest finances */
:root {
  --paper: #fdfdfc;
  --lilac: #efecf8;
  --lilac-deep: #d9d3f0;
  --ink: #1d1b3a;
  --ink-soft: #565473;
  --red: #d53f28;
  --red-deep: #b5321e;
  --sun: #ffcc4d;
  --green: #2f8a5b;
  --line: #e3e1ec;
  --white: #ffffff;

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", Arial, sans-serif;
  --r: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 56ch; }
.small { font-size: 0.88rem; color: var(--ink-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--body); font-weight: 700; font-size: 1rem; padding: 14px 26px; border-radius: var(--r); background: var(--red); color: var(--white); border: 2px solid var(--red); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ink { background: var(--ink); border-color: var(--ink); }
.btn-ink:hover { background: #2e2b57; border-color: #2e2b57; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.3rem; line-height: 1; }
.brand-sub { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 0.97rem; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--red); }
.nav .btn { padding: 10px 22px; border-bottom-width: 2px; }
.menu-btn { display: none; font-family: var(--body); font-weight: 700; background: var(--ink); color: var(--white); border: 0; border-radius: var(--r); padding: 9px 16px; cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px)); }
  .nav[hidden] { display: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--red); }
  .nav .btn { margin-top: 16px; padding: 14px; }
}
@media (min-width: 901px) { .nav[hidden] { display: flex; } }

/* Hero */
.hero { position: relative; color: var(--white); background: var(--ink); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(29,27,58,.92) 0%, rgba(29,27,58,.72) 45%, rgba(29,27,58,.2) 100%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: end; padding-block: clamp(64px, 9vw, 120px); }
.hero-copy { display: grid; gap: 20px; }
.hero-copy p { color: rgba(255,255,255,.88); font-size: 1.15rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.campaign { background: var(--white); color: var(--ink); border-radius: 14px; padding: 24px; display: grid; gap: 12px; box-shadow: 0 20px 44px rgba(10,9,30,.3); }
.campaign .tag { font-weight: 700; font-size: 0.82rem; color: var(--red); }
.bar { height: 14px; background: var(--lilac); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--sun); border-radius: 999px; }
.campaign-nums { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.campaign-nums strong { font-family: var(--display); font-size: 1.7rem; font-weight: 400; display: block; line-height: 1.1; }
.campaign-nums span { font-size: 0.85rem; color: var(--ink-soft); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media::after { background: linear-gradient(180deg, rgba(29,27,58,.65) 0%, rgba(29,27,58,.9) 70%); }
}

.section { padding-block: clamp(64px, 9vw, 108px); }
.band { background: var(--lilac); }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.head .lede { margin-top: 12px; }
.text-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 1px; }

/* Impact numbers */
.impact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.impact div { padding: 26px 20px 26px 0; display: grid; gap: 4px; }
.impact strong { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.impact span { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 820px) { .impact { grid-template-columns: 1fr 1fr; } }

/* Programs */
.programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.program { display: grid; gap: 14px; align-content: start; }
.program .ph { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--lilac); max-width: 100%; }
.program .ph img { width: 100%; height: 100%; object-fit: cover; }
.program p { color: var(--ink-soft); }
.program .stat { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
@media (max-width: 900px) { .programs { grid-template-columns: 1fr; max-width: 560px; } }

/* Donate widget */
.donate { display: grid; grid-template-columns: 1.1fr 0.9fr; background: var(--white); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.donate-form { padding: clamp(24px, 4vw, 40px); display: grid; gap: 22px; }
.toggle { display: inline-flex; background: var(--lilac); border-radius: 999px; padding: 4px; justify-self: start; }
.toggle label { position: relative; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle span { display: block; padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; }
.toggle input:checked + span { background: var(--ink); color: var(--white); }
.toggle input:focus-visible + span { outline: 3px solid var(--sun); }
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.amounts label { position: relative; }
.amounts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amounts span { display: block; text-align: center; padding: 16px 8px; border: 2px solid var(--line); border-radius: var(--r); font-family: var(--display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.amounts input:checked + span { border-color: var(--red); background: #fdf0ed; }
.amounts input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (max-width: 480px) { .amounts { grid-template-columns: 1fr 1fr; } }
.other { display: grid; gap: 6px; font-weight: 600; font-size: 0.93rem; }
.other input { font: inherit; padding: 13px 14px; border: 2px solid var(--line); border-radius: var(--r); min-width: 0; }
.other input:focus { border-color: var(--ink); outline: none; }
.donate-impact { background: var(--ink); color: var(--white); padding: clamp(24px, 4vw, 40px); display: grid; gap: 16px; align-content: center; }
.donate-impact .label { color: #bdbade; font-weight: 600; font-size: 0.9rem; }
.donate-impact .total { font-family: var(--display); font-size: clamp(2.8rem, 6vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.donate-impact .total small { font-family: var(--body); font-size: 1rem; color: #bdbade; }
.donate-impact .what { font-size: 1.15rem; line-height: 1.45; }
.donate-impact .small { color: #bdbade; }
@media (max-width: 860px) { .donate { grid-template-columns: 1fr; } }

/* Stories */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.story img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.story blockquote { margin: 0; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.25; }
.story .copy { display: grid; gap: 18px; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* Page head */
.page-head { background: var(--lilac); }
.page-head .wrap { padding-block: clamp(48px, 7vw, 84px); display: grid; gap: 14px; }

/* Program detail rows */
.prog-rows { display: grid; gap: 64px; }
.prog-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.prog-row:nth-child(even) .ph { order: 2; }
.prog-row .ph { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--lilac); max-width: 100%; }
.prog-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.prog-row .copy { display: grid; gap: 14px; }
.prog-row .copy p { color: var(--ink-soft); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.facts li strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.facts li span { font-size: 0.88rem; color: var(--ink-soft); }
@media (max-width: 820px) { .prog-row { grid-template-columns: 1fr; } .prog-row:nth-child(even) .ph { order: 0; } }

/* Finances */
.split-bar { display: flex; height: 54px; border-radius: var(--r); overflow: hidden; }
.split-bar span { display: grid; place-items: center; color: var(--white); font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 14px; font-size: 0.95rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.docs div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 4px; }
@media (max-width: 760px) { .docs { grid-template-columns: 1fr; } }

.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.person { display: grid; gap: 4px; border-top: 2px solid var(--ink); padding-top: 16px; }
.person .role { color: var(--red); font-weight: 700; font-size: 0.88rem; }
.person p { color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .team { grid-template-columns: 1fr; } }

/* Volunteer shifts */
.shifts { display: grid; gap: 12px; }
.shift { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--white); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 18px; cursor: pointer; }
.shift:has(input:checked) { border-color: var(--red); background: #fdf6f4; }
.shift input { width: 20px; height: 20px; accent-color: var(--red); }
.shift .when { font-weight: 700; }
.shift .what { color: var(--ink-soft); font-size: 0.95rem; }
.spots { font-weight: 700; font-size: 0.88rem; padding: 6px 12px; border-radius: 999px; background: var(--lilac); white-space: nowrap; font-variant-numeric: tabular-nums; }
.spots.low { background: #fde6e1; color: var(--red-deep); }
.spots.full { background: var(--line); color: var(--ink-soft); }
.shift.is-full { opacity: .55; cursor: not-allowed; }
@media (max-width: 560px) { .shift { grid-template-columns: auto 1fr; } .spots { grid-column: 2; justify-self: start; } }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 24px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.form legend { font-family: var(--display); font-size: 1.45rem; margin-bottom: 8px; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
.form label.f { display: grid; gap: 6px; font-weight: 600; font-size: 0.93rem; }
.form .f input, .form .f select, .form .f textarea { font: inherit; font-weight: 400; padding: 13px 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--ink); min-width: 0; }
.form .f input:focus, .form .f select:focus, .form .f textarea:focus { border-color: var(--ink); outline: none; }
.form textarea { min-height: 110px; resize: vertical; }
.notice { padding: 14px 16px; background: var(--lilac); border-radius: var(--r); font-weight: 600; }
.side { display: grid; gap: 20px; align-content: start; }
.side-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 8px; }
.side-card ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.side-card.dark { background: var(--ink); color: var(--white); border: 0; }
.side-card.dark p { color: #cfcde6; }

/* Footer */
.cta { background: var(--red); color: var(--white); }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-block: 56px; }
.cta p { color: rgba(255,255,255,.9); margin-top: 8px; }
.cta .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.cta .btn:hover { background: var(--sun); border-color: var(--sun); }
.site-footer { background: var(--ink); color: #cfcde6; font-size: 0.93rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 56px 28px; }
.site-footer h4 { font-family: var(--display); font-weight: 400; color: var(--white); font-size: 1.1rem; margin: 0 0 10px; }
.site-footer a { display: block; text-decoration: none; padding: 3px 0; }
.site-footer a:hover { color: var(--sun); }
.legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 0.8rem; opacity: .85; }
@media (max-width: 820px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .wrap { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
