/* /listen page-specific styles (shared core in base.css) */

:root {
  --maxw: 940px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
}

.wordmark__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 var(--amber-glow);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 159, 28, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 159, 28, 0); }
}

[data-panel="episode"]:not([hidden]) > * {
  animation: rise 0.7s var(--ease) backwards;
}

.episode__head { animation-delay: 0.02s; }

.player { animation-delay: 0.10s; }

.notice { animation-delay: 0.10s; }

.grid { animation-delay: 0.18s; }

.related { animation-delay: 0.26s; }

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

.panel--loading { padding-top: 28px; }

.tuner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.tuner__needle {
  width: 38px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber));
  transform-origin: left center;
  animation: sweep 1.4s ease-in-out infinite;
}

@keyframes sweep {
  0%, 100% { transform: scaleX(0.3); opacity: 0.4; }
  50%      { transform: scaleX(1);   opacity: 1; }
}

.skeleton--eyebrow { width: 180px; height: 13px; margin-bottom: 26px; }

.skeleton--title { width: 80%; height: 44px; margin-bottom: 14px; }

.skeleton--short { width: 50%; }

.skeleton--player { width: 100%; height: 108px; margin-top: 40px; }

.ghost-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--amber-hi);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.episode__head { padding-top: 18px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 22px;
}

.eyebrow__sep { color: var(--ink-ghost); margin: 0 0.2em; }

.eyebrow__rec {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  animation: pulse 2.6s var(--ease) infinite;
}

.episode__show {
  display: flex; align-items: baseline; gap: 0.8em;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.episode__show-label { color: var(--ink-ghost); letter-spacing: 0.18em; font-size: 0.66rem; }

.episode__show a { color: var(--amber-hi); text-decoration: none; border-bottom: 1px solid transparent; }

.episode__show a:hover { border-color: var(--amber-hi); }

.episode__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 900;
  font-size: clamp(2.3rem, 6.5vw, 4.2rem);
  line-height: 1.0;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

.episode__hosts-line {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.episode__hosts-line span { color: var(--ink); }

.player {
  margin-top: 42px;
  background: linear-gradient(160deg, var(--bg-raised), var(--bg-sunk));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 30px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 24px 60px -30px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
}

.player::before {
  
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 11px);
  opacity: 0.5;
}

.player__deck {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 26px);
}

.transport {
  --size: 70px;
  position: relative;
  flex: none;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--amber-hi), var(--amber) 45%, var(--amber-deep));
  color: #1a1206;
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease), box-shadow 0.3s;
  box-shadow: 0 8px 24px -8px rgba(255, 159, 28, 0.6);
}

.transport:hover { transform: scale(1.05); }

.transport:active { transform: scale(0.97); }

.transport:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 4px; }

.transport__icon {
  width: 30px; height: 30px;
  fill: currentColor;
  position: absolute;
  transition: opacity 0.2s, transform 0.2s;
}

.transport__icon--play { transform: translateX(1px); }

.transport__icon--pause { opacity: 0; transform: scale(0.7); }

[data-playing] .transport__icon--play { opacity: 0; transform: scale(0.7); }

[data-playing] .transport__icon--pause { opacity: 1; transform: scale(1); }

.transport__ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  opacity: 0;
}

[data-playing] .transport__ring { animation: ring 1.8s var(--ease) infinite; }

@keyframes ring {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.35); }
}

.player__body { flex: 1; min-width: 0; }

.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-bottom: 14px;
  opacity: 0.35;
  transition: opacity 0.4s;
}

[data-playing] .eq { opacity: 1; }

.eq span {
  width: 3px;
  height: 30%;
  background: linear-gradient(var(--amber-hi), var(--amber-deep));
  border-radius: 2px;
}

[data-playing] .eq span { animation: bounce 0.9s ease-in-out infinite; }

.eq span:nth-child(1) { animation-delay: -0.7s; }

.eq span:nth-child(2) { animation-delay: -0.2s; }

.eq span:nth-child(3) { animation-delay: -0.5s; }

.eq span:nth-child(4) { animation-delay: -0.1s; }

.eq span:nth-child(5) { animation-delay: -0.8s; }

.eq span:nth-child(6) { animation-delay: -0.3s; }

.eq span:nth-child(7) { animation-delay: -0.6s; }

.eq span:nth-child(8) { animation-delay: -0.15s; }

.eq span:nth-child(9) { animation-delay: -0.45s; }

.eq span:nth-child(10) { animation-delay: -0.25s; }

@keyframes bounce {
  0%, 100% { height: 22%; }
  50%      { height: 100%; }
}

.scrub__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(var(--amber), var(--amber)) 0/var(--progress, 0%) 100% no-repeat,
    var(--line);
  cursor: pointer;
  margin: 0;
}

.scrub__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--amber-hi);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--amber);
  transition: transform 0.15s;
}

.scrub__range::-webkit-slider-thumb:hover { transform: scale(1.25); }

.scrub__range::-moz-range-thumb {
  width: 15px; height: 15px; border: 2px solid var(--bg);
  border-radius: 50%; background: var(--amber-hi); box-shadow: 0 0 0 1px var(--amber);
}

.scrub__range:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 6px; }

.scrub__times {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.scrub__time--total { color: var(--ink-ghost); }

.notice {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber-deep);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}

.notice p { margin: 0; }

.notice__sig {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--amber-deep);
  position: relative;
}

.notice__sig::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--amber-deep);
  opacity: 0.5;
}

.grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(30px, 6vw, 64px);
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; gap: 40px; }
}

.block { margin-bottom: 38px; }

.block:last-child { margin-bottom: 0; }

.block__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.block__subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 10px;
}

.prose { color: var(--ink-soft); }

.prose p { margin: 0 0 1em; }

.prose p:last-child { margin-bottom: 0; }

.prose a { color: var(--amber-hi); }

.facts dl { margin: 0; }

.fact {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.fact:first-child { padding-top: 0; }

.fact dt {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 5px;
}

.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink);
}

.fact__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.hosts { list-style: none; margin: 0; padding: 0; }

.hosts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.host__avatar {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--line), var(--bg-sunk));
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber-hi);
  text-transform: uppercase;
}

.host__name { color: var(--ink); }

.hosts a { color: inherit; text-decoration: none; }

.hosts a:hover .host__name { color: var(--amber-hi); }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.tags a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  transition: color 0.25s, border-color 0.25s, transform 0.2s;
}

.tags a:hover {
  color: var(--amber-hi);
  border-color: var(--amber-deep);
  transform: translateY(-1px);
}

.related {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.related__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 22px;
}

.related__list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.related__list a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}

.related__list a:hover {
  border-color: var(--amber-deep);
  transform: translateY(-3px);
  background: var(--bg-raised);
}

.related__when {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  display: block;
  margin-bottom: 8px;
}

.related__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.25;
}

.colophon {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 30px;
  padding-bottom: 40px;
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-ghost);
  border-top: 1px solid var(--line-soft);
}

[data-state="loading"] [data-panel="episode"], [data-state="loading"] [data-panel="error"], [data-state="ready"] [data-panel="loading"], [data-state="ready"] [data-panel="error"], [data-state="error"] [data-panel="loading"], [data-state="error"] [data-panel="episode"] { display: none; }
