/* The Solid Rock Baptist Church — site styles
   Palette taken from the church logo: red rock, sandstone, parchment. */

:root {
  --cream: #FBF6EE;
  --parchment: #F4EADB;
  --sand: #E8A25B;
  --rock: #B4472A;
  --rock-dark: #8E3520;
  --brown: #2B1E17;
  --brown-soft: #5A4638;
  --line: #E6D7C3;
  --white: #FFFDF9;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --wrap: 68rem;
  --text: 42rem;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 30, 23, .06), 0 8px 24px rgba(43, 30, 23, .07);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--sans);
  font-size: 1.125rem;      /* 18px */
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rock); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rock-dark); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sand); outline-offset: 3px; border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--brown);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.1em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brown); color: var(--white); padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: var(--text); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--brown); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.15;
}
.brand:hover { color: var(--brown); text-decoration: none; }
.brand svg { width: 2.6rem; height: 2.6rem; flex: none; }
.brand small {
  display: block; font-family: var(--sans); font-weight: 600; font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rock);
}

.nav-toggle {
  display: none;
  font: 600 1rem var(--sans); color: var(--brown);
  background: var(--parchment); border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a {
  display: block; padding: .5rem .8rem; border-radius: 999px;
  color: var(--brown); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.site-nav a:hover { background: var(--parchment); color: var(--brown); }
.site-nav a[aria-current="page"] { background: var(--rock); color: var(--white); }

@media (max-width: 64rem) {
  .js .nav-toggle { display: inline-block; }
  .site-nav ul { flex-direction: column; gap: .15rem; padding: .5rem 0 1rem; }
  .site-nav { width: 100%; }
  .header-inner { flex-wrap: wrap; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav a { padding: .75rem 1rem; font-size: 1.1rem; border-radius: 10px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.4rem;
  border-radius: 999px; border: 2px solid var(--rock);
  background: var(--rock); color: var(--white);
  font: 600 1.05rem var(--sans); text-decoration: none;
}
.btn:hover { background: var(--rock-dark); border-color: var(--rock-dark); color: var(--white); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--rock); }
.btn-ghost:hover { background: var(--rock); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(232, 162, 91, .28), transparent 60%),
    linear-gradient(180deg, var(--parchment), var(--cream));
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero .logo {
  width: min(100%, 26rem); margin: 0 auto 1.75rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero p.lead { max-width: 40rem; margin: 0 auto 1.6rem; font-size: 1.2rem; color: var(--brown-soft); }
.hero .btn-row { justify-content: center; }
.eyebrow {
  display: inline-block; margin-bottom: .75rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rock);
}

.page-head { padding: 3rem 0 2rem; background: var(--parchment); border-bottom: 1px solid var(--line); }
.page-head p { color: var(--brown-soft); font-size: 1.15rem; max-width: var(--text); margin-bottom: 0; }

/* ---------- Sections ---------- */
section.block { padding: 3.25rem 0; }
section.block.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.pillars { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: 1.5rem; }
.pillar {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.25rem; text-align: center;
}
.pillar strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--rock); }
.pillar span { color: var(--brown-soft); }

.grid-2 { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 52rem) { .grid-2 { grid-template-columns: 1.1fr .9fr; } }

/* ---------- Times card ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem;
}
.card h2, .card h3 { margin-bottom: .9rem; }
.times { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.times li {
  display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem;
  padding: .8rem 0; border-bottom: 1px dashed var(--line);
}
.times li:last-child { border-bottom: 0; }
.times .day { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rock); grid-column: 1 / -1; }
.times .what { font-weight: 600; }
.times .when { white-space: nowrap; color: var(--brown-soft); }
.note {
  background: var(--parchment); border-left: 4px solid var(--sand);
  padding: .9rem 1rem; border-radius: 0 10px 10px 0; font-size: 1rem; margin: 0 0 1.25rem;
}
.address { font-style: normal; margin-bottom: 1.25rem; }
.address strong { display: block; font-size: 1.1rem; }

/* ---------- Scripture ---------- */
blockquote.scripture {
  margin: 1.5rem 0; padding: 1.1rem 1.25rem 1.1rem 1.4rem;
  background: var(--white); border-left: 4px solid var(--rock); border-radius: 0 12px 12px 0;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.6;
}
blockquote.scripture p { margin: 0 0 .4rem; }
blockquote.scripture cite {
  display: block; font-family: var(--sans); font-style: normal; font-weight: 700;
  font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rock);
}

/* ---------- Story ---------- */
.story h2 { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.story h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.callout {
  font-family: var(--serif); font-size: 1.5rem; text-align: center; color: var(--rock);
  margin: 1.5rem 0;
}
.family { text-align: center; color: var(--brown-soft); font-style: italic; margin-bottom: 1.5rem; }

/* ---------- Beliefs ---------- */
.toc { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.toc a {
  display: inline-block; padding: .4rem .85rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  color: var(--brown); text-decoration: none; font-size: .95rem; font-weight: 600;
}
.toc a:hover { border-color: var(--rock); color: var(--rock); }
.belief { padding: 1.75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.belief:last-child { border-bottom: 0; }
.belief h2 { font-size: 1.5rem; }
.refs { color: var(--brown-soft); }
.to-top { font-size: .9rem; font-weight: 600; }

/* ---------- Ministries ---------- */
.ministries { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .ministries { grid-template-columns: repeat(3, 1fr); } }
.ministry { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ministry img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ministry .body { padding: 1.25rem 1.25rem 1.5rem; }
.ministry blockquote.scripture { font-size: 1.02rem; margin: 1rem 0 0; }

.teaser { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .teaser { grid-template-columns: repeat(3, 1fr); } }
.teaser a.tile { display: block; text-decoration: none; color: var(--brown); }
.teaser a.tile img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: .75rem; }
.teaser a.tile strong { font-family: var(--serif); font-size: 1.2rem; }
.teaser a.tile:hover strong { color: var(--rock); }

/* ---------- Map ---------- */
.map {
  width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius);
  background: var(--parchment); box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown); color: #EADCC8; margin-top: 0;
  padding: 3rem 0 2rem; font-size: 1rem;
}
.site-footer a { color: #F6C48E; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h2 { color: var(--white); font-size: 1.1rem; margin-bottom: .6rem; }
.site-footer p { margin-bottom: .5rem; }
.site-footer address { font-style: normal; }
.footer-bottom {
  border-top: 1px solid rgba(234, 220, 200, .2); margin-top: 2rem; padding-top: 1.25rem;
  font-size: .9rem; color: #C9B8A2;
}
.footer-bottom em { font-family: var(--serif); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Round photos (the original photos were circle-cropped) */
.ministry img, .teaser a.tile img {
  aspect-ratio: 1 / 1; width: min(78%, 16rem); margin: 1.5rem auto 0;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 6px var(--white), 0 0 0 7px var(--line);
}
.ministry { border-top: 6px solid var(--rock); }
.teaser a.tile { text-align: center; }
.teaser a.tile img { margin: .5rem auto 1rem; }
.teaser a.tile { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--rock); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1rem; }

/* ---------- Watch & Listen ---------- */
.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;
}
.watch-head { text-align: center; }
.watch-latest { max-width: 56rem; margin: 0 auto; }
.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  background: var(--brown); box-shadow: var(--shadow);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-cta { justify-content: center; margin-top: 1.25rem; }
.pl-heading { margin-top: 2.75rem; text-align: center; font-size: 1.5rem; }
.watch-more { text-align: center; margin: 1.75rem 0 0; font-weight: 600; }

.playlists {
  list-style: none; margin: 1.25rem 0 0; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
}
.playlist a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  color: var(--brown); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.playlist a:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(43,30,23,.08), 0 14px 32px rgba(43,30,23,.14); color: var(--brown); text-decoration: none; }
.pl-art {
  display: grid; place-items: center; aspect-ratio: 16 / 8;
  background:
    radial-gradient(90% 120% at 85% 0%, rgba(255,255,255,.22), transparent 55%),
    linear-gradient(135deg, var(--pl-a, var(--sand)), var(--pl-b, var(--rock)));
  color: #FFF8EF;
}
.pl-art svg {
  width: 3.5rem; height: 3.5rem;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.18));
}
.pl-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.3rem; }
.pl-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; margin-bottom: .35rem; }
.pl-desc { color: var(--brown-soft); font-size: 1rem; margin-bottom: 1.1rem; }
.pl-btn {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem;
  padding: .55rem 1.15rem; border-radius: 999px;
  background: var(--rock); color: var(--white); font-weight: 600; font-size: 1rem;
}
.playlist a:hover .pl-btn { background: var(--rock-dark); }
@media (prefers-reduced-motion: reduce) { .playlist a { transition: none; } .playlist a:hover { transform: none; } }

/* Phones: compact side-by-side playlist cards so the list stays short */
@media (max-width: 40rem) {
  .playlists { gap: .85rem; }
  .playlist a { flex-direction: row; }
  .pl-art { aspect-ratio: auto; width: 6.5rem; flex: none; }
  .pl-art svg { width: 2.6rem; height: 2.6rem; }
  .pl-body { padding: .9rem 1rem 1rem; }
  .pl-title { font-size: 1.15rem; }
  .pl-desc { font-size: .95rem; margin-bottom: .75rem; }
}
