/* Riverside CRC — the public website. Same logo, colours and fonts as Member Manager (member.riversidecrc.ca). */
:root {
    --teal: #3085A3;
    --teal-dark: #21677F;
    --teal-deep: #164a5c;
    --lime: #BAD236;
    --lime-dark: #8f9f1c;
    --ink: #151515;
    --grey: #5F6368;
    --line: #ECEEE6;
    --tile: #F4F6EF;
    --white: #fff;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(21, 40, 50, .10);
    --serif: "Merriweather", Georgia, "Times New Roman", serif;
    --sans: "Lato", "Segoe UI", Helvetica, Arial, sans-serif;
    --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* ── Header ─────────────────────────────────────────── */
.topbar { background: var(--teal-deep); color: #e6f1f4; font-size: .86rem; }
.topbar .wrap { display: flex; gap: 18px; align-items: center; justify-content: space-between; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .tb-left { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar .live-dot { display: none; align-items: center; gap: 6px; font-weight: 700; color: #fff; }
.topbar .live-dot.on { display: inline-flex; }
.topbar .live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 3px rgba(255,77,77,.3); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,77,77,0); } }
header.site { background: #fff; border-bottom: 4px solid var(--lime); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
header.site .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 50px; width: auto; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 6px; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
nav.main ul a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
nav.main ul a:hover { background: var(--tile); color: var(--teal-dark); }
nav.main ul a[aria-current="page"] { color: var(--teal-dark); box-shadow: inset 0 -3px 0 var(--lime); border-radius: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 700; line-height: 1.2; transition: background .15s, color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-teal { background: var(--teal-dark); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); color: #fff; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #cfe356; color: var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-line { border-color: var(--teal-dark); color: var(--teal-dark); background: #fff; }
.btn-line:hover { background: var(--teal-dark); color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; }
.signin { margin-left: 6px; padding: 9px 16px; font-size: .92rem; white-space: nowrap; flex: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 30px; height: 30px; }

@media (max-width: 1180px) {
    .menu-btn { display: block; }
    nav.main { display: block; position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: #fff; box-shadow: -10px 0 30px rgba(0,0,0,.15); transform: translateX(105%); transition: transform .25s; padding: 80px 18px 24px; overflow-y: auto; z-index: 60; margin: 0; }
    nav.main.open { transform: none; }
    nav.main ul { flex-direction: column; align-items: stretch; }
    nav.main ul a { padding: 12px 14px; font-size: 1.05rem; }
    nav.main ul a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--lime); background: var(--tile); }
    .signin { margin: 14px 0 0; justify-content: center; display: flex; }
    .nav-close { display: block !important; position: absolute; top: 18px; right: 18px; }
    .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; display: none; }
    .scrim.open { display: block; }
}
.nav-close { display: none; background: none; border: 0; cursor: pointer; padding: 6px; color: var(--ink); }
.nav-close svg { width: 28px; height: 28px; }

/* ── Hero ───────────────────────────────────────────── */
.hero { position: relative; color: #fff; background: var(--teal-deep) center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10,38,48,.88) 0%, rgba(14,52,66,.66) 48%, rgba(14,52,66,.25) 100%); }
.hero .wrap { position: relative; padding: clamp(70px, 11vw, 140px) 20px clamp(60px, 9vw, 110px); }
.hero h1 { color: #fff; max-width: 15em; }
.hero .verse { font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 34em; opacity: .95; }
.hero .verse cite { display: block; font-style: normal; font-family: var(--sans); font-size: .9rem; opacity: .85; margin-top: 6px; letter-spacing: .04em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero.small .wrap { padding: clamp(54px, 8vw, 90px) 20px clamp(40px, 6vw, 64px); }
.hero.small h1 { margin: 0; }
.hero .kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 900; color: var(--lime); margin-bottom: 10px; }

/* the times strip under the home hero */
.times { background: var(--lime); }
.times .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.times .t { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.times .t + .t { border-left: 1px solid rgba(0,0,0,.12); }
.times svg { width: 30px; height: 30px; flex: none; color: var(--teal-deep); }
.times b { display: block; font-size: 1.05rem; }
.times span { font-size: .92rem; }
@media (max-width: 760px) { .times .wrap { grid-template-columns: 1fr; } .times .t + .t { border-left: 0; border-top: 1px solid rgba(0,0,0,.12); } }

/* ── Sections ───────────────────────────────────────── */
section { padding: clamp(48px, 7vw, 84px) 0; }
section.tint { background: var(--tile); }
section.dark { background: var(--teal-deep); color: #e7f1f4; }
section.dark h2, section.dark h3 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 900; color: var(--teal); margin-bottom: 8px; }
section.dark .eyebrow { color: var(--lime); }
.lead { font-size: 1.15rem; color: #333; }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.flip > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.head-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.head-row h2 { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border-top: 4px solid var(--lime); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .when { font-weight: 700; color: var(--teal-dark); font-size: .92rem; margin-bottom: 6px; }
.icon-round { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #eef6f8; color: var(--teal-dark); margin-bottom: 12px; }
.icon-round svg { width: 24px; height: 24px; }

/* events */
.events { display: grid; gap: 12px; }
.ev { display: grid; grid-template-columns: 74px 1fr; gap: 16px; background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05); align-items: start; }
.ev .d { background: var(--teal-dark); color: #fff; border-radius: 10px; text-align: center; padding: 8px 0 6px; line-height: 1.1; }
.ev .d .m { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .9; }
.ev .d .n { font-size: 1.7rem; font-weight: 900; font-family: var(--serif); }
.ev.svc .d { background: var(--lime); color: var(--ink); }
.ev h3 { margin: 2px 0 2px; font-size: 1.08rem; }
.ev .meta { color: var(--grey); font-size: .92rem; }
.ev p { margin: 6px 0 0; font-size: .95rem; }
.muted { color: var(--grey); }
.empty { color: var(--grey); font-style: italic; }

/* sermons */
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0b2730; box-shadow: var(--shadow); }
.video-frame iframe, .video-frame .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame .poster { display: grid; place-items: center; background-size: cover; background-position: center; cursor: pointer; border: 0; padding: 0; }
.video-frame .poster::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.video-frame .play { position: relative; z-index: 1; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.video-frame .play svg { width: 32px; height: 32px; color: var(--teal-dark); margin-left: 4px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; background: #d93025; color: #fff; border-radius: 999px; padding: 3px 12px; font-weight: 900; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.sermons { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.sermon { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.07); text-decoration: none; color: inherit; display: flex; flex-direction: column; border: 0; padding: 0; text-align: left; font: inherit; cursor: pointer; }
.sermon:hover { box-shadow: var(--shadow); }
.sermon img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.sermon .s-body { padding: 12px 14px 16px; }
.sermon b { display: block; line-height: 1.35; }
.sermon span { color: var(--grey); font-size: .88rem; }

/* gallery */
.gallery { columns: 4 240px; column-gap: 14px; }
.gallery button { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: none; cursor: zoom-in; break-inside: avoid; border-radius: 10px; overflow: hidden; }
.gallery img { width: 100%; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; background: rgba(5,15,20,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox button svg { width: 28px; height: 28px; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* the members strip */
.members { background: linear-gradient(120deg, var(--teal-dark), var(--teal-deep)); color: #e9f3f6; border-radius: 20px; padding: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.members h2 { color: #fff; margin-bottom: .3em; }
.members p { margin: 0; }
@media (max-width: 760px) { .members { grid-template-columns: 1fr; } }

/* forms */
form.contact { display: grid; gap: 14px; }
form.contact label { font-weight: 700; font-size: .92rem; display: block; margin-bottom: 4px; }
form.contact input, form.contact textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid #cfd6c8; border-radius: 10px; background: #fff; }
form.contact input:focus, form.contact textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(48,133,163,.18); }
form.contact .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { form.contact .row2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 10px; padding: 12px 16px; font-weight: 700; }
.notice.ok { background: #eef7dc; color: #3d5a0f; }
.notice.err { background: #fdecea; color: #8a1c13; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 340px; }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
dl.info { margin: 0; display: grid; gap: 14px; }
dl.info dt { font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); }
dl.info dd { margin: 2px 0 0; }

/* ministries */
.ministry { display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ministry:last-child { border-bottom: 0; }
.ministry h3 { margin-bottom: .25em; }
.ministry p { margin: 0; }
.ministry .when { display: inline-block; background: #eef6f8; color: var(--teal-dark); font-weight: 700; font-size: .84rem; border-radius: 999px; padding: 2px 12px; margin-bottom: 6px; }

.prose { max-width: 760px; }
.prose p { font-size: 1.06rem; }
.pastor-card { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.pastor-card img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.pastor-card .contact-mini { margin-top: 16px; display: grid; gap: 6px; font-size: .95rem; }
@media (max-width: 760px) { .pastor-card { grid-template-columns: 1fr; } .pastor-card img { max-width: 300px; } }
.links-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.links-row a { display: block; background: #fff; border-radius: 12px; padding: 18px; text-decoration: none; color: inherit; box-shadow: 0 2px 10px rgba(0,0,0,.06); border-left: 4px solid var(--teal); }
.links-row a:hover { box-shadow: var(--shadow); }
.links-row b { display: block; color: var(--teal-dark); }
.links-row span { font-size: .92rem; color: var(--grey); }

/* ── Footer ─────────────────────────────────────────── */
footer.site { background: #0f2f3a; color: #c9dbe1; padding: 54px 0 24px; font-size: .95rem; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
footer.site h4 { color: var(--lime); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer.site .logo-box { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
footer.site .logo-box img { height: 42px; }
footer.site .social { display: flex; gap: 10px; margin-top: 12px; }
footer.site .social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
footer.site .social svg { width: 20px; height: 20px; }
footer.site .bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: #93aeb7; }
@media (max-width: 860px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { footer.site .cols { grid-template-columns: 1fr; } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
@media (max-width: 600px) { .topbar .tb-left a[href^="mailto"] { display: none; } .topbar { font-size: .82rem; } }
