/* Sundays & Cigars — episode page template (loads after base.css + style.css) */

.ep-page .nav { background: linear-gradient(to bottom, rgba(10,11,13,.85), rgba(10,11,13,0)); }

/* ---------- HERO ---------- */
.eph {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.eph__media { position: absolute; inset: 0; z-index: -1; }
.eph__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.eph__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 0%, rgba(10,11,13,.82) 26%, rgba(10,11,13,.25) 60%, rgba(10,11,13,.55) 100%),
    radial-gradient(120% 80% at 0% 100%, rgba(226,96,27,.16), transparent 60%);
}
.eph__inner { position: relative; padding-block: var(--space-32) var(--space-16); width: 100%; }
.eph__crumb {
  font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-text-muted); margin: 0 0 var(--space-6);
}
.eph__crumb a { color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--ember); }
.eph__num {
  position: absolute; right: var(--gutter); bottom: var(--space-12);
  font-family: var(--font-display); font-size: clamp(6rem, 18vw, 17rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(244,235,219,.22);
  pointer-events: none; user-select: none;
}
.eph__title { font-size: var(--text-hero); line-height: .92; margin: var(--space-4) 0 var(--space-4); max-width: 12ch; }
.eph__guest {
  font-family: var(--font-accent); font-style: italic; font-size: var(--text-2xl);
  color: var(--cream); margin: 0 0 var(--space-10);
}
.eph__guest span { color: var(--ember); font-style: normal; }
.eph__meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); gap: var(--space-4) var(--space-12);
  margin: 0; padding-top: var(--space-6); border-top: 1px solid rgba(244,235,219,.18); max-width: 880px;
}
.eph__meta dt { font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-1); }
.eph__meta dd { margin: 0; color: var(--cream); font-size: var(--text-sm); font-weight: 500; }
.eph__status { color: var(--ember-lit) !important; display: inline-flex; align-items: center; gap: .5em; }
.eph__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
body[data-status="live"] .eph__status::before { animation: none; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

/* ---------- FILM ---------- */
.film { padding-block: var(--space-16) var(--section-y); }
.film__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden;
  background: var(--ink-3); border: 1px solid var(--color-border);
}
.film__poster { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.55); }
.film__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film__state {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  background: linear-gradient(to top, rgba(10,11,13,.92), rgba(10,11,13,.2) 70%);
}
.film__state h2 { font-family: var(--font-display); font-size: var(--text-3xl); line-height: 1; margin: var(--space-3) 0 var(--space-3); text-transform: uppercase; }
.film__state p:not(.kicker) { color: var(--cream-2); max-width: 46ch; margin: 0 0 var(--space-6); }
.film__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 6px rgba(226,96,27,.2); animation: pulse 1.6s infinite; margin-bottom: var(--space-3); }
.film__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
body[data-status="live"] .film__state, body[data-status="live"] .film__poster { display: none; }
.film__audio { margin-top: var(--space-4); }
.film__audio audio { width: 100%; }
.film__intro { max-width: 62ch; margin: var(--space-12) auto 0; text-align: center; }
.film__intro .lede { font-family: var(--font-accent); font-size: var(--text-xl); line-height: 1.5; color: var(--cream); }

/* ---------- CHAPTERS ---------- */
.chap { padding-block: var(--section-y); border-top: 1px solid var(--color-divider); background: var(--ink-2); }
.chap__inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--space-16); align-items: start; }
.chap__head h2 { font-size: var(--text-4xl); line-height: .95; margin: var(--space-4) 0; }
.chap__note { color: var(--color-text-faint); font-size: var(--text-sm); }
.chap__list { list-style: none; margin: 0; padding: 0; }
.chap__list li {
  display: grid; grid-template-columns: 3.5rem 1fr; column-gap: var(--space-4);
  padding: var(--space-5) 0; border-top: 1px solid var(--color-border);
}
.chap__list li:last-child { border-bottom: 1px solid var(--color-border); }
.chap__act { grid-row: span 2; font-family: var(--font-accent); font-style: italic; color: var(--ember); font-size: var(--text-xl); }
.chap__list b { font-family: var(--font-display); font-weight: 400; font-size: var(--text-xl); letter-spacing: .02em; text-transform: uppercase; }
.chap__list em { font-style: normal; color: var(--color-text-muted); font-size: var(--text-sm); }
.chap__list time { color: var(--ember-lit); font-variant-numeric: tabular-nums; margin-right: .6em; }

/* ---------- CIGAR ---------- */
.epcig { padding-block: var(--section-y); }
.epcig__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-16); align-items: center; }
.epcig__figure { margin: 0; position: relative; }
.epcig__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-md); }
.epcig__figure figcaption, .epguest__figure figcaption {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  font-family: var(--font-accent); font-style: italic; color: var(--cream); font-size: var(--text-sm);
  background: rgba(10,11,13,.6); padding: .35em .8em; border-radius: var(--radius-pill);
}
.epcig__body h2 { font-size: var(--text-4xl); line-height: .92; margin: var(--space-4) 0 var(--space-6); }
.epcig__body .lede { color: var(--cream); font-family: var(--font-accent); font-size: var(--text-xl); margin-bottom: var(--space-4); }
.epcig__body > p:not(.kicker):not(.lede) { color: var(--color-text-muted); }
.epcig__spec { margin-top: var(--space-8); }

.epband { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 2px; height: clamp(220px, 32vw, 460px); }
.epband img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- GUEST ---------- */
.epguest { padding-block: var(--section-y); }
.epguest__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.epguest__body h2 { font-size: var(--text-4xl); line-height: .92; margin: var(--space-4) 0 var(--space-2); }
.epguest__role { font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--ember-lit); margin: 0 0 var(--space-6); }
.epguest__body > p:not(.kicker):not(.epguest__role) { color: var(--color-text-muted); max-width: 52ch; }
.epguest__pull { margin-bottom: var(--space-8); }
.epguest__pull .pull__trans { font-family: var(--font-body) !important; font-style: normal !important; font-size: var(--text-base) !important; color: var(--color-text-muted) !important; margin-top: var(--space-2) !important; }
.epguest__figure { margin: 0; position: relative; }
.epguest__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 90% 45%; border-radius: var(--radius-md); }

/* ---------- ROOM ---------- */
.eproom { position: relative; min-height: 80vh; display: flex; align-items: center; isolation: isolate; overflow: hidden; }
.eproom__media { position: absolute; inset: 0; z-index: -1; }
.eproom__media img { width: 100%; height: 100%; object-fit: cover; }
.eproom__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,11,13,.92) 0%, rgba(10,11,13,.55) 45%, rgba(10,11,13,.1) 100%); }
.eproom__inner { padding-block: var(--section-y); width: 100%; }
.eproom__card { max-width: 30rem; }
.eproom__card h2 { font-size: var(--text-4xl); line-height: .92; margin: var(--space-4) 0 var(--space-6); }
.eproom__card p:not(.kicker) { color: var(--cream-2); }
.eproom__addr { font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--cream) !important; margin: var(--space-6) 0; }

/* ---------- GALLERY ---------- */
.gal { padding-block: var(--section-y); }
.gal__head { margin-bottom: var(--space-12); }
.gal__head h2 { font-size: var(--text-4xl); }
.gal__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(160px, 17vw, 260px); grid-auto-flow: dense; gap: 6px; }
.gal__item, .bts__strip a { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); background: var(--ink-3); cursor: zoom-in; }
.gal__item--wide { grid-column: span 2; }
.gal__item--tall { grid-row: span 2; }
.gal__item img, .bts__strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out), filter .4s; filter: saturate(.9); }
.gal__item:hover img, .gal__item:focus-visible img, .bts__strip a:hover img { transform: scale(1.04); filter: saturate(1.05); }
.gal__item:focus-visible, .bts__strip a:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.bts { margin-top: var(--space-16); }
.bts__strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: var(--space-4); }
.bts__strip a { aspect-ratio: 3 / 2; }
.bts__strip img { filter: grayscale(.6) brightness(.85); }

/* ---------- CREDITS ---------- */
.epcred { padding-block: var(--space-20); border-top: 1px solid var(--color-divider); background: var(--ink-2); }
.epcred__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-16); align-items: end; }
.epcred__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-10); margin: 0; }
.epcred__list dt { font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-1); }
.epcred__list dd { margin: 0; color: var(--cream); }
.epcred__list a { color: var(--cream); text-decoration-color: var(--ember); text-underline-offset: 3px; }
.epcred__next { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-6); }
.epcred__prev { display: grid; gap: var(--space-1); text-decoration: none; color: var(--cream); }
.epcred__prev b { font-family: var(--font-display); font-weight: 400; font-size: var(--text-2xl); text-transform: uppercase; }
.epcred__prev em { font-family: var(--font-accent); color: var(--color-text-muted); }
.epcred__prev:hover b { color: var(--ember-lit); }

/* ---------- LIGHTBOX ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(6,7,8,.96); display: grid; grid-template-columns: 4rem 1fr 4rem; align-items: center; }
.lb[hidden] { display: none; }
.lb__fig { margin: 0; display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-12) 0; }
.lb__fig img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius-sm); }
.lb__fig figcaption { color: var(--color-text-muted); font-size: var(--text-sm); text-align: center; }
.lb__nav, .lb__close { background: none; border: 0; color: var(--cream); cursor: pointer; font-size: 2.6rem; line-height: 1; padding: var(--space-3); }
.lb__nav:hover, .lb__close:hover { color: var(--ember-lit); }
.lb__close { position: absolute; top: var(--space-3); right: var(--space-4); }
body.lb-open { overflow: hidden; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .chap__inner, .epcig__inner, .epguest__inner, .epcred__inner { grid-template-columns: 1fr; gap: var(--space-10); }
  .epguest__figure { order: -1; }
  .gal__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .eph__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); }
  .eph__num { display: none; }
  .eph__inner { padding-bottom: var(--space-10); }
  .film { padding-top: var(--space-8); }
  .film__frame { aspect-ratio: auto; }
  .film__poster { position: absolute; inset: 0; }
  .film__state { position: relative; padding-top: 42vw; }
  .film__actions .btn { flex: 1 1 100%; justify-content: center; }
  .eph__media img { object-position: 58% 40%; }
  .gal__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gal__item--wide { grid-column: span 2; }
  .bts__strip { grid-template-columns: repeat(2, 1fr); }
  .epband { grid-template-columns: 1fr 1fr; height: 220px; }
  .epband img:last-child { display: none; }
  .epcred__list { grid-template-columns: 1fr; }
  .lb { grid-template-columns: 2.5rem 1fr 2.5rem; }
  .eproom__media::after { background: linear-gradient(to top, rgba(10,11,13,.95) 20%, rgba(10,11,13,.35)); }
  .eproom { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .eph__status::before, .film__dot { animation: none; }
}
