/* ============================================================
   LitHERacy — homepage trailer
   ============================================================
   Sits in the brand reveal scene, under the launch date, on cream.
   Hidden entirely until a trailer exists in the podcast feed.
   ============================================================ */
.trailer[hidden] { display: none; }

.trailer {
  /* kept compact so the logo, the launch line and the trailer sit together
     on a standard laptop screen rather than pushing each other apart */
  margin: 26px auto 0;
  max-width: 520px;
  width: 100%;
  text-align: center;
}
.trailer .t-label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet);
}
.trailer .t-note {
  margin: 14px 0 0;
  font-family: var(--font-hand), cursive;
  font-size: 20px;
  line-height: 1.4;
  color: var(--violet);
}

/* an explicit display in a stylesheet beats the hidden attribute, so
   every element that sets one needs this alongside it */
.t-player[hidden] { display: none; }
.t-player {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15,15,15,0.04);
  border: 1px solid rgba(15,15,15,0.14);
  padding: 16px 18px;
  text-align: left;
}
/* .trailer prefix so this beats the footer's generic button padding,
   which was stretching the circle into an oval */
.trailer .t-player .t-play {
  flex: none;
  width: 52px; height: 52px;
  min-width: 0;
  padding: 0;
  box-sizing: border-box;
  border: none; border-radius: 50%;
  background: var(--lavender);
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 140ms ease;
}
.trailer .t-player .t-play:hover { transform: scale(1.06); }
.trailer .t-player .t-play:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.trailer .t-player .t-play svg { width: 20px; height: 20px; }

.t-player .t-info { flex: 1; min-width: 0; }
.t-player .t-title {
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-player .t-track {
  margin-top: 10px; height: 4px;
  background: rgba(15,15,15,0.16);
  border-radius: 2px; position: relative; cursor: pointer;
}
.t-player .t-track::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: calc(var(--p, 0) * 100%);
  background: var(--lavender); border-radius: 2px;
}
.t-player .t-track::after {
  content: ""; position: absolute; left: calc(var(--p, 0) * 100%); top: 50%;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--violet); transform: translate(-50%,-50%);
}
.t-player .t-time {
  flex: none; font-size: 12px;
  color: rgba(15,15,15,0.55);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .trailer { margin-top: 38px; }
  .t-player { gap: 12px; padding: 13px 14px; }
  .trailer .t-player .t-play { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-player .t-play { transition: none; }
  .t-player .t-play:hover { transform: none; }
}

/* ============================================================
   Trailer video — click-to-load
   ============================================================
   Our own poster and play button. The YouTube iframe replaces
   this only once the button is pressed.
   ============================================================ */
.t-video { position: relative; aspect-ratio: 16 / 9; background: rgba(15,15,15,0.05); border: 1px solid rgba(15,15,15,0.14); overflow: hidden; }
.t-video[hidden] { display: none; }
.t-video iframe { width: 100%; height: 100%; display: block; border: 0; }

.trailer .t-video-play {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; margin: 0; min-width: 0;
  border: none; background: none;
  cursor: pointer; display: grid; place-items: center;
}
.trailer .t-video-play:focus-visible { outline: 3px solid var(--violet); outline-offset: -3px; }

.t-poster {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
/* no poster supplied — a plain on-brand panel rather than a blank hole */
.t-poster--plain {
  background: linear-gradient(140deg, rgba(167,139,202,0.32), rgba(125,91,166,0.14));
}
.t-video-play::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(15,15,15,0.28);
  transition: background 160ms ease;
}
.trailer .t-video-play:hover::after { background: rgba(15,15,15,0.16); }

.t-badge {
  position: relative; z-index: 1;
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--lavender); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(15,15,15,0.35);
  transition: transform 160ms ease;
}
.t-badge svg { width: 28px; height: 28px; margin-left: 3px; }
.trailer .t-video-play:hover .t-badge { transform: scale(1.07); }

@media (max-width: 620px) {
  .t-badge { width: 60px; height: 60px; }
  .t-badge svg { width: 23px; height: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-badge, .t-video-play::after { transition: none; }
  .trailer .t-video-play:hover .t-badge { transform: none; }
}
