/* ==========================================================================
   Audio Page CSS — H&T Library Theme (dark)
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════════ */
.ht-library-audio-hero {
  position:            relative;
  background-size:     cover;
  background-position: center;
  min-height:          clamp(440px, 46vw, 580px);
  display:             flex;
  align-items:         center;
  padding-top:         calc(var(--bpt-header-h) + clamp(2.5rem, 5vw, 4rem));
  padding-bottom:      clamp(2.5rem, 5vw, 4rem);
  overflow:            hidden;
}

/* Bottom accent line — matches .ht-library-page-header::after on other inner pages */
.ht-library-audio-hero::after {
  content:    '';
  position:   absolute;
  bottom:     0;
  left:       0;
  right:      0;
  height:     2px;
  background: linear-gradient(to right, transparent, rgba(183, 83, 61, .4), transparent);
  z-index:    1;
}

/* Left-to-right gradient — black fades to transparent, revealing the image on the right (matches .ht-library-page-header) */
.ht-library-audio-hero::before {
  content:    '';
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    to right,
    rgba(10, 8, 6, 0.92) 0%,
    rgba(10, 8, 6, 0.82) 32%,
    rgba(10, 8, 6, 0.45) 62%,
    rgba(10, 8, 6, 0.12) 100%
  );
  z-index:    0;
}

.ht-library-audio-hero__inner {
  position: relative;
  z-index:  1;
}

.ht-library-audio-hero__copy {
  max-width: 620px;
}

.ht-library-audio-hero__eyebrow {
  font-size:      .78rem;
  font-weight:    700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--primary);
  margin:         0 0 .75rem;
}

.ht-library-audio-hero__title {
  font-family:    var(--bpt-heading-font);
  font-size:      clamp(2rem, 3.4vw + .5rem, 3rem);
  font-weight:    700;
  color:          #FFF7F0;
  letter-spacing: -.02em;
  line-height:    1.18;
  margin:         0 0 .5rem;
}

.ht-library-audio-hero__divider {
  display:       flex;
  align-items:   center;
  gap:           .75rem;
  margin-bottom: 1.1rem;
  color:         var(--primary);
}
.ht-library-audio-hero__divider-line {
  display:     block;
  height:      1.5px;
  width:       56px;
  background:  linear-gradient(to right, var(--primary-light), transparent);
  flex-shrink: 0;
}
.ht-library-audio-hero__divider-line:last-child {
  background: linear-gradient(to left, var(--primary-light), transparent);
}

.ht-library-audio-hero__desc {
  font-size:   1rem;
  line-height: 1.8;
  color:       rgba(255, 247, 240, .65);
  max-width:   42ch;
  margin:      0 0 1.75rem;
}

.ht-library-audio-hero__btn {
  display:         inline-flex;
  align-items:     center;
  gap:             .55rem;
  background:      var(--primary);
  color:           #fff;
  padding:         .95rem 2rem;
  border-radius:   50px;
  font-weight:     600;
  font-size:       .95rem;
  text-decoration: none;
  box-shadow:      0 4px 18px rgba(183, 83, 61, .35);
  transition:      background .2s, transform .2s, box-shadow .2s;
}
.ht-library-audio-hero__btn:hover {
  background: var(--primary-dark);
  color:      #fff;
  transform:  translateY(-2px);
  box-shadow: 0 8px 28px rgba(183, 83, 61, .45);
}

@media (max-width: 640px) {
  .ht-library-audio-hero {
    min-height:  clamp(360px, 78vw, 460px);
    padding-top: calc(var(--bpt-header-h) + 2.5rem);
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   FEATURES
   ══════════════════════════════════════════════════════════════════════════ */
.ht-library-audio-features {
  background:     #181512;
  padding-top:    clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.ht-library-audio-features__header {
  text-align:    center;
  max-width:     640px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 0.5rem);
}

.ht-library-audio-features__eyebrow {
  font-size:      .78rem;
  font-weight:    700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--primary);
  margin:         0 0 .6rem;
}

.ht-library-audio-features__title {
  font-family:    var(--bpt-heading-font);
  font-size:      clamp(1.7rem, 2.8vw + .5rem, 2.4rem);
  font-weight:    700;
  color:          #FFF7F0;
  letter-spacing: -.02em;
  margin:         0 0 .75rem;
}

.ht-library-audio-features__divider {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             .75rem;
  color:           var(--primary);
  margin:          0 0 .75rem;
}
.ht-library-audio-features__divider-line {
  height:      1.5px;
  width:       56px;
  background:  linear-gradient(to right, var(--primary-light), transparent);
  flex-shrink: 0;
}
.ht-library-audio-features__divider-line:last-child {
  background: linear-gradient(to left, var(--primary-light), transparent);
}
.ht-library-audio-features__divider svg {
  color:       var(--primary);
  opacity:     .85;
  flex-shrink: 0;
}

.ht-library-audio-features__sub {
  font-size:   1rem;
  line-height: 1.75;
  color:       rgba(255, 247, 240, .6);
  margin:      0;
}

.ht-library-audio-features__grid {
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  gap:                   1.1rem;
}

.ht-library-audio-feature {
  background:    #211D18;
  border:        1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding:       clamp(1.5rem, 3vw, 2rem);
  text-align:    center;
  display:       flex;
  flex-direction: column;
  align-items:   center;
  gap:           .75rem;
}
.ht-library-audio-feature svg { width: 64px; height: 64px; color: var(--primary); }
.ht-library-audio-feature h3 {
  font-family: var(--bpt-heading-font);
  font-size:   1.05rem;
  font-weight: 700;
  color:       #FFF7F0;
  margin:      0;
}
.ht-library-audio-feature p {
  font-size:   .875rem;
  line-height: 1.6;
  color:       rgba(255, 247, 240, .55);
  margin:      0;
}

@media (max-width: 900px) {
  .ht-library-audio-features__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .ht-library-audio-features__grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════════════════════════
   PLAYER — page-level additions on top of audio-player.css
   ══════════════════════════════════════════════════════════════════════════ */
.ht-library-audio {
  padding-block:    clamp(1rem, 3vw, 2rem) 20px;
  background-color: #181512;
  background-image: none;
}
.ht-library-audio::before,
.ht-library-audio::after {
  content: none;
}

/* Keep the track number visible even on the active row */
.ht-library-audio-page__player .ht-library-track.is-active .ht-library-track__num {
  color: rgba(255, 247, 240, .85);
}

/* "Listen to a Sample Story" intro above the now-playing card */
.ht-library-np__intro {
  width:      100%;
  text-align: center;
  margin-bottom: .25rem;
}
.ht-library-np__intro-eyebrow {
  font-size:   .95rem;
  font-weight: 700;
  color:       var(--primary-light);
  margin:      0 0 .3rem;
}
.ht-library-np__intro-desc {
  font-size:   .82rem;
  line-height: 1.5;
  color:       rgba(255, 247, 240, .5);
  margin:      0;
}

/* Playlist "20+ Stories" badge (static, distinct from the JS-managed __count) */
.ht-library-playlist__badge {
  font-size:      .7rem;
  font-weight:    700;
  letter-spacing: .04em;
  color:          rgba(255, 247, 240, .5);
  background:     rgba(255, 247, 240, .06);
  padding:        .3rem .75rem;
  border-radius:  50px;
  flex-shrink:    0;
}

/* Locked track rows */
.ht-library-track--locked {
  cursor: default;
}
.ht-library-track--locked .ht-library-track__title { color: rgba(255, 247, 240, .45); }
.ht-library-track--locked .ht-library-track__cat   { color: rgba(255, 247, 240, .25); }
.ht-library-track__lock {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           30px;
  height:          30px;
  flex-shrink:     0;
  color:           rgba(255, 247, 240, .3);
}

/* Footer note below the playlist */
.ht-library-playlist__footer {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             .5rem;
  padding:         .9rem 1.5rem;
  border-top:      1px solid rgba(255, 247, 240, .08);
  font-size:       .8rem;
  color:           rgba(255, 247, 240, .45);
  flex-shrink:     0;
  text-align:      center;
}
.ht-library-playlist__footer svg { color: var(--primary-light); flex-shrink: 0; }
.ht-library-playlist__footer a {
  color:           var(--primary-light);
  text-decoration: none;
  font-weight:     600;
}
.ht-library-playlist__footer a:hover { color: #fff; }


/* ══════════════════════════════════════════════════════════════════════════
   CTA BANNER (page-specific — distinct from shared .ht-library-cta)
   ══════════════════════════════════════════════════════════════════════════ */
.ht-library-audio-cta {
  background:    #181512;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.ht-library-audio-cta__card {
  position:      relative;
  overflow:      hidden;
  background:    #211D18;
  border:        1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  padding-block: clamp(2rem, 5vw, 2rem);
}

.ht-library-audio-cta__deco {
  position:       absolute;
  top:            0;
  width:          min(38vw, 420px);
  height:         100%;
  color:          rgba(255, 247, 240, .14);
  pointer-events: none;
}
.ht-library-audio-cta__deco--left  { left:  0; }
.ht-library-audio-cta__deco--right { right: 0; transform: scaleX(-1); }

.ht-library-audio-cta__inner {
  position:       relative;
  z-index:        1;
  max-width:      460px;
  margin-inline:  auto;
  text-align:     center;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            .4rem;
}

.ht-library-audio-cta__eyebrow {
  font-size:      .75rem;
  font-weight:    700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--primary-light);
  margin:         0 0 .5rem;
}

.ht-library-audio-cta__title {
  font-family:    var(--bpt-heading-font);
  font-size:      clamp(1.7rem, 2.8vw + .4rem, 2.3rem);
  font-weight:    700;
  color:          #FFF7F0;
  letter-spacing: -.02em;
  line-height:    1.25;
  margin:         0;
}

.ht-library-audio-cta__divider {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             .75rem;
  color:           var(--primary);
  margin:          .5rem 0 .1rem;
}
.ht-library-audio-cta__divider-line {
  height:      1.5px;
  width:       56px;
  background:  linear-gradient(to right, var(--primary-light), transparent);
  flex-shrink: 0;
}
.ht-library-audio-cta__divider-line:last-child {
  background: linear-gradient(to left, var(--primary-light), transparent);
}

.ht-library-audio-cta__sub {
  font-size: 1.02rem;
  color:     rgba(255, 247, 240, .6);
  margin:    0 0 .6rem;
}

.ht-library-audio-cta__btn {
  display:         inline-flex;
  align-items:     center;
  gap:             .55rem;
  background:      var(--primary);
  color:           #fff;
  padding:         .95rem 2.25rem;
  border-radius:   50px;
  font-weight:     600;
  font-size:       1rem;
  text-decoration: none;
  box-shadow:      0 4px 18px rgba(183, 83, 61, .35);
  transition:      background .2s, transform .2s, box-shadow .2s;
}
.ht-library-audio-cta__btn:hover {
  background: var(--primary-dark);
  color:      #fff;
  transform:  translateY(-2px);
  box-shadow: 0 8px 28px rgba(183, 83, 61, .45);
}


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — player grid (page-level; base grid lives in audio-player.css)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ht-library-audio-cta__deco { width: 55vw; opacity: .6; }
}
