/* ==========================================================================
   Vela — film.html: the page around the film. The film itself (film.js)
   injects its own player styles; these only frame and size it.
   ========================================================================== */

/* ---- Hero ----------------------------------------------------------------- */
.film-hero { padding-top: calc(var(--nav-h) + clamp(36px, 6vw, 80px)); padding-bottom: clamp(26px, 3.6vw, 40px); isolation: isolate; }
.film-hero .stars { mask-image: linear-gradient(180deg, #000 30%, transparent 95%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); }
.film-hero .glow { width: min(980px, 150vw); height: 560px; left: 50%; right: auto; top: -170px; transform: translateX(-50%); opacity: 0.75; z-index: -1; }
.film-hero h1 { font-size: clamp(40px, 7.4vw, 84px); margin-bottom: 16px; text-wrap: balance; }
.film-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.film-meta .chip .icon { width: 12px; height: 12px; color: var(--accent); }

/* ---- Toolbar: back link and Desktop / Mobile ----------------------------- */
.film-section { position: relative; padding-bottom: clamp(8px, 2vw, 20px); }
.film-toolbar { max-width: 1120px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.back-link { font-size: 15px; min-height: 44px; }
.back-link .icon { width: 17px; height: 17px; }
.text-link.back-link:hover .icon { transform: translateX(-3px); }
.view-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.view-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: none; color: var(--text-2); font: 600 14px/1 var(--font-text); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s var(--ease), color 0.2s, box-shadow 0.25s;
}
.view-btn .icon { width: 17px; height: 17px; }
.view-btn:hover { color: var(--text); }
.view-btn[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--text) 12%, transparent); box-shadow: inset 0 0 0 1px var(--line-2); }
.view-btn[aria-pressed="true"] .icon { color: var(--accent); }
@media (pointer: coarse), (max-width: 719px) { .view-btn { min-height: 44px; } }
@media (max-width: 480px) {
  .film-toolbar { gap: 8px; }
  .back-link { font-size: 14.5px; gap: 5px; }
  .view-btn { padding: 0 12px; gap: 6px; font-size: 13.5px; }
}

/* ---- The stage ------------------------------------------------------------ */
/* The film keeps its own look (it is always dark, like a video). Here it is
   framed to match the site and sized so the whole frame fits on screen under
   the navigation, in both 16:9 and 9:16. */
.film-stage { position: relative; isolation: isolate; }
.film-stage > .glow { width: 86%; height: 80%; left: 7%; top: 10%; z-index: -1; opacity: 0.7; filter: blur(50px); }
.film-stage .vf-root {
  max-width: min(1120px, calc((100vh - var(--nav-h) - 48px) * 16 / 9));
  max-width: min(1120px, calc((100svh - var(--nav-h) - 48px) * 16 / 9));
  border-radius: clamp(14px, 1.8vw, 22px);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line-2), 0 0 120px -30px var(--glow);
}
.film-stage .vf-root.vf-compact {
  max-width: min(100%, calc((100vh - var(--nav-h) - 48px) * 4 / 5));
  max-width: min(100%, calc((100svh - var(--nav-h) - 48px) * 4 / 5));
}
.film-stage .vf-root.vf-tall {
  max-width: none;
  width: min(100%, calc((100vh - var(--nav-h) - 40px) * 9 / 16));
  width: min(100%, calc((100svh - var(--nav-h) - 40px) * 9 / 16));
}
.film-stage .vf-root:focus-visible { box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.8), 0 0 0 3px var(--accent); }
:root[data-theme="light"] .film-stage .vf-root, :root[data-theme="sand"] .film-stage .vf-root { box-shadow: 0 40px 90px -40px rgba(20, 24, 40, 0.45), 0 0 0 1px var(--line-2); }
/* Full screen fills the screen (kept separate so an unknown selector can't drop the other) */
.film-stage .vf-root:fullscreen { max-width: none; width: 100%; border-radius: 0; box-shadow: none; }
.film-stage .vf-root:-webkit-full-screen { max-width: none; width: 100%; border-radius: 0; box-shadow: none; }

.film-desc { margin-top: 20px; text-align: center; color: var(--text-2); font-size: 15.5px; text-wrap: balance; }
.film-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 26px; margin-top: 16px; color: var(--text-3); font-size: 13px; }
.film-foot kbd {
  display: inline-grid; place-items: center; min-width: 24px; height: 23px; padding: 0 6px; margin-right: 6px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; background: var(--surface);
  font: 600 11px/1 var(--font-text); color: var(--text-2);
}
.film-foot kbd + kbd { margin-left: -2px; }
@media (max-width: 560px) { .film-foot { display: none; } }

/* ---- Download ------------------------------------------------------------- */
.film-cta { overflow: hidden; isolation: isolate; padding-top: clamp(72px, 11vw, 130px); }
.film-cta .glow { width: 900px; height: 660px; max-width: 170vw; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: -1; }
.film-cta-icon { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 20px 60px -15px var(--glow), 0 0 0 1px rgba(255, 255, 255, 0.1); }
.film-cta h2 { margin-top: 16px; }
.film-cta .lead { margin-top: 18px; max-width: 32em; }
.film-cta .btn-row { margin-top: 30px; }
.film-cta-meta { margin-top: 18px; font: 500 13px/1.7 var(--font-mono); color: var(--text-3); }
.film-cta-soon { margin-top: 22px; }
.film-cta-soon .soon { border-style: dashed; font-size: 10.5px; text-transform: uppercase; }
@media (max-width: 560px) {
  .film-cta .btn-row .btn { width: 100%; }
}

/* the filled Apple mark on the App Store button (install.css has the same rule) */
.btn .icon-apple { fill: currentColor; stroke: none; margin-top: -2px; }
