/* Crags Family Church public website. Same brand as the app: navy, logo gold, Geist. */
:root {
  --navy-900: #0F2147;
  --navy-600: #1D3B7C;
  --navy-50: #F1F4FA;
  --gold: #F5B915;
  --gold-50: #FEF9EA;
  --gold-800: #5E4300;
  --ink: #1C1917;
  --muted: #6B6966;
  --line: #E7E5E4;
  --bg: #F7F7F5;
  --card: #FFFFFF;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); }
a:hover { color: var(--navy-900); }
h1, h2 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 600; }
h2 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 0.8em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header: white, so the full-colour logo (navy + gold) reads as visitors know it */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: block; line-height: 0; }
.brand img { height: 44px; width: auto; }
@media (min-width: 820px) { .brand img { height: 54px; } }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 10px 12px; border-radius: 8px; }
.topbar nav a:hover { color: var(--navy-900); background: var(--navy-50); }
.topbar nav a[aria-current="page"] { color: var(--navy-900); background: var(--navy-50); }

/* Banner / hero */
.banner img { width: 100%; height: auto; } /* never crop: the banner has text and the logo near its edges */
.hero { background: var(--navy-900); color: #fff; padding: 56px 0; }
.hero p { color: #C5D2E9; font-size: 1.15rem; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.meta { color: var(--muted); font-size: 0.95rem; }
.more { font-weight: 600; text-decoration: none; }

.home-grid { display: grid; gap: 16px; padding-top: 24px; padding-bottom: 40px; }
@media (min-width: 820px) {
  .home-grid { grid-template-columns: 1fr 1fr; padding-top: 32px; }
  .home-grid .announcement, .home-grid .with-image { grid-column: 1 / -1; }
}
.announcement { background: var(--gold-50); border-color: #FBE08F; color: var(--gold-800); font-weight: 500; }
.announcement p { margin: 0; }

.service-times { list-style: none; padding: 0; margin: 0 0 16px; }
.service-times li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.service-times li:first-child { font-weight: 600; font-size: 1.1rem; }
.service-times li:last-child { border-bottom: 0; }
.next-service { background: var(--navy-50); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.next-service p { margin: 0 0 2px; }
.next-when { font-weight: 600; }
.next-title { color: var(--muted); }
.next-preacher { margin-top: 6px !important; }
.welcome { margin-top: 12px; }

.with-image { display: grid; gap: 18px; align-items: center; }
/* natural proportions: some images (e.g. Sunday School) have text near the edges */
.with-image img { border-radius: 10px; width: 100%; height: auto; max-height: 420px; object-fit: contain; }
@media (min-width: 820px) { .with-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--navy-600); background: var(--navy-600); color: #fff; font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-900); color: #fff; }
.btn-outline { background: #fff; color: var(--navy-600); border-color: var(--line); }
.btn-outline:hover { background: var(--navy-50); color: var(--navy-900); }

/* Audio */
.player { width: 100%; margin: 12px 0; }

/* Sermons */
.page { padding-top: 28px; padding-bottom: 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.filters input, .filters select { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.filters input { flex: 1 1 240px; }
.filters select { flex: 1 1 160px; }
.filters .clear { align-self: center; padding: 0 6px; }
.count { color: var(--muted); font-size: 0.9rem; }
.empty { color: var(--muted); padding: 24px 0; }

.sermon-list { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sermon-item + .sermon-item { border-top: 1px solid var(--line); }
.sermon-item a { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; text-decoration: none; color: inherit; }
.sermon-text { display: grid; gap: 2px; min-width: 0; }
.sermon-thumb { width: 72px; height: 72px; flex: none; border-radius: 10px; object-fit: cover; background: #F6F4ED; }
.latest-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.latest-head h2 { margin-bottom: 2px; }
.latest-head .meta { margin: 0; }
.sermon-item a:hover { background: var(--navy-50); }
.sermon-date { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.sermon-title { font-weight: 600; font-size: 1.05rem; color: var(--navy-900); }
.sermon-sub { font-size: 0.9rem; color: var(--muted); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 0.9rem; }

.sermon .back { margin-bottom: 12px; }
.sermon .back a { text-decoration: none; font-weight: 500; }
/* Same 16:9 area, but the whole image always shows (covers are usually square) */
.sermon-art { border-radius: var(--radius); margin-bottom: 18px; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #F6F4ED; }
/* no cover art: the CFC badge, with breathing room inside the same area */
.sermon-art-badge { padding: 6% 0; }
.sermon .series { font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.description { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.related { margin-top: 32px; }

/* Footer */
.footer { background: var(--navy-900); color: #C5D2E9; padding: 32px 0; font-size: 0.95rem; }
.footer a { color: #fff; }
.footer-grid { display: grid; gap: 12px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-name { color: #fff; font-weight: 600; }
.footer-small { font-size: 0.85rem; color: #98AED6; }

/* Long-form text pages (privacy notice) */
.prose h2 { margin-top: 1.6em; font-size: 1.15rem; }
.prose ul { padding-left: 1.2em; margin: 0 0 0.8em; }
.prose li { margin-bottom: 0.3em; }
