/* Digital Access Foundation — shared styles
   Goals: calm, minimal, and easy to read for older adults.
   - Large base text, generous spacing, high contrast (WCAG AA or better)
   - Clear focus outlines for keyboard users
   - No auto-moving content; motion is disabled if the visitor prefers that */

:root {
  --ink: #14213d;        /* main text */
  --muted: #44546a;      /* secondary text (7:1 on white) */
  --blue: #0b5cad;       /* brand blue, links and buttons (6.6:1 on white) */
  --blue-dark: #08407a;
  --red: #c8102e;        /* heartbeat accent from the logo */
  --bg: #ffffff;
  --soft: #f3f7fb;       /* alternate section background */
  --line: #d3dde8;
  --navy: #0f2440;       /* footer */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .06);
  --wrap: 1120px;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 112.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.large-text { font-size: 131.25%; }

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 46rem; }
.center { text-align: center; margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; }
.brand { display: flex; flex-shrink: 0; white-space: nowrap; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.15; margin-right: auto; }
.brand img { width: 64px; height: 64px; }
.brand span { font-size: 1.05rem; }

/* Menu ribbon: always visible, full width, under the logo row */
.site-nav { background: var(--navy); }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .1rem .25rem; list-style: none; margin: 0 auto; padding: .3rem 0; width: min(100% - 2.5rem, var(--wrap)); }
.nav-list a {
  display: block; padding: .6rem .85rem; border-radius: 8px;
  color: #fff; text-decoration: none; font-size: .95rem; white-space: nowrap;
}
.nav-list a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.nav-list a:focus-visible { outline-color: #fff; }
.nav-list a[aria-current="page"] { background: #fff; color: var(--navy); font-weight: 700; }
.nav-list a.nav-donate { background: var(--red); color: #fff; font-weight: 700; padding-inline: 1.1rem; margin-left: .35rem; }
.nav-list a.nav-donate:hover { background: #a50d26; color: #fff; }
.nav-list a.nav-donate[aria-current="page"] { background: #fff; color: var(--red); }

.icon-btn {
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 8px;
  min-height: 44px; padding: .4rem .8rem; cursor: pointer; white-space: nowrap;
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue-dark); }

@media (max-width: 900px) {
  /* The ribbon wraps onto several rows on small screens, so let it scroll away */
  .site-header { position: static; }
  .nav-list { width: calc(100% - 1rem); }
  .nav-list a { padding: .6rem .6rem; }
  .nav-list a.nav-donate { margin-left: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
  padding: .8rem 1.5rem; min-height: 48px; border-radius: 10px; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--blue-dark); }
.btn.secondary:hover { background: var(--soft); color: var(--blue-dark); }
.btn.small { padding: .5rem 1rem; min-height: 44px; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.soft { background: var(--soft); }
.section-head { margin-bottom: 2.25rem; }
.eyebrow { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: .6rem; }
.eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 3px; background: var(--red); border-radius: 2px; vertical-align: middle; margin-right: .6rem; }

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); background: var(--soft); border-bottom: 1px solid var(--line); }
.page-head p { max-width: 46rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img, .photo { border-radius: var(--radius); width: 100%; object-fit: cover; }
.split + .split { margin-top: clamp(3rem, 6vw, 4.5rem); }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .75rem; aspect-ratio: 1 / 1; }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.hero-photos img:first-child { grid-column: span 2; }
.hero h1 { margin-bottom: .6rem; }
.hero .lead { color: var(--ink); margin-top: 0; }
.hero .lead + p { font-size: 1.15rem; color: var(--ink); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid.four { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.card > img { margin: -1.6rem -1.6rem 1.25rem; width: calc(100% + 3.2rem); max-width: none; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.card .btn, .card .card-link { margin-top: auto; align-self: flex-start; }
.card p + .btn, .card p + .card-link { margin-top: 1.25rem; }
.card .tag { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: .5rem; }
.card-link { font-weight: 700; }

.avatar {
  width: 3.25rem; height: 3.25rem; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: var(--blue-dark);
  background: #dcebfa; margin-bottom: 1rem;
}

/* Events */
.event-meta { list-style: none; margin: 0 0 1rem; padding: 0; color: var(--muted); }
.event-meta li { padding: .1rem 0; }
.event-meta strong { color: var(--ink); }
.status { display: inline-block; font-size: .85rem; font-weight: 700; padding: .25rem .7rem; border-radius: 99px; background: #eef1f5; color: var(--muted); margin-bottom: 1rem; align-self: flex-start; }
.event { display: grid; grid-template-columns: minmax(0, 22rem) 1fr; gap: 2rem; align-items: start; padding: 2rem 0; border-top: 1px solid var(--line); scroll-margin-top: 6rem; }
.event:first-of-type { border-top: 0; padding-top: 0; }
.event img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.event h3 { font-size: 1.1rem; margin-top: 1.25rem; }
@media (max-width: 760px) { .event { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Testimonials */
blockquote { margin: 0; }
.quote p { font-size: 1.05rem; }
.quote footer { margin-top: 1.25rem; display: flex; align-items: center; gap: .85rem; font-weight: 700; }
.quote .avatar { margin: 0; }

/* Team */
.person { text-align: center; align-items: center; }
.person .portrait { width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; margin-bottom: 1.1rem; }
.person .avatar { width: 9rem; height: 9rem; font-size: 2.25rem; margin-bottom: 1.1rem; }
.person h3 { margin-bottom: .2rem; }
.person .socials { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; }
.person .socials a { display: inline-block; padding: .4rem 0; font-size: .95rem; }
.person .btn { align-self: center; margin-top: 1.25rem; }

/* Stats tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.75rem; }
.tile { border-left: 4px solid var(--blue); background: #fff; padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; }
.soft .tile { background: #fff; }
.tile span { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile strong { font-size: 1.3rem; }

/* Banner band */
.band { background: var(--navy); color: #fff; text-align: center; }
.band h2 { margin: 0; color: #fff; }
.band p { color: #d7e3f1; margin-top: 1rem; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .75rem; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
.req { color: var(--red); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid #8794a6; border-radius: 10px; padding: .7rem .85rem; min-height: 50px;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form-note { font-size: .95rem; color: var(--muted); }
.form-status { font-weight: 700; color: var(--blue-dark); min-height: 1.5em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }

.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; font-size: 1.1rem; }
.contact-list li { padding: .3rem 0; }
address { font-style: normal; font-weight: 700; margin: 1rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--blue); background: var(--soft); border-radius: 0 10px 10px 0; }
.soft address { background: #fff; }
.qr { width: 13rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; background: #fff; margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #d7e3f1; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-size: 1rem; color: #fff; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-grid li a { display: inline-block; padding: .3rem 0; }
.footer-grid .plain { columns: 1; }
.copyright { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 2rem; padding-top: 1.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

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

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
}

/* ---------- Wellspring app page ---------- */
.stat { display: flex; align-items: baseline; gap: .75rem; margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-left: 4px solid var(--red); background: var(--soft); border-radius: 0 10px 10px 0; }
.stat strong { font-size: 2.25rem; line-height: 1; color: var(--blue-dark); }
.stat span { font-weight: 700; }
/* iPhone frame drawn in CSS around each app screenshot */
.phone-frame { position: relative; width: 100%; max-width: 20rem; margin-inline: auto; padding: 3.2%; background: #0a0a0c; border-radius: 16% / 7.6%; box-shadow: 0 0 0 2px #d5d8dd, 0 0 0 3px #9a9ea6, var(--shadow); align-self: start; }
.phone-frame img { display: block; width: 100%; height: auto; border-radius: 13.5% / 6.2%; }
.phone-frame::before { content: ""; position: absolute; top: 3.6%; left: 50%; transform: translateX(-50%); width: 29%; aspect-ratio: 3.4 / 1; background: #000; border-radius: 999px; }
.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.shots figure { margin: 0; }
.shots .phone-frame { max-width: 15rem; }
.shots figcaption { margin-top: .85rem; font-weight: 700; text-align: center; }
@media (max-width: 860px) { .shots { grid-template-columns: repeat(2, 1fr); } }
.btn.light { background: #fff; color: var(--blue-dark); border-color: #fff; }
.btn.light:hover { background: #dcebfa; border-color: #dcebfa; color: var(--blue-dark); }
.btn.outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn.outline-light:hover { background: rgba(255, 255, 255, .14); color: #fff; border-color: #fff; }
.band :focus-visible { outline-color: #fff; }
.checks { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.checks li { position: relative; padding: .35rem 0 .35rem 1.9rem; }
.checks li::before { content: ""; position: absolute; left: .2rem; top: .95rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--blue); }

/* ---------- Videos ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.5rem; }
.videos figure { margin: 0; }
.videos video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); }
.videos figcaption { margin-top: .6rem; }

/* Wellspring intro on the homepage: both paragraphs the same size */

/* Homepage Wellspring section: phone screenshot starts level with the heading */
@media (min-width: 821px) {
  section[aria-labelledby="wellspring-heading"] .phone-frame { margin-top: 2rem; }
}

/* Event flyers: show the whole flyer instead of cropping it */
.event img.flyer { aspect-ratio: 3 / 4; }
.card > img.flyer { object-fit: contain; background: var(--soft); }

/* One style for all body text on every page (matches the Wellspring intro sentence) */
main section p:not(.stat):not(.form-note):not(.form-status):not(.tag):not(.status),
main section .checks li,
main section .contact-list li,
main section .event-meta li,
main section figcaption { font-size: 1.15rem; color: var(--muted); }
main section.band p:not(.stat):not(.form-note):not(.form-status):not(.tag):not(.status) { color: #d7e3f1; }
