/* The film hero (?hero=film).
   The centred headline, under it the real reel as a large screen and nothing else,
   under the film five client logos on the next section's black. Everything is under html.hero-film, so the other heroes stay as they were.
   Sizes hang on --u, so the composition scales as one picture. The film is built and moved by assets/hero-film.js. */

html.hero-film {
  --u: min(1vw, 1.6vh);                  /* 14.4 px at 1440 × 900 */
  --film: 70, 110, 190;                  /* the colour the film throws, by chapter (the script crossfades it) */
  --fm-ease: cubic-bezier(.16, 1, .3, 1);
  --logo-h: clamp(30px, calc(var(--u) * 2.64), 46px);   /* the client logos' height: 38 px at 1440 × 900 (was 33) */
  --logo-row: calc(var(--logo-h) * 1.45);
  --logo-sink: 52px;                     /* how far below the black edge's top the logos sit */
  --fm-w: 72;                            /* the film's width at rest, in --u (the middle of 66 / 72 / 78); 20 % more when grown */
  --black-later: 23vh;                   /* the logos and the black edge sit this much lower, so the film has grown before the black reaches it */
}
html.hero-film .hero__video { display: none; }
html.hero-film .hero__graphic { background: #000; }
html.hero-film .hero__graphic::after { content: none; }
/* the hero is as tall as its content: the film starts in the first screen and is seen whole after a short scroll. No pin */
/* its bottom padding puts the logos a little way down on the next section's black edge (--dome-gap: that edge's top above the hero's bottom) */
html.hero-film .hero { justify-content: flex-start; min-height: 0; overflow: hidden; overflow: clip;
  padding: calc(clamp(20px, 4vh, 40px) + clamp(92px, 12vh, 124px)) var(--gutter) max(24px, calc(var(--dome-gap, 150px) - var(--logo-row) - var(--logo-sink))); }
/* the next section's box lies over the hero's bottom: it must not take the pointer from what sinks behind its edge */
html.hero-film .show { pointer-events: none; }
html.hero-film .show > :not(.show__stage):not(.show__bg) { pointer-events: auto; }

/* ------------------------------------------------------------ the text: first thing seen, nothing else in its band */
html.hero-film .hero__copy { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
/* a flex column, so the lines' negative margins add up instead of collapsing */
html.hero-film .hero__title { display: flex; flex-direction: column; max-width: none; font-size: clamp(30px, calc(var(--u) * 5.6), 108px); line-height: 1.04; text-wrap: initial; }
/* the mask around a line: the padding leaves room for accents and descenders (Safari has no overflow-clip-margin) */
html.hero-film .fm-l { display: block; overflow: hidden; overflow: clip; padding: .1em 0 .16em; margin: -.1em 0 -.16em; }
html.hero-film .fm-l > span { display: inline-block; transition: transform 1.15s var(--fm-ease); }
html.hero-film .fm-l + .fm-l > span { transition-delay: .08s; }
html.hero-film .hero__lead { display: block; margin: clamp(14px, calc(var(--u) * 1.5), 26px) 0 0; max-width: 36em; font: 400 clamp(15px, calc(var(--u) * 1.22), 21px)/1.5 var(--bf, "Hanken Grotesk"), sans-serif; color: var(--muted); text-wrap: balance;
  transition: opacity .9s ease .34s, transform 1.1s var(--fm-ease) .34s; }
html.hero-film .hero__actions { margin-top: clamp(16px, calc(var(--u) * 1.7), 30px); transition: opacity .9s ease .44s, transform 1.1s var(--fm-ease) .44s; }
html.fm-wait .fm-l > span { transform: translateY(112%); }
html.fm-wait .hero__lead, html.fm-wait .hero__actions { opacity: 0; transform: translateY(16px); }

/* ------------------------------------------------------------ the client logos: five in the middle under the film, turning one at a time
   (the Nový hero's slots, assets/hero-film.js). They replace the strip that rode the dome. Bigger than Nový's and further
   apart, about the film's width, and a little lower, on the next section's black edge.
   z 2: above that edge (.show__bg, z 1), so they ride on it, while the film (z 1) goes under it */
html.hero-film .show__logo { display: none; }
html.hero-film .hero__logos { display: grid; position: relative; z-index: 2; grid-template-columns: repeat(5, clamp(120px, calc(var(--u) * 13), 225px)); justify-content: center;
  gap: clamp(30px, calc(var(--u) * 4.3), 75px); margin-top: calc(clamp(84px, calc(var(--u) * 7.4), 132px) + var(--black-later)); }
html.hero-film .hero__slot { height: var(--logo-row); }
html.hero-film .hero__slot img { top: calc(var(--logo-h) * .22); right: 0; height: var(--logo-h); margin: 0 auto; object-position: center; transform-origin: 50% 50% calc(var(--logo-h) * -.55); }
html.fm-wait .hero__logos { opacity: 0; }
html.hero-film .hero__logos { transition: opacity 1s ease 1.2s; }

/* ------------------------------------------------------------ the stage: the film's box, held back on the scroll so the black covers it */
html.hero-film .fm { display: block; position: relative; z-index: 1; will-change: transform; flex: none; box-sizing: border-box; width: calc(var(--u) * var(--fm-w)); max-width: 100%; aspect-ratio: 16 / 9;
  margin-top: clamp(26px, calc(var(--u) * 3.1), 58px); text-align: left; perspective: calc(var(--u) * 130); perspective-origin: 50% 12%; }
.fm__light { position: absolute; z-index: 0; inset: -16% -22%; pointer-events: none; opacity: 0; background: radial-gradient(closest-side, rgb(var(--film)), rgba(var(--film), .36) 56%, transparent); }

/* the light (not a glow but light: soft orange streaks like a blurred line, spread out, strongest at their
   start and gone by the middle of their run, gently moving, on both sides, out of focus; from the corners: from beyond the screen's
   edges above the film, slanting down to it, so the brightest part is at the screen's edge and not 100–200 px in from it).
   .fm__beams spans the whole screen's width at the film's height and moves with the film; it sits behind the film. Each streak is three soft
   layers, blurred once, strongest at its anchored end (--ml/--mr: which end; --o: the same end as an origin), which starts off the screen;
   only transform and opacity move */
.fm__beams { position: absolute; z-index: 1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none; opacity: 0; }
.fm__streak { --ml: 0; --mr: auto; --o: 0%; --dir: to right; position: absolute; width: 54%; top: -14%; height: calc(var(--u) * 16); margin-top: calc(var(--u) * -8);
  transform: rotate(var(--rot)); transform-origin: var(--o) 50%; animation: fm-drift 11s ease-in-out infinite alternate; }
.fm__streak--l { left: -14%; --rot: 17deg; }
.fm__streak--r { right: -14%; --rot: -17deg; --ml: auto; --mr: 0; --o: 100%; --dir: to left; animation-duration: 13s; animation-delay: -6s; }
.fm__streak i { position: absolute; left: 0; right: 0; top: 50%; display: block; margin-left: var(--ml); margin-right: var(--mr); border-radius: 50%; transform-origin: var(--o) 50%; animation: fm-breathe 8s ease-in-out infinite alternate; }
.fm__streak .core { width: 74%; height: calc(var(--u) * .8); margin-top: calc(var(--u) * -.4); filter: blur(calc(var(--u) * .8));
  background: linear-gradient(var(--dir), rgba(255, 196, 150, .68), rgba(255, 102, 51, .38) 28%, transparent 60%); }
.fm__streak .band { width: 100%; height: calc(var(--u) * 3.4); margin-top: calc(var(--u) * -1.7); filter: blur(calc(var(--u) * 1.8)); animation-delay: -3s;
  background: linear-gradient(var(--dir), rgba(255, 118, 62, .84), rgba(255, 102, 51, .3) 34%, transparent 64%); }
.fm__streak .haze { width: 66%; height: calc(var(--u) * 13); margin-top: calc(var(--u) * -6.5); filter: blur(calc(var(--u) * 4.6)); animation-delay: -5.5s;
  background: radial-gradient(farthest-side at var(--o) 50%, rgba(255, 102, 51, .46), rgba(255, 102, 51, .14) 55%, transparent); }
@keyframes fm-breathe { from { opacity: .62; transform: scaleX(.88); } to { opacity: 1; transform: scaleX(1.03); } }
@keyframes fm-drift { from { transform: rotate(calc(var(--rot) * .8)) translateY(calc(var(--u) * -.6)); } to { transform: rotate(calc(var(--rot) * 1.15)) translateY(calc(var(--u) * .6)); } }

/* the film: a large screen standing on the page. It starts hidden, like its light and streaks: hero-film.js builds it after the page is parsed
   and writes its opacity every frame, so without this the poster showed at full strength for a moment, vanished and faded in again (16. 11.) */
.fm__film { position: absolute; z-index: 2; inset: 0; border-radius: calc(var(--u) * 1.05); overflow: hidden; overflow: clip; background: #08080a; transform-origin: 50% 62%; will-change: transform, opacity; opacity: 0;
  box-shadow: 0 calc(var(--u) * 4) calc(var(--u) * 9) rgba(0, 0, 0, .75), 0 0 0 1px rgba(248, 248, 248, .1); }
.fm__film video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .999; }   /* .999: see .hero__video, the same hardware plane blink */
.fm__film::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(248, 248, 248, .14); }
/* the reel has white frames: under the headline they are held down a little, and the film comes to full light as it reaches the middle of the screen */
.fm__dim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .34), rgba(0, 0, 0, .1) 34%); will-change: opacity; }
.fm__pause { position: absolute; z-index: 1; right: calc(var(--u) * .9); top: calc(var(--u) * .9); width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #f8f8f8; cursor: pointer; opacity: .62; transition: opacity .25s ease; }
.fm__pause:hover, .fm__pause:focus-visible { opacity: 1; }
.fm__pause:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.fm__pause svg { width: 12px; height: 12px; fill: currentColor; }
.fm__pause .play, .fm__pause[data-paused="true"] .hold { display: none; }
.fm__pause[data-paused="true"] .play { display: block; }
/* the sound button, styled as the pause, top right. A click on the film pauses it, so the pause button shows only for the keyboard,
   and for visitors with reduced motion, whose film starts on its poster. */
.fm__sound { position: absolute; z-index: 1; right: calc(var(--u) * .9); top: calc(var(--u) * .9); width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #f8f8f8; cursor: pointer; opacity: .62; transition: opacity .25s ease; }
.fm__sound:hover, .fm__sound:focus-visible { opacity: 1; }
.fm__sound:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.fm__sound svg { width: 16px; height: 16px; fill: currentColor; }
.fm__sound .on, .fm__sound[data-on="true"] .off { display: none; }
.fm__sound[data-on="true"] .on { display: block; }
.fm__sound[data-on="true"] { opacity: .9; }
.fm__film { cursor: pointer; }
.fm__pause:not(:focus-visible) { opacity: 0; pointer-events: none; }
.fm__pause { right: calc(var(--u) * .9 + 42px); }
.fm__flash { position: absolute; z-index: 1; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0, 0, 0, .5) center / 22px no-repeat; opacity: 0; pointer-events: none; }
.fm__flash[data-kind="pause"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23f8f8f8' d='M2 1h3v10H2zM7 1h3v10H7z'/%3E%3C/svg%3E"); }
.fm__flash[data-kind="play"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23f8f8f8' d='M2.5 1 11 6l-8.5 5z'/%3E%3C/svg%3E"); }
.fm__flash.is-on { animation: fm-flash .7s ease-out; }
@keyframes fm-flash { from { opacity: 1; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .fm__flash.is-on { animation: none; } .fm__pause:not(:focus-visible) { opacity: .62; pointer-events: auto; } }

/* ------------------------------------------------------------ the first screen: the headline, the line
   and the button in the middle of the screen with only black around them, the film below with just its top edge (--fm-peek) showing at the
   bottom of the first screen, so the eyes find the sentence first and the film draws them down. The copy box fills the first
   screen down to the film's margin and centres its content; the header's clearance stays the hero's top padding. Phones keep their own
   composition below */
html.hero-film { --fm-peek: 120px; --hero-top: calc(clamp(20px, 4vh, 40px) + clamp(92px, 12vh, 124px)); --fm-gap: clamp(26px, calc(var(--u) * 3.1), 58px); }
@media (min-width: 901px) and (min-aspect-ratio: 1/1) and (min-height: 501px) {
  html.hero-film .hero__copy { justify-content: center; box-sizing: border-box; min-height: calc(100vh - var(--hero-top) - var(--fm-gap) - var(--fm-peek));
    min-height: calc(100svh - var(--hero-top) - var(--fm-gap) - var(--fm-peek)); }
}

/* ------------------------------------------------------------ phones and portrait tablets: their own composition. The text, then the film
   filling the width at 4:3, so the reel is not a thin strip */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  html.hero-film { --logo-h: clamp(28px, 8vw, 40px); --logo-sink: 40px; --black-later: 8vh; }
  html.hero-film .hero { padding-top: calc(clamp(20px, 4vh, 40px) + 76px); }
  html.hero-film .hero__title { font-size: clamp(34px, 9.8vw, 72px); }
  html.hero-film .fm-l { display: inline; overflow: visible; padding: 0; margin: 0; }
  html.hero-film .fm-l > span { display: inline; }
  html.hero-film .hero__title { display: block; max-width: 11.5em; text-wrap: balance; transition: opacity .9s ease, transform 1.1s var(--fm-ease); }
  html.fm-wait .hero__title { opacity: 0; transform: translateY(16px); }
  html.hero-film .hero__lead { font-size: clamp(15px, 2.4vw, 19px); max-width: 30em; }
  html.hero-film .hero__actions { margin-top: 20px; }
  html.hero-film .fm { width: min(100%, 720px); aspect-ratio: 4 / 3; margin-top: 30px; perspective: 900px; }
  .fm__film { border-radius: 14px; }
  .fm__light { inset: -10% -16%; }
  /* the film fills the width, so the screen's edges are the film's: every placement breaks out over its top corners for now */
  html.hero-film .fm__streak { width: 56%; height: 100px; margin-top: -50px; top: 0; }
  html.hero-film .fm__streak--l { left: -8%; --rot: 9deg; }
  html.hero-film .fm__streak--r { right: -8%; --rot: -9deg; }
  html.hero-film .hero__logos { width: 100%; max-width: 600px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 3.6vw, 28px); margin-top: 56px; }
}
/* phones on their side: the text and the film alone, kept small enough to read together */
@media (max-height: 500px) {
  html.hero-film .hero__title { font-size: clamp(28px, 10vh, 42px); max-width: none; }
  html.hero-film .fm { width: min(68%, 560px); aspect-ratio: 16 / 9; }
  html.hero-film .hero__logos { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .fm__streak, .fm__streak i { animation: none; }
  html.hero-film .fm-l > span, html.hero-film .hero__lead, html.hero-film .hero__actions, html.hero-film .hero__title { transition: none; }
  html.hero-film .hero__logos { transition: none; }
}
