/* ---------- Hero (featured slider) ---------- */
.hero {
  position: relative;
  height: clamp(580px, 88vh, 840px);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 500ms var(--ease), visibility 0s linear 500ms;
}
.hero__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transform-origin: 30% 40%; }
/* slow push-in on the active image */
.hero__slide.is-active .hero__img { animation: kenburns 12s ease-out both; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }

/* staggered entrance of the text block */
.hero__slide.is-active .hero__content .container > div > * { animation: rise 600ms var(--ease) both; }
.hero__slide.is-active .hero__content .container > div > :nth-child(2) { animation-delay: 70ms; }
.hero__slide.is-active .hero__content .container > div > :nth-child(3) { animation-delay: 140ms; }
.hero__slide.is-active .hero__content .container > div > :nth-child(4) { animation-delay: 210ms; }
.hero__slide.is-active .hero__content .container > div > :nth-child(5) { animation-delay: 280ms; }
.hero__slide.is-active .hero__content .container > div > :nth-child(6) { animation-delay: 350ms; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.hero__logo { display: block; height: auto; max-height: 110px; max-width: min(440px, 100%); width: auto; filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .5)); }
.hero__fa { margin-top: var(--sp-3); font-size: var(--fs-22); font-weight: 700; color: #fff; }

/* Scrims keep text readable on any image: from the text side and from the bottom */
.hero__slide::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 0%, var(--bg) 3%, color-mix(in srgb, var(--bg) 70%, transparent) 16%, transparent 45%),
    linear-gradient(to left, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .62) 32%, rgba(0, 0, 0, 0) 62%);
}

.hero__content {
  position: absolute; inset-inline: 0; bottom: 170px;
  color: #fff;
}
.hero__content .container > div { max-width: 560px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.hero__badges .badge:not(.badge--accent) { background: rgba(255, 255, 255, .14); color: #fff; }
.hero__title { font-size: var(--fs-48); font-weight: 800; line-height: 1.15; }
.hero__en { margin-top: var(--sp-1); font-size: var(--fs-14); font-weight: 500; color: rgba(255, 255, 255, .7); direction: ltr; text-align: right; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-14); color: rgba(255, 255, 255, .85); }
.hero__meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.hero__plot { margin-top: var(--sp-3); font-size: var(--fs-16); color: rgba(255, 255, 255, .8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero__cta .btn--secondary { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .18); color: #fff; }
.hero__cta .btn--secondary:hover { background: rgba(255, 255, 255, .22); }

/* Picker: poster thumbs */
.hero__thumbs { position: absolute; inset-inline: 0; bottom: var(--sp-7); }
.hero__thumbs .container { display: flex; justify-content: flex-end; align-items: flex-end; gap: var(--sp-3); }
.thumb {
  position: relative; width: 72px; aspect-ratio: 2 / 3; padding: 0; border: 0;
  border-radius: var(--r-md); overflow: hidden; background: var(--surface-2);
  opacity: .5; transition: opacity var(--dur-base) var(--ease), width var(--dur-slow) var(--ease), outline-color var(--dur-base) var(--ease);
  outline: 2px solid transparent; outline-offset: 3px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: .9; }
.thumb[aria-selected="true"] { opacity: 1; width: 92px; outline-color: rgba(255, 255, 255, .9); }
.thumb__bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, .45); }
.thumb__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: right; }
.thumb[aria-selected="true"] .thumb__bar i { animation: thumbfill var(--hero-delay, 8s) linear forwards; }
.hero.is-paused .thumb__bar i { animation-play-state: paused; }
@keyframes thumbfill { to { transform: scaleX(1); } }

/* ---------- Quick access: fixed grid of equal tiles ---------- */
.quick { margin-top: var(--sp-7); }
.quick__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-3); }
.qtile {
  display: flex; align-items: center; gap: var(--sp-3);
  height: 72px; padding: 0 var(--sp-4);
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.qtile:hover { background: var(--surface-2); border-color: var(--border-strong); }
.qtile__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.qtile__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.qtile__text b { font-size: var(--fs-14); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qtile__text small { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1180px) { .quick__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 960px) {
  .hero { height: auto; min-height: 0; background: none; }
  .hero__slide { position: relative; display: none; }
  .hero__slide.is-active { display: block; }
  .hero__media { position: relative; aspect-ratio: 4 / 3.3; }
  .hero__media { position: relative; z-index: 0; }
  .hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(0, 0, 0, 0) 55%); }
  .hero__slide::before { display: none; }
  .hero__content { position: relative; bottom: auto; margin-top: -48px; z-index: 2; color: var(--text-1); }
  .hero__logo { max-height: 64px; max-width: 70%; }
  .hero__fa { font-size: var(--fs-18); color: var(--text-1); margin-top: var(--sp-2); }
  .hero__en, .hero__meta, .hero__plot { color: var(--text-2); }
  .hero__badges .badge:not(.badge--accent) { background: var(--surface-3); color: var(--text-1); }
  .hero__cta { margin-top: var(--sp-4); }
  .hero__cta .btn--primary { flex: 1; }
  .hero__cta .btn--secondary { background: var(--surface-2); border-color: var(--border); color: var(--text-1); }
  .hero__thumbs { position: static; margin-top: var(--sp-4); }
  .hero__thumbs .container { justify-content: center; gap: var(--sp-2); }
  .thumb { width: 8px; height: 8px; aspect-ratio: auto; border-radius: 50%; background: var(--surface-3); opacity: 1; outline: 0; }
  .thumb img, .thumb__bar { display: none; }
  .thumb[aria-selected="true"] { width: 24px; border-radius: 4px; background: var(--accent); outline: 0; }
  .quick { margin-top: var(--sp-6); }
  .quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .qtile { height: 60px; padding: 0 var(--sp-3); gap: var(--sp-2); }
  .qtile__icon { width: 34px; height: 34px; }
}

.hero__cta [data-save][aria-pressed="true"] { color: var(--accent-text); }
