/* ============================================================================
   Videos (videos.html). Page-local styles. Shared tokens/components: forge.css.
   Grammar: gallery / catalog (museum labels). Anchors: hero bottom-left over the
   particle film, programme head split, grid asymmetric (8 + 4 + 4, then rows),
   close as the last row of the programme. Signature: the "lights down" theatre.
   The hero and the theatre are always-dark film scenes: their ink is hard-coded.
   ========================================================================== */

/* ---------------------------------------------------------------- hero -- */
.vhero {
  position: relative; min-height: 600px; height: 92vh; height: 92svh; max-height: 980px; overflow: hidden; isolation: isolate;
  background: #05040a; color-scheme: dark;
  --ink: #efecf7; --ink-2: #c9c4dc; --ink-3: #9d98b6; --line-2: rgb(239 236 247 / 0.18);
  --glass: rgb(19 17 31 / 0.55); --accent-text: #a396ff; color: var(--ink);
}
.vhero__film { position: absolute; inset: 0; z-index: 0; background: #05040a; }
.vhero__film > img, .vhero__film > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.vhero__scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(85% 75% at 0% 100%, rgb(5 4 10 / 0.94) 0%, rgb(5 4 10 / 0.82) 38%, rgb(5 4 10 / 0.35) 62%, rgb(5 4 10 / 0) 78%),
    linear-gradient(180deg, rgb(5 4 10 / 0.7) 0, rgb(5 4 10 / 0) 130px),
    linear-gradient(0deg, rgb(5 4 10 / 0.75) 0%, rgb(5 4 10 / 0) 24%); }
.vhero__copy { position: absolute; left: 0; right: 0; bottom: clamp(3rem, 9vh, 6.5rem); z-index: 2; }
.vhero__copy .d-hero { color: var(--ink); font-size: clamp(3rem, 1.2rem + 7vw, 8.25rem); }
.vhero__copy .lede { margin-top: var(--s-5); max-width: 40ch; color: var(--ink-2); }
.vhero__copy .btn-row { margin-top: var(--s-6); }
.vhero .btn--primary .i { width: 0.95em; height: 0.95em; }
/* the hero hands over to the page ground with a hard edge in light mode, and a dissolve in dark */
.vhero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgb(239 236 247 / 0.08); z-index: 3; }

/* ----------------------------------------------------------- programme -- */
.programme { padding: var(--section) 0; }
.programme__head { display: flex; justify-content: space-between; align-items: end; gap: var(--s-6); flex-wrap: wrap; margin-bottom: var(--s-7); }
.programme__filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: none; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color var(--d-1) var(--ease-out), color var(--d-1) var(--ease-out), border-color var(--d-1) var(--ease-out), transform var(--d-1) var(--ease-out); }
.pill:active { transform: scale(0.97); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pill[aria-pressed="false"]:hover { color: var(--ink); border-color: var(--ink-3); } }

.reel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 1.6vw, 24px); }
.reel > .tile { grid-column: span 12; }
.reel-plain { display: grid; gap: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-5); }
.reel-plain b { display: block; color: var(--ink); }

/* the tile: the round-3 card. Moving picture on top, a label under it, the action pinned to the
   bottom so every tile in a row ends on the same line. The whole card lifts on hover. */
.tile { position: relative; min-width: 0; display: flex; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e1), var(--edge); overflow: hidden; isolation: isolate;
  transition: transform var(--d-3) var(--ease-out), box-shadow var(--d-3) var(--ease-out), border-color var(--d-3) var(--ease-out); }
.tile.is-enter { animation: tile-in 520ms var(--ease-out) both; animation-delay: var(--delay, 0ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(12px); } }
.tile__open { all: unset; box-sizing: border-box; display: flex; flex-direction: column; flex: 1; width: 100%; min-height: 100%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tile__media { position: relative; display: block; flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0a14; }
.tile__media::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; z-index: 1; pointer-events: none; background: linear-gradient(0deg, color-mix(in oklab, var(--surface) 55%, transparent), transparent); }
.tile__media .vid { position: absolute; inset: 0; background: #0b0a14; }
.tile__media .vid > img, .tile__media .vid > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out), opacity var(--d-4) var(--ease-out); }
.tile__open:focus-visible { outline: none; }
.tile:has(.tile__open:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.tile__play { position: absolute; right: 16px; top: 16px; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: rgb(10 9 18 / 0.55); color: #fff; border: 1px solid rgb(255 255 255 / 0.22); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  transition: transform var(--d-2) var(--ease-out), background-color var(--d-2) var(--ease-out); }
.tile__play .i { width: 18px; height: 18px; margin-left: 2px; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--e3), var(--edge); }
  .tile__open:hover .tile__media .vid > img, .tile__open:hover .tile__media .vid > video { transform: scale(1.04); }
  .tile__open:hover .tile__play { transform: scale(1.08); background: var(--accent); border-color: transparent; }
  .tile__open:hover .tile__go .i { transform: translateX(3px); }
}
.tile:active { transform: scale(0.99); }

.tile__label { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: var(--s-5) clamp(1.25rem, 0.9rem + 1vw, 1.75rem) clamp(1.25rem, 0.9rem + 1vw, 1.75rem); }
.tile__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.tile__cat { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--accent-text); }
.tile__status.chip { height: 22px; font-size: 0.6875rem; }
.tile__title { font-family: var(--f-display); font-weight: 580; font-size: var(--t-xl); line-height: 1.12; letter-spacing: -0.022em; color: var(--ink); text-wrap: balance; }
.tile__desc { font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2); max-width: 52ch; text-wrap: pretty; }
.tile__go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: var(--s-3); font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.tile__go .i { width: 16px; height: 16px; color: var(--accent-text); transition: transform var(--d-2) var(--ease-out); }

/* the feature: the first slot, its preview runs while it is in view, the label sits on the film */
.tile--feature { background: #0b0a14; border-color: rgb(239 236 247 / 0.1); }
.tile--feature .tile__media { aspect-ratio: 16 / 9; }
.tile--feature .tile__play { right: 22px; top: 22px; width: 64px; height: 64px; background: var(--accent); border-color: transparent; }
.tile--feature .tile__play .i { width: 22px; height: 22px; }
.tile--feature .tile__label { position: absolute; left: 0; bottom: 0; z-index: 2; max-width: min(600px, 100%); padding: clamp(20px, 2.6vw, 40px); color: #efecf7; pointer-events: none;
  --ink: #efecf7; --ink-2: #cdc8de; --ink-3: #aaa5c2; --accent-text: #b7adff; }
.tile--feature .tile__media::after { inset: 0; height: auto; background: radial-gradient(120% 85% at 0% 100%, rgb(5 4 10 / 0.9) 0%, rgb(5 4 10 / 0.55) 40%, rgb(5 4 10 / 0) 68%); }
.tile--feature .tile__title { font-size: clamp(1.75rem, 1rem + 2.2vw, 3rem); line-height: 1.04; letter-spacing: -0.032em; font-weight: 620; }
.tile--feature .tile__desc { font-size: var(--t-base); }
.tile--feature .tile__status.chip { background: rgb(239 236 247 / 0.14); color: #efecf7; }
.tile--feature .tile__meta { justify-content: flex-start; }
.tile--feature .tile__go { color: #efecf7; }
.tile--tall { min-height: 460px; }
.tile--tall .tile__open { position: absolute; inset: 0; }
.tile--tall .tile__media { aspect-ratio: auto; height: 100%; }

/* a lone tile at the end of a row: picture left, label right */
.tile--wide .tile__open { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
.tile--wide .tile__media::after { inset: 0 0 0 auto; width: 30%; height: auto; background: linear-gradient(270deg, color-mix(in oklab, var(--surface) 55%, transparent), transparent); }
.tile--wide .tile__label { justify-content: center; padding: clamp(1.5rem, 1rem + 2vw, 3rem); }
.tile--wide .tile__go { margin-top: var(--s-3); }
.tile--wide .tile__title { font-size: var(--t-2xl); line-height: 1.06; }
.tile--wide .tile__desc { font-size: var(--t-base); }

.vid--still > img { object-position: 50% 40%; }


/* ------------------------------------------------------------- theatre -- */
.theatre { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; color: #efecf7; color-scheme: dark;
  --ink: #efecf7; --ink-2: #c9c4dc; --ink-3: #9d98b6; --line: rgb(239 236 247 / 0.1); --line-2: rgb(239 236 247 / 0.2);
  --glass: rgb(19 17 31 / 0.6); --accent: #6652f5; --accent-text: #a396ff; }
.theatre__dim { position: absolute; inset: 0; background: rgb(5 4 10 / 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--d-3) var(--ease-out); }
.theatre.is-on .theatre__dim { opacity: 1; }
.theatre__body { position: relative; z-index: 1; width: min(1180px, 92vw, calc((100svh - 230px) * 16 / 9)); display: grid; gap: var(--s-4); }
.theatre__top, .theatre__caption { opacity: 0; transform: translateY(6px); transition: opacity var(--d-3) var(--ease-out), transform var(--d-3) var(--ease-out); }
.theatre.is-on .theatre__top { opacity: 1; transform: none; transition-delay: 160ms; }
.theatre.is-mounted .theatre__caption { opacity: 1; transform: none; }
.theatre__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.theatre__cat { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.theatre__close { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: rgb(255 255 255 / 0.04); color: var(--ink); font-size: var(--t-sm); font-weight: 600; transition: background-color var(--d-1) var(--ease-out), transform var(--d-1) var(--ease-out); }
.theatre__close .i { width: 18px; height: 18px; }
.theatre__close:hover { background: rgb(255 255 255 / 0.1); }
.theatre__close:active { transform: scale(0.97); }
.theatre__stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.8); opacity: 0; transition: opacity var(--d-2) var(--ease-out); }
.theatre.is-mounted .theatre__stage { opacity: 1; }
.theatre__stage > iframe, .theatre__stage > video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.theatre__caption { display: flex; justify-content: space-between; align-items: start; gap: var(--s-6); }
.theatre__title { font-family: var(--f-display); font-weight: 600; font-size: var(--t-xl); line-height: 1.12; letter-spacing: -0.03em; color: var(--ink); }
.theatre__desc { margin-top: 6px; max-width: 62ch; font-size: var(--t-sm); color: var(--ink-2); }
.theatre__nav { display: flex; align-items: center; gap: 10px; flex: none; }
.theatre__pos { max-width: 22ch; font-size: 0.8125rem; color: var(--ink-3); text-align: right; order: -1; }
.theatre__step { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: none; color: var(--ink); transition: background-color var(--d-1) var(--ease-out), transform var(--d-1) var(--ease-out); }
.theatre__step:hover { background: rgb(255 255 255 / 0.08); }
.theatre__step:active { transform: scale(0.95); }
.theatre__step[data-t-prev] .i { transform: rotate(180deg); }
.theatre :focus-visible { outline: 2px solid #a396ff; outline-offset: 3px; }
.theatre__fly { position: fixed; z-index: 2; overflow: hidden; border-radius: var(--r-lg); pointer-events: none; opacity: 0; will-change: transform; }
.theatre__fly img { width: 100%; height: 100%; object-fit: cover; }
.theatre__fly.is-flying { transition: transform var(--d-3) var(--ease-out); }
body.theatre-open .chat-fab { opacity: 0; pointer-events: none; }

/* coming soon: the preview loops behind the card */
.soon__film { position: absolute; inset: 0; }
.soon__film > img, .soon__film > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soon__film > video { opacity: 0; transition: opacity var(--d-4) var(--ease-out); }
.soon__film.is-playing > video { opacity: 1; }
.soon__film::after { content: ""; position: absolute; inset: 0; background: radial-gradient(130% 110% at 0% 100%, rgb(5 4 10 / 0.94) 0%, rgb(5 4 10 / 0.78) 42%, rgb(5 4 10 / 0) 74%); }
.soon__card { position: absolute; left: clamp(16px, 3vw, 36px); bottom: clamp(16px, 3vw, 36px); z-index: 2; max-width: 440px; display: grid; gap: 10px; justify-items: start; }
.soon__chip.chip { background: rgb(239 236 247 / 0.14); color: #efecf7; }
.soon__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.375rem, 1rem + 1.4vw, 2.25rem); line-height: 1.04; letter-spacing: -0.035em; color: #fff; }
.soon__p { font-size: var(--t-sm); color: #cdc8de; max-width: 40ch; }
.soon__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* -------------------------------------------------------------- phones -- */
@media (max-width: 760px) {
  .vhero { height: 86svh; min-height: 560px; }
  .vhero__film > img, .vhero__film > video { object-position: 72% 50%; }
  .vhero__scrim { background: linear-gradient(0deg, rgb(5 4 10 / 0.94) 0%, rgb(5 4 10 / 0.72) 40%, rgb(5 4 10 / 0) 72%); }
  .vhero__copy { bottom: 2.5rem; }
  .vhero__copy .d-hero { font-size: clamp(2.9rem, 14vw, 4rem); }
  .vhero__copy .lede { font-size: var(--t-base); margin-top: var(--s-4); }
  .vhero__copy .btn--lg { --h: 50px; padding: 0 1.1em; font-size: var(--t-sm); }
  .programme__filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; }
  .programme__filters::-webkit-scrollbar { display: none; }
  .tile__media { aspect-ratio: 16 / 9; }
  .tile--feature .tile__label { position: relative; padding: var(--s-5); max-width: none; pointer-events: none; }
  .tile--feature .tile__media::after { inset: auto 0 0; height: 40%; background: linear-gradient(0deg, #0b0a14, transparent); }
  .tile--feature .tile__meta { justify-content: space-between; }
  .tile--feature .tile__play { width: 52px; height: 52px; right: 14px; top: 14px; }
  .theatre { place-items: center; padding: 0 var(--gutter); }
  .theatre__body { width: 100%; }
  .theatre__caption { flex-direction: column; gap: var(--s-4); }
  .theatre__nav { width: 100%; justify-content: space-between; }
  .theatre__pos { order: 0; flex: 1; text-align: center; }
  .theatre__stage.is-soon { aspect-ratio: auto; display: grid; background: #0b0a14; }
  .theatre__stage.is-soon .soon__film { position: relative; aspect-ratio: 16 / 9; }
  .theatre__stage.is-soon .soon__film::after { display: none; }
  .theatre__stage.is-soon .soon__card { position: static; padding: var(--s-5) var(--s-4); max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tile.is-enter { animation: none; }
  .theatre__dim, .theatre__top, .theatre__caption, .theatre__stage { transition-duration: 1ms !important; transition-delay: 0s !important; transform: none !important; }
  .tile, .tile__media .vid > img { transition-duration: 1ms; }
  .tile:hover { transform: none !important; }
}

/* light theme: the tile frames sit on paper-light ground, so their fill matches it */
:root[data-theme="light"] .tile:not(.tile--feature) .tile__media, :root[data-theme="light"] .tile:not(.tile--feature) .tile__media .vid { background: var(--surface-2); }

/* light theme: until the nav turns solid it floats over the always-dark film, so it keeps light ink */
:root[data-theme="light"] body[data-page="videos"] .nav:not(.is-solid):not(.is-open) :is(.nav__brand, .nav__link, .nav__login, .nav__icon) { color: #efecf7; }
:root[data-theme="light"] body[data-page="videos"] .nav:not(.is-solid):not(.is-open) .nav__link[aria-current="page"] { background: rgb(239 236 247 / 0.12); }
:root[data-theme="light"] body[data-page="videos"] .nav:not(.is-solid):not(.is-open) .mark { color: #a396ff; }

/* close band */
.vclose .film__copy > * { max-width: 34rem; }
.vclose .film__copy > .d-1 { max-width: none; }
.vclose .btn-row { margin-top: var(--s-6); }
.vclose .film__media > img, .vclose .film__media > video { object-position: 60% 35%; }
