/* ==========================================================================
   Rule 43 — podcast site
   Two pages: index (landing) + podcast (episodes)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --paper:       #ffffff;
  --ink:         #000000;
  --ink-2:       #2e2e2e;
  --ink-3:       #6b6b6b;
  --line-strong: rgba(0, 0, 0, 0.42);
  --accent:      #000000;
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-md:   0 16px 48px rgba(0, 0, 0, 0.16);
  --wrap:        1120px;
  --radius:      16px;

  /* liquid-glass surfaces (adapted from the ART site) */
  --glass-blur:  blur(18px) saturate(1.4);
  --glass-bg:    rgba(255, 255, 255, 0.24);
  --glass-bg-hi: rgba(255, 255, 255, 0.34);
  --glass-brd:   rgba(255, 255, 255, 0.50);

  /* buttons — two tones, ~90% opacity */
  --btn-bg:      rgba(14, 14, 14, 0.9);
  --btn-bg-hi:   rgba(14, 14, 14, 1);
  --btn-brd:     rgba(255, 255, 255, 0.20);
  --btn-fg:      #ffffff;
  --btn2-bg:     rgba(255, 255, 255, 0.9);
  --btn2-bg-hi:  #ffffff;
  --btn2-brd:    rgba(0, 0, 0, 0.14);
  --btn2-fg:     #000000;
}

/* Episodes page — inverted (black background, white ink) */
body.inverted {
  --paper:       #000000;
  --ink:         #ffffff;
  --ink-2:       #cacaca;
  --ink-3:       #8a8a8a;
  --line-strong: rgba(255, 255, 255, 0.44);
  --accent:      #ffffff;
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.55);
  --shadow-md:   0 16px 48px rgba(0, 0, 0, 0.65);
  --glass-bg:    rgba(255, 255, 255, 0.045);
  --glass-bg-hi: rgba(255, 255, 255, 0.09);
  --glass-brd:   rgba(255, 255, 255, 0.16);
  --btn-bg:      rgba(244, 244, 244, 0.9);
  --btn-bg-hi:   #ffffff;
  --btn-brd:     rgba(0, 0, 0, 0.12);
  --btn-fg:      #000000;
  --btn2-bg:     rgba(18, 18, 18, 0.9);
  --btn2-bg-hi:  #000000;
  --btn2-brd:    rgba(255, 255, 255, 0.20);
  --btn2-fg:     #ffffff;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1 {
  font-family: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* faint oversized logo behind the episodes page, for texture */
.watermark {
  position: fixed;
  right: -14%; bottom: -18%;
  width: min(92vw, 760px); aspect-ratio: 1;
  background: url('logo.png') center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none; user-select: none;
  z-index: 0;
}
body.inverted .watermark { filter: invert(1); }

/* ---- buttons — one shared style, two tones (~90% opacity) --------------- */
.btn,
.btn--ghost {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-family: 'Anton', sans-serif; font-weight: 400;
  font-size: 1rem; line-height: 1;
  letter-spacing: 0.13em; text-transform: uppercase;
  padding: 1.1em 2em;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s, background 0.18s, border-color 0.18s;
}
/* diagonal light sweep */
.btn::before,
.btn--ghost::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover::before,
.btn--ghost:hover::before { transform: translateX(100%); }
.btn > *,
.btn--ghost > * { position: relative; z-index: 1; }
.btn:hover,
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active,
.btn--ghost:active { transform: translateY(0) scale(0.98); }

/* primary tone */
.btn {
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-brd);
}
.btn:hover { background: var(--btn-bg-hi); border-color: var(--btn-bg-hi); }

/* secondary tone */
.btn--ghost {
  color: var(--btn2-fg);
  background: var(--btn2-bg);
  border: 1px solid var(--btn2-brd);
}
.btn--ghost:hover { background: var(--btn2-bg-hi); border-color: var(--btn2-bg-hi); }

/* ==========================================================================
   Landing — locked to one screen, no scroll
   ========================================================================== */
body.landing { height: 100svh; overflow: hidden; display: flex; flex-direction: column; }

.hero {
  position: relative;
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 28px 24px 14px;
  overflow: hidden;
  background: var(--paper);
}

/* hero background: the white-backed logo video, softened so it reads as
   ambient motion behind the foreground. No blend modes — they trigger a
   rectangular halo around filtered elements on iOS Safari. */
.hero__video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: blur(3px) saturate(0.95);
  transform: scale(1.06);
  -webkit-mask-image: radial-gradient(ellipse 96% 96% at 50% 44%, #000 56%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 96% at 50% 44%, #000 56%, transparent 100%);
}

/* white veil that keeps the page reading as white, video as faint texture */
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 46%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.24) 75%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.42));
}

/* logo + copy in front */
.hero__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
  max-width: 640px;
}

.hero__logo-wrap { margin: 0; line-height: 0; }
.hero__logo { width: clamp(220px, 44vw, 400px); height: auto; }

/* MLK quote — liquid-glass card */
.hero__quote {
  position: relative; overflow: hidden;
  max-width: 38ch;
  margin-top: 2px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
}
.hero__quote::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.22) 50%, transparent 58%);
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero__quote:hover::before { transform: translateX(100%); }
.hero__quote > * { position: relative; z-index: 1; }
.hero__quote blockquote {
  font-size: clamp(1.02rem, 2.7vw, 1.22rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: balance;
}
.hero__quote figcaption {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.btn-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: center;
}

/* ==========================================================================
   Episodes page
   ========================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 24px;
  background: var(--paper);
}
.masthead__logo img { height: 132px; width: auto; }
body.inverted .masthead__logo img { filter: invert(1); }

.section { position: relative; z-index: 1; padding: 4px 0 84px; }

/* ---- playlist grid ---- */
.playlist-grid {
  display: grid; grid-template-columns: 1fr; gap: 26px;
  max-width: var(--wrap); margin: 0 auto;
}
@media (min-width: 620px) { .playlist-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .playlist-grid { grid-template-columns: repeat(3, 1fr); } }
.playlist-grid[hidden] { display: none; }

.playlist-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.playlist-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.20) 50%, transparent 58%);
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.playlist-card:hover::before { transform: translateX(100%); }
.playlist-card > * { position: relative; z-index: 1; }
.playlist-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: var(--glass-bg-hi); }

.playlist-thumb {
  position: relative; display: block;
  width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; cursor: pointer;
  background: rgba(128, 128, 128, 0.22); overflow: hidden;
}
.playlist-thumb img { width: 100%; height: 100%; object-fit: cover; }

.playlist-play-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0; transition: opacity 0.2s;
}
.playlist-card:hover .playlist-play-badge,
.playlist-thumb:focus-visible .playlist-play-badge { opacity: 1; }

.playlist-play-circle {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-brd);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.playlist-title {
  font-weight: 600; font-size: 0.96rem; line-height: 1.35;
  padding: 14px 16px 18px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- skeletons ---- */
.playlist-card.is-skel { pointer-events: none; }
.playlist-card.is-skel .playlist-thumb {
  background: linear-gradient(100deg, rgba(128,128,128,0.16) 30%, rgba(128,128,128,0.30) 50%, rgba(128,128,128,0.16) 70%);
  background-size: 200% 100%;
  animation: skeleton 1.3s linear infinite;
}
.playlist-skel-line { height: 12px; margin: 14px 16px 0; border-radius: 6px; background: rgba(128,128,128,0.22); }
.playlist-skel-line.short { width: 55%; margin-bottom: 18px; }
@keyframes skeleton { to { background-position: -200% 0; } }

/* ---- fallback embed / coming soon ---- */
.video-embed {
  position: relative; width: 100%; max-width: 840px;
  margin: 0 auto; aspect-ratio: 16 / 9;
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.playlist-fallback[hidden], .playlist-coming-soon[hidden] { display: none; }
.playlist-coming-soon {
  text-align: center;
  font-family: 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 1.5rem; color: var(--ink-3);
  padding: 48px 0;
}

/* foldable "Our Mission" card (accordion, ART pricing-page style) */
.mission {
  max-width: 720px;
  margin: 4px auto 40px;
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.mission[open] { box-shadow: var(--shadow-md); }
.mission summary {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 7px 20px;
  cursor: pointer; list-style: none;
  font-family: 'Anton', sans-serif; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.94rem; color: var(--ink);
}
.mission summary::-webkit-details-marker { display: none; }
.mission__chevron {
  width: 9px; height: 9px; flex-shrink: 0;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mission[open] .mission__chevron { transform: rotate(-135deg); }
.mission__body { padding: 0 20px 14px; }

.mission__list {
  list-style: none; margin: 0; padding: 0;
  text-align: left;
  display: flex; flex-direction: column; gap: 10px;
}
.mission__list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.85rem; line-height: 1.55; color: var(--ink-2);
}
.mission__list li strong { color: var(--ink); font-weight: 700; }
.mission__list li::before {
  content: '';
  position: absolute; left: 0; top: 1px;
  width: 17px; height: 17px; border-radius: 5px;
  border: 1.5px solid var(--line-strong);
}
.mission__list li::after {
  content: '';
  position: absolute; left: 5px; top: 4px;
  width: 5px; height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}

.backrow {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: center;
  padding-top: 56px;
}

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
