/* ==========================================================================
   v9 · Media: contained film with chapters, filterable gallery,
   lightbox, brand kit, social cards.
   ========================================================================== */

/* ---------- film ---------- */
.film__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.film__p { margin-top: 18px; color: var(--ink-2); font-weight: 300; font-size: 1.12rem; line-height: 1.65; max-width: 46ch; }
.film__chh { margin-top: 34px; font-weight: 700; font-size: .78rem; letter-spacing: .12em; color: var(--ink-3); }
.chapters { display: grid; margin-top: 10px; border-top: 1px solid var(--line); }
.chapter { width: 100%; display: grid; grid-template-columns: 96px auto 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: start; transition: background .3s; }
.chapter:hover { background: var(--tint); }
.chapter__thumb { position: relative; width: 96px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--dark); }
.chapter__thumb img, .chapter__thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chapter__thumb video { opacity: 0; transition: opacity .4s; }
.chapter.is-previewing .chapter__thumb video { opacity: 1; }
.chapter__n { font-weight: 300; color: var(--ink-3); font-size: .9rem; }
.chapter__t { font-weight: 700; font-size: 1.08rem; }
.chapter__time { color: var(--accent); font-weight: 700; font-size: .9rem; padding-inline-end: 8px; }
.player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--dark); color: #fff; box-shadow: 0 50px 90px -50px rgba(6, 21, 49, .7); }
.player__loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.player:hover .player__loop { transform: scale(1.04); }
.player__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 21, 49, .1), rgba(6, 21, 49, .55)); }
.player__orb { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: clamp(76px, 8vw, 104px); aspect-ratio: 1; margin: calc(clamp(76px, 8vw, 104px) / -2) 0 0 calc(clamp(76px, 8vw, 104px) / -2); border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .6s var(--ease-out), background .4s; }
.player__orb::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); animation: orb 2.6s var(--ease-out) infinite; }
@keyframes orb { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.player__orb .ic { margin-left: 4px; fill: #fff; }
.player:hover .player__orb { transform: scale(1.08); background: rgba(255, 255, 255, .26); }
.player__label { position: absolute; bottom: 22px; inset-inline-start: 24px; font-weight: 700; font-size: 1.1rem; }
.player__len { position: absolute; bottom: 20px; inset-inline-end: 22px; padding: 6px 12px; border-radius: var(--pill); background: rgba(6, 21, 49, .6); font-weight: 700; font-size: .85rem; }

/* ---------- gallery ---------- */
.gtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 36px); }
.gtabs__tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--pill); border: 1px solid rgba(11, 27, 51, .14); background: #fff; color: var(--ink-2); font-weight: 600; transition: all .3s; }
.gtabs__tab small { color: var(--ink-3); font-size: .78rem; }
.gtabs__tab:hover { border-color: var(--navy); color: var(--ink); }
.gtabs__tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.gtabs__tab.is-active small { color: rgba(255, 255, 255, .7); }
.ggrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 15vw, 230px); grid-auto-flow: dense; gap: clamp(8px, 1vw, 14px); }
.gitem { position: relative; margin: 0; overflow: hidden; background: #DCE2EA; }
.gitem--wide { grid-column: span 2; }
.gitem--tall { grid-row: span 2; }
.gitem.is-hidden { display: none; }
.gitem button { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.gitem:hover img { transform: scale(1.06); }
.gitem figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 30px 16px 12px; background: linear-gradient(180deg, transparent, rgba(6, 21, 49, .78)); color: #fff; font-size: .9rem; font-weight: 600; transform: translateY(100%); transition: transform .5s var(--ease-out); pointer-events: none; }
.gitem:hover figcaption, .gitem:focus-within figcaption { transform: none; }
.gitem__zoom { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--navy); opacity: 0; transform: scale(.8); transition: all .4s var(--ease-out); }
.gitem:hover .gitem__zoom { opacity: 1; transform: none; }
.gitem.is-entering { animation: g-in .6s var(--ease-out) both; animation-delay: var(--gd, 0ms); }
@keyframes g-in { from { opacity: 0; transform: scale(.96); } }

/* ---------- lightbox ---------- */
.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(4, 12, 28, .96); color: #fff; }
.lb::backdrop { background: rgba(4, 12, 28, .7); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; animation: lb-in .4s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } }
.lb__stage { display: grid; place-items: center; padding: clamp(56px, 6vw, 80px) clamp(16px, 8vw, 120px) 12px; min-height: 0; }
.lb__img, .lb__video { max-width: 100%; max-height: 100%; object-fit: contain; animation: lb-zoom .5s var(--ease-out); }
.lb__video { width: min(1200px, 100%); aspect-ratio: 16 / 9; background: #000; }
@keyframes lb-zoom { from { opacity: 0; transform: scale(.97); } }
.lb__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(16px, 8vw, 120px) 22px; }
.lb__cap strong { display: block; font-weight: 700; }
.lb__cap small { color: rgba(255, 255, 255, .6); }
.lb__count { color: rgba(255, 255, 255, .6); }
.lb__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; transition: background .3s; }
.lb__btn:hover { background: rgba(255, 255, 255, .22); }
.lb__close { top: 16px; inset-inline-end: 16px; }
.lb__prev { top: 50%; inset-inline-start: 16px; margin-top: -26px; }
.lb__next { top: 50%; inset-inline-end: 16px; margin-top: -26px; }
.lb.is-video .lb__prev, .lb.is-video .lb__next, .lb.is-video .lb__count { display: none; }

/* ---------- brand kit ---------- */
.kit__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 110px); align-items: center; }
.kit__p { margin-top: 18px; color: var(--ink-2); font-weight: 300; font-size: 1.1rem; line-height: 1.65; max-width: 44ch; }
.kit__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kit__card { border: 1px solid var(--line); background: #fff; transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.kit__card:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -36px rgba(6, 21, 49, .5); }
.kit__preview { display: grid; place-items: center; height: clamp(200px, 19vw, 270px); padding: 10%; overflow: hidden; }
.kit__preview--light { background: #F5F7FA; }
.kit__preview--dark { background: var(--tint); }
.kit__preview img { width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.kit__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--line); }
.kit__foot strong { font-weight: 700; }
.kit__dl { display: flex; gap: 6px; }
.kit__dl a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: var(--pill); border: 1px solid var(--line-strong); font-weight: 700; font-size: .8rem; transition: all .3s; }
.kit__dl a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- social ---------- */
.socialx__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.socialx__card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 22px; border: 1px solid var(--line-dark); background: rgba(255, 255, 255, .03); transition: background .4s, border-color .4s, transform .5s var(--ease-out); }
.socialx__card:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .35); transform: translateY(-3px); }
.socialx__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--dark); }
.socialx__name { font-weight: 700; font-size: 1.1rem; }
.socialx__go { color: rgba(255, 255, 255, .5); transition: transform .4s var(--ease-out), color .3s; }
.socialx__card:hover .socialx__go { color: #fff; transform: translate(-3px, -3px); }

@media (max-width: 1100px) {
	.film__grid, .kit__grid { grid-template-columns: 1fr; }
	.film__player { order: -1; }
	.ggrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
	.ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
	.gitem--tall { grid-row: span 1; }
	.kit__cards { grid-template-columns: 1fr; }
	.chapter { grid-template-columns: 80px auto 1fr auto; }
	.chapter__thumb { width: 80px; }
	.lb__prev, .lb__next { top: auto; bottom: 74px; }
}
