/* Highlights & Announcements showcase — uses theme tokens */
.bv-hl {
  max-width: 1240px;
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 80px);
  padding-inline: 20px;
  box-sizing: border-box;
  position: relative;
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--color-text, #141B22);
}

.bv-hl *,
.bv-hl *::before,
.bv-hl *::after {
  box-sizing: border-box;
}

.bv-hl__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .bv-hl__head {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    align-items: end;
    gap: 8px 24px;
  }

  .bv-hl__pill {
    grid-column: 1;
    justify-self: start; /* grid items stretch: keep the pill pill-sized */
    margin: 0;
  }

  .bv-hl__title {
    grid-column: 1;
    margin: 0;
  }

  .bv-hl__lead {
    grid-column: 1;
    margin: 0;
  }

  .bv-hl__controls {
    grid-column: 2;
    grid-row: 2 / span 2;
    justify-self: end;
    align-self: end;
    margin: 0;
  }
}

.bv-hl__pill {
  display: inline-block;
  border: 1px solid var(--color-divider, #e2e8f0);
  background: var(--color-surface, #ffffff);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent-text, #8A1E2F);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  margin: 0 0 8px;
}

.bv-hl__title {
  font-family: var(--font-heading, serif);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--color-navy, #141B22);
  line-height: 1.15;
  margin: 0 0 8px;
}

.bv-hl__lead {
  color: var(--color-text-soft, #5A5550);
  max-width: 60ch;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.5;
  margin: 0;
}

.bv-hl__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bv-hl__controls[hidden] {
  display: none !important;
}

.bv-hl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-navy, #141B22);
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-divider, #e2e8f0);
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.bv-hl__btn[data-bv-hl-prev],
.bv-hl__btn[data-bv-hl-next] {
  padding: 0;
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.bv-hl__btn:hover {
  background: var(--color-accent-100, #fdf2f2);
  border-color: var(--color-accent, #9D2235);
  color: var(--color-accent-text, #8A1E2F);
}

.bv-hl__btn:focus-visible {
  outline: 2px solid var(--color-accent, #9D2235);
  outline-offset: 2px;
}

/* Entrance animation */
@keyframes bv-hl-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bv-hl.js:not(.is-in) .bv-hl__head > * {
  opacity: 0;
}

.bv-hl.is-in .bv-hl__head > * {
  animation: bv-hl-in 400ms ease forwards;
}

.bv-hl.is-in .bv-hl__head > *:nth-child(1) {
  animation-delay: 0ms;
}

.bv-hl.is-in .bv-hl__head > *:nth-child(2) {
  animation-delay: 80ms;
}

.bv-hl.is-in .bv-hl__head > *:nth-child(3) {
  animation-delay: 160ms;
}

.bv-hl.is-in .bv-hl__head > *:nth-child(4) {
  animation-delay: 240ms;
}

/* Viewport and track */
.bv-hl__viewport {
  overflow: hidden;
  padding-block: 16px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.bv-hl__track {
  display: flex;
  gap: clamp(14px, 2vw, 24px);
  width: max-content;
  list-style: none;
  margin: 0;
  padding: 0;
}

@keyframes bv-hl-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.bv-hl.is-running .bv-hl__track {
  animation: bv-hl-marquee var(--bv-hl-dur, 40s) linear infinite;
  will-change: transform;
  /* trailing gap so -50% is exactly one set + its gaps: seamless loop, no jump */
  padding-right: clamp(14px, 2vw, 24px);
}

.bv-hl.is-paused .bv-hl__track {
  animation-play-state: paused;
}

.bv-hl.is-manual .bv-hl__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.bv-hl.is-manual .bv-hl__item {
  scroll-snap-align: center;
}

.bv-hl.is-static .bv-hl__track {
  margin-inline: auto;
}

/* Poster Card */
.bv-hl__item {
  flex: 0 0 auto;
  width: clamp(200px, 22vw, 260px);
}

.bv-hl__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
}

.bv-hl__card:focus-visible {
  outline: 2px solid var(--color-accent, #9D2235);
  outline-offset: 4px;
}

.bv-hl__frame {
  aspect-ratio: 3 / 4;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-divider, #e2e8f0);
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(20, 27, 34, .10);
  transition: transform 250ms ease, box-shadow 250ms ease;
  transform-origin: center center;
}

.bv-hl__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bv-hl__item:nth-child(odd) .bv-hl__frame {
  transform: rotate(-1.5deg);
}

.bv-hl__item:nth-child(even) .bv-hl__frame {
  transform: rotate(1.5deg);
}

.bv-hl__card:hover .bv-hl__frame,
.bv-hl__card:focus-visible .bv-hl__frame {
  transform: rotate(0) translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 27, 34, .18);
}

.bv-hl__meta {
  font-size: 13px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bv-hl__tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-accent-100, #fdf2f2);
  color: var(--color-accent-text, #8A1E2F);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bv-hl__meta time,
.bv-hl__ddate {
  color: var(--color-text-soft, #5A5550);
  font-size: 13px;
}

.bv-hl__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-navy, #141B22);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* Lightbox Dialog */
.bv-hl__dialog {
  max-width: min(1100px, 94vw);
  max-height: 92vh;
  border: 0;
  padding: 0;
  border-radius: 4px;
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #141B22);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
  overflow: hidden;
}

.bv-hl__dialog::backdrop {
  background: rgba(13, 17, 23, .72);
}

.bv-hl__dbody {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  max-height: 92vh;
}

@media (min-width: 900px) {
  .bv-hl__dbody {
    grid-template-columns: 1fr 320px;
  }
}

.bv-hl__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--color-divider, #e2e8f0);
  background: var(--color-surface, #ffffff);
  color: var(--color-navy, #141B22);
  border-radius: 4px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 150ms ease;
}

.bv-hl__close:hover {
  background: var(--color-accent-100, #fdf2f2);
  color: var(--color-accent-text, #8A1E2F);
}

.bv-hl__close:focus-visible {
  outline: 2px solid var(--color-accent, #9D2235);
  outline-offset: 2px;
}

.bv-hl__zoom {
  overflow: auto;
  max-height: 80vh;
  background: var(--color-bg, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bv-hl__dimg {
  max-height: 80vh;
  width: 100%;
  object-fit: contain;
  cursor: zoom-in;
  display: block;
  user-select: none;
}

.bv-hl__zoom.is-zoomed {
  display: block; /* flex centering would push the zoomed poster's top/left out of scroll reach */
}

.bv-hl__zoom.is-zoomed .bv-hl__dimg {
  max-height: none;
  width: auto;
  max-width: none;
  cursor: zoom-out;
}

.bv-hl__dcopy {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.bv-hl__dcopy .bv-hl__tag {
  align-self: flex-start;
}

.bv-hl__dcopy h3 {
  font-family: var(--font-heading, serif);
  color: var(--color-navy, #141B22);
  font-size: 20px;
  margin: 0;
  line-height: 1.3;
}

.bv-hl__ddate {
  margin: 0;
}

.bv-hl__ddesc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text, #141B22);
  margin: 0;
  white-space: pre-line;
}

.bv-hl__dctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.bv-hl__dctas .bv-btn {
  text-align: center;
  justify-content: center;
}

.bv-hl__hint {
  font-size: 12px;
  color: var(--color-text-soft, #5A5550);
  margin: 0;
}

/* Mobile ≤ 600px */
@media (max-width: 600px) {
  .bv-hl__item {
    width: 68vw;
  }

  .bv-hl__controls {
    margin-top: 12px;
  }

  .bv-hl__dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    max-width: none;
    border-radius: 0;
    margin: 0;
  }

  .bv-hl__dbody {
    height: 100dvh;
    max-height: 100dvh;
    grid-template-columns: 1fr;
  }

  .bv-hl__zoom {
    max-height: 55vh;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bv-hl.is-running .bv-hl__track {
    animation: none !important;
  }

  .bv-hl.js:not(.is-in) .bv-hl__head > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .bv-hl.is-in .bv-hl__head > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .bv-hl__item:nth-child(odd) .bv-hl__frame,
  .bv-hl__item:nth-child(even) .bv-hl__frame {
    transform: none !important;
    transition: none !important;
  }

  .bv-hl__card:hover .bv-hl__frame,
  .bv-hl__card:focus-visible .bv-hl__frame {
    transform: none !important;
  }

  .bv-hl .bv-hl__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .bv-hl .bv-hl__item {
    scroll-snap-align: center;
  }
}

/* Without JS: posters that do not fit can still be scrolled sideways */
.bv-hl:not(.js) .bv-hl__viewport {
  overflow-x: auto;
}

/* Lightbox opens instantly: no lingering mobile tap flash over it */
.bv-hl__card {
  -webkit-tap-highlight-color: transparent;
}
