/* Full-bleed film sections (story film + app showcase).
   The frame opens from an inset card to edge-to-edge as the section scrolls in,
   then holds pinned while the film plays. Geometry is driven by film.js through
   --p (0 → 1 as the section reaches the top of the viewport). */
main section.tj-film{padding:0 !important}  /* mobile.css pads every main section */
.tj-film{position:relative;height:var(--tj-len,190vh);background:var(--tj-bg,#12211A);color:#F6F1E9;transition:background-color .35s linear}
.tj-film__stick{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
.tj-film__frame{position:absolute;inset:0;overflow:hidden;background:var(--tj-edge,var(--tj-bg,#12211A));
  clip-path:inset(calc((1 - var(--p,0)) * 7vh) calc((1 - var(--p,0)) * 6vw) round calc((1 - var(--p,0)) * 28px));
  transition:background-color .35s linear;will-change:clip-path}
.tj-film__video,.tj-film__poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;
  transform:scale(calc(1.06 - var(--p,0) * .06));transform-origin:50% 50%;will-change:transform;background:transparent}
.tj-film[data-fit="contain"] .tj-film__video,.tj-film[data-fit="contain"] .tj-film__poster{object-fit:contain;object-position:50% 100%}

/* feather where a boxed film meets its painted band (an overlay — WebKit will not draw a masked <video>) */
.tj-film__feather{position:absolute;left:0;right:0;height:44px;pointer-events:none;display:none}
.tj-film[data-box="letter"] .tj-film__feather{display:block}
@media (max-width:600px){.tj-film[data-fit="contain"] .tj-film__label{display:none}}

/* the video fades in over its poster once it is actually painting frames */
.tj-film__video{opacity:0;transition:opacity .35s ease}
.tj-film__video.is-live{opacity:1}

/* soft scrims so the controls read on any frame */
.tj-film__frame::after{content:"";position:absolute;inset:auto 0 0 0;height:22%;pointer-events:none;
  background:linear-gradient(180deg,rgba(6,12,9,0),rgba(6,12,9,.38));opacity:var(--p,0)}

.tj-film__meta{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  padding:0 clamp(18px,4vw,56px) calc(clamp(18px,4vh,44px) + env(safe-area-inset-bottom,0px));pointer-events:none;opacity:var(--p,0)}
.tj-film__label{font-size:11px;letter-spacing:.34em;text-transform:uppercase;color:#E8C06A;text-shadow:0 1px 10px rgba(0,0,0,.45)}
.tj-film__btns{display:flex;gap:10px;pointer-events:auto;margin-left:auto}
.tj-film__btn{appearance:none;border:1px solid rgba(232,192,106,.55);background:rgba(10,20,14,.42);color:#F6F1E9;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:999px;height:42px;padding:0 18px 0 14px;
  display:inline-flex;align-items:center;gap:9px;font:500 13px/1 "Instrument Sans",Inter,system-ui,sans-serif;letter-spacing:.02em;cursor:pointer;
  transition:background-color .2s,border-color .2s}
.tj-film__btn:hover{background:rgba(10,20,14,.62);border-color:#E8C06A}
.tj-film__btn:focus-visible{outline:2px solid #E8C06A;outline-offset:3px}
.tj-film__btn svg{width:18px;height:18px;flex:none}
.tj-film__btn .on{display:none}.tj-film__btn[aria-pressed="true"] .on{display:inline}.tj-film__btn[aria-pressed="true"] .off{display:none}

/* light background (showcase): darker controls */
.tj-film[data-tone="light"] .tj-film__label{color:#7A6228;text-shadow:none}
.tj-film[data-tone="light"] .tj-film__frame::after{display:none}

@media (prefers-reduced-motion: reduce){
  .tj-film{height:auto}
  .tj-film__stick{position:relative;height:auto;aspect-ratio:var(--tj-ar,16/9);max-height:100svh}
  .tj-film__frame{clip-path:none}
  .tj-film__video,.tj-film__poster{transform:none}
  .tj-film__meta,.tj-film__frame::after{opacity:1}
}

/* Immersive: while a film is pinned and filling the screen, the site chrome steps away
   (nav, promo strip, header backdrop, scroll progress, side spine) and returns on exit. */
header,#tajly-promo-strip,#tajly-header-backdrop{transition:opacity .45s ease,transform .55s cubic-bezier(.2,.7,.2,1) !important}
html.tj-immersive header,html.tj-immersive #tajly-promo-strip,html.tj-immersive #tajly-header-backdrop{opacity:0 !important;transform:translateY(-110%) !important;pointer-events:none !important}
html.tj-immersive #tajly-spine,html.tj-immersive :has(> #tajly-progress){opacity:0 !important;transition:opacity .4s ease !important;pointer-events:none !important}
