/* Ripley Nazarene Mission – public site styles.
   Look carried over from the original Carrd site (blush background, mauve text, rainbow logo,
   Alata headings) with darker text colors so everything meets WCAG AA contrast. */
:root {
  --bg: #f1dedd;
  --bg-2: #e6cfd0;
  --surface: #fbf8f8;
  --cream: #fbf3ea;
  --text: #3f3538;        /* body text, ~10:1 on bg */
  --muted: #5e4f53;       /* secondary text, ~6.5:1 */
  --mauve: #6e5c61;       /* buttons, headings */
  --mauve-dark: #52434a;
  --rose: #a3404f;        /* Donate color, 5.9:1 with white */
  --rose-dark: #84303e;
  --sage: #6f7b5d;
  --tan: #c9a888;
  --line: rgba(110, 92, 97, .25);
  --radius: 14px;
  --shadow: 0 6px 24px rgba(82, 67, 74, .12);
  --head: 'Alata', 'Trebuchet MS', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(110, 92, 97, .07) 1px, transparent 1px),
    linear-gradient(160deg, #f6eceb 0%, var(--bg) 45%, var(--bg-2) 100%);
  background-size: 14px 14px, 100% 100%;
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; }
a { color: var(--rose-dark); text-underline-offset: 2px; }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--head); font-weight: 400; color: var(--mauve-dark); line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.25rem; margin: .4em 0 .4em; }
.lead { font-size: 1.2rem; font-style: italic; color: var(--muted); max-width: 46em; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--sage); margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--mauve-dark); color: #fff; padding: .7em 1em; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Alert ---------- */
.alert-bar { background: var(--mauve-dark); color: #fff; text-align: center; padding: .6rem 1rem; }
.alert-bar p { margin: 0; }
.alert-bar a { color: #fff; font-weight: 600; }

/* ---------- Header & menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 248, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--mauve-dark); margin-right: auto; }
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--head); font-size: 1.15rem; }
.brand-sub { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); font-weight: 600; }

.site-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .55rem .8rem; border-radius: 999px;
  text-decoration: none; color: var(--mauve-dark); font-weight: 600; font-size: .98rem;
}
.site-nav a:hover { background: var(--bg); color: var(--mauve-dark); }
.site-nav a[aria-current="page"] { background: var(--mauve); color: #fff; }

.menu-toggle {
  display: none; font: inherit; font-weight: 600; color: var(--mauve-dark);
  background: transparent; border: 2px solid var(--mauve); border-radius: 999px; padding: .4rem 1rem; cursor: pointer;
}

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; padding-block: .5rem; }
  .js .menu-toggle { display: inline-block; }
  .header-donate { order: 2; }
  .menu-toggle { order: 3; }
  .site-nav { order: 4; flex-basis: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding-bottom: .75rem; }
  .site-nav a { padding: .8rem 1rem; }
  .brand-name { font-size: 1rem; }
}
@media (max-width: 520px) {
  .header-inner { gap: .5rem; }
  .brand { min-width: 0; }
  .brand-name { font-size: .92rem; }
  .brand-sub { display: none; }
  .brand img { width: 44px; height: 44px; }
  .header-donate, .menu-toggle { padding: .45rem .8rem; font-size: .92rem; }
}
@media (max-width: 400px) { .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font: 600 1rem/1.2 var(--body);
  color: #fff; background: var(--mauve);
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid var(--mauve);
  cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--mauve-dark); border-color: var(--mauve-dark); color: #fff; transform: translateY(-1px); }
.btn-donate { background: var(--rose); border-color: var(--rose); }
.btn-donate:hover { background: var(--rose-dark); border-color: var(--rose-dark); }
.btn-outline { background: transparent; color: var(--mauve-dark); }
.btn-outline:hover { background: var(--mauve); color: #fff; }
.btn-light { background: #fff; color: var(--mauve-dark); border-color: #fff; }
.btn-light:hover { background: var(--cream); color: var(--mauve-dark); border-color: var(--cream); }
.btn-lg { font-size: 1.1rem; padding: 1rem 1.8rem; }
/* Facebook blue, darkened slightly so white text meets contrast guidelines */
.btn-facebook { background: #0b5fcc; border-color: #0b5fcc; display: inline-flex; align-items: center; gap: .55rem; }
.btn-facebook:hover { background: #084a9f; border-color: #084a9f; }
.header-donate { padding: .6rem 1.2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }

/* ---------- Content ---------- */
.content { padding: 2rem 0 3.5rem; }
.content:focus { outline: none; }
.content > p, .content > ul, .content > ol, .content > h2, .content > h3 { max-width: 46em; }
.content ul li { margin-bottom: .35em; }

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem; margin: 2rem 0;
}
.card h2 { margin-top: 0; }

/* Hero */
.hero {
  display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center;
  padding: 2rem 0 1rem;
}
.hero-logo img { display: block; width: 246px; border-radius: 6px; box-shadow: var(--shadow); background: var(--cream); }
.hero h1 { margin-top: 0; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
  .hero-logo img { margin: 0 auto; width: 190px; }
  .hero .cta-row { justify-content: center; }
}

/* Impact stats */
.stats ul { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stats li { background: var(--surface); border-radius: var(--radius); padding: 1.3rem; text-align: center; box-shadow: var(--shadow); border-top: 5px solid var(--sage); }
.stats li:nth-child(2) { border-top-color: var(--rose); }
.stats li:nth-child(3) { border-top-color: var(--tan); }
.stats li:nth-child(4) { border-top-color: var(--mauve); }
.stats li:nth-child(5) { border-top-color: var(--rose-dark); }
.stat-num { display: block; font-family: var(--head); font-size: 2.6rem; color: var(--mauve-dark); line-height: 1.1; }
.stat-label { color: var(--muted); }
.stats-more { text-align: center; margin: -1rem 0 2rem; font-weight: 600; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.cards .card { margin: 0; display: flex; flex-direction: column; }
.cards .card p:last-child { margin-top: auto; margin-bottom: 0; }

/* Giving levels */
.give-levels ul { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.give-levels a {
  display: block; height: 100%; text-decoration: none; color: var(--text);
  background: var(--surface); border: 2px solid transparent; border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow);
}
.give-levels a:hover, .give-levels a:focus-visible { border-color: var(--rose); color: var(--text); }
.give-levels .amt { display: block; font-family: var(--head); font-size: 2rem; color: var(--rose-dark); }
.monthly-note { background: var(--cream); border-left: 5px solid var(--sage); padding: 1rem 1.2rem; border-radius: 8px; }

/* Campaign */
.campaign { border-left: 6px solid var(--rose); }
progress { width: 100%; height: 1.2rem; appearance: none; border: 0; border-radius: 999px; background: var(--bg); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--bg); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--sage), var(--rose)); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--sage), var(--rose)); border-radius: 999px; }
.progress-text { margin-top: .4rem; }

/* Hours */
/* Matches the impact-number boxes: colored band on top, centered text */
.hours { border-top: 5px solid var(--sage); text-align: center; padding: 1.4rem 1.6rem; }
.hours h2 { margin-bottom: .3rem; }
.hours-main { font-family: var(--head); font-size: clamp(1.3rem, 2.6vw, 1.7rem); color: var(--mauve-dark); line-height: 1.3; margin: .2rem 0 .6rem; }
.hours p, .hours address { margin-left: auto; margin-right: auto; max-width: 40em; }
/* Info on the left, a smaller map on the right; stacked on phones */
.hours { display: grid; grid-template-columns: 1fr minmax(260px, 42%); gap: 1.5rem; align-items: center; }
.hours .map { margin: 0; box-shadow: none; border: 1px solid var(--line); }
.hours .map iframe { height: 240px; }
@media (max-width: 760px) {
  .hours { grid-template-columns: 1fr; }
  .hours .map iframe { height: 220px; }
}
address { font-style: normal; }

/* Map */
.map { margin: 2rem 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map iframe { display: block; width: 100%; height: 360px; border: 0; }

/* Partners */
.partners { text-align: center; margin-top: 3rem; }
.partners h2 { font-size: 1.4rem; }
.partners ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.partners li { background: #fff; border-radius: 12px; padding: .75rem; width: 150px; height: 110px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.partners img { max-height: 86px; width: auto; object-fit: contain; }

/* Forms */
.site-form { max-width: 36rem; }
.site-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.site-form input[type=text], .site-form input[type=email], .site-form input[type=tel], .site-form textarea {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 2px solid #a8979b; border-radius: 10px; background: #fff; color: var(--text);
}
.site-form input:focus, .site-form textarea:focus { border-color: var(--rose); outline: 2px solid var(--rose); outline-offset: 1px; }
.site-form fieldset { border: 2px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; }
.site-form legend { font-weight: 600; padding: 0 .3rem; }
.site-form .check { font-weight: 400; display: flex; gap: .7rem; align-items: center; margin: 0; padding: .55rem .25rem; min-height: 44px; cursor: pointer; border-radius: 8px; }
.site-form .check:hover { background: var(--bg); }
.site-form .check input { width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--mauve); }
.req { font-weight: 400; color: var(--muted); font-size: .9em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .inline-fields { grid-template-columns: 1fr; } }
.cf-turnstile { margin: .5rem 0 .25rem; max-width: 36rem; }
.notice { padding: .9rem 1.1rem; border-radius: 10px; font-weight: 600; max-width: 36rem; }
.notice-ok { background: #e3eadb; color: #34401f; }
.notice-err { background: #f6d9dc; color: #6e1f2a; }

/* Donate strip & footer */
.donate-strip { background: var(--mauve-dark); color: #fff; padding: 2.5rem 0; text-align: center; }
.donate-strip h2 { color: #fff; margin-top: 0; }
.donate-strip .cta-row { justify-content: center; }
.site-footer { background: #3b3034; color: #f1e7e8; padding: 2.5rem 0 1rem; font-size: .97rem; }
.site-footer h2 { color: #fff; font-size: 1.15rem; margin: 0 0 .6rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.site-footer .btn-light, .site-footer .btn-light:hover { color: var(--mauve-dark); }
.footer-email { margin-top: .4rem; padding: .55rem 1.2rem; }
/* Linked forms land below the sticky header */
.site-form, .content h2 { scroll-margin-top: 110px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.2); margin-top: 2rem; padding-top: 1rem; font-size: .88rem; color: #dccfd1; }
.footer-legal p { margin: .3rem 0; }

/* Photo beside text (floats right on wide screens, full width on phones) */
.content figure.photo-right { float: right; width: min(46%, 520px); margin: .4rem 0 1.25rem 2rem; }
.content figure.photo-right img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.content figure.photo-right figcaption { font-size: .9rem; color: var(--muted); margin-top: .45rem; font-style: italic; }
.content section, .content .cta-row, .content .stats, .content .cards { clear: both; }
@media (max-width: 760px) { .content figure.photo-right { float: none; width: 100%; margin: 1rem 0 1.5rem; } }

/* Simple horizontal bar charts: label, bar, and the number in text */
.bar-list { list-style: none; padding: 0; margin: 1.25rem 0 2rem; max-width: 46em; }
.bar-list li { display: grid; grid-template-columns: minmax(0, 15rem) 1fr 5.5rem; align-items: center; gap: .75rem; margin: 0 0 .7rem; }
.bar-list .bar { display: block; height: 1.1rem; border-radius: 999px; background: var(--bg); position: relative; overflow: hidden; }
.bar-list .bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); min-width: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--sage), var(--rose)); }
.bar-list strong { text-align: right; font-family: var(--head); font-weight: 400; font-size: 1.2rem; color: var(--mauve-dark); }
@media (max-width: 600px) {
  .bar-list li { grid-template-columns: 1fr auto; gap: .2rem .75rem; }
  .bar-list .bar { grid-column: 1 / -1; grid-row: 2; }
  .bar-list .bar-label { grid-column: 1; }
}
/* Two photos side by side */
.photo-pair { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 1.5rem 0 2rem; max-width: 820px; }
.photo-pair figure { margin: 0; }
.photo-pair img { display: block; width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.photo-pair figcaption { font-size: .9rem; color: var(--muted); margin-top: .45rem; font-style: italic; }
@media (max-width: 560px) { .photo-pair { grid-template-columns: 1fr; } .photo-pair img { height: auto; } }
.content h2 { clear: both; }

/* Affiliations & diaper need */
.affiliations { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.affiliations li { background: #fff; border-radius: 12px; padding: .8rem 1.1rem; box-shadow: var(--shadow); display: flex; align-items: center; }
.affiliations img { display: block; height: 64px; width: auto; }
.footer-affil { border-top: 1px solid rgba(255,255,255,.2); margin-top: 2rem; padding-top: 1.25rem; text-align: center; }
.footer-affil p { margin: 0; }
.footer-logos { justify-content: center; }
.footer-logos li { box-shadow: none; padding: .55rem .9rem; }
.footer-logos img { height: 48px; }
.legal-id { font-weight: 600; color: #f1e7e8; }
.diaper-need figure { margin: 1rem 0; }
.diaper-need img { display: block; width: 100%; max-width: 640px; border-radius: 8px; box-shadow: var(--shadow); }
.diaper-need figcaption { font-size: .92rem; color: var(--muted); margin-top: .5rem; }
.diaper-need details { margin-top: 1rem; }
.diaper-need summary { font-weight: 600; cursor: pointer; color: var(--mauve-dark); }

@media print {
  .site-header, .donate-strip, .alert-bar, .map, .site-form { display: none; }
  body { background: #fff; }
}
