/* Salem Primitive Baptist Church */
:root {
  --ink: #1d2733;
  --muted: #55606c;
  --navy: #1f3247;
  --navy-deep: #15212f;
  --teal: #1b7565;
  --teal-dark: #135a4e;
  --gold: #d6973a;
  --gold-soft: #f6e7cf;
  --cream: #f8f5ef;
  --sky: #eaf1f5;
  --line: #e2ddd3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 1.0625rem/1.65 var(--sans); color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .7rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--navy); line-height: 1.15; padding: .5rem 0; }
.brand-name { font-family: var(--serif); font-variant: small-caps; font-weight: 700; font-size: 1.22rem; letter-spacing: .04em; }
.brand-tag { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; font: 600 .95rem var(--sans); color: var(--navy); cursor: pointer; min-height: 44px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.site-nav ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.site-nav a { display: block; padding: .7rem .25rem; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--teal); }
.site-nav .nav-give a { border: 0; margin-top: .75rem; text-align: center; }
@media (max-width: 420px) { .brand-name { font-size: 1.05rem; } .brand-tag { font-size: .75rem; letter-spacing: .1em; } }
@media (min-width: 1200px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .site-nav ul { display: flex; align-items: center; gap: .15rem; padding: 0; }
  .site-nav a { border: 0; padding: .5rem .6rem; font-size: .95rem; border-radius: 8px; }
  .site-nav a:hover { background: var(--sky); color: var(--navy); }
  .site-nav .nav-give a { margin: 0 0 0 .5rem; padding: .55rem 1rem; }
  .site-nav .nav-give a:hover { background: var(--teal-dark); color: #fff; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px; background: var(--teal); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--teal); cursor: pointer; font-size: 1rem; font-family: var(--sans); }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.btn-outline { background: transparent; color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--navy-deep); overflow: hidden; }
.hero picture, .hero > img { position: absolute; inset: 0; }
.hero picture img, .hero > img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,33,47,.35) 0%, rgba(21,33,47,.55) 50%, rgba(21,33,47,.88) 100%); }
.hero .wrap { position: relative; z-index: 1; padding: clamp(5rem, 16vw, 9.5rem) 0 clamp(3rem, 8vw, 5rem); }
.hero h1 { color: #fff; max-width: 17ch; font-size: clamp(2.1rem, 6vw, 3.6rem); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero .eyebrow { color: var(--gold-soft); }
.hero-lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 38ch; margin-bottom: 1.6rem; color: #f2f4f6; }
.eyebrow { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: .6rem; }

.page-hero { background: linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, #2b4b5f); color: #fff; padding: clamp(2.8rem, 7vw, 4.5rem) 0 clamp(2.4rem, 6vw, 3.6rem); position: relative; overflow: hidden; }
.page-hero.has-img { background: var(--navy-deep); }
.page-hero.has-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-hero .wrap, .page-hero .narrow { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: #e7ecf0; font-size: 1.12rem; max-width: 52ch; margin: 0; }
.page-hero .eyebrow { color: var(--gold-soft); }

/* Sections */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-tint { background: var(--cream); }
.section-sky { background: var(--sky); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } .split.reverse > :first-child { order: 2; } }
.photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px -18px rgba(21,33,47,.45); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
figure { margin: 0; }
figcaption { font-size: .92rem; color: var(--muted); padding-top: .6rem; }
.lead { font-size: 1.15rem; }
.verse { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--navy); border-left: 4px solid var(--gold); padding: .2rem 0 .2rem 1.1rem; margin: 0 0 1.5rem; }
.verse cite { display: block; font-style: normal; font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: .35rem; }

.cards { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); }
.card-body .more { margin-top: auto; font-weight: 700; }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.meta { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }

.pillars { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: #fff; border-radius: var(--radius); padding: 1.6rem; border-top: 4px solid var(--gold); box-shadow: 0 10px 30px -20px rgba(21,33,47,.4); }
.pillar p { color: var(--muted); margin: 0; }

/* Video */
.video { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; color: #fff; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s; }
.video:hover img { opacity: 1; }
.video .play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; background: rgba(27,117,101,.92); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.video .play::after { content: ""; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sermon-list { display: grid; gap: 2rem; }
@media (min-width: 760px) { .sermon-list { grid-template-columns: 1fr 1fr; } }
.sermon h3 { margin: 1rem 0 .3rem; }
.sermon p { color: var(--muted); }
.sermon-feature { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 860px) { .sermon-feature { grid-template-columns: 1.35fr 1fr; gap: 3rem; } }

/* Prose (articles) */
.prose { font-size: 1.1rem; }
.prose p { margin-bottom: 1.15em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.post-img { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; }
.post-img img { width: 100%; max-height: 460px; object-fit: cover; }
.post-nav { display: grid; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } .post-nav .next { text-align: right; } }
.post-nav a { display: block; text-decoration: none; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); font-weight: 700; }
.post-nav a span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }
.post-nav a:hover { border-color: var(--teal); }
.byline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: #e7ecf0; font-size: 1rem; }

/* Beliefs */
.articles { list-style: none; counter-reset: art; padding: 0; margin: 0; display: grid; gap: 1rem; }
.articles li { counter-increment: art; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem 1.25rem 4.4rem; }
.articles li::before { content: counter(art); position: absolute; left: 1.2rem; top: 1.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--navy); color: #fff; font: 700 1.05rem/2.3rem var(--serif); text-align: center; }
.articles p { margin: 0 0 .4rem; }
.articles .refs { font-size: .93rem; color: var(--teal-dark); margin: 0; }

/* Info blocks */
.info-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
.info { background: #fff; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); }
.info h2, .info h3 { font-size: 1.35rem; }
.info p:last-child { margin-bottom: 0; }
.big { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); font-weight: 700; line-height: 1.3; }
.map { border: 0; width: 100%; height: 340px; border-radius: var(--radius); display: block; background: var(--sky); }

/* Events */
.events { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .events { grid-template-columns: 1fr 1fr; } }
.event { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 1.6rem; }
.event h2 { font-size: 1.45rem; }
.sched { list-style: none; padding: 0; margin: 0; }
.sched li { padding: .65rem 0; border-top: 1px solid var(--line); }
.sched li:first-child { border-top: 0; }
.sched strong { color: var(--navy); }
.sched small { display: block; color: var(--muted); font-size: .95rem; }
.times { list-style: none; padding: 0; margin: 0; }
.times li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.times li:last-child { border: 0; }

/* Gallery */
.gal-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.gal-nav a { padding: .45rem .9rem; border-radius: 999px; background: var(--sky); color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; }
.gal-nav a:hover { background: var(--teal); color: #fff; }
.gal-section { margin-bottom: 3rem; scroll-margin-top: 90px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--sky); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10,16,24,.9); }
.lightbox img { max-width: 96vw; max-height: 84vh; width: auto; border-radius: 8px; margin: 0 auto; }
.lightbox-bar { display: flex; justify-content: center; gap: .6rem; margin-top: .7rem; }
.lightbox-bar button { min-width: 48px; min-height: 44px; border-radius: 999px; border: 0; background: #fff; color: var(--navy); font: 700 1rem var(--sans); cursor: pointer; padding: 0 1rem; }

/* Forms */
.form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); }
.form .row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--navy); }
.form input, .form textarea { width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid #c9c3b8; border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px; }
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 3px solid rgba(27,117,101,.3); border-color: var(--teal); }
.form .req { color: #a33a1f; }
.form-note { font-size: .92rem; color: var(--muted); margin: 0; }

/* CTA band */
.band { position: relative; color: #fff; background: var(--navy-deep); overflow: hidden; }
.band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.band .wrap { position: relative; padding: clamp(3rem, 8vw, 5rem) 0; text-align: center; }
.band h2 { color: #fff; }
.band p { max-width: 56ch; margin: 0 auto 1.5rem; color: #eef1f4; font-size: 1.1rem; }
.band .btn-row { justify-content: center; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #d9e0e7; padding: 3.5rem 0 1.5rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold-soft); }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.15rem; font-family: var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer .foot-brand { font-family: var(--serif); font-variant: small-caps; font-size: 1.35rem; color: #fff; font-weight: 700; letter-spacing: .03em; margin-bottom: .2rem; }
.site-footer p { margin: 0 0 .9rem; }
.foot-phone { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; text-decoration: none; display: inline-block; padding: .2rem 0; }
.foot-list { list-style: none; padding: 0; margin: 0; }
.foot-list li { margin-bottom: .35rem; }
.foot-list a { display: inline-block; padding: .2rem 0; }
.social { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.social a { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.social a:hover { background: var(--teal); }
.social svg { width: 20px; height: 20px; fill: #fff; }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem; color: #aab6c2; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.site-footer .hp-badge, .site-footer [class*="hp-badge"] { margin-top: 1rem; }

.center { text-align: center; }
.mt { margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.notfound { padding: 6rem 0; text-align: center; }
