/* Beta Cell Podcast — site styles */

:root {
  --bcp-blue: #3fa7f3;
  --bcp-blue-soft: rgba(63, 167, 243, 0.12);
  --bcp-blue-border: rgba(63, 167, 243, 0.28);
  --bcp-navy: #002856;
  --bcp-navy-deep: #001a3d;
  --bg: #050a14;
  --surface: #0b1422;
  --surface-2: #11203a;
  --border: #1a2c4a;
  --text: #ffffff;
  --text-muted: #a6bdd8;
  --text-dim: #8095b5;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --max-w: 1040px;
  --content-w: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--bcp-blue); text-decoration: none; transition: opacity 0.15s ease; }
a:hover { opacity: 0.75; }

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

/* Headings */
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); font-weight: 500; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 10, 20, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 15px;
  text-decoration: none;
}
.footer-brand {
  text-transform: uppercase;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
  display: inline-block;
}
.brand img { height: 28px; width: auto; display: block; }
.brand:hover { opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
/* Compact "support" style — small rounded rectangle, matches BCF nav-donate. */
.btn-support {
  background: var(--bcp-blue);
  color: var(--bcp-navy-deep);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 6px;
}
.btn-support:hover { background: #66baf6; transform: translateY(-1px); opacity: 1; }
.btn-primary { background: var(--bcp-blue); color: var(--bcp-navy-deep); }
.btn-primary:hover { background: #6fbef7; opacity: 1; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--bcp-blue); color: var(--bcp-blue); opacity: 1; }
.btn-ghost { background: var(--bcp-blue-soft); color: var(--bcp-blue); border-color: var(--bcp-blue-border); }
.btn-ghost:hover { background: var(--bcp-blue); color: var(--bcp-navy-deep); opacity: 1; }
.btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 16px 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.btn-back:hover { color: var(--bcp-blue); border-color: var(--bcp-blue-border); background: var(--bcp-blue-soft); opacity: 1; }
.btn-back svg { width: 14px; height: 14px; }

/* Main layout */
main { max-width: var(--max-w); margin: 0 auto; padding: 48px 24px 80px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 56px;
}
.hero-art img {
  width: 220px;
  height: 220px;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
}
.hero-eyebrow { font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--bcp-blue); margin-bottom: 12px; }
.hero h1 { margin-bottom: 16px; }
.hero p { color: var(--text-muted); font-size: 17px; line-height: 1.6; max-width: 580px; margin-bottom: 24px; }
.hero-links { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .hero-art img { width: 160px; height: 160px; }
  main { padding: 32px 20px 64px; }
  .site-header-inner { padding: 14px 20px; }
  .brand { font-size: 14px; }
}

/* Filter bar */
.filter-section { margin-bottom: 32px; }
.filter-label { font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 14px; }
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.filter-bar::-webkit-scrollbar { height: 6px; }
.filter-bar::-webkit-scrollbar-track { background: transparent; }
.filter-bar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-btn:hover { color: var(--text); border-color: var(--bcp-blue-border); }
.filter-btn.active {
  background: var(--bcp-blue);
  color: var(--bcp-navy-deep);
  border-color: var(--bcp-blue);
}

/* Show header (revealed when filter active) */
.show-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-width: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-width 0.1s ease;
}
.show-header.visible {
  max-height: 320px;
  opacity: 1;
  border-width: 1px;
  padding-top: 24px;
  padding-bottom: 24px;
  margin-bottom: 32px;
}
.show-header-art {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
}
.show-header-art img { width: 100%; height: 100%; object-fit: cover; }
.show-header h2 { margin-bottom: 8px; color: var(--text); }
.show-header p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

@media (max-width: 600px) {
  .show-header { grid-template-columns: 80px 1fr; gap: 16px; padding: 18px; }
  .show-header-art { width: 80px; height: 80px; }
  .show-header.visible { max-height: 480px; }
}

/* Episode list */
.episode-list { display: grid; gap: 0; border-top: 1px solid var(--border); }
.episode-card {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  transition: background 0.18s ease;
  color: var(--text);
}
.episode-card:hover { background: var(--bcp-blue-soft); opacity: 1; }
.episode-art {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.episode-art img { width: 100%; height: 100%; object-fit: cover; }
.episode-meta { font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--bcp-blue); margin-bottom: 6px; }
.episode-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; color: var(--text); }
.episode-snippet { color: var(--text-muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode-arrow { color: var(--text-dim); font-size: 20px; padding-left: 8px; }
.episode-card:hover .episode-arrow { color: var(--bcp-blue); }

@media (max-width: 600px) {
  .episode-card { grid-template-columns: 64px 1fr; gap: 14px; padding: 16px 0; }
  .episode-art { width: 64px; height: 64px; }
  .episode-title { font-size: 16px; }
  .episode-snippet { -webkit-line-clamp: 2; font-size: 13px; }
  .episode-arrow { display: none; }
}

.empty-state { padding: 48px 0; text-align: center; color: var(--text-muted); }

/* Episode page */
.episode-page { max-width: var(--content-w); margin: 0 auto; padding: 24px 24px 120px; }
.episode-back-row { margin-bottom: 24px; }
.episode-header { margin-bottom: 32px; }
.episode-header .episode-meta { font-size: 12px; margin-bottom: 16px; }
.episode-header h1 { font-size: clamp(28px, 4.5vw, 40px); margin-bottom: 16px; line-height: 1.2; }
.episode-header .episode-show-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bcp-blue-soft);
  color: var(--bcp-blue);
  border: 1px solid var(--bcp-blue-border);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 16px;
  text-decoration: none;
}

.episode-player { margin-bottom: 40px; }
.episode-player iframe {
  border: 0;
  border-radius: var(--radius-md);
  width: 100%;
  height: 175px;
  max-width: 660px;
  display: block;
}

.episode-section { margin-bottom: 48px; }
.episode-section h2 {
  font-size: 14px;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bcp-blue);
  margin-bottom: 20px;
  font-weight: 500;
}

.show-notes { color: var(--text); font-size: 16px; line-height: 1.75; }
.show-notes p { margin-bottom: 16px; }
.show-notes a { color: var(--bcp-blue); text-decoration: underline; text-decoration-color: var(--bcp-blue-border); text-underline-offset: 3px; }
.show-notes ul, .show-notes ol { margin: 0 0 16px 24px; }
.show-notes li { margin-bottom: 6px; }

.transcript { color: var(--text); font-size: 16px; line-height: 1.85; }
.transcript p { margin-bottom: 14px; }
.transcript p.transcript-intro { color: var(--text-muted); font-style: italic; font-size: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.transcript p.dialogue {
  padding-left: 40px;
  margin-left: 0;
  text-indent: 0;
}
.transcript p.dialogue strong { font-weight: 700; color: var(--bcp-blue); }
.transcript p.narration { padding-left: 0; }
@media (max-width: 600px) {
  .transcript p.dialogue { padding-left: 24px; }
}

/* Floating buttons */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 40;
}
.floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  font-size: 20px;
}
.floating-btn:hover { background: var(--bcp-blue); color: var(--bcp-navy-deep); border-color: var(--bcp-blue); opacity: 1; }
.floating-btn.hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }
.floating-btn svg { width: 20px; height: 20px; }

@media (max-width: 600px) {
  .floating-actions { bottom: 16px; right: 16px; gap: 10px; }
  .floating-btn { width: 44px; height: 44px; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px 24px 32px;
  margin-top: 80px;
}
.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
@media (max-width: 900px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
}
.footer-about { max-width: 360px; }
.footer-about p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.footer-col h4 { margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--bcp-blue); opacity: 1; }

.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.18s ease;
}
.footer-social a:hover { background: var(--bcp-blue); color: var(--bcp-navy-deep); border-color: var(--bcp-blue); opacity: 1; }
.footer-social svg { width: 16px; height: 16px; }

.footer-meta {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}
.footer-meta a { color: var(--text-dim); }
.footer-meta a:hover { color: var(--bcp-blue); opacity: 1; }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* Stack the footer meta line on narrower viewports so the legal links
   don't run off the edge. */
@media (max-width: 720px) {
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-legal { gap: 16px; }
}

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-meta { justify-content: flex-start; }
}

/* Static content pages */
.static-page { max-width: var(--content-w); margin: 0 auto; padding: 48px 24px 120px; }
.static-page h1 { margin-bottom: 24px; }
.static-page h2 { font-size: 22px; margin: 32px 0 12px; color: var(--bcp-blue); }
.static-page p { color: var(--text); font-size: 16px; line-height: 1.75; margin-bottom: 16px; }
.static-page .last-updated { font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 32px; }
.static-page ul { margin: 0 0 16px 24px; color: var(--text); }
.static-page li { margin-bottom: 8px; }
