:root {
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mute: rgba(255, 255, 255, .55);
  --ease: cubic-bezier(.65, 0, .35, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; }
/* Trang không cuộn: credits chạy trong khung riêng */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html { background: #000; }
body { font-family: var(--font); color: #fff; background: #000; }
::selection { background: #fff; color: #000; }

/* ================= NỀN: video toàn màn hình của dự án đang chiếu ================= */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.slide.on { opacity: 1; }
.slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Ô tượng trưng khi chưa có video: số thứ tự thật lớn */
.slide.ph { background: #0c0c0c; display: grid; place-items: center; }
.slide.ph svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke: rgba(255,255,255,.07); fill: none; }
.slide.ph .big {
  font-size: min(62vw, 92vh); font-weight: 700; line-height: 1; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.42);
  transform: scale(1.06); transition: transform 3s linear;
}
.slide.ph.on .big { transform: scale(1); }
/* Lớp tối giữa màn hình để chữ trắng luôn đọc được */
.shade {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.15), rgba(0,0,0,.55) 35%, rgba(0,0,0,.55) 65%, rgba(0,0,0,.15)),
    linear-gradient(rgba(0,0,0,.6), transparent 22%, transparent 78%, rgba(0,0,0,.7));
}

/* ================= ĐẦU TRANG ================= */
.back {
  position: fixed; top: clamp(18px, 3vh, 30px); left: clamp(18px, 3vw, 40px); z-index: 20;
  font: 600 13px/1 var(--font); letter-spacing: .26em; color: #fff; text-decoration: none; padding: 6px 0;
}
.back:hover { opacity: .7; }
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  text-align: center; padding-top: clamp(20px, 4vh, 40px); pointer-events: none;
}
header > * { pointer-events: auto; }
.name { display: inline-block; font-weight: 700; font-size: clamp(16px, 2vw, 24px); letter-spacing: .14em; color: #fff; text-decoration: none; }
.roles { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(16px, 4vw, 56px); margin-top: 16px; }
.roles a {
  font-size: 12px; font-weight: 600; letter-spacing: .28em; color: var(--mute); text-decoration: none;
  padding-bottom: 5px; border-bottom: 1px solid transparent; transition: color .25s, border-color .25s;
}
.roles a:hover { color: #fff; }
.roles a[aria-current="page"] { color: #fff; border-color: #fff; }

/* ================= CREDITS ROLL ================= */
/* Khung credits: nằm dưới menu, trên thanh điều khiển.
   Chữ hiện dần ở mép dưới, mờ dần rồi biến mất ở mép trên → không bao giờ đè lên menu. */
.window {
  position: fixed; left: 0; right: 0; z-index: 2;
  top: var(--win-top, 24vh); bottom: 80px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  touch-action: none;
}
.roll {
  position: absolute; left: 0; right: 0; top: 0;
  text-align: center; padding: 0 24px;
  will-change: transform; transition: opacity .6s var(--ease);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.section { margin-bottom: 4vh; }
.section > h2 {
  display: inline-block;
  font-size: clamp(13px, 1.3vw, 16px); font-weight: 700; letter-spacing: .5em;
  padding: 0 0 12px .5em; margin-bottom: 2vh;
  border-bottom: 1px solid rgba(255,255,255,.5);
}
.item {
  display: block; width: min(640px, 100%); margin: 0 auto;
  padding: 1.4vh 0; background: none; border: 0; color: inherit; cursor: pointer;
  opacity: .38; transition: opacity .6s var(--ease), transform .6s var(--ease);
  transform: scale(.96);
}
.item.on { opacity: 1; transform: none; }
.item:hover { opacity: .8; }
.item.on:hover { opacity: 1; }
.item:focus-visible { outline: 1px solid #fff; outline-offset: 8px; }
/* Giãn chữ giống tiêu đề 3 mục; padding-left bù khoảng giãn ở cuối để chữ nằm đúng giữa */
.item .pname { display: block; font-size: 16px; font-weight: 700; letter-spacing: .4em; padding-left: .4em; word-spacing: -.3em; text-transform: uppercase; line-height: 1.5; }
.item .role { display: block; margin-top: 8px; font-size: 9.5px; font-weight: 600; letter-spacing: .4em; padding-left: .4em; text-transform: uppercase; color: var(--mute); }
.item .who { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; letter-spacing: .3em; padding-left: .3em; }
/* Trang gọn (Editor): chỉ tên mục + tên phim, không gạch dưới tiêu đề mục, các dòng sát nhau hơn,
   chuyển video cắt thẳng (không mờ dần) */
.minimal .slide { transition: none; }
.minimal .section { margin-bottom: 3vh; }
/* Tên mục: Oswald (chữ đứng, hẹp) */
.minimal .section > h2 {
  border-bottom: 0; padding-bottom: 0; margin-bottom: 0; line-height: 1.1;
  font-family: 'Oswald', var(--font); font-weight: 500; font-size: clamp(13px, 1.2vw, 15px); letter-spacing: .45em;
}
.minimal .item { padding: .5vh 0; }
.minimal .section > h2 + .item { padding-top: 0; }   /* tên phim đầu tiên sát ngay dưới tên mục */
/* Tên phim: Cormorant Garamond (chữ có chân, kiểu credits điện ảnh), nhỏ hơn */
.minimal .item .pname {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600;
  font-size: 13px; letter-spacing: .22em; padding-left: .22em; word-spacing: 0;
}
/* Khung credits ngắn lại, nằm giữa màn hình: chữ hiện ra và biến mất quanh khoảng giữa */
.minimal .window { top: max(var(--win-top, 0px), 32vh); bottom: 32vh; }
/* Mỗi bản danh sách giữ trọn margin bên trong → các vòng nối khít nhau */
#sections, .loop-copy { display: flow-root; }

/* ================= THANH ĐIỀU KHIỂN DƯỚI ================= */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: 18px clamp(18px, 3vw, 40px) 26px;
  pointer-events: none;
}
.now { font-size: 11px; font-weight: 600; letter-spacing: .24em; padding-left: .24em; white-space: nowrap; text-align: center; }
.now span { color: var(--mute); margin-left: 8px; }
.progress { flex: 1; height: 2px; background: rgba(255,255,255,.22); position: relative; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; }
.progress.demo i { animation: clip 3s linear; }
@keyframes clip { from { width: 0; } to { width: 100%; } }
.progress, .sec { display: none; }   /* tắt thanh thời gian; xoá dòng này để hiện lại */
.sec { font-size: 11px; letter-spacing: .16em; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 560px) { .now span { display: none; } }

/* ================= CHƯA CÓ SẢN PHẨM ================= */
.empty-note {
  position: fixed; inset: 0; z-index: 5;
  display: grid; place-items: center; pointer-events: none;
  font-size: 12px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  color: var(--mute);
}
