/* Sermon pages. Uses the tokens and components from /site.css.
   Three layouts: the "theater" (latest sermon and single sermon, dark),
   the archive and "more from" lists (light sheets), and the reading page
   for transcripts and study notes (light, 19px text in a 700px column). */

.draft-banner {
  position: fixed; left: 50%; bottom: 16px; z-index: 80; transform: translateX(-50%);
  /* max-content: without it the centered box shrinks to half the screen and wraps to four lines on a phone */
  width: max-content; max-width: calc(100% - 32px); padding: 11px 20px; border-radius: 22px;
  background: #f3c64e; color: #16130a; font-size: 0.875rem; line-height: 1.35; font-weight: 700; text-align: center;
  box-shadow: 0 12px 40px rgba(4, 10, 8, 0.4);
}
.needs-review { padding: 0 0.2em; background: #fff1b8; color: var(--ink); }

/* ---------- theater ---------- */

.theater {
  position: relative; z-index: 0; isolation: isolate; overflow: hidden;
  padding: clamp(112px, 11vw, 152px) 0 calc(clamp(56px, 7vw, 104px) + var(--r-xl));
  background: var(--e950); color: var(--on-dark);
}
.theater::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 52% at 50% 26%, rgba(100, 129, 133, 0.3), transparent 72%),
    radial-gradient(40% 40% at 0% 100%, rgba(194, 160, 110, 0.12), transparent 70%);
}
.theater + .sheet { margin-top: calc(-1 * var(--r-xl)); }
.theater-wrap { max-width: 1180px; }
.latest-label { margin: 12px 0 20px; font: 600 var(--t-lead)/1.2 var(--display); letter-spacing: -0.02em; color: var(--on-dark-2); }
.back-link { display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; font-weight: 600; color: var(--bronze); }
.theater .back-link { margin-bottom: 12px; color: var(--brass); }
.back-link:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: var(--e800); box-shadow: 0 0 0 1px var(--hair-dark), 0 40px 120px rgba(0, 0, 0, 0.5); }
.player > img, .player-poster, .player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player-poster-blank { background: linear-gradient(135deg, var(--e700), var(--e900)); }
.player-play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center;
  width: 88px; height: 88px; margin: -44px 0 0 -44px; border: 0; border-radius: 50%;
  background: rgba(246, 240, 226, 0.92); color: var(--e900); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease);
}
.player-play svg { margin-left: 4px; }
.player-play:hover { transform: scale(1.08); background: #fff; }
.player-soon { position: absolute; right: 18px; bottom: 18px; }
.player-soon span { display: block; padding: 10px 16px; border-radius: 999px; background: rgba(10, 19, 16, 0.72); color: var(--on-dark); font-size: 0.875rem; font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

.sermon-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-top: clamp(28px, 3.4vw, 48px); }
.sermon-title-row h1, .index-title { font-size: var(--t-xl); line-height: 1; letter-spacing: -0.04em; }
.sermon-title-row h1 a { transition: color 0.3s var(--ease); }
.sermon-title-row h1 a:hover { color: var(--brass); }
.sermon-meta { margin-top: 14px; color: var(--on-dark-2); }
.sermon-description { max-width: 40em; margin-top: 22px; font-size: var(--t-lead); line-height: 1.5; color: var(--on-dark-2); }
.sermon-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sermon-actions { display: flex; flex: none; gap: 18px; }

.round-action { display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.round-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(246, 240, 226, 0.12); box-shadow: inset 0 0 0 1px var(--hair-dark); transition: background-color 0.3s var(--ease); }
.round-action:hover .round-icon { background: rgba(246, 240, 226, 0.26); }
.round-label { font-size: 0.875rem; font-weight: 600; }
.share-wrap { position: relative; }
.share-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; display: grid; min-width: 214px; padding: 6px;
  border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px var(--hair-light), 0 24px 60px rgba(4, 10, 8, 0.35);
}
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 12px; background: none; color: inherit; font: 600 1rem/1.2 var(--font); text-align: left; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--s100); }
.copied { color: #1d6b3a; font-size: 0.875rem; }

/* ---------- more from this series, and the archive ---------- */

.more-from h2, .series-group h3 { font: 600 0.875rem/1.2 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--bronze); }
.more-from h2 span { color: var(--ink-2); }
.more-list { display: grid; gap: 14px; margin-top: 24px; }
.more-item { display: grid; grid-template-columns: minmax(140px, 300px) 1fr; align-items: center; gap: clamp(18px, 3vw, 40px); padding: 12px; border-radius: var(--r-lg); background: var(--s100); transition: background-color 0.3s var(--ease); }
.more-item:hover { background: var(--s200); }
.more-item img, .more-blank { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: var(--e800); }
.more-text { display: grid; gap: 8px; }
.more-text strong { font: 700 var(--t-md)/1.08 var(--display); letter-spacing: -0.032em; }
.more-text span { color: var(--ink-2); }

.archive-title { font-size: var(--t-display); line-height: 0.95; letter-spacing: -0.042em; }
.series-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 0.9375rem/1 var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(17, 25, 22, 0.3); transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.chip[aria-pressed="true"] { background: var(--e900); color: var(--cream); box-shadow: none; }
.series-group { margin-top: clamp(40px, 5vw, 72px); }
.series-group[hidden] { display: none; }
.sermon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.sermon-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px 12px 24px; border-radius: var(--r-lg); background: var(--s100); transition: background-color 0.3s var(--ease); }
.sermon-card:hover { background: var(--s200); }
.sermon-card img, .card-blank { display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 10px; object-fit: cover; border-radius: 20px; background: var(--e800); }
.sermon-card strong { padding: 0 10px; font: 700 var(--t-md)/1.08 var(--display); letter-spacing: -0.032em; }
.sermon-card span { padding: 0 10px; color: var(--ink-2); }

/* ---------- transcript and study notes ---------- */

.doc-page { position: relative; z-index: 1; padding: clamp(124px, 13vw, 176px) 0 calc(clamp(72px, 9vw, 128px) + var(--r-xl)); background: var(--s50); color: var(--ink); }
.doc-wrap { max-width: 700px; }
.doc-wrap h1 { margin-top: 14px; font-size: var(--t-xl); line-height: 1; letter-spacing: -0.04em; }
.doc-page .eyebrow { margin-top: 18px; }
.doc-page .sermon-meta { color: var(--ink-2); }
.doc-tools { display: flex; align-items: flex-start; gap: 18px; margin: 28px 0; }
.doc-page .round-icon { width: 48px; height: 48px; background: var(--s200); box-shadow: none; }
.doc-page .round-action:hover .round-icon { background: var(--s400); }
.doc-note { padding-bottom: 22px; border-bottom: 1px solid var(--hair-light); color: var(--ink-2); font-style: italic; }
.doc-body { margin-top: 30px; font-size: 1.1875rem; line-height: 1.6; letter-spacing: -0.006em; }
.doc-body p { margin: 0 0 1.25em; }
.doc-body h2, .doc-body h3, .doc-body h4 { margin: 2em 0 0.6em; line-height: 1.12; text-wrap: balance; }
.doc-body h2 { font-size: var(--t-md); letter-spacing: -0.032em; }
.doc-body h3 { font-size: var(--t-lead); letter-spacing: -0.022em; }
.doc-body h4 { font-size: 1.1875rem; }
.doc-body ul, .doc-body ol { margin: 0 0 1.25em; padding-left: 1.3em; }
.doc-body ul { list-style: disc; }
.doc-body ol { list-style: decimal; }
.doc-body li + li { margin-top: 0.4em; }
.doc-body li::marker { color: var(--brass-deep); }
.doc-body blockquote { margin: 1.6em 0; padding: 2px 0 2px 22px; border-left: 2px solid var(--brass-deep); font: italic 400 1.3125rem/1.5 var(--serif); }
.doc-body blockquote p:last-child { margin-bottom: 0; }
.doc-body a { color: var(--bronze); text-decoration: underline; text-underline-offset: 0.18em; }
.doc-body strong { font-weight: 600; }

@media (max-width: 1068px) {
  .sermon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  .sermon-title-row { flex-direction: column; gap: 22px; }
  .share-menu { right: auto; left: 0; }
  /* 56px keeps the button clear of the title printed on the poster at phone size */
  .player-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .player-play svg { width: 20px; height: 20px; margin-left: 3px; }
  .sermon-grid { grid-template-columns: 1fr; }
  .more-item { grid-template-columns: 1fr 1.3fr; }
  .doc-body { font-size: 1.125rem; }
  .sermon-links .button { flex: 1 1 100%; }
}

@media print {
  .site-header, .site-footer, .doc-tools, .back-link, .skip-link, .draft-banner { display: none !important; }
  body, .doc-page { background: #fff; color: #000; }
  .doc-page { padding: 0; }
  .doc-wrap { width: auto; max-width: none; }
  .doc-body { font-size: 12pt; }
  .doc-body a { color: #000; text-decoration: none; }
}
