/*
 * Additions for the Firebase site. main.css is the site's stylesheet as it has always been;
 * this file holds what the new pages need on top of it: classes that replace the old inline
 * styles, the welcome video band, banners, sermon chapters and transcript, and post and staff pages.
 */

main { display: block; }

/* ---- Layout helpers (these were inline styles on the old pages) ---- */
.container--narrow { max-width: 900px; }
.container--sermon { max-width: 860px; }
.section__head--split { display: flex; justify-content: space-between; align-items: end; max-width: none; gap: 24px; flex-wrap: wrap; }
.section__joined { margin-top: 40px; }
.section--dark .eyebrow { color: #ff8687; }
.hero .btn--outline, .section--dark .btn--outline { border-color: rgba(255, 255, 255, 0.35); color: #fff !important; }
.btn-row--spaced { margin-top: 24px; }
.btn-row--center { justify-content: center; }
.text-center > .btn-row { justify-content: center; }
.text-center > .section__head { margin-left: auto; margin-right: auto; }
.text-center > .section__head .lead { margin-left: auto; margin-right: auto; }
.hero__actions { margin-top: 28px; }
.back-row { margin-top: 40px; }
.split__cards { margin-top: 24px; }
.callout p { margin: 0; }
.callout--below { margin-top: 24px; }
.latest { align-items: start; }
.latest__info { padding-left: 12px; }
.stats { gap: 14px; }
.staff-group { margin-bottom: 48px; }
.staff-group__grid { margin-top: 20px; }
.staff-card__more { color: var(--journey-red); font-weight: 600; }
.card__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.tile__link--red { color: var(--journey-red); }
.card .tile__link { margin-top: auto; }
.jc-form--centered { max-width: 720px; margin: 0 auto; width: 100%; }
.jc-form__checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 4px; }
.jc-form__footnote--intro { margin-top: 12px; }
.hero--notfound { padding: 140px 0 120px; text-align: center; }
.hero--notfound h1 { margin: 0 auto; }
.hero--notfound .lead { margin: 24px auto; max-width: 520px; }

/* ---- Rich text (written in the admin's editor) ---- */
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich ul, .rich ol { padding-left: 1.3em; margin: 0 0 var(--sp-4); }
.rich li { margin-bottom: 6px; }
.rich blockquote { margin: var(--sp-5) 0; padding: 4px 0 4px var(--sp-5); border-left: 4px solid var(--journey-red); color: var(--text-muted); font-size: 18px; }
.rich img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: var(--sp-4) 0; }
.rich a:not(.btn) { color: var(--journey-red); text-decoration: underline; text-underline-offset: 2px; }
.rich--large p { font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.55; max-width: 62ch; }
.section--dark .rich { color: rgba(255, 255, 255, 0.85); }

/* ---- Welcome video band (was injected by js/welcome.js) ---- */
.jw { background: #141414; color: #fff; position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0; }
.jw::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(40% 60% at 70% 50%, rgba(255, 200, 140, 0.16), transparent 70%); pointer-events: none; }
.jw__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; position: relative; }
.jw__eyebrow { font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: 0.24em; text-transform: uppercase; color: #ff8a8b; }
.jw h2 { color: #fff; margin: 0.35em 0 0.4em; }
.jw p { color: rgba(255, 255, 255, 0.82); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; max-width: 34ch; margin: 0; }
.jw__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.jw__btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; background: #d62829; color: #fff; border: 2px solid #d62829; }
.jw__btn--o { background: transparent; border-color: rgba(255, 255, 255, 0.6); }
.jw__fig { margin: 0; position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.jw__fig video, .jw__fig iframe { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; border: 0; }
.jw__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; background: #d62829; color: #fff; font-size: 30px; box-shadow: 0 0 0 10px rgba(214, 40, 41, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4); }
.jw__play[hidden] { display: none; }
@media (max-width: 860px) { .jw__grid { grid-template-columns: 1fr; } .jw__fig { order: -1; } }

/* ---- Homepage hero background (still or silent looping video, with a pause button) ---- */
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 15, 16, 0.88) 0%, rgba(15, 15, 16, 0.62) 55%, rgba(15, 15, 16, 0.35) 100%); }
.hero--media .container { position: relative; z-index: 1; }
.hero__pause { position: absolute; z-index: 2; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 12px; cursor: pointer; }
.hero__pause:hover, .hero__pause:focus-visible { background: var(--journey-red); border-color: var(--journey-red); }

/* ---- Banners ---- */
.site-banner { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 48px 10px 16px; font-size: 15px; line-height: 1.4; color: #fff; background: #1a1a1a; }
.site-banner[hidden] { display: none; }
.site-banner__inner { display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap; text-align: center; }
.site-banner__msg { margin: 0; font-weight: 600; }
.site-banner__btn { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.site-banner__close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; opacity: 0.85; }
.site-banner__close:hover, .site-banner__close:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.18); }
.site-banner--info { background: #1a1a1a; color: #fff; }
.site-banner--highlight { background: #d62829; color: #fff; }
.site-banner--celebration { background: #f4c66a; color: #1a1a1a; }
.site-banner--urgent { background: #a80f10; color: #fff; }
.site-banner--urgent .site-banner__msg::before { content: "Important: "; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 800; }
.site-banner--home { padding-top: 16px; padding-bottom: 16px; font-size: 17px; }
[data-theme="dark"] .site-banner--info { background: #26272d; }
.preview-note { background: #fff3c4; color: #1a1a1a; font: 600 14px/1.4 var(--font-body); text-align: center; padding: 8px 12px; }

/* ---- Sermon page: chapters and transcript ---- */
.sermon-detail__pending { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.7); font-size: 15px; }
.sermon-chapters { margin-top: var(--sp-6); }
.sermon-chapters__title { font-size: 18px; margin: 0 0 10px; }
.sermon-chapters ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.sermon-chapters li + li { border-top: 1px solid var(--border); }
.sermon-chapters button { display: flex; gap: 14px; width: 100%; text-align: left; padding: 12px 16px; border: 0; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.sermon-chapters button:hover, .sermon-chapters button:focus-visible { background: var(--surface-alt); }
.sermon-chapters__t { font-family: var(--font-mono); font-size: 13px; color: var(--journey-red); min-width: 48px; padding-top: 2px; }
.sermon-transcript { margin-top: var(--sp-5); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.sermon-transcript summary { cursor: pointer; padding: 14px 16px; font-weight: 700; }
.sermon-transcript__text { white-space: pre-wrap; padding: 0 16px 16px; max-height: 60vh; overflow: auto; color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* ---- Post and staff pages ---- */
.post__media { border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--sp-6); background: var(--charcoal); }
.post__media img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.post__body { font-size: 17px; line-height: 1.7; }
.staff-detail { align-items: start; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.staff-detail__photo { border-radius: var(--radius-md); overflow: hidden; }
.staff-detail__photo img { width: 100%; display: block; }
@media (max-width: 860px) { .staff-detail { grid-template-columns: 1fr; } }
