/* Home page */

/* ---------- intro splash: "smiling level : ☻ ☻ ☻ ☻ ☻" ----------
   faces light up one by one like a loading bar (0.35s apart),
   hold briefly, then the whole overlay fades out (~2.9s total). */
.splash-on { overflow: hidden; }
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 0 16px;
  background: var(--bg); cursor: pointer;
  animation: splash-out .5s ease 2.4s forwards;
}
.splash__text {
  display: flex; align-items: center; gap: .4em; white-space: nowrap;
  font-size: clamp(22px, 6.4vw, 48px); line-height: 1.2; letter-spacing: .08em;
  color: #d6582b;
}
.splash__faces { display: inline-flex; gap: .35em; font-variant-emoji: text; letter-spacing: 0; }
.splash__faces span { opacity: .15; animation: splash-face .25s ease forwards; }
.splash__faces span:nth-child(1) { animation-delay: .35s; }
.splash__faces span:nth-child(2) { animation-delay: .7s; }
.splash__faces span:nth-child(3) { animation-delay: 1.05s; }
.splash__faces span:nth-child(4) { animation-delay: 1.4s; }
.splash__faces span:nth-child(5) { animation-delay: 1.75s; }
@keyframes splash-face { from { opacity: .15; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .splash__faces span { animation-duration: .01s; }
  .splash { animation-delay: 1.2s; }
}

.nav__icon { width: 27px; height: 27px; margin: 0 2.3px; }

/* hero: 1440 x 1024 pale block with the three banner slices at y=212 */
.hero { height: 1024px; background: var(--bg); position: relative; margin-bottom: 48px; }
.banners { position: absolute; top: 212px; left: 0; width: 100%; display: flex; height: 600px; }
.banners img { width: 33.3333%; height: 600px; object-fit: cover; }

main > section + section { margin-top: 48px; }
.fest-info { margin-top: 0; }
.fact__ticket { width: 32px; height: auto; }
.fact__head .fact__ticket { margin-left: 2px; }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 29px; }
.timeline__month {
  margin: 0; font-weight: 300; font-size: 40px; line-height: 1; letter-spacing: .2em;
  height: 53px; color: var(--teal);
}
.timeline__scroller {
  position: relative; width: 100%; max-width: 1200px; height: auto; padding-bottom: 8px;
  overflow-x: auto; overflow-y: hidden; outline-offset: 4px;
  scrollbar-width: thin; scrollbar-color: var(--teal) transparent;
}
.timeline__line { position: absolute; left: 0; top: 0; width: 4046px; height: 106.7px; max-width: none; pointer-events: none; }
.timeline__track {
  position: relative; display: flex; align-items: flex-start; gap: 48px;
  padding: 28px 42px 0 42px; width: max-content;
}
.tl-group { display: flex; flex-direction: column; gap: 80px; padding: 1px 0; }
.tl-group__date {
  height: 50px; font-weight: 600; font-size: 48px; line-height: 1; letter-spacing: .1em; color: var(--teal);
}
.tl-group__box { display: flex; gap: 48px; background: var(--teal); border-radius: 5px; height: 273px; padding: 0 20px 12px 0; }

/* Figma renders the card's Chinese at Noto Sans TC's full size, so opt out of
   the site-wide cap-height scaling here. */
.tl-card { position: relative; display: block; width: 341px; height: 261px; color: #fff; flex: none; font-size-adjust: none; }
.tl-card__time {
  position: absolute; left: 0; top: -37px; width: 63px; height: 27px;
  font-weight: 500; font-size: 24px; line-height: 1; letter-spacing: .1em; color: var(--teal);
}
.tl-card__runtime {
  position: absolute; left: 301px; top: 7px; font-size: 24px; line-height: 1.05; letter-spacing: 0;
  color: rgba(242, 242, 242, .5); text-align: right; white-space: nowrap;
}
.tl-card__still { width: 280px; height: 160px; object-fit: cover; border-top-left-radius: 5px; }
/* zh/en titles sit closer than Figma (zh line-height 1.5 → 1.25, gap 5 → 3px);
   top +3px keeps the zh title in place and the blurb's extra margin keeps it
   on the same line as the arrow. */
.tl-card__text { position: absolute; left: 8px; top: 179px; width: 280px; display: flex; flex-direction: column; gap: 5px; }
.tl-card__zh { font-weight: 300; font-size: 24px; line-height: 1.25; letter-spacing: .15em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card__en { margin-top: -2px; font-family: var(--font-film-en); font-style: italic; font-weight: 400; font-size: 16px; line-height: 1.2; letter-spacing: 0; color: var(--surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card__blurb { margin-top: 5px; font-weight: 300; font-size: 16px; line-height: 1.5; letter-spacing: .15em; color: var(--surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card__arrow { position: absolute; left: 320px; top: 245px; width: 14px; height: 13.2px; }
.tl-card:hover .tl-card__zh { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- FAQ (styled like a media player) ---------- */
.faq-merch { display: flex; justify-content: center; gap: 160px; padding-bottom: 40px; }
.faq { position: relative; width: 546px; height: 357px; flex: none; background: var(--blue); border-radius: 3px; color: var(--surface); }
.faq__body { position: absolute; left: 0; right: 0; top: 106px; bottom: 24px; background: var(--surface); border-radius: 3px; }
.faq__icon { position: absolute; left: 15px; top: 3.5px; width: 46.7px; height: 46.7px; }
.faq__title { position: absolute; left: 67px; top: 16px; height: 24px; margin: 0; display: flex; align-items: center; font-weight: 500; font-size: 48px; line-height: 1.2; letter-spacing: .15em; color: var(--surface); }
.faq__deco { position: absolute; left: 325px; top: 0; width: 209px; height: 40.8px; }
.faq__q { position: absolute; left: 38px; top: 67px; width: 469px; margin: 0; font-weight: 500; font-size: 24px; line-height: 1.2; letter-spacing: .15em; color: var(--surface); }
.faq__a { position: absolute; left: 41px; top: 126px; width: 463px; height: 207px; overflow: auto; margin: 0; font-size: 20px; line-height: 1.5; letter-spacing: .15em; color: var(--dark-gray); text-align: justify; scrollbar-width: none; }
.faq__a::-webkit-scrollbar { display: none; }
.faq__player { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; }
.faq__btn { position: absolute; top: 2px; width: 20px; height: 20px; display: grid; place-items: center; }
.faq__btn--play { left: 14px; }
.faq__btn--play img { width: 20px; height: 19px; }
.faq__btn--pause { left: 36px; }
.faq__pauseicon { display: inline-flex; gap: 3px; }
.faq__pauseicon i { display: block; width: 3.5px; height: 13px; background: var(--surface); }
.faq.is-playing .faq__btn--play { opacity: .5; }
.faq:not(.is-playing) .faq__btn--pause { opacity: .5; }
/* scrubbable progress bar: drag the thumb or press anywhere on the bar */
.faq__track {
  position: absolute; left: 139px; width: 320px; top: 10px; height: 4px;
  background: rgba(217, 217, 217, .35); border-radius: 2px;
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; outline: none;
}
.faq__track::before { content: ""; position: absolute; left: -10px; right: -10px; top: -10px; bottom: -10px; } /* bigger hit area */
.faq__track:focus-visible { box-shadow: 0 0 0 3px rgba(217, 217, 217, .6); }
.faq__fill { position: absolute; left: 0; top: 0; height: 4px; background: #d9d9d9; border-radius: 2px; pointer-events: none; }
.faq__dot {
  position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%;
  background: #d9d9d9; pointer-events: none;
}
.faq__thumb {
  position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px rgba(53, 26, 211, .35); pointer-events: none;
  transition: transform .15s;
}
.faq__track:hover .faq__thumb, .faq.is-scrubbing .faq__thumb { transform: scale(1.3); }
.faq.is-scrubbing .faq__track { cursor: grabbing; }
/* glide only on discrete jumps (release, keys, next question); follow the
   finger / playhead exactly otherwise */
.faq__track.is-snapping .faq__fill { transition: width .3s ease; }
.faq__track.is-snapping .faq__thumb { transition: left .3s ease, transform .15s; }

/* ---------- merch carousel ---------- */
.merch { position: relative; width: 294px; height: 356px; flex: none; }
.merch__card { position: absolute; left: 42px; top: 0; width: 210px; height: 356px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.merch__img { width: 180px; height: 225px; object-fit: cover; border-radius: 3px; }
.merch__name { width: 180px; font-size: 24px; line-height: 1.5; letter-spacing: .15em; color: var(--gray); }
.merch__price { width: 180px; font-size: 24px; line-height: 1.2; letter-spacing: .15em; color: var(--gray); text-align: right; }
.merch__btn { position: absolute; top: 171px; width: 28px; height: 28px; }
.merch__btn img { width: 28px; height: 28px; }
.merch__btn--prev { left: 0; }
.merch__btn--prev img { transform: scaleX(-1); }
.merch__btn--next { right: 0; }

/* ---------- podcast: full row under FAQ + merch, same width as that row ---------- */
.podcast { width: 1000px; max-width: calc(100% - 2 * var(--gutter)); margin: 0 auto; }
.podcast iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; }

footer { margin-top: 254px; }

@media (max-width: 1100px) {
  :root { --gutter: 24px; }
  .hero { height: auto; padding: 120px 0 0; }
  .banners { position: static; height: auto; }
  .banners img { height: auto; aspect-ratio: 4 / 5; }
  .fest-info { flex-direction: column; align-items: flex-start; gap: 40px; }
  .fest-info__mid, .fest-info__left { width: 100%; }
  .fest-info__right { flex-direction: row; flex-wrap: wrap; gap: 32px; }
  .trailer__frame { height: auto; aspect-ratio: 16 / 9; }
  .faq-merch { flex-direction: column; align-items: center; gap: 48px; }
  .faq { max-width: 100%; }
  .contact { width: 100%; }
  footer, .film + footer { margin-top: 48px; }
}
