/* 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: #363B47;    /* charcoal body text, cool to sit with the navy */
  --muted: #687083;
  --navy-800: #16305F;
  --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; color: var(--navy-900); }
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); }

h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin: 0 0 0.35em; color: var(--navy-900); }

/* Hero: real text (readable on phones, by screen readers and search engines)
   beside a photo, on the brand navy */
.hero { background: var(--navy-900); color: #fff; padding: 40px 0 44px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 0.4em; text-wrap: balance; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em; margin-bottom: 14px; }
.hero-lead { color: #C5D2E9; font-size: 1.12rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 820px) {
  .hero { padding: 64px 0; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
  .hero-grid.no-photo { grid-template-columns: minmax(0, 1fr); }
}

/* Page sections and full-width bands, so the page has some rhythm */
.section { padding: 36px 0; }
.section-title { font-size: clamp(1.45rem, 3.4vw, 1.85rem); margin-bottom: 18px; }
.band { padding: 44px 0; }
.band-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack { display: grid; gap: 16px; }

/* 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; }

.announcement { background: var(--gold-50); border-color: #FBE08F; color: var(--gold-800); font-weight: 500; margin-bottom: 24px; }
.announcement p { margin: 0; }

/* Plan your visit: When + Where, same height side by side */
.visit-grid { display: grid; gap: 16px; }
@media (min-width: 820px) { .visit-grid { grid-template-columns: 1fr 1fr; } }
/* card heading: small icon + label */
.card-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-50); color: var(--navy-600); flex: none; }

/* When: the main service time large, the rest as a small schedule */
.main-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; color: var(--navy-900); }
.main-day { font-size: 1.15rem; font-weight: 500; }
.main-hour { font-size: 2.6rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; order: -1; }
.main-hour-text { font-size: 1.6rem; order: 0; }
.schedule { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.schedule li { display: flex; align-items: center; gap: 12px; }
.chip { flex: none; min-width: 62px; text-align: center; padding: 3px 8px; border-radius: 999px; background: var(--gold-50); border: 1px solid #FBE08F; color: var(--gold-800); font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip-soft { background: var(--navy-50); border-color: #DCE3F0; color: var(--navy-600); }

/* Next service: a calendar tile beside the details */
.next-service { display: flex; gap: 14px; align-items: flex-start; background: var(--navy-50); border-radius: 12px; padding: 14px; margin-top: auto; }
.next-service p { margin: 0 0 2px; }
.next-service .label { margin-bottom: 2px; }
.date-tile { flex: none; width: 58px; margin: 0 !important; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #DCE3F0; text-align: center; line-height: 1.1; }
.date-tile span { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 0; color: var(--muted); }
.date-tile span:first-child { background: var(--navy-900); color: var(--gold); }
.date-tile b { display: block; font-size: 1.5rem; font-weight: 600; color: var(--navy-900); padding-top: 2px; }
.next-when { font-weight: 600; color: var(--navy-900); }
.next-title { color: var(--muted); }
.next-preacher { margin-top: 4px !important; }
.when { display: flex; flex-direction: column; }
.where-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
.address { font-size: 1.1rem; font-weight: 500; color: var(--navy-900); }
/* contact buttons sit at the foot of the card, level with the When card */
.where { display: flex; flex-direction: column; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.where .contact-actions:first-child, .where .label + .contact-actions { border-top: 0; padding-top: 0; }

/* What to expect */
.expect { display: grid; gap: 24px; align-items: start; }
.expect-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.expect-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.expect-list li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.expect-list li h3::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: 0.15em; }
.expect-list p { font-size: 0.98rem; }
.expect-list p:last-child { margin-bottom: 0; }
@media (min-width: 820px) {
  .expect-list { grid-template-columns: 1fr 1fr; }
  .expect.has-photo { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); }
  .expect.has-photo .expect-list { grid-template-columns: 1fr; }
}
@media (min-width: 1000px) { .expect.has-photo .expect-list { grid-template-columns: 1fr 1fr; } }

/* Scripture: navy, with a mountain-range edge (the Crags) */
.band-verse { position: relative; background: radial-gradient(ellipse at 50% 0%, var(--navy-800), var(--navy-900) 70%); color: #fff; padding: 56px 0 120px; overflow: hidden; }
.band-verse::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath fill='%231D3B7C' fill-opacity='.45' d='M0 140V92l90-30 70 22 110-58 80 40 70-26 120 64 90-50 60 20 120-72 100 58 70-24 110 52 90-36 80 30 110-50 70 26V140z'/%3E%3Cpath fill='%23F7F7F5' d='M0 140v-22l120-30 90 26 130-44 100 36 80-18 130 40 110-34 90 20 140-46 110 38 90-14 110 30 140-36V140z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; pointer-events: none; }
.verse { position: relative; margin: 0 auto; text-align: center; z-index: 1; }
.verse blockquote { margin: 0; }
.verse p { font-size: clamp(1.25rem, 3.2vw, 1.75rem); font-weight: 500; line-height: 1.45; color: #fff; letter-spacing: -0.01em; text-wrap: balance; margin-bottom: 18px; }
.verse p::before { content: '\201C'; display: block; font-size: 4.5rem; line-height: 0.5; height: 0.45em; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.verse figcaption { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.verse figcaption::before, .verse figcaption::after { content: ''; width: 36px; height: 1px; background: rgba(245, 185, 21, 0.6); }
@media (min-width: 820px) { .band-verse { padding: 72px 0 150px; } .band-verse::after { height: 130px; } }

.with-image { display: grid; gap: 20px; 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); }
  .with-image.reverse { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .with-image.reverse > img { order: 2; }
}

/* Latest sermon: details and player side by side on wide screens */
.latest-body { display: grid; gap: 8px; align-items: center; }
@media (min-width: 820px) { .latest-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; } }
.latest-head h2 { font-size: 1.2rem; }
.latest-head h2 a { text-decoration: none; color: var(--navy-900); }
.latest-head h2 a:hover { text-decoration: underline; }
.latest-more { margin: 0; }

/* 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); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: #FFCB3D; color: var(--navy-900); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* 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; }

/* "Plan your visit" link: land below the sticky header */
#visit { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
