/* Sermon Insights — shared styles
   Palette mirrors the Sermon Notes app (Scandinavian minimalism + warm faith). */

:root {
  --gold: #d5a95e;
  --gold-dark: #b98f47;
  --soft-sand: #f8eedc;
  --clay: #e8d9c4;
  --olive: #6a6f4c;
  --olive-dark: #545839;
  --slate: #7a7a89;
  --light-grey: #f5f5f7;
  --stone: #e5e5ea;
  --ink: #2b2b2e;
  --white: #ffffff;
  --link-blue: #4a6fa5;

  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 3px rgba(43, 43, 46, 0.06), 0 8px 24px rgba(43, 43, 46, 0.06);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }

p { margin: 0 0 1em; }
a { color: var(--link-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.muted { color: var(--slate); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .7em 1.3em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #3a2c11; }
.btn-gold:hover { background: var(--gold-dark); color: #3a2c11; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--stone); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--stone);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 64px; width: auto; display: block; }
.brand:hover { text-decoration: none; opacity: .9; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); font-size: .92rem; font-weight: 500; }
.nav a:hover { color: var(--gold-dark); text-decoration: none; }
.nav .btn { font-size: .85rem; padding: .55em 1.1em; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: .82rem; color: var(--slate); margin: 22px 0 6px; }
.crumb a { color: var(--slate); }
.crumb a:hover { color: var(--gold-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(90deg, rgba(248, 238, 220, 0.82) 0%, rgba(248, 238, 220, 0.5) 42%, rgba(248, 238, 220, 0) 72%),
    url("/img/hero-church.png") center/cover no-repeat;
  background-color: var(--soft-sand);
}
.hero-inner { padding-top: 96px; padding-bottom: 96px; }
.hero h1 { max-width: 16ch; color: var(--ink); text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); }
.hero p { font-size: 1.15rem; color: #4a463c; max-width: 46ch; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
/* Archive/directory pages (sermons, topics, pastors) — tight rhythm, not home-page bands */
main.container > section { padding: 0; }
main.container > section + section { margin-top: calc(14px + 1.6em); }
main.container > section h2:first-child { margin-top: 0; margin-bottom: 0.45em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head a { font-size: .9rem; font-weight: 600; color: var(--gold-dark); }
.section-more { margin: 28px 0 0; text-align: center; }

/* ---------- Cards grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(43,43,46,.12); text-decoration: none; }
.card .thumb { position: relative; aspect-ratio: 16/9; background: var(--stone); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-badge {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 38px;
  background: rgba(220, 30, 30, .92); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.play-badge::after { content: ""; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.tag-pastor { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--olive); }
.card .body h3 { margin: 2px 0; }
.card .hook { color: var(--slate); font-size: .92rem; margin: 0; }
.card .date { color: var(--slate); font-size: .8rem; margin-top: 4px; }

/* ---------- Pastor avatar grid ---------- */
.pastor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 18px; }
.pastor-cell { text-align: center; }
.pastor-cell a { color: var(--ink); }
.pastor-cell a:hover { text-decoration: none; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.5rem; color: #4a3a17; font-weight: 600;
  background: linear-gradient(135deg, var(--clay), var(--gold));
  border: 2px solid var(--white); box-shadow: var(--shadow);
}
.avatar.lg { width: 150px; height: 150px; font-size: 2.6rem; }
.pastor-header .avatar.lg { align-self: flex-start; flex-shrink: 0; margin: 0; }
.pastor-cell .name { font-weight: 600; font-size: .95rem; }
.pastor-cell .trad { color: var(--slate); font-size: .78rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--olive), var(--olive-dark));
  color: #f3f0e6; border-radius: var(--radius); padding: 30px 34px;
  display: flex; align-items: center; gap: 28px; justify-content: space-between; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { color: rgba(255,255,255,.82); margin: 0; max-width: 46ch; }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.store-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 162px; height: 48px; flex-shrink: 0;
}
.store-badge:hover { opacity: .88; }
.store-badge img {
  width: 162px; height: 48px; object-fit: contain; object-position: center;
  display: block;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--light-grey); border-top: 1px solid var(--stone); padding: 40px 0 32px; margin-top: 24px; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.email-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.email-form input {
  font-family: var(--sans); font-size: .92rem; padding: .65em 1em; border-radius: 999px;
  border: 1px solid var(--stone); min-width: 240px; background: #fff;
}
.email-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--slate); font-size: .88rem; }
.disclaimer { color: var(--slate); font-size: .82rem; margin-top: 22px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 9999;
  background: rgba(26, 26, 26, .96); color: #fff; padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.cookie-banner-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: .92rem; color: rgba(255,255,255,.88); max-width: 62ch; }
.cookie-banner a { color: var(--gold); }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }

/* ================= Sermon (money) page ================= */
.article-head { padding-top: 8px; }
.article-head:not(:has(.topic-tags)) { margin-bottom: 20px; }
.article-meta { color: var(--slate); font-size: .95rem; margin: -.2em 0 1.2em; }
.video-embed {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: #000; box-shadow: var(--shadow); margin: 0 0 18px;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; }

.tldr {
  background: var(--soft-sand); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 18px;
}
.tldr .label { font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; }
.tldr ul { margin: 0; padding-left: 1.1em; }
.tldr li { margin-bottom: 6px; }
.tldr p { margin: 0; font-size: 1.08rem; line-height: 1.5; }

/* Overview prose body */
.overview p { font-size: 1.05rem; line-height: 1.7; color: #3a372f; margin: 0 0 1em; }
.overview p:last-child { margin-bottom: 0; }

/* Inline scripture links woven into prose */
.scripture-inline {
  color: var(--gold-dark); text-decoration: none;
  border-bottom: 1px dotted var(--gold); white-space: nowrap;
}
.scripture-inline:hover { border-bottom-style: solid; text-decoration: none; }

/* Topic tags under the article headline */
.topic-tags { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.article-head .topic-tags { margin-top: 14px; margin-bottom: 32px; }
.topic-tags--wide { margin-top: 0; }
.topic-tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold-dark); background: var(--soft-sand);
  border: 1px solid var(--stone); border-radius: 999px; padding: 4px 12px;
  text-decoration: none; transition: background .12s ease, border-color .12s ease;
}
a.topic-tag:hover { background: var(--clay); border-color: var(--gold); text-decoration: none; color: var(--gold-dark); }

/* Topic index grid */
.topic-grid {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.topic-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-sm);
  padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.topic-card:hover { transform: translateY(-2px); border-color: var(--gold); text-decoration: none; color: var(--ink); }
.topic-card-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.topic-card-count { font-size: .78rem; color: var(--slate); font-weight: 500; }

.topic-header { padding-top: 0; margin-bottom: 8px; }
.topic-header .lede { max-width: 58ch; color: #45413a; font-size: 1.05rem; line-height: 1.65; }

.archive-head { padding-top: 0; margin-bottom: 4px; }
.archive-head .lede { margin-bottom: 6px; }

/* Notable quotes (the preacher's verbatim words) */
.quote-list { display: flex; flex-direction: column; gap: 18px; }
.pull-quote { margin: 0; border-left: 4px solid var(--gold); padding: 4px 0 4px 20px; }
.pull-quote blockquote {
  margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.5;
  color: #34302a; font-style: italic;
}
.pull-quote figcaption { margin-top: 8px; font-size: .85rem; color: var(--slate); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--stone); }
.faq-item { border-bottom: 1px solid var(--stone); padding: 4px 0; }
.faq-item summary {
  cursor: pointer; padding: 14px 28px 14px 2px; font-weight: 600; color: var(--ink);
  list-style: none; position: relative; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 400; color: var(--gold-dark); transition: transform .15s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0 0 14px; padding-right: 28px; color: #45413a; line-height: 1.6; }

.article-section { margin-bottom: 22px; }
/* Sermon article blocks use <section> but must not inherit the page-level
   `section { padding: 48px 0 }` used on home/pastor layout sections. */
article .article-section {
  padding: 0;
  margin-bottom: 0;
}
article .article-section + .article-section,
article .tldr + .article-section {
  margin-top: calc(14px + 1.6em);
}
article .article-section h2 { margin-top: 0; margin-bottom: 0.4em; }
.article-section ul, .article-section ol { padding-left: 1.2em; margin: 0; }
.article-section li { margin-bottom: 8px; }
.article-section ol li { padding-left: .2em; }

/* Lede paragraph (editorial intro under the byline) */
.lede { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; color: #3f3a2f; margin: 14px 0 6px; }

/* Outline — items carry their own "I." / "A." numbering, so no list markers. */
.article-section ul.outline { list-style: none; padding-left: 0; }
.article-section ul.outline li { margin-bottom: 7px; }
.article-section ul.outline li.sub { padding-left: 1.5em; color: var(--slate); font-size: .96em; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-block; padding: .35em .9em; border-radius: 999px; font-size: .85rem; font-weight: 500;
  border: 1px solid var(--gold); color: var(--gold-dark); background: #fffaf1;
}
.chip:hover { background: var(--soft-sand); text-decoration: none; }

/* Insights */
.insight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.insight {
  position: relative; background: var(--clay); border-radius: var(--radius);
  padding: 22px 24px 24px; font-family: var(--serif); font-size: 1.05rem; color: #3f3a2f;
}
.insight::before { content: "\201C"; font-family: var(--serif); font-size: 3rem; color: var(--gold); line-height: 0; position: absolute; top: 26px; left: 16px; opacity: .55; }
.insight p { margin: 14px 0 0; }
.insight.locked { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--slate); background: var(--light-grey); border: 1px dashed var(--stone); }
.insight.locked::before { content: none; }
.lock-ico { width: 30px; height: 30px; margin-bottom: 8px; }

/* Flashcards */
.flash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.flash {
  perspective: 1000px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-align: left;
  height: 150px;
}
.flash-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flash.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius);
  border: 1px solid var(--stone); background: #fff; padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow);
}
.flash-face .q-label { font-size: .72rem; font-weight: 700; color: var(--gold-dark); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.flash-face .flip-hint { color: var(--slate); font-size: .78rem; margin-top: auto; }
.flash-back { transform: rotateY(180deg); background: var(--soft-sand); }
.flash-teaser {
  border: 1px dashed var(--stone); border-radius: var(--radius); background: var(--light-grey);
  display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--slate);
  height: 150px; font-size: .92rem; font-weight: 500;
}

/* end-of-article CTA + sticky bar */
.app-cta { margin: 40px 0 24px; }
.sticky-cta {
  position: sticky; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-top: 1px solid var(--stone); padding: 12px 0;
}
.sticky-cta .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sticky-cta .pitch { font-weight: 600; font-size: .95rem; }

/* ================= Pastor hub ================= */
.pastor-header { display: flex; gap: 30px; align-items: flex-start; padding: 14px 0 8px; flex-wrap: wrap; }
.pastor-header .info { flex: 1; min-width: 280px; }
.pastor-header .info .trad { text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; font-weight: 700; color: var(--olive); margin: 0 0 12px; }
.pastor-bio p { margin: 0 0 .85em; line-height: 1.65; }
.pastor-bio p:last-child { margin-bottom: 0; font-size: .92rem; color: var(--muted); }
.notify-strip {
  background: var(--soft-sand); border-radius: var(--radius); padding: 16px 22px; margin: 24px 0 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.notify-strip .label { font-weight: 600; }

.sermon-list { list-style: none; padding: 0; margin: 0; }
.sermon-row {
  display: flex; align-items: center; gap: 18px; padding: 16px 6px;
  border-bottom: 1px solid var(--stone); color: var(--ink);
}
.sermon-row:hover { text-decoration: none; background: var(--light-grey); border-radius: var(--radius-sm); }
.sermon-row .thumb { position: relative; width: 132px; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; flex: none; background: var(--stone); }
.sermon-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sermon-row .play-badge { width: 40px; height: 28px; }
.sermon-row .play-badge::after { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }
.sermon-row .meta { flex: 1; min-width: 0; }
.sermon-row .meta h3 { margin: 0 0 2px; }
.sermon-row .meta .hook { color: var(--slate); font-size: .9rem; margin: 0; }
.sermon-row .right { color: var(--slate); font-size: .82rem; white-space: nowrap; text-align: right; }

/* ================= Legal / simple pages ================= */
.prose { padding: 32px 0 16px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }

/* ================= Responsive ================= */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .pastor-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { max-width: none; }
  .hero p { max-width: none; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--stone); padding: 18px 24px;
  }
  .nav.open .btn { width: 100%; }
  .nav-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .pastor-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-grid, .flash-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 24px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .sermon-row .thumb { width: 96px; }
  .sticky-cta .pitch { display: none; }
  .sticky-cta .btn { width: 100%; }
  .hero-inner { padding-top: 64px; padding-bottom: 64px; }
}

/* ================= Bible reader ================= */
.bible-chapter-head { margin-bottom: 28px; }
.bible-chapter-head h1 { margin-bottom: .15em; }
.bible-chapter-num { color: var(--gold-dark); }
.bible-translation {
  font-size: .88rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--slate); margin: 0;
}
.bible-highlight-note { margin-top: 8px; }

.bible-verses { font-family: var(--serif); font-size: 1.12rem; line-height: 1.65; }
.bible-verses .verse {
  margin: 0 0 14px; padding: 0;
  scroll-margin-top: 96px; /* clear sticky site header when jumping to #vN */
}
.bible-verses .verse:target {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}
.bible-verses .verse.highlighted {
  background: rgba(213, 169, 94, 0.15);
  margin-left: -12px; margin-right: -12px;
  padding: 10px 12px; border-radius: 6px;
}
.bible-verses .verse sup {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  color: var(--gold-dark); margin-right: 4px;
}

/* Sermon-page compact excerpts (option A) */
.scripture-excerpts { margin-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.scripture-excerpt {
  background: var(--light-grey); border: 1px solid var(--stone);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.scripture-excerpt-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  margin-bottom: 12px;
}
.scripture-excerpt-ref {
  font-weight: 600; color: var(--gold-dark); font-size: .95rem;
}
.scripture-excerpt-note { font-size: .82rem; color: var(--slate); font-style: italic; }
.scripture-excerpt .bible-verses { font-size: 1rem; }
.scripture-excerpt-more { margin: 10px 0 0; font-size: .88rem; }
.scripture-excerpt-more a { font-weight: 500; }
