:root {
  --bg: #090909;
  --panel: #111111;
  --panel-2: #171717;
  --panel-3: #1d1d1d;
  --line: #2a2a2a;
  --text: #f7f4ef;
  --muted: #96938e;
  --muted-2: #6f6c68;
  --red: #8f0000;
  --red-bright: #ff4f4f;
  --red-dark: #490000;
  --gold: #c59a2e;
  --gold-soft: #efcf86;
  --radius: 14px;
  --font-display: Newsreader, ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: Manrope, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --sidebar: 252px;
  --topbar: 62px;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 78% 3%, rgba(143,0,0,.11), transparent 25%), var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, .brand-copy strong, .empty-state h3 {
  font-family: var(--font-display); font-weight: 600;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.topbar {
  height: var(--topbar);
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 40px auto minmax(300px, 520px) 44px;
  gap: 18px;
  align-items: center;
  padding: 0 16px;
  background: rgba(5,5,5,.94);
  border-bottom: 1px solid #181818;
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 44px; height: 44px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-copy strong { font-size: 14px; letter-spacing: .06em; white-space: nowrap; }
.brand-copy span { color: var(--muted); font-size: 10px; letter-spacing: .03em; white-space: nowrap; }
.search-wrap {
  width: 100%; height: 40px; display: flex; align-items: center; gap: 10px;
  background: #1c1c1c; border: 1px solid #242424; border-radius: 999px; padding: 0 14px;
  justify-self: center;
}
.search-wrap:focus-within { border-color: #4c4130; box-shadow: 0 0 0 3px rgba(239,207,134,.05); }
.search-icon { color: #918d88; font-size: 22px; line-height: 1; transform: rotate(-15deg); }
.search-wrap input { flex: 1; background: transparent; border: 0; color: var(--text); outline: none; min-width: 0; }
.search-wrap input::placeholder { color: #908c87; }
kbd { color: #9a9a9a; background: #242424; border: 1px solid #303030; padding: 2px 7px; border-radius: 6px; font-size: 11px; }
.more-button, .mobile-menu {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #292929; background: transparent; cursor: pointer;
}
.mobile-menu { display: grid; place-items: center; color: #cfcfcf; font-size: 17px; transition: border-color .18s ease, color .18s ease; }
.mobile-menu:hover { border-color: #4c4130; color: var(--gold-soft); }

.sidebar {
  position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); z-index: 40;
  padding: 14px 10px 18px 14px; background: #0b0b0b; border-right: 1px solid #191919;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .24s var(--ease-drawer);
}
/* Collapsed state: the bar slides out and the content reclaims the space.
   The topbar grid is left alone so the brand never gets squeezed. */
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .main-content { margin-left: 0; }
.main-content { transition: margin-left .24s var(--ease-drawer); }
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  border: 0; background: transparent; color: #929292; cursor: pointer; text-align: left; padding: 13px 14px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px; font-weight: 650;
}
.nav-item span { width: 22px; color: #9c9c9c; font-size: 19px; }
.nav-item:hover { background: #151515; color: #ddd; }
.nav-item.active { background: #282828; color: #fff; }
.sidebar-bottom { padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 9px; }
.sidebar-bottom a { color: #8f8f8f; font-size: 13px; display: flex; justify-content: space-between; }
.sidebar-bottom a:hover { color: var(--gold-soft); }
.social-row { display: flex; gap: 6px; align-items: center; }
.social-icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; background: transparent; transition: transform .18s ease, filter .18s ease;
}
.social-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.eyebrow { margin: 0 0 7px; color: var(--gold-soft); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

.main-content { margin-left: var(--sidebar); padding-top: var(--topbar); min-height: 100vh; }
.topic-strip-wrap {
  position: sticky; top: var(--topbar); z-index: 30; background: rgba(9,9,9,.94); backdrop-filter: blur(15px);
  border-bottom: 1px solid #151515; padding: 12px 30px 10px;
}
.topic-strip { overflow: hidden; scrollbar-width: none; padding-bottom: 2px; }
.topic-strip::-webkit-scrollbar { display: none; }
.topic-track { display: flex; gap: 9px; width: max-content; animation: topic-marquee 120s linear infinite; }
.topic-strip:hover .topic-track { animation-play-state: paused; }
@keyframes topic-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* Keep colour cues, strip movement. */
@media (prefers-reduced-motion: reduce) {
  .topic-track { animation: none; }
  .sidebar, .main-content, .topic-drawer { transition: none; }
  .topic-chip:hover, .sermon-card:hover, .series-card:hover,
  .social-icon:hover, .footer-links a:hover,
  .sermon-card:hover .cover-wrap img { transform: none; }
  html { scroll-behavior: auto; }
}
.topic-chip {
  flex: 0 0 auto; border: 1px solid #252525; background: #191919; color: #d4d4d4; border-radius: 999px; padding: 8px 14px;
  font-size: 12px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.topic-chip:hover { border-color: #4c4130; color: #fff; }
.topic-chip.active { background: #efe9de; color: #111; border-color: #efe9de; }

/* Movement only where there's a real pointer — touch devices flash hover on tap. */
@media (hover: hover) and (pointer: fine) {
  .topic-chip:hover { transform: translateY(-1px); }
  .sermon-card:hover { transform: translateY(-4px); }
  .series-card:hover { transform: translateY(-3px); }
  .social-icon:hover { transform: translateY(-2px) scale(1.06); filter: brightness(1.12); }
  .footer-links a:hover { transform: translateY(-2px); }
}
.topic-chip:active, .primary-button:active, .secondary-button:active, .outline-button:active,
.nav-item:active, .more-button:active, .mobile-menu:active { transform: scale(.97); }

.view { display: none; }
.view.active { display: block; }
.page-intro { padding: 48px 32px 24px; max-width: 860px; }
.home-intro { padding-top: 54px; }
.hero-cta { display: inline-flex; margin-top: 26px; }
.page-intro h1 { margin: 0; font-size: clamp(28px, 3.1vw, 40px); letter-spacing: -.02em; line-height: 1.14; max-width: 22ch; }
.intro-copy { margin: 12px 0 0; color: #aaa6a1; line-height: 1.65; max-width: 650px; font-size: 15px; }
.content-section { padding: 10px 20px 42px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 12px 16px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.text-button { border: 0; background: transparent; color: var(--gold-soft); cursor: pointer; font-weight: 650; }

.sermon-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px 16px;
}
.sermon-card {
  background: transparent; border-radius: 12px; overflow: hidden; cursor: pointer; min-width: 0; transition: transform .2s ease;
}
.cover-wrap { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #181818; box-shadow: 0 12px 34px rgba(0,0,0,.23); }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s var(--ease-out), filter .25s var(--ease-out); }
.sermon-card:hover .cover-wrap img { transform: scale(1.025); filter: brightness(.72); }
.play-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s ease;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.22));
}
.sermon-card:hover .play-overlay { opacity: 1; }
.play-circle { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 2px solid white; background: rgba(0,0,0,.32); font-size: 21px; padding-left: 3px; }
.cover-tag { position: absolute; left: 9px; bottom: 9px; background: rgba(5,5,5,.82); border: 1px solid rgba(255,255,255,.12); padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; backdrop-filter: blur(10px); }
.card-copy { padding: 10px 4px 0; }
.card-copy h3 { margin: 0 0 7px; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 7px; color: #858585; font-size: 11px; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #666; }
.empty-state { text-align: center; padding: 70px 20px 100px; color: #999; }
.empty-icon { font-size: 42px; color: #555; }
.empty-state h3 { color: #e2e2e2; margin-bottom: 6px; }
.empty-state p { margin-top: 0; }

.series-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding: 10px 32px 80px; }
.series-card {
  min-height: 195px; border: 1px solid #2a2a2a; border-radius: var(--radius); overflow: hidden; position: relative; padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #321111, #171717);
  cursor: pointer; text-align: left; transition: transform .2s ease, border-color .2s ease;
}
.series-card:hover { border-color: #4c4130; }
.series-card:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.series-cta { pointer-events: none; }
.series-card:nth-child(2) { background: linear-gradient(135deg, #5d430d, #19160f); }
.series-card:nth-child(3) { background: linear-gradient(135deg, #2f0e16, #171717); }
.series-card:nth-child(4) { background: linear-gradient(135deg, #43320e, #171717); }
.series-card h2 { margin: 0; font-size: 26px; max-width: 310px; line-height: 1.08; letter-spacing: -.03em; }
.series-card p { color: rgba(255,255,255,.62); margin: 9px 0 0; max-width: 420px; line-height: 1.55; font-size: 13px; }
.series-card .series-label { color: var(--gold-soft); font-size: 10px; letter-spacing: .17em; font-weight: 800; }
.series-watermark { position: absolute; right: -30px; bottom: -80px; width: 250px; opacity: .07; filter: grayscale(1); pointer-events: none; }

.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; padding: 18px 32px 100px; }
.partner-card {
  grid-column: 1 / -1; min-height: 0; display: flex; flex-direction: column; align-items: flex-start;
  border-color: #3b3222; background: linear-gradient(120deg, #1a1508, #121212 60%);
}
.partner-card p { margin-bottom: 20px; max-width: 46ch; }
.live-card { min-height: 196px; position: relative; overflow: hidden; border: 1px solid #303030; border-radius: var(--radius); padding: 26px; background: #121212; }
.platform-head { display: flex; align-items: center; gap: 12px; }
.platform-head h2 { margin: 0; font-size: 24px; }
.platform-icon { width: 38px; height: 38px; object-fit: contain; display: block; flex: 0 0 auto; }
.live-card p { color: #b0aca7; max-width: 500px; line-height: 1.6; font-size: 14px; margin: 20px 0 24px; position: relative; z-index: 2; }
.outline-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #3d3d3d; padding: 11px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; position: relative; z-index: 2; }
.outline-button:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.card-glow { position: absolute; width: 220px; height: 150px; border-radius: 50%; filter: blur(50px); opacity: .11; right: -40px; bottom: -50px; }
.glow-red { background: red; }
.glow-gold { background: #ffbd35; }
.glow-blue { background: #1e88c8; }
.glow-green { background: #1f8c53; }

.teaching-view { padding: 30px 32px 80px; }
.back-button { border: 0; background: transparent; color: #aaa; cursor: pointer; padding: 8px 0 24px; }
.back-button:hover { color: white; }
.detail-hero { display: grid; grid-template-columns: minmax(260px, 430px) minmax(0,1fr); gap: 46px; align-items: center; padding: 10px 0 46px; }
.detail-cover { width: 100%; aspect-ratio: 1; border-radius: 18px; object-fit: cover; box-shadow: 0 35px 80px rgba(0,0,0,.46); }
.detail-info h1 { margin: 8px 0 12px; font-size: clamp(32px, 4vw, 52px); line-height: 1.06; letter-spacing: -.025em; }
.detail-kicker { color: var(--gold-soft); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; }
.detail-tag { background: #1a1a1a; border: 1px solid #2b2b2b; color: #c9c9c9; padding: 7px 10px; border-radius: 999px; font-size: 11px; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.primary-button { display: inline-flex; align-items: center; gap: 6px; background: #f1ece2; color: #111; border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; cursor: pointer; }
.primary-button:hover { background: white; }
.secondary-button { background: #151515; color: #ddd; border: 1px solid #303030; border-radius: 999px; padding: 12px 18px; font-weight: 700; cursor: pointer; }
.pending-pill {
  display: inline-flex; align-items: center; background: #1a1a1a; border: 1px solid #2b2b2b; color: #999;
  padding: 11px 16px; border-radius: 999px; font-size: 13px; font-weight: 650;
}
.audio-player { width: 100%; margin: 20px 0 6px; }
.audio-player audio { width: 100%; max-width: 460px; accent-color: var(--gold-soft); }
.detail-body { border-top: 1px solid #242424; display: grid; grid-template-columns: 1.4fr .6fr; gap: 48px; padding-top: 35px; }
.detail-body h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: .04em; }
.detail-body p { color: #aaa; line-height: 1.75; font-size: 14px; }
.note-placeholder { background: #111; border: 1px solid #242424; border-radius: 14px; padding: 20px; color: #918d88; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-item { padding: 13px 14px; border: 1px solid #272727; border-radius: 12px; background: #111; cursor: pointer; }
.related-item:hover { border-color: #4b4030; }
.related-item strong { display: block; font-size: 13px; }
.related-item span { display: block; color: #8d8d8d; font-size: 11px; margin-top: 5px; }

.footer { margin: 0 32px; min-height: 84px; border-top: 1px solid #242424; display: flex; align-items: center; gap: 20px; color: #8b8781; font-size: 12px; }
.footer-tagline { flex: 1; text-align: center; }
.footer-links { display: flex; gap: 14px; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-links img { width: 26px; height: 26px; object-fit: contain; display: block; }
.footer-links a { transition: transform .18s ease; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.64); backdrop-filter: blur(3px); }
.topic-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(460px, 94vw); z-index: 80; background: #101010; border-left: 1px solid #2b2b2b; padding: 30px; transform: translateX(102%); transition: transform .28s var(--ease-drawer); box-shadow: -30px 0 80px rgba(0,0,0,.45); overflow-y: auto; }
.topic-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.drawer-head h2 { margin: 0; font-size: 30px; }
.drawer-head button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #333; background: transparent; cursor: pointer; font-size: 24px; }
.drawer-copy { color: #8f8f8f; line-height: 1.6; font-size: 13px; margin: 20px 0 24px; }
.drawer-topic-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.drawer-topic { border: 1px solid #2d2d2d; background: #171717; padding: 9px 12px; border-radius: 999px; cursor: pointer; color: #d0d0d0; font-size: 12px; }
.drawer-topic:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

@media (min-width: 1500px) {
  .sermon-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  :root { --sidebar: 210px; }
  .topbar { grid-template-columns: var(--sidebar) minmax(280px, 1fr) 44px; }
  .brand-copy span { display: none; }
  .sermon-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .live-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 780px) {
  :root { --sidebar: 0px; --topbar: 64px; }
  .topbar { grid-template-columns: 40px 1fr 40px; gap: 8px; padding: 0 10px; }
  .mobile-menu { display: block; }
  .brand { justify-self: center; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-copy { display: none; }
  .search-wrap { position: fixed; left: 12px; right: 12px; top: 72px; width: auto; height: 43px; z-index: 44; }
  .sidebar { width: 260px; transform: translateX(-104%); transition: transform .22s ease; top: 0; padding-top: 82px; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding-top: 121px; }
  .topic-strip-wrap { top: 121px; padding-left: 14px; padding-right: 14px; }
  .page-intro { padding: 38px 18px 22px; }
  .content-section { padding: 8px 12px 40px; }
  .sermon-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 10px; }
  .series-grid, .live-grid { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
  .series-card { min-height: 165px; }
  .teaching-view { padding: 26px 18px 60px; }
  .detail-hero { grid-template-columns: 1fr; gap: 26px; }
  .detail-cover { max-width: 520px; }
  .detail-body { grid-template-columns: 1fr; gap: 28px; }
  .footer { margin: 0 18px; flex-wrap: wrap; justify-content: center; padding: 22px 0; text-align: center; }
  .footer-tagline { flex: 0 0 100%; order: 3; }
}
@media (max-width: 430px) {
  .sermon-grid { grid-template-columns: 1fr 1fr; }
  .card-copy h3 { font-size: 12px; }
  .card-meta { font-size: 10px; }
  .topic-chip { font-size: 11px; padding: 7px 11px; }
  .detail-info h1 { font-size: 38px; }
}
