/* ===== LE NINH — tối giản theo tinh thần soares.tv ===== */

:root {
    --bg: #fff;
    --ink: #000;
    --red: #e30613;        /* chữ menu, nút đóng */
    --gray: #777;          /* dòng thông tin nhỏ */
    --soft: #f3f3f3;       /* nền cho ảnh mockup PNG */
    --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --side: 72px;          /* rãnh chứa menu dọc hai bên */
    --gallery-gutter: 0px; /* đổi thành var(--side) nếu muốn ảnh chừa lề cho menu như bản trước */
}
/* ban đêm: nền tối, chữ sáng — logo dùng difference nên tự đảo theo */
:root[data-theme="dark"] {
    --bg: #0b0b0b;
    --ink: #f2f2f2;
    --gray: #8c8c8c;
    --soft: #1a1a1a;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
    margin: 0;
    background: transparent;
    color: var(--ink);
    font: 400 16px/1.4 var(--font);
    font-stretch: 125%;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
/* dự án trong danh sách: không vẽ viền khi được chọn (vd sau khi đóng khung xem) — dùng màu tên thay cho viền */
.item:focus, .item:focus-visible { outline: none; }
.item:focus-visible h2 { color: var(--red); }

/* ---------- Logo uốn sóng: cố định trên đầu, trôi ngang khi cuộn, đảo màu khi đè lên ảnh ---------- */
.top { position: fixed; z-index: 30; inset: 0 0 auto 0; height: 0; mix-blend-mode: difference; pointer-events: none; }   /* cố định, trôi theo khi cuộn — đảo màu khi đè lên ảnh */
.logo-row {
    display: flex; width: 250vw; margin-left: -75vw;
    padding: 72px 0 0; will-change: transform;
}
.logo-row a { flex: 0 0 50vw; display: flex; justify-content: center; pointer-events: auto; }
.logo-row svg { width: max(170px, 15vw); height: auto; overflow: visible; }
.logo-row path { fill: #fff; }   /* trắng + difference = đen trên nền trắng */
/* đang xem video / ảnh: logo nổi lên trên khung xem, vẫn trôi, đảo màu theo hình — không chặn nút bấm */
.viewer-open .top { position: fixed; z-index: 110; }
.viewer-open .logo-row a { pointer-events: none; }
main { padding-top: calc(72px + max(170px, 15vw) * .525 + 40px); }   /* .525 = tỉ lệ cao/rộng của logo */
.info { margin-top: 70px; }   /* trang Info: chữ bắt đầu thấp hơn, không nằm sát dưới LE NINH */

/* ---------- Menu dọc bên trái: Films / Commercial / Info ---------- */
/* menu canh giữa màn hình, không nền — LE NINH trôi qua cột menu bình thường, không bị che */
.nav-left { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--side); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: min(110px, 8vh); padding: 0; pointer-events: none; }   /* cụm 3 mục canh giữa màn hình theo chiều dọc */
.nav-left a {
    pointer-events: auto;
    writing-mode: vertical-rl; transform: rotate(180deg);
    color: var(--ink); font-weight: 900; font-size: 20px; letter-spacing: .02em; text-transform: uppercase;   /* 22px − 10% ≈ 20px */
    transition: color .2s;
}
/* trang đang xem: màu cam đỏ — trang chưa chọn: màu đen */
.nav-left a:hover, .nav-left a[aria-current] { color: var(--red); }

/* ---------- Ngôn ngữ: chỉ hiện tiếng Anh (bản tiếng Việt vẫn giữ trong code, đang ẩn) ---------- */
html[lang="vi"] [data-lang="en"], html:not([lang="vi"]) [data-lang="vi"] { display: none; }
/* ---------- Nút ngày / đêm (góc phải trên) ---------- */
.theme-btn {
    position: fixed; z-index: 60; top: 22px; right: 18px; width: 40px; height: 40px;
    display: grid; place-items: center; border-radius: 50%; color: var(--ink); transition: color .2s, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.theme-btn:hover { color: var(--red); transform: rotate(25deg); }
.theme-btn svg { width: 24px; height: 24px; }
.theme-btn .moon { display: block; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
/* khi trình duyệt không có View Transitions: đổi màu mượt */
:root.theme-fade, :root.theme-fade body, :root.theme-fade .nav-left { transition: background-color .6s ease, color .6s ease; }
/* hiệu ứng vòng tròn lan ra từ nút bấm */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Danh sách phim / commercial ---------- */
.list { padding: 80px 0 80px; display: grid; row-gap: 184px; }
.item { display: grid; grid-template-columns: 50% 1fr; align-items: center; column-gap: 6vw;   /* ảnh rộng đúng nửa trang (không tính thanh cuộn) → mép ảnh trái/phải thẳng hàng */ cursor: pointer; text-align: left; width: 100%; padding: 0 var(--gallery-gutter); }   /* --gallery-gutter: 0 = ảnh sát mép như soares.tv */
.item .frame { aspect-ratio: 734 / 405; overflow: hidden; background: #000; }
.item .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.item .frame.contain { background: var(--soft); }
.item .frame.contain img { object-fit: contain; padding: 4%; }
.item:hover .frame img { transform: scale(1.03); }
.item .txt { padding-right: 2vw; max-width: 33vw; }
/* mục chẵn: chữ bên trái, ảnh sát mép phải */
.item:nth-child(even) { grid-template-columns: 1fr 50%; }
.item:nth-child(even) .frame { order: 2; }
.item:nth-child(even) .txt { order: 1; justify-self: end; width: 100%; max-width: none; padding: 0 0 0 calc(var(--side) - var(--gallery-gutter) + 5vw); }   /* chữ luôn tránh cụm menu */
.item:nth-child(even) .txt > * { max-width: 30vw; }
.item h2 { margin: 0 0 18px; font-weight: 900; font-size: clamp(20px, 2.1vw, 36px); line-height: 1.05; letter-spacing: -.005em; transition: color .2s; }
.item:hover h2 { color: var(--red); }
/* tên phim: tên chính 1 hàng, tên tiếng Anh 1 hàng — không bẻ dòng giữa tên */
.item h2 .t-main, .item h2 .t-en { display: block; white-space: nowrap; }
/* dự án đang phát triển: không bấm được */
.item.is-soon { cursor: default; }
.item.is-soon:hover h2 { color: inherit; }
.item.is-soon:hover .frame img { transform: none; }
.item p { margin: 0; color: var(--gray); font-size: 16px; font-weight: 700; font-stretch: 110%; }
.item .count { color: var(--red); }

/* ---------- Trang Info ---------- */
.info { padding-right: calc(var(--side) + 3vw); padding-bottom: 24px; padding-left: calc(var(--side) + 3vw); }   /* lề trái = lề phải → nội dung nằm giữa trang */
/* ảnh chân dung: cột phải, đỉnh ảnh ngang với tiêu đề các mục (giống soares.tv/about) */
.info .portrait { margin: 0; }
.info .portrait img { display: block; width: 100%; height: auto; }
.info .bio { max-width: none; margin: 0; font-size: clamp(24px, 3.5vw, 54px); line-height: 1.5; font-weight: 400; }
.info .bio em { font-style: italic; }
.info .bio { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }   /* đoạn tiểu sử canh đều 2 bên */
.info .bio a { transition: color .2s; }
.br-m { display: none; }   /* chỉ xuống hàng trên điện thoại */
@media (max-width: 767px) { .br-m { display: inline; } }   /* không gạch chân, chỉ đổi màu khi rê chuột */
.info .bio a:hover { color: var(--red); }
.info .bio + .bio { margin-top: 1em; }
.info-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px 56px;   /* trái: Awards + Contact | giữa: Filmography | phải: ảnh */ margin-top: 170px; padding-top: 60px;   /* đường kẻ thấp xuống, nội dung sát đường kẻ hơn */ border-top: 1px solid var(--ink); align-items: start; font-stretch: 110%; font-size: 13.5px; line-height: 1.45; }
.info-cols h3 { margin: 0 0 14px; font-weight: 900; font-size: 19px; font-stretch: 125%; }   /* tiêu đề: 24px − 20% */
.info-cols ul { list-style: none; margin: 0; padding: 0; }
.info-cols li { margin: 0 0 4px; }
.info-cols a { transition: color .2s; }
.info-cols a:hover { color: var(--red); }
.info-cols .wide { grid-column: auto; }
/* Education + Contact chung một cột, Contact nằm dưới */
.info-cols .stack { display: grid; gap: 48px; align-content: start; }
/* Awards + danh sách dự án: mỗi mục nằm gọn 1 dòng */
.info-cols .sec-awards li, .info-cols .sec-projects li { white-space: nowrap; }
@media (max-width: 1300px) { .info-cols .sec-awards li, .info-cols .sec-projects li { font-stretch: 95%; } }
@media (max-width: 1100px) { .info-cols .sec-awards li, .info-cols .sec-projects li { font-stretch: 82%; } }
.info-cols .sec-projects a { text-decoration: none; }   /* Film (Selected): không gạch chân, vẫn bấm được */
.info-cols .sec-projects a:hover { color: var(--red); }
.info-cols .sec-work a, .info-cols .sec-awards a { text-decoration: none; }   /* chỉ mục Contact mới gạch chân */
.info-cols .sec-work a:hover, .info-cols .sec-awards a:hover { color: var(--red); }
.info-cols .contact a { white-space: nowrap; }
.info-cols .muted { color: var(--gray); }

/* ---------- Footer ---------- */
.foot.on-list { display: none; }
/* trang Info: bản quyền nằm giữa trang, cuối trang (chân trang chung) — bỏ dòng dưới ảnh */
.copy-cap { display: none !important; }
.copy-cap { margin-top: 14px; text-align: center; color: var(--gray); font-size: 17px; font-weight: 700; font-stretch: 110%; }
.foot { padding: 48px var(--side) 36px; color: var(--gray); font-size: 17px; font-weight: 700; font-stretch: 110%; text-align: center; }   /* 13px + 30% */

/* ---------- Màn hình xem video / ảnh ---------- */
/* nền tối mờ phủ lên trang (vẫn thấy trang + menu 2 bên), khung đen ở giữa chừa đúng rãnh menu — như soares.tv */
.viewer { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(0, 0, 0, .62); }
.viewer.is-open { display: block; }
.viewer .body { position: absolute; top: 0; bottom: 0; left: var(--side); right: var(--side); background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* bộ ảnh dự án thương mại: nền theo chế độ — sáng = trắng, tối = đen */
.viewer.is-photo:not(.is-synopsis) { background: var(--bg); }   /* bộ ảnh: 2 mép ngoài cũng đặc (tối = đen, sáng = trắng), không thấy trang phía sau */
.viewer.is-photo:not(.is-synopsis) .body { background: var(--bg); }
.viewer.is-photo:not(.is-synopsis) .cap { color: var(--red); }   /* scope: màu chủ đạo */
.viewer.is-photo:not(.is-synopsis) .counter { color: var(--gray); }
:root:not([data-theme="dark"]) .viewer.is-photo:not(.is-synopsis) .close { background: var(--bg); }
.viewer.is-synopsis .body { background: rgba(0, 0, 0, .9); }   /* dự án đang phát triển: nền đen 90% */
/* tên + thể loại: màu chủ đạo (đỏ cam) — logline 2 thứ tiếng: trắng, chữ thường */
.viewer.is-synopsis .synopsis h2 { color: var(--red); }
.viewer.is-synopsis .synopsis .meta { color: #5f5f5f; }   /* thể loại: xám đậm */
.viewer.is-synopsis .synopsis .langs .en, .viewer.is-synopsis .synopsis .langs .vi { color: #fff; }
.viewer .close {
    position: absolute; top: 16px; right: calc((var(--side) - 40px) / 2); z-index: 2; width: 40px; height: 40px;
    display: grid; place-items: center; background: #000; color: var(--red); font-weight: 900; font-size: 26px; line-height: 1;
}
.viewer .stage { position: relative; width: min(100vw - 2 * var(--side), 100vh * var(--ar, 1.7778)); aspect-ratio: var(--ar, 16 / 9); }
.viewer .stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer .spin { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px; border-radius: 50%; border: 4px solid #333; border-left-color: #fff; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.viewer .photo { max-width: calc(100vw - 2 * var(--side) - 240px);   /* chừa chỗ cho mũi tên 2 bên */ max-height: calc(100vh - 120px); object-fit: contain; }
/* mũi tên chuyển ảnh: tam giác đặc — trượt nhẹ theo hướng khi rê chuột */
.viewer .prev, .viewer .next { position: absolute; top: 50%; transform: translateY(-50%); color: var(--red); padding: 24px 18px; opacity: .85; transition: opacity .25s; }
.viewer .prev:hover, .viewer .next:hover { opacity: 1; }
.viewer .prev svg, .viewer .next svg { display: block; width: 26px; height: 30px; fill: currentColor; stroke: none; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.viewer .prev { left: 6px; }
.viewer .next { right: 6px; }
.viewer .prev svg { transform: scaleX(-1); }
.viewer .prev:hover svg { transform: scaleX(-1) translateX(6px); }
.viewer .next:hover svg { transform: translateX(6px); }
.viewer .counter { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: #8c8c8c; font-size: 13px; font-stretch: 110%; }
.viewer .cap { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 140px); text-align: center; top: 26px; color: #fff; font-weight: 900; font-size: 15px; }
/* tóm tắt dự án: ảnh sát mép trái khung (cao full khung) | tên + 2 cột Anh / Việt ngang hàng bên phải */
.viewer .synopsis { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); align-items: center; color: #fff; }
.viewer .synopsis .thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.viewer .synopsis .txt { padding: 48px clamp(32px, 4.5vw, 72px); max-height: 100%; overflow-y: auto; }
.viewer .synopsis h2 { margin: 0 0 10px; font-weight: 900; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.1; }
.viewer .synopsis h2 span { white-space: nowrap; }
.viewer .synopsis .meta { margin: 0 0 28px; color: #8c8c8c; font-weight: 700; font-size: 15px; font-stretch: 110%; }
.viewer .synopsis .langs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3vw, 48px); max-width: 980px; }
.viewer .synopsis .langs p { margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.55; font-weight: 700; font-stretch: 110%; text-wrap: pretty; }   /* cùng kiểu chữ với dòng thể loại */   /* pretty: không để 1 chữ trơ trọi ở dòng cuối */
.viewer .synopsis .langs .vi { font-style: normal; }   /* tiếng Việt và tiếng Anh cùng kiểu chữ thường */
.viewer .synopsis .langs .en { color: #b5b5b5; }
@media (max-width: 900px) {
    .viewer .synopsis { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; overflow-y: auto; }
    .viewer .synopsis .thumb { height: auto; aspect-ratio: 16 / 9; }
    .viewer .synopsis .txt { padding: 28px 20px 48px; max-height: none; }
}
/* điện thoại: khung tóm tắt full màn hình, chữ to dễ đọc */
@media (max-width: 767px) {
    .viewer.is-synopsis .body { top: 0; bottom: 0; left: 0; right: 0; background: #000; }
    .viewer .synopsis .thumb { aspect-ratio: 4 / 3; }
    .viewer .synopsis .txt { padding: 24px 22px 64px; }
    .viewer .synopsis h2 { font-size: 30px; line-height: 1.1; margin-bottom: 10px; }
    .viewer .synopsis h2 span { white-space: normal; }
    .viewer .synopsis .meta { font-size: 15px; margin-bottom: 22px; }
    .viewer .synopsis .langs { gap: 22px; }
    .viewer .synopsis .langs p { font-size: 18px; line-height: 1.55; }
    .viewer .synopsis .langs { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Điện thoại: giống soares.tv — 1 logo ở giữa, ảnh xếp liền nhau, không chữ ---------- */
@media (max-width: 767px) {
    :root { --side: 0px; }
    /* logo: chỉ 1 chữ ở giữa, nằm yên và cuộn theo trang */
    .top { position: absolute; mix-blend-mode: normal; }
    .viewer-open .top { mix-blend-mode: difference; }
    .viewer-open .logo-row path { fill: #fff; }
    .logo-row path { fill: var(--ink); }
    .logo-row { width: 100%; margin: 0; padding-top: 40px; transform: none !important; }
    .logo-row a { flex: 1 0 100%; }
    .logo-row a:not(:nth-child(3)) { display: none; }
    .logo-row svg { width: 38vw; }
    main { padding-top: calc(40px + 38vw * .525 + 36px); }

    /* menu chữ đỏ dọc hai bên mép, đè lên ảnh */
    /* menu: cả 3 mục xếp dọc ở mép trái, canh giữa màn hình */
    .nav-left { top: 0; bottom: 0; left: 6px; width: 44px; padding: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; }
    .theme-btn { display: none; }   /* điện thoại: luôn tối, không cần nút đổi */
    .nav-left a { font-size: 18px; }   /* 20px − 10% */


    /* ảnh xếp chồng full ngang, cách nhau 2px, không hiện chữ */
    .list { padding: 0; row-gap: 2px; }
    .item, .item:nth-child(even) { display: block; }
    .item .txt { display: none; }
    .item .frame { aspect-ratio: 390 / 220; }
    .item .frame.contain img { padding: 3%; }
    .item:hover .frame img { transform: none; }

    /* Info: chừa lề hai bên cho chữ menu */
    .info { margin-top: 0; padding-left: 62px; padding-right: 46px; padding-bottom: 16px; }   /* sát menu hơn, gần giữa trang */
    .info .bio { font-size: 16px; line-height: 1.4; }
    .info .bio + .bio { margin-top: .8em; }
    .info-cols { grid-template-columns: 1fr; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ink); gap: 36px; font-size: 15px; line-height: 1.45; padding-top: 40px; }   /* điện thoại: chữ Awards / Filmography / Contact to hơn */
    .info-cols h3 { font-size: 19px; margin-bottom: 10px; }
    .info-cols li { margin-bottom: 4px; }
    .info-cols .wide { grid-column: auto; }
    /* điện thoại: Worked with → Awards → Education → Contact → ảnh */
    .info-cols .stack { display: contents; }
    .info-cols .sec-awards { order: 1; }   /* điện thoại: ảnh → Awards → Filmography → Contact */
    .info-cols .sec-projects { order: 2; }
    .info-cols .sec-contact { order: 3; }
    .info-cols .portrait { order: 0; }   /* ảnh ngay dưới đoạn mô tả */
    /* Awards: mỗi giải nằm gọn 1 dòng — chữ hẹp lại và co theo bề ngang màn hình */
    /* Awards: tên cuộc thi 1 hàng, tên giải xuống hàng bên dưới */
    .info-cols .sec-awards .aw { display: inline; }   /* tạm cho chung hàng hết để kiểm tra chỗ rớt chữ (đổi lại block = tên giải xuống hàng) */
    /* Awards + Filmography: cùng kiểu chữ với Contact, dòng dài thì xuống hàng */
    .info-cols .sec-awards li, .info-cols .sec-projects li { white-space: normal; font-stretch: inherit; font-size: inherit; letter-spacing: normal; margin-bottom: 6px; }
    .info-cols .contact a { white-space: normal; }

    .foot { padding: 40px 16px 32px; }
    .foot.on-list { display: block; }
    /* điện thoại: ảnh nằm trên cùng nên bản quyền về lại cuối trang */
    .foot.on-info { display: block; }
    .copy-cap { display: none; }
    .viewer .stage { width: min(100vw, 100vh * var(--ar, 1.7778)); }
    .viewer .close { right: 10px; top: 10px; }
    .viewer.is-portrait .stage { width: min(100vw - 32px, (100vh - 120px) * var(--ar)); }
    .viewer .photo { max-width: 100vw; max-height: calc(100vh - 160px); }
    /* điện thoại: mũi tên to, nằm giữa 2 bên mép, vùng bấm rộng */
    .viewer .prev, .viewer .next { top: 50%; bottom: auto; transform: translateY(-50%); padding: 22px 10px; z-index: 3; }
    .viewer .prev svg, .viewer .next svg { width: 28px; height: 34px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
    .viewer .prev { left: 0; }
    .viewer .next { right: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0s !important; } }

/* ---------- Hiệu ứng mở đầu: cả trang trôi lên từ đáy màn hình ---------- */
/* lần đầu vào: logo + menu + nội dung nằm dưới đáy, rồi cùng trôi lên vào chỗ */
.intro-long body { opacity: 0; }
.intro-long .nav-left, .intro-long main, .intro-long .foot { transform: translateY(100vh); }
/* logo: không chờ cả trang — hiện ngay, trôi xuống nhẹ từ trên vào chỗ */
.intro-long .top { transform: translateY(-24px); opacity: 0; }
.intro-long.intro-go body { opacity: 1; transition: opacity .6s ease-out; }
.intro-long.intro-go .top { transform: none; opacity: 1; transition: transform .9s cubic-bezier(.16, 1, .3, 1), opacity .6s ease-out; }
.intro-long.intro-go .nav-left, .intro-long.intro-go main, .intro-long.intro-go .foot {
    transform: none; transition: transform 2.4s cubic-bezier(.22, .61, .36, 1) .3s;
}
/* chuyển trang trong web: nội dung trôi lên nhẹ, logo giữ nguyên chỗ */
.intro-short body { opacity: 0; }
.intro-short .nav-left, .intro-short main { transform: translateY(60px); }
.intro-short.intro-go body { opacity: 1; transition: opacity .4s ease-out; }
.intro-short.intro-go .nav-left, .intro-short.intro-go main { transform: none; transition: transform 1s cubic-bezier(.16, 1, .3, 1); }
