/*
Theme Name: Kadence Child – Two Promises
Theme URI: https://two-promises.com
Description: Kadence child theme for The Two-Promises Podcast. Adds custom Episodes archive template.
Author: Two Promises
Author URI: https://two-promises.com
Template: kadence
Version: 1.0.0
Text Domain: kadence-child-twopromises
*/

/* ==============================================
   TWO-PROMISES — EPISODES ARCHIVE STYLES
   ============================================== */

.tp-archive {
  background: var(--global-palette7, #f5efe1);
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--global-palette1, #1a1410);
}

/* ===== Page Header ===== */
.tp-archive__header {
  padding: 80px 24px 64px;
  text-align: center;
  border-bottom: 1px solid var(--global-palette3, #b8743a);
}

.tp-archive__container {
  max-width: 1280px;
  margin: 0 auto;
}

.tp-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--global-palette4, #8a4f1f);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.tp-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--global-palette3, #b8743a);
}

.tp-archive__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.035em;
  margin: 24px 0;
  color: var(--global-palette1, #1a1410);
}

.tp-archive__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--global-palette4, #8a4f1f);
}

.tp-archive__lede {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--global-palette2, #2d2520);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Episodes List ===== */
.tp-archive__list {
  padding: 80px 24px;
}

.tp-episode {
  display: grid;
  grid-template-columns: 80px 1fr 380px;
  gap: 40px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--global-palette3, #b8743a);
}

.tp-episode:last-child {
  border-bottom: none;
}

.tp-episode__num {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 56px;
  color: var(--global-palette3, #b8743a);
  line-height: 1;
}

.tp-episode__content h2,
.tp-episode__content h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--global-palette1, #1a1410);
}

.tp-episode__content h2 a,
.tp-episode__content h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.tp-episode__content h2 a:hover,
.tp-episode__content h3 a:hover {
  color: var(--global-palette4, #8a4f1f);
}

.tp-episode__desc {
  color: var(--global-palette2, #2d2520);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 16px;
}

.tp-episode__desc p { margin: 0 0 8px; }

.tp-episode__meta {
  display: flex;
  gap: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--global-palette2, #2d2520);
  flex-wrap: wrap;
}

/* ===== Embed Frame ===== */
.tp-embed {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.15);
  background: var(--global-palette1, #1a1410);
  width: 100%;
}

.tp-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Spotify embed: 152px tall */
.tp-embed--spotify iframe {
  height: 152px;
  min-height: 152px;
}

/* YouTube/MP4: 16:9 aspect ratio */
.tp-embed--youtube,
.tp-embed--video {
  aspect-ratio: 16/9;
}

.tp-embed--youtube iframe,
.tp-embed--video video {
  width: 100%;
  height: 100%;
  display: block;
}

/* MP3 audio bar */
.tp-embed--audio {
  padding: 16px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--global-palette6, #6e3a1d) 0%, var(--global-palette1, #1a1410) 100%);
  min-height: 152px;
}

.tp-embed--audio audio {
  width: 100%;
}

/* External link fallback */
.tp-embed--link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 152px;
  background: linear-gradient(135deg, var(--global-palette6, #6e3a1d) 0%, var(--global-palette1, #1a1410) 100%);
  padding: 24px;
  text-align: center;
}

.tp-embed--link a {
  color: var(--global-palette5, #d4a04a);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--global-palette5, #d4a04a);
  padding-bottom: 4px;
}

/* ===== Pagination ===== */
.tp-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 64px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.tp-pagination a,
.tp-pagination .current,
.tp-pagination .dots {
  padding: 12px 18px;
  border: 1px solid var(--global-palette3, #b8743a);
  border-radius: 999px;
  text-decoration: none;
  color: var(--global-palette1, #1a1410);
  background: transparent;
  transition: all 0.2s;
}

.tp-pagination a:hover,
.tp-pagination .current {
  background: var(--global-palette1, #1a1410);
  color: var(--global-palette7, #f5efe1);
  border-color: var(--global-palette1, #1a1410);
}

.tp-pagination .dots {
  border: none;
  background: transparent;
  color: var(--global-palette2, #2d2520);
}

/* ===== Load More CTA ===== */
.tp-loadmore {
  display: flex;
  justify-content: center;
  margin-top: 64px;
}

.tp-loadmore__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 18px 40px;
  background: var(--global-palette1, #1a1410);
  color: var(--global-palette7, #f5efe1);
  text-decoration: none;
  border-radius: 999px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.tp-loadmore__btn:hover {
  background: var(--global-palette4, #8a4f1f);
  color: var(--global-palette7, #f5efe1);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px -20px rgba(110, 58, 29, 0.4);
}

/* ===== Empty state ===== */
.tp-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--global-palette2, #2d2520);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 22px;
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .tp-episode {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tp-episode__num { font-size: 40px; }
  .tp-archive__list { padding: 40px 16px; }
  .tp-archive__header { padding: 48px 16px 40px; }
}


/* ==============================================
   SINGLE EPISODE PAGE
   ============================================== */

.tp-single {
  background: var(--global-palette7, #f5efe1);
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--global-palette1, #1a1410);
}

.tp-single__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.tp-single__container--narrow {
  max-width: 800px;
}

/* ===== Hero player + overlaid title ===== */
.tp-single__hero {
  padding: 40px 0 64px;
  background:
    radial-gradient(circle at 15% 20%, rgba(212, 160, 74, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(184, 116, 58, 0.06) 0%, transparent 40%);
}

.tp-single__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--global-palette2, #2d2520);
  text-decoration: none;
  margin-bottom: 32px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.tp-single__back:hover {
  color: var(--global-palette4, #8a4f1f);
  border-bottom-color: var(--global-palette3, #b8743a);
}

/* Player wrapper: holds embed + overlaid title block */
.tp-single__player-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(110, 58, 29, 0.35), 0 0 0 1px rgba(26, 20, 16, 0.08);
  background: var(--global-palette1, #1a1410);
}

/* The embed itself sits flush in its container */
.tp-single__player .tp-embed {
  border-radius: 0;
  box-shadow: none;
}

/* Spotify embeds: tall enough to feel intentional, not stretched */
.tp-single__player .tp-embed--spotify iframe {
  height: 232px;
  min-height: 232px;
}

/* Video embeds keep their 16:9 aspect */
.tp-single__player .tp-embed--youtube,
.tp-single__player .tp-embed--video {
  aspect-ratio: 16/9;
}

/* Audio bar: more presence on the single page */
.tp-single__player .tp-embed--audio {
  min-height: 232px;
  padding: 32px;
}

/* Fallback link: bigger statement on single */
.tp-single__player .tp-embed--link {
  min-height: 232px;
  padding: 48px;
}

/* TITLE OVERLAY — positioned BELOW the player on small screens,
   ABOVE the bottom edge of the player on desktop with a dark gradient.
   For Spotify/audio embeds (152-232px tall) we stack title beneath
   for usability. For 16:9 video embeds we overlay. */

.tp-single__title-overlay {
  padding: 32px 32px 36px;
  background: linear-gradient(to bottom, var(--global-palette1, #1a1410) 0%, #0a0806 100%);
  color: var(--global-palette7, #f5efe1);
  position: relative;
}

/* When the player is a video (16:9), absolutely position the title overlay
   on top of the bottom portion with a gradient fade */
.tp-single__player-wrap:has(.tp-embed--youtube) .tp-single__title-overlay,
.tp-single__player-wrap:has(.tp-embed--video) .tp-single__title-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 80px 40px 40px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(10, 8, 6, 0.4) 30%,
    rgba(10, 8, 6, 0.85) 70%,
    rgba(10, 8, 6, 0.95) 100%
  );
  pointer-events: none;
}

/* Make the eyebrow + title visible without intercepting clicks on the player */
.tp-single__player-wrap:has(.tp-embed--youtube) .tp-single__title-overlay > *,
.tp-single__player-wrap:has(.tp-embed--video) .tp-single__title-overlay > * {
  pointer-events: auto;
}

.tp-single__title-overlay .tp-eyebrow {
  color: var(--global-palette5, #d4a04a);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tp-single__title-overlay .tp-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--global-palette5, #d4a04a);
}

.tp-single__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--global-palette7, #f5efe1);
  margin: 16px 0 16px;
  /* subtle text shadow only on video overlays for legibility */
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.tp-single__meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 239, 225, 0.75);
}

/* ===== Body content ===== */
.tp-single__body {
  padding: 64px 0 48px;
}

.tp-single__lede {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--global-palette1, #1a1410);
  padding: 0 0 32px;
  border-bottom: 1px solid var(--global-palette3, #b8743a);
  margin-bottom: 40px;
  font-style: italic;
}

.tp-single__lede p { margin: 0 0 12px; }
.tp-single__lede p:last-child { margin-bottom: 0; }

.tp-single__content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--global-palette2, #2d2520);
}

.tp-single__content p { margin: 0 0 20px; }

.tp-single__content h2,
.tp-single__content h3,
.tp-single__content h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--global-palette1, #1a1410);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
}

.tp-single__content h2 { font-size: 28px; line-height: 1.2; }
.tp-single__content h3 { font-size: 22px; line-height: 1.25; }

.tp-single__content a {
  color: var(--global-palette4, #8a4f1f);
  text-decoration: none;
  border-bottom: 1px solid var(--global-palette3, #b8743a);
  transition: color 0.2s, border-color 0.2s;
}

.tp-single__content a:hover {
  color: var(--global-palette1, #1a1410);
  border-bottom-color: var(--global-palette1, #1a1410);
}

.tp-single__content blockquote {
  border-left: 3px solid var(--global-palette3, #b8743a);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: var(--global-palette4, #8a4f1f);
}

.tp-single__content ul,
.tp-single__content ol { margin: 0 0 20px; padding-left: 24px; }
.tp-single__content li { margin-bottom: 8px; }

/* ===== Listen on platforms ===== */
.tp-single__platforms {
  padding: 48px 0 64px;
  border-top: 1px solid var(--global-palette3, #b8743a);
  text-align: center;
}

.tp-eyebrow--center {
  justify-content: center;
  margin-bottom: 32px;
}

.tp-eyebrow--center::before { display: none; }

.tp-platforms-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tp-platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--global-palette3, #b8743a);
  border-radius: 999px;
  background: transparent;
  color: var(--global-palette1, #1a1410);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.25s;
}

.tp-platform svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tp-platform:hover {
  background: var(--global-palette1, #1a1410);
  color: var(--global-palette7, #f5efe1);
  border-color: var(--global-palette1, #1a1410);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(110, 58, 29, 0.3);
}

.tp-platform--share:hover {
  background: var(--global-palette4, #8a4f1f);
  border-color: var(--global-palette4, #8a4f1f);
}

/* ===== Prev / Next nav ===== */
.tp-single__nav {
  background: var(--global-palette1, #1a1410);
  padding: 64px 0;
  margin-top: 0;
}

.tp-single__nav .tp-single__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tp-nav-card {
  display: flex;
  flex-direction: column;
  padding: 28px 32px;
  background: rgba(245, 239, 225, 0.04);
  border: 1px solid rgba(245, 239, 225, 0.12);
  border-radius: 12px;
  text-decoration: none;
  color: var(--global-palette7, #f5efe1);
  transition: all 0.25s;
  min-height: 110px;
}

.tp-nav-card--prev { align-items: flex-start; text-align: left; }
.tp-nav-card--next { align-items: flex-end; text-align: right; }

.tp-nav-card:hover {
  background: rgba(212, 160, 74, 0.08);
  border-color: var(--global-palette5, #d4a04a);
  transform: translateY(-2px);
}

.tp-nav-card__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--global-palette5, #d4a04a);
  margin-bottom: 12px;
}

.tp-nav-card__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--global-palette7, #f5efe1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-nav-card--empty {
  background: transparent;
  border: 1px dashed rgba(245, 239, 225, 0.08);
  pointer-events: none;
}

/* ===== Single page mobile ===== */
@media (max-width: 768px) {
  .tp-single__hero { padding: 24px 0 40px; }
  .tp-single__title { font-size: 26px; }
  .tp-single__title-overlay { padding: 24px 20px 28px; }
  .tp-single__player-wrap:has(.tp-embed--youtube) .tp-single__title-overlay,
  .tp-single__player-wrap:has(.tp-embed--video) .tp-single__title-overlay {
    padding: 60px 20px 24px;
  }
  .tp-single__body { padding: 40px 0 32px; }
  .tp-single__lede { font-size: 18px; padding-bottom: 24px; margin-bottom: 28px; }
  .tp-single__content { font-size: 16px; }
  .tp-single__content h2 { font-size: 24px; }
  .tp-single__platforms { padding: 32px 0 40px; }
  .tp-platforms-grid { gap: 8px; }
  .tp-platform { padding: 10px 16px; font-size: 13px; }
  .tp-platform svg { width: 16px; height: 16px; }
  .tp-single__nav { padding: 40px 0; }
  .tp-single__nav .tp-single__container { grid-template-columns: 1fr; }
  .tp-nav-card--next { align-items: flex-start; text-align: left; }
  .tp-nav-card { min-height: auto; padding: 20px 24px; }
}
