Nonprofit — Religious / Community Landing
A warm, welcoming landing page for a fictional religious community center, built with vanilla HTML, CSS, and JavaScript. It pairs a classic serif voice with gold and teal accents across a sticky nav, hero with live service times, animated impact counters, a filterable ministries grid, an events list with RSVP, a give and tithe panel with amount presets and a fundraising thermometer, community stories, donor recognition, and a get involved form.
MCP
Code
:root {
--brand: #1f7a6d;
--brand-d: #155e54;
--gold: #c9a14a;
--gold-d: #a9842f;
--accent: #b9743a;
--accent-d: #99592a;
--ink: #2c261d;
--ink-2: #56503f;
--muted: #8a8270;
--bg: #f7f1e6;
--surface: #ffffff;
--surface-2: #fbf6ec;
--line: rgba(44, 38, 29, 0.1);
--line-2: rgba(44, 38, 29, 0.18);
--ok: #2f9e6f;
--warn: #d98a2b;
--danger: #c64a36;
--r-sm: 8px;
--r-md: 14px;
--r-lg: 22px;
--sh-sm: 0 1px 2px rgba(44, 38, 29, 0.06), 0 2px 8px rgba(44, 38, 29, 0.05);
--sh-md: 0 8px 28px rgba(44, 38, 29, 0.1);
--sh-lg: 0 24px 60px rgba(44, 38, 29, 0.14);
--serif: "Fraunces", Georgia, "Times New Roman", serif;
--sans: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
font-family: var(--sans);
color: var(--ink);
background: var(--bg);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.wrap { width: min(1140px, 92vw); margin-inline: auto; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; color: var(--ink); font-weight: 600; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.skip {
position: absolute; left: -999px; top: 0; z-index: 100;
background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
}
.skip:focus { left: 12px; top: 12px; }
.eyebrow {
display: inline-block; font-family: var(--sans); font-weight: 600;
letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem;
color: var(--gold-d); margin-bottom: 0.7rem;
}
.eyebrow--light { color: var(--gold); }
/* ---------- Buttons ---------- */
.btn {
--bg-btn: var(--brand); --fg-btn: #fff;
display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
padding: 0.7rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
background: var(--bg-btn); color: var(--fg-btn); cursor: pointer;
transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
box-shadow: var(--sh-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn--give { --bg-btn: var(--accent); }
.btn--give:hover { background: var(--accent-d); }
.btn--ghost {
background: transparent; color: var(--ink); border-color: var(--line-2);
box-shadow: none;
}
.btn--ghost:hover { background: var(--surface); border-color: var(--gold); }
.btn--lg { padding: 0.85rem 1.7rem; font-size: 1rem; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--block { width: 100%; }
/* ---------- Nav ---------- */
.nav {
position: sticky; top: 0; z-index: 50;
background: rgba(247, 241, 230, 0.86); backdrop-filter: blur(10px);
border-bottom: 1px solid var(--line);
transition: box-shadow 0.25s ease;
}
.nav.is-scrolled { box-shadow: var(--sh-sm); }
.nav__inner { display: flex; align-items: center; gap: 1.2rem; padding: 0.7rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand__mark {
width: 38px; height: 38px; flex: none; display: grid; place-items: center;
border-radius: 50%; background: linear-gradient(150deg, var(--brand), var(--brand-d));
color: var(--gold); font-size: 1.2rem; box-shadow: inset 0 0 0 2px rgba(201,161,74,0.5);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--serif); font-size: 1.12rem; }
.brand__text em { font-style: normal; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }
.nav__links { display: flex; gap: 0.4rem; margin-left: auto; }
.nav__links a {
padding: 0.5rem 0.85rem; border-radius: var(--r-sm); font-weight: 500; font-size: 0.95rem;
color: var(--ink-2); transition: color 0.15s, background 0.15s;
}
.nav__links a:hover { color: var(--brand-d); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 0.6rem; }
.nav__toggle {
display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav__toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* ---------- Hero ---------- */
.hero {
position: relative; padding: clamp(2.4rem, 6vw, 5rem) 0;
background:
radial-gradient(120% 80% at 100% 0%, rgba(201,161,74,0.14), transparent 55%),
radial-gradient(90% 70% at 0% 100%, rgba(31,122,109,0.1), transparent 60%),
var(--bg);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3.2rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-2); margin: 1.1rem 0 1.6rem; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.7rem; }
.trust { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; }
.trust li { display: flex; align-items: center; gap: 0.4rem; font-size: 0.86rem; color: var(--ink-2); font-weight: 500; }
.trust span { font-size: 1rem; }
.hours {
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
overflow: hidden; box-shadow: var(--sh-md);
}
.hours__photo {
height: 170px; position: relative;
background:
linear-gradient(180deg, rgba(44,38,29,0) 40%, rgba(44,38,29,0.55) 100%),
linear-gradient(135deg, var(--brand) 0%, var(--brand-d) 55%, var(--gold-d) 130%);
display: flex; align-items: flex-end;
}
.hours__photo::before {
content: "✦"; position: absolute; top: 14px; right: 18px; color: rgba(255,255,255,0.5); font-size: 1.6rem;
}
.hours__caption { color: #fff; font-size: 0.82rem; padding: 0.9rem 1.1rem; font-weight: 500; }
.hours__body { padding: 1.2rem 1.3rem 1.4rem; }
.hours__body h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.hours__list { list-style: none; }
.hours__list li {
display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
padding: 0.55rem 0; border-bottom: 1px dashed var(--line);
}
.hours__list li:last-child { border-bottom: none; }
.hours__list .day { font-weight: 600; color: var(--ink); }
.hours__list .time { color: var(--brand-d); font-weight: 600; font-variant-numeric: tabular-nums; }
.hours__note {
margin-top: 0.9rem; padding: 0.6rem 0.8rem; border-radius: var(--r-sm);
background: var(--surface-2); font-size: 0.85rem; color: var(--ink-2);
border: 1px solid var(--line);
}
/* ---------- Impact ---------- */
.impact { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-d) 100%); color: #fff; padding: 2.4rem 0; }
.impact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; text-align: center; }
.stat strong { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.86rem; color: rgba(255,255,255,0.85); }
/* ---------- Sections ---------- */
.section { padding: clamp(2.8rem, 6vw, 5rem) 0; }
.section--alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section__head { max-width: 42rem; margin-bottom: 2rem; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 0.5rem; }
.section__head p { color: var(--ink-2); font-size: 1.05rem; }
/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.chip {
font-family: var(--sans); font-weight: 600; font-size: 0.88rem;
padding: 0.45rem 1rem; border-radius: 999px; cursor: pointer;
background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2);
transition: 0.18s;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 1.1rem; }
.card {
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
padding: 1.4rem; box-shadow: var(--sh-sm);
transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--gold); }
.card__icon {
width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center;
font-size: 1.4rem; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 0.9rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.card p { color: var(--ink-2); font-size: 0.94rem; margin-bottom: 0.8rem; }
.card__meta { font-size: 0.8rem; font-weight: 600; color: var(--brand-d); letter-spacing: 0.02em; }
.card.is-hidden { display: none; }
.cards__empty { text-align: center; color: var(--muted); padding: 1.5rem; }
/* ---------- Events ---------- */
.events { list-style: none; display: grid; gap: 0.8rem; }
.event {
display: flex; align-items: center; gap: 1.1rem;
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
padding: 1rem 1.2rem; box-shadow: var(--sh-sm); transition: 0.2s;
}
.event:hover { border-color: var(--gold); box-shadow: var(--sh-md); }
.event__date {
flex: none; width: 62px; text-align: center; border-radius: var(--r-sm);
background: linear-gradient(160deg, var(--accent), var(--accent-d)); color: #fff; padding: 0.4rem 0;
}
.event__date .m { display: block; font-size: 0.68rem; letter-spacing: 0.1em; font-weight: 700; }
.event__date .d { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1; font-weight: 600; }
.event__body { flex: 1; }
.event__body h3 { font-size: 1.12rem; margin-bottom: 0.15rem; }
.event__body p { color: var(--ink-2); font-size: 0.9rem; }
.event__meta { font-size: 0.8rem; color: var(--brand-d); font-weight: 600; }
.event__rsvp { flex: none; }
.event__rsvp.is-done { background: var(--ok); color: #fff; border-color: var(--ok); }
/* ---------- Give ---------- */
.give {
padding: clamp(2.8rem, 6vw, 5rem) 0;
background:
radial-gradient(80% 100% at 0% 0%, rgba(201,161,74,0.18), transparent 60%),
linear-gradient(160deg, var(--ink) 0%, #221d15 100%);
color: #fff;
}
.give__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.give__copy h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.give__copy p { color: rgba(255,255,255,0.82); margin: 0.8rem 0 1.6rem; max-width: 44ch; }
.thermo { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--r-md); padding: 1.1rem 1.2rem; }
.thermo__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
.thermo__head span { font-weight: 600; color: var(--gold); }
.thermo__head strong { font-variant-numeric: tabular-nums; font-family: var(--serif); }
.thermo__track { height: 14px; border-radius: 999px; background: rgba(255,255,255,0.14); overflow: hidden; }
.thermo__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width 1.4s cubic-bezier(0.2,0.8,0.2,1); }
.thermo__foot { margin-top: 0.6rem; font-size: 0.82rem; color: rgba(255,255,255,0.7); }
.give__card { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--sh-lg); }
.give__card h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.amt {
font-family: var(--sans); font-weight: 700; font-size: 1rem; padding: 0.7rem 0;
border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--surface-2);
color: var(--ink); cursor: pointer; transition: 0.16s;
}
.amt:hover { border-color: var(--gold); }
.amt.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.amt:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.field { display: block; margin-bottom: 0.9rem; }
.field > span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.35rem; }
.field input, .field select {
width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
padding: 0.7rem 0.8rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,122,109,0.16); }
.field input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(198,74,54,0.14); }
.field__money { display: flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); padding-left: 0.8rem; background: #fff; }
.field__money:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,122,109,0.16); }
.field__money span { color: var(--muted); font-weight: 600; }
.field__money input { border: none; box-shadow: none !important; padding-left: 0.4rem; }
.check { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1.1rem; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.give__fine { margin-top: 0.8rem; font-size: 0.76rem; color: var(--muted); text-align: center; }
/* ---------- Stories ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-bottom: 2.4rem; }
.quote { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r-md); padding: 1.4rem; box-shadow: var(--sh-sm); transition: 0.2s; }
.quote:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.quote blockquote { font-family: var(--serif); font-size: 1.08rem; color: var(--ink); line-height: 1.5; margin-bottom: 0.9rem; }
.quote figcaption { display: flex; align-items: center; gap: 0.6rem; font-size: 0.86rem; color: var(--ink-2); font-weight: 500; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(150deg, var(--brand), var(--gold-d)); color: #fff; font-weight: 700; font-family: var(--serif); }
.donors { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem 1.5rem; }
.donors h3 { font-size: 1.15rem; margin-bottom: 0.9rem; }
.donors__list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 0.7rem; }
.donors__list li { font-size: 0.9rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 0.4rem 0.85rem; border-radius: 999px; font-weight: 500; }
/* ---------- Get Involved ---------- */
.involved { padding: clamp(2.8rem, 6vw, 5rem) 0; background: var(--surface-2); border-top: 1px solid var(--line); }
.involved__inner { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.involved__copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.involved__copy p { color: var(--ink-2); margin: 0.7rem 0 1.2rem; max-width: 44ch; }
.involved__list { list-style: none; display: grid; gap: 0.45rem; }
.involved__list li { color: var(--ink-2); font-weight: 500; }
.involved__form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--sh-md); }
/* ---------- Footer ---------- */
.foot { background: var(--ink); color: rgba(255,255,255,0.78); padding: 2.8rem 0 1.4rem; }
.foot__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 2rem; padding-bottom: 1.8rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.foot__brand { display: flex; gap: 0.8rem; }
.foot__brand strong { font-family: var(--serif); font-size: 1.2rem; color: #fff; display: block; margin-bottom: 0.3rem; }
.foot__brand p { font-size: 0.86rem; line-height: 1.5; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.foot__cols h4 { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.7rem; font-family: var(--sans); }
.foot__cols a { display: block; font-size: 0.9rem; padding: 0.22rem 0; color: rgba(255,255,255,0.78); transition: color 0.15s; }
.foot__cols a:hover { color: var(--gold); }
.foot__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.3rem; font-size: 0.82rem; flex-wrap: wrap; }
.foot__top { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.16); padding: 0.45rem 1rem; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-size: 0.85rem; transition: 0.16s; }
.foot__top:hover { background: rgba(255,255,255,0.16); }
/* ---------- Toast ---------- */
.toast {
position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
background: var(--ink); color: #fff; padding: 0.85rem 1.3rem; border-radius: var(--r-md);
box-shadow: var(--sh-lg); font-weight: 500; font-size: 0.92rem; z-index: 200;
max-width: 90vw; opacity: 0; transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1), opacity 0.35s;
border-left: 4px solid var(--gold);
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }
/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.reveal { opacity: 1; transform: none; transition: none; }
.thermo__fill { transition: none; }
}
/* ---------- Responsive ---------- */
@media (max-width: 900px) {
.hero__inner, .give__inner, .involved__inner { grid-template-columns: 1fr; }
.impact__grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.foot__inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
.nav__links {
position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-md);
padding: 0.5rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: 0.22s;
}
.nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
.nav__links a { padding: 0.8rem 1rem; border-radius: var(--r-sm); }
.nav__toggle { display: flex; }
.nav__inner { flex-wrap: wrap; }
}
@media (max-width: 520px) {
.impact__grid { grid-template-columns: 1fr 1fr; }
.amounts { grid-template-columns: repeat(2, 1fr); }
.event { flex-wrap: wrap; }
.event__rsvp { width: 100%; }
.foot__cols { grid-template-columns: 1fr 1fr; }
.brand__text em { display: none; }
.hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
.nav__actions .btn--give { display: none; }
}(function () {
"use strict";
/* ---------- Toast helper ---------- */
var toastEl = document.getElementById("toast");
var toastTimer;
function toast(msg) {
if (!toastEl) return;
toastEl.textContent = msg;
toastEl.classList.add("is-show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toastEl.classList.remove("is-show");
}, 3200);
}
/* ---------- Mobile nav ---------- */
var navToggle = document.getElementById("navToggle");
var navLinks = document.getElementById("primary-nav");
if (navToggle && navLinks) {
navToggle.addEventListener("click", function () {
var open = navLinks.classList.toggle("is-open");
navToggle.setAttribute("aria-expanded", String(open));
navToggle.setAttribute("aria-label", open ? "Close menu" : "Open menu");
});
navLinks.addEventListener("click", function (e) {
if (e.target.tagName === "A") {
navLinks.classList.remove("is-open");
navToggle.setAttribute("aria-expanded", "false");
}
});
}
/* ---------- Nav scroll shadow ---------- */
var nav = document.querySelector(".nav");
function onScroll() {
if (nav) nav.classList.toggle("is-scrolled", window.scrollY > 8);
}
window.addEventListener("scroll", onScroll, { passive: true });
onScroll();
/* ---------- Scroll reveal ---------- */
var reveals = document.querySelectorAll(".reveal");
if ("IntersectionObserver" in window) {
var io = new IntersectionObserver(
function (entries) {
entries.forEach(function (en) {
if (en.isIntersecting) {
en.target.classList.add("is-in");
io.unobserve(en.target);
}
});
},
{ threshold: 0.12, rootMargin: "0px 0px -40px 0px" }
);
reveals.forEach(function (el) { io.observe(el); });
} else {
reveals.forEach(function (el) { el.classList.add("is-in"); });
}
/* ---------- Animated impact counters ---------- */
var counters = document.querySelectorAll(".stat strong[data-count]");
function animateCount(el) {
var target = parseInt(el.getAttribute("data-count"), 10) || 0;
var suffix = el.getAttribute("data-suffix") || "";
var dur = 1400;
var start = null;
function step(ts) {
if (start === null) start = ts;
var p = Math.min((ts - start) / dur, 1);
var eased = 1 - Math.pow(1 - p, 3);
var val = Math.round(target * eased);
el.textContent = val.toLocaleString("en-US") + suffix;
if (p < 1) requestAnimationFrame(step);
}
requestAnimationFrame(step);
}
if ("IntersectionObserver" in window) {
var co = new IntersectionObserver(
function (entries) {
entries.forEach(function (en) {
if (en.isIntersecting) {
animateCount(en.target);
co.unobserve(en.target);
}
});
},
{ threshold: 0.5 }
);
counters.forEach(function (el) { co.observe(el); });
} else {
counters.forEach(animateCount);
}
/* ---------- Next gathering banner ---------- */
var nextEl = document.getElementById("nextGathering");
if (nextEl) {
var schedule = [
{ day: 0, h: 9, label: "Sunday Worship at 9:00 AM" },
{ day: 0, h: 11, label: "Sunday Worship at 11:00 AM" },
{ day: 3, h: 18.5, label: "Wednesday Gathering at 6:30 PM" },
{ day: 5, h: 12, label: "Community Lunch on Friday at noon" },
{ day: 5, h: 19, label: "Youth Night on Friday at 7:00 PM" }
];
var now = new Date();
var nowDay = now.getDay();
var nowH = now.getHours() + now.getMinutes() / 60;
var best = null, bestDelta = Infinity;
schedule.forEach(function (s) {
var delta = (s.day - nowDay + 7) % 7 + (s.h - nowH) / 24;
if (delta < 0) delta += 7;
if (delta < bestDelta) { bestDelta = delta; best = s; }
});
nextEl.textContent = best ? "Next gathering: " + best.label + " — we'd love to see you." : "";
}
/* ---------- Ministry filter ---------- */
var chips = document.querySelectorAll(".chip");
var cards = document.querySelectorAll("#programGrid .card");
var emptyNote = document.getElementById("emptyNote");
chips.forEach(function (chip) {
chip.addEventListener("click", function () {
chips.forEach(function (c) {
c.classList.remove("is-active");
c.setAttribute("aria-selected", "false");
});
chip.classList.add("is-active");
chip.setAttribute("aria-selected", "true");
var f = chip.getAttribute("data-filter");
var shown = 0;
cards.forEach(function (card) {
var match = f === "all" || card.getAttribute("data-cat") === f;
card.classList.toggle("is-hidden", !match);
if (match) shown++;
});
if (emptyNote) emptyNote.hidden = shown !== 0;
});
});
/* ---------- Event RSVP ---------- */
document.querySelectorAll(".event__rsvp").forEach(function (btn) {
btn.addEventListener("click", function () {
if (btn.classList.contains("is-done")) return;
btn.classList.add("is-done");
btn.textContent = "Saved ✓";
toast("You're on the list for " + btn.getAttribute("data-event") + ". See you there!");
});
});
/* ---------- Give thermometer ---------- */
var fill = document.getElementById("thermoFill");
if (fill) {
var raised = 62400, goal = 90000;
requestAnimationFrame(function () {
fill.style.width = Math.min((raised / goal) * 100, 100) + "%";
});
}
/* ---------- Give form ---------- */
var amtBtns = document.querySelectorAll(".amt");
var amtInput = document.getElementById("giveAmount");
var btnAmt = document.getElementById("giveBtnAmt");
function syncBtn() {
var v = parseFloat(amtInput.value);
btnAmt.textContent = v > 0 ? "$" + v.toLocaleString("en-US") : "";
}
amtBtns.forEach(function (b) {
b.addEventListener("click", function () {
amtBtns.forEach(function (x) { x.classList.remove("is-active"); });
b.classList.add("is-active");
amtInput.value = b.getAttribute("data-amt");
syncBtn();
});
});
if (amtInput) {
amtInput.addEventListener("input", function () {
amtBtns.forEach(function (x) {
x.classList.toggle("is-active", x.getAttribute("data-amt") === amtInput.value);
});
syncBtn();
});
syncBtn();
}
var giveForm = document.getElementById("giveForm");
if (giveForm) {
giveForm.addEventListener("submit", function (e) {
e.preventDefault();
var v = parseFloat(amtInput.value);
if (!v || v < 1) {
amtInput.classList.add("is-invalid");
amtInput.focus();
toast("Please enter a gift amount.");
return;
}
amtInput.classList.remove("is-invalid");
var fund = document.getElementById("giveFund").value;
var recurring = document.getElementById("recurring").checked;
toast("Thank you! $" + v.toLocaleString("en-US") + (recurring ? "/mo" : "") + " to the " + fund + ". (Demo)");
giveForm.reset();
amtInput.value = "50";
amtBtns.forEach(function (x) { x.classList.toggle("is-active", x.getAttribute("data-amt") === "50"); });
syncBtn();
});
}
/* ---------- Connect form ---------- */
var connectForm = document.getElementById("connectForm");
if (connectForm) {
connectForm.addEventListener("submit", function (e) {
e.preventDefault();
var name = document.getElementById("cName");
var email = document.getElementById("cEmail");
var ok = true;
[name, email].forEach(function (f) {
var valid = f.type === "email" ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f.value) : f.value.trim().length > 1;
f.classList.toggle("is-invalid", !valid);
if (!valid && ok) { f.focus(); ok = false; }
});
if (!ok) { toast("Please fill in your name and a valid email."); return; }
var interest = document.getElementById("cInterest").value;
toast("Thanks, " + name.value.split(" ")[0] + "! Our welcome team will reach out about " + interest.toLowerCase() + ".");
connectForm.reset();
});
}
/* ---------- Back to top ---------- */
var toTop = document.getElementById("toTop");
if (toTop) {
toTop.addEventListener("click", function () {
window.scrollTo({ top: 0, behavior: "smooth" });
});
}
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Cedar Grove Fellowship — A Place to Belong</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a class="skip" href="#main">Skip to content</a>
<header class="nav" id="top">
<div class="wrap nav__inner">
<a class="brand" href="#top" aria-label="Cedar Grove Fellowship home">
<span class="brand__mark" aria-hidden="true">✦</span>
<span class="brand__text">
<strong>Cedar Grove</strong>
<em>Fellowship & Community Center</em>
</span>
</a>
<nav class="nav__links" id="primary-nav" aria-label="Primary">
<a href="#welcome">Welcome</a>
<a href="#programs">Ministries</a>
<a href="#events">Events</a>
<a href="#stories">Stories</a>
<a href="#involved">Get Involved</a>
</nav>
<div class="nav__actions">
<a class="btn btn--give" href="#give">Give & Tithe</a>
<button class="nav__toggle" id="navToggle" aria-expanded="false" aria-controls="primary-nav" aria-label="Open menu">
<span></span><span></span><span></span>
</button>
</div>
</div>
</header>
<main id="main">
<!-- HERO -->
<section class="hero" id="welcome">
<div class="wrap hero__inner">
<div class="hero__copy reveal">
<span class="eyebrow">Est. 1961 · All are welcome</span>
<h1>A place to gather, grow, and belong.</h1>
<p class="lead">Cedar Grove is a welcoming community of faith, friendship, and service in the heart of Mapleton. Whatever your story, there is a seat saved for you at our table.</p>
<div class="hero__cta">
<a class="btn btn--give btn--lg" href="#give">Give & Tithe</a>
<a class="btn btn--ghost btn--lg" href="#events">Plan a Visit</a>
</div>
<ul class="trust">
<li><span aria-hidden="true">⛪</span> 60+ years rooted here</li>
<li><span aria-hidden="true">🤝</span> Registered 501(c)(3)</li>
<li><span aria-hidden="true">🧾</span> Gifts are tax-deductible</li>
</ul>
</div>
<aside class="hours reveal" aria-label="Gathering times">
<div class="hours__photo" role="img" aria-label="Members greeting one another in the sunlit fellowship hall">
<span class="hours__caption">Sunday morning in the Fellowship Hall</span>
</div>
<div class="hours__body">
<h2>This Week</h2>
<ul class="hours__list">
<li><span class="day">Sunday Worship</span><span class="time">9:00 & 11:00 AM</span></li>
<li><span class="day">Wednesday Gathering</span><span class="time">6:30 PM</span></li>
<li><span class="day">Community Lunch</span><span class="time">Fri · 12:00 PM</span></li>
<li><span class="day">Youth Night</span><span class="time">Fri · 7:00 PM</span></li>
</ul>
<p class="hours__note" id="nextGathering" aria-live="polite">Loading next gathering…</p>
</div>
</aside>
</div>
</section>
<!-- IMPACT STRIP -->
<section class="impact" aria-label="Our community by the numbers">
<div class="wrap impact__grid">
<div class="stat reveal"><strong data-count="1240" data-suffix="">0</strong><span>Members & friends</span></div>
<div class="stat reveal"><strong data-count="58000" data-prefix="" data-suffix="">0</strong><span>Meals shared last year</span></div>
<div class="stat reveal"><strong data-count="34">0</strong><span>Volunteer ministries</span></div>
<div class="stat reveal"><strong data-count="92" data-suffix="%">0</strong><span>Gifts to direct service</span></div>
</div>
</section>
<!-- PROGRAMS / MINISTRIES -->
<section class="section" id="programs">
<div class="wrap">
<header class="section__head reveal">
<span class="eyebrow">Ministries & Programs</span>
<h2>Find your place to serve and grow</h2>
<p>From the nursery to the food pantry, there are dozens of ways to connect. Filter by who you'd like to join.</p>
</header>
<div class="filters reveal" role="tablist" aria-label="Filter ministries">
<button class="chip is-active" data-filter="all" role="tab" aria-selected="true">All</button>
<button class="chip" data-filter="worship" role="tab" aria-selected="false">Worship</button>
<button class="chip" data-filter="families" role="tab" aria-selected="false">Families</button>
<button class="chip" data-filter="service" role="tab" aria-selected="false">Service</button>
<button class="chip" data-filter="care" role="tab" aria-selected="false">Care</button>
</div>
<div class="cards" id="programGrid">
<article class="card reveal" data-cat="worship">
<div class="card__icon" aria-hidden="true">🎵</div>
<h3>Choir & Worship Arts</h3>
<p>Lift your voice with our 40-member choir and instrumental ensemble. No audition required.</p>
<span class="card__meta">Rehearsals · Thursdays 7 PM</span>
</article>
<article class="card reveal" data-cat="families">
<div class="card__icon" aria-hidden="true">🧸</div>
<h3>Children & Nursery</h3>
<p>Safe, joyful classrooms for newborns through 5th grade, every Sunday morning.</p>
<span class="card__meta">Sundays · during worship</span>
</article>
<article class="card reveal" data-cat="service">
<div class="card__icon" aria-hidden="true">🥫</div>
<h3>Cedar Pantry</h3>
<p>Pack and distribute groceries to 200+ neighbors each week. Drivers welcome.</p>
<span class="card__meta">Saturdays · 8 AM–noon</span>
</article>
<article class="card reveal" data-cat="families">
<div class="card__icon" aria-hidden="true">🔥</div>
<h3>Youth Group</h3>
<p>Games, mentorship, and real talk for grades 6–12 every Friday night.</p>
<span class="card__meta">Fridays · 7 PM</span>
</article>
<article class="card reveal" data-cat="care">
<div class="card__icon" aria-hidden="true">💛</div>
<h3>Care & Visitation</h3>
<p>Meals, rides, and prayer for members facing illness, loss, or new seasons.</p>
<span class="card__meta">As needs arise</span>
</article>
<article class="card reveal" data-cat="worship">
<div class="card__icon" aria-hidden="true">📖</div>
<h3>Small Groups</h3>
<p>Gather midweek in homes across Mapleton for study, supper, and friendship.</p>
<span class="card__meta">Weeknights · all areas</span>
</article>
<article class="card reveal" data-cat="service">
<div class="card__icon" aria-hidden="true">🔨</div>
<h3>Home Repair Team</h3>
<p>Fix porches, ramps, and roofs for elderly neighbors at no cost to them.</p>
<span class="card__meta">2nd Saturday monthly</span>
</article>
<article class="card reveal" data-cat="care">
<div class="card__icon" aria-hidden="true">☕</div>
<h3>Welcome Café</h3>
<p>New here? Coffee, pastries, and a friendly face await in the atrium.</p>
<span class="card__meta">Sundays · 8:30 AM</span>
</article>
</div>
<p class="cards__empty" id="emptyNote" hidden>No ministries in that group yet — check back soon.</p>
</div>
</section>
<!-- EVENTS -->
<section class="section section--alt" id="events">
<div class="wrap">
<header class="section__head reveal">
<span class="eyebrow">Upcoming</span>
<h2>Events & gatherings</h2>
<p>Mark your calendar — everyone is invited, members and neighbors alike.</p>
</header>
<ul class="events">
<li class="event reveal">
<div class="event__date"><span class="m">JUN</span><span class="d">22</span></div>
<div class="event__body">
<h3>Community Garden Workday</h3>
<p>Plant, weed, and harvest for the pantry — gloves and lemonade provided.</p>
<span class="event__meta">9:00 AM · East Lawn</span>
</div>
<button class="btn btn--ghost btn--sm event__rsvp" data-event="Community Garden Workday">RSVP</button>
</li>
<li class="event reveal">
<div class="event__date"><span class="m">JUN</span><span class="d">28</span></div>
<div class="event__body">
<h3>Summer Hymn Sing & Potluck</h3>
<p>Bring a dish to share and your favorite hymn. Tables under the cedars.</p>
<span class="event__meta">5:30 PM · Fellowship Lawn</span>
</div>
<button class="btn btn--ghost btn--sm event__rsvp" data-event="Summer Hymn Sing & Potluck">RSVP</button>
</li>
<li class="event reveal">
<div class="event__date"><span class="m">JUL</span><span class="d">04</span></div>
<div class="event__body">
<h3>Neighborhood Pancake Breakfast</h3>
<p>Free breakfast for all of Mapleton before the parade. Volunteers needed at 6 AM.</p>
<span class="event__meta">7:00 AM · Fellowship Hall</span>
</div>
<button class="btn btn--ghost btn--sm event__rsvp" data-event="Neighborhood Pancake Breakfast">RSVP</button>
</li>
<li class="event reveal">
<div class="event__date"><span class="m">JUL</span><span class="d">14</span></div>
<div class="event__body">
<h3>Back-to-School Backpack Drive</h3>
<p>Help fill 400 backpacks with supplies for Mapleton students in need.</p>
<span class="event__meta">10:00 AM · Atrium</span>
</div>
<button class="btn btn--ghost btn--sm event__rsvp" data-event="Back-to-School Backpack Drive">RSVP</button>
</li>
</ul>
</div>
</section>
<!-- GIVE -->
<section class="give" id="give">
<div class="wrap give__inner">
<div class="give__copy reveal">
<span class="eyebrow eyebrow--light">Give & Tithe</span>
<h2>Your generosity feeds, shelters, and welcomes.</h2>
<p>Every gift to Cedar Grove stays close to home — funding the pantry, care ministries, and a building that's open to all. Gifts are tax-deductible.</p>
<div class="thermo" role="img" aria-label="Summer Pantry Fund progress: 62 thousand of 90 thousand dollars raised">
<div class="thermo__head">
<span>Summer Pantry Fund</span>
<strong id="thermoLabel">$62,400 of $90,000</strong>
</div>
<div class="thermo__track"><div class="thermo__fill" id="thermoFill"></div></div>
<div class="thermo__foot">317 households fed this summer · goal by Sept 1</div>
</div>
</div>
<form class="give__card reveal" id="giveForm" novalidate>
<h3>Make a gift</h3>
<div class="amounts" role="group" aria-label="Choose an amount">
<button type="button" class="amt" data-amt="25">$25</button>
<button type="button" class="amt is-active" data-amt="50">$50</button>
<button type="button" class="amt" data-amt="100">$100</button>
<button type="button" class="amt" data-amt="250">$250</button>
</div>
<label class="field">
<span>Custom amount</span>
<div class="field__money">
<span aria-hidden="true">$</span>
<input type="number" id="giveAmount" name="amount" min="1" step="1" value="50" inputmode="decimal" />
</div>
</label>
<label class="field">
<span>Designate to</span>
<select id="giveFund" name="fund">
<option>General Fund</option>
<option>Summer Pantry Fund</option>
<option>Building & Grounds</option>
<option>Youth & Children</option>
</select>
</label>
<label class="check">
<input type="checkbox" id="recurring" />
<span>Make this a monthly gift</span>
</label>
<button type="submit" class="btn btn--give btn--block btn--lg">Give <span id="giveBtnAmt">$50</span></button>
<p class="give__fine">Secure & encrypted · 100% goes to ministry · Demo only</p>
</form>
</div>
</section>
<!-- STORIES -->
<section class="section" id="stories">
<div class="wrap">
<header class="section__head reveal">
<span class="eyebrow">Community Stories</span>
<h2>Lives touched, here at home</h2>
</header>
<div class="quotes">
<figure class="quote reveal">
<blockquote>"When my husband passed, the care team showed up with meals for a month. I never felt alone."</blockquote>
<figcaption><span class="avatar" aria-hidden="true">E</span> Eleanor Whitfield · Member since 1988</figcaption>
</figure>
<figure class="quote reveal">
<blockquote>"The pantry kept our family fed during a hard winter. Now we volunteer there every Saturday."</blockquote>
<figcaption><span class="avatar" aria-hidden="true">M</span> The Okafor Family · Mapleton</figcaption>
</figure>
<figure class="quote reveal">
<blockquote>"Youth group gave my son a place to belong — and mentors who still check in on him at college."</blockquote>
<figcaption><span class="avatar" aria-hidden="true">D</span> Diane Reyes · Parent</figcaption>
</figure>
</div>
<div class="donors reveal">
<h3>With gratitude to this month's supporters</h3>
<ul class="donors__list">
<li>The Halverson Family</li><li>Mapleton Hardware Co.</li>
<li>Grace & Theodore Lin</li><li>Anonymous Friend</li>
<li>Riverside Book Club</li><li>The Abernathy Trust</li>
<li>Sunrise Bakery</li><li>Coach Marcus & Family</li>
</ul>
</div>
</div>
</section>
<!-- GET INVOLVED -->
<section class="involved" id="involved">
<div class="wrap involved__inner">
<div class="involved__copy reveal">
<span class="eyebrow">Get Involved</span>
<h2>Take a next step</h2>
<p>Whether you're visiting for the first time or ready to serve, we'll help you find your place. Leave your email and our welcome team will reach out within a day.</p>
<ul class="involved__list">
<li>✦ Plan your first visit</li>
<li>✦ Join a small group or ministry</li>
<li>✦ Volunteer at the pantry</li>
<li>✦ Request prayer or care</li>
</ul>
</div>
<form class="involved__form reveal" id="connectForm" novalidate>
<label class="field">
<span>Your name</span>
<input type="text" id="cName" name="name" autocomplete="name" required />
</label>
<label class="field">
<span>Email</span>
<input type="email" id="cEmail" name="email" autocomplete="email" required />
</label>
<label class="field">
<span>I'm interested in</span>
<select id="cInterest" name="interest">
<option>Planning a visit</option>
<option>Joining a ministry</option>
<option>Volunteering</option>
<option>Prayer & care</option>
</select>
</label>
<button type="submit" class="btn btn--give btn--block btn--lg">Connect with us</button>
</form>
</div>
</section>
</main>
<footer class="foot">
<div class="wrap foot__inner">
<div class="foot__brand">
<span class="brand__mark" aria-hidden="true">✦</span>
<div>
<strong>Cedar Grove Fellowship</strong>
<p>412 Cedar Hollow Road · Mapleton, OH 44101</p>
<p>(555) 014-7720 · hello@cedargrove.example</p>
</div>
</div>
<nav class="foot__cols" aria-label="Footer">
<div>
<h4>Visit</h4>
<a href="#welcome">Service Times</a>
<a href="#events">Events</a>
<a href="#programs">Ministries</a>
</div>
<div>
<h4>Give</h4>
<a href="#give">Tithe Online</a>
<a href="#give">Pantry Fund</a>
<a href="#involved">Volunteer</a>
</div>
<div>
<h4>Connect</h4>
<a href="#involved">Plan a Visit</a>
<a href="#stories">Stories</a>
<a href="#involved">Prayer Request</a>
</div>
</nav>
</div>
<div class="wrap foot__bottom">
<span>© 2026 Cedar Grove Fellowship · Registered 501(c)(3) · EIN 00-0000000</span>
<button class="foot__top" id="toTop">Back to top ↑</button>
</div>
</footer>
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>Religious / Community Landing
A complete, single-file-per-asset landing page for Cedar Grove Fellowship, a fictional religious and community center. The design leans into a welcoming, rooted feel: a Fraunces serif for headings, warm sand backgrounds, and gold and mission-teal accents. The page is fully responsive down to 360px, with a collapsing mobile nav, and respects prefers-reduced-motion.
Interactions are all vanilla JavaScript. The hero card computes and announces the next gathering from a weekly schedule, impact numbers count up when scrolled into view, and the ministries grid filters live by category with an empty-state fallback. Events expose an RSVP button that confirms via a toast, and the give panel offers preset and custom amounts, a monthly toggle, an animated fundraising thermometer, and inline validation. A get involved form validates name and email before confirming, and a toast helper surfaces every action.
Every section reveals on scroll via IntersectionObserver, buttons and inputs carry hover, active, focus-visible, and invalid states, and all copy, org names, donors, and amounts are realistic but clearly fictional.
Illustrative UI only — fictional organization, not a real charity or donation system.