/* =========================================================
   eventsAVP · Hero showreel (data-hero="reel")
   Two fits, set with data-fit on #hero:
     data-fit="fill"  the video fills the whole screen behind the nav. It is pinned to the
                      bottom, so any cropping comes off the top (under the nav), never the
                      bottom captions. Screens narrower than 16:9 also lose a little at the sides.
     data-fit="fit"   the whole video shows under the nav, never cropped; thin dark strips
                      at the sides when the screen isn't 16:9.
   The site's own elements sit only where the showreel never puts words (checked frame by frame):
     buttons    bottom centre-right, between the video's caption (ends by 50%) and its slide
                counter (starts at 81%): right edge at 79%, top at 85%. They scale with the video.
     sound tab  right edge, halfway down: the big title letters stop just short of it.
     WhatsApp   steps aside while the hero is on screen (it sat on the slide counter).
     nav        a darker fade behind it over the client logos at the top of the video.
   Phones get the video full width with the buttons below it.
   Phones always use the "fit" layout with the buttons under the video.
   Back to the slideshow: set data-hero="slideshow" on #hero.
   ========================================================= */
.hreel{display:none}
.hero[data-hero=reel]{height:auto!important;min-height:0!important;background:#04060d}
.hero[data-hero=reel] .hreel{display:block;position:relative;z-index:2;padding-top:var(--nav-h,92px)}

/* slideshow layers off; the h1 stays in the page for Google and screen readers */
.hero[data-hero=reel] > :not(.hreel):not(.hero__left){display:none!important}
.hero[data-hero=reel] .hero__left{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.hero[data-hero=reel] .hero__left > :not(.hero__eyebrow){display:none!important}

/* the whole 16:9 video fits in the screen under the nav: as wide as possible without
   being taller than the space left under the nav, centred */
.hreel{--fit-w:min(100vw,calc((100vh - var(--nav-h,92px)) * 16 / 9))}
@supports (height:100svh){.hreel{--fit-w:min(100vw,calc((100svh - var(--nav-h,92px)) * 16 / 9))}}
.hreel__frame{position:relative;width:var(--fit-w);aspect-ratio:16/9;margin:0 auto;overflow:hidden}
.hreel__v{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#04060d}

/* buttons: in the clear zone between the video's caption and its slide counter; sized with the video */
.hreel__cta{position:absolute;z-index:3;right:21%;top:85%;display:flex;flex-wrap:nowrap;align-items:stretch;gap:1em;
  font-size:clamp(11px,calc(var(--fit-w) * .0073),15px)}
.hreel__cta .btn,.hreel__cta .btn2{font-size:1em!important;padding:1.25em 2.1em!important;gap:.85em!important}
.hreel__cta .btn2 img{height:1.55em!important;width:auto}

/* level-2 button on video: solid dark fill so the border colour can't show through */
html .hero[data-hero=reel] .hreel__cta .btn2{background:linear-gradient(#0B0E17,#0B0E17) padding-box,linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.55)) border-box!important;border:1.5px solid transparent!important;backdrop-filter:none!important}
html .hero[data-hero=reel] .hreel__cta .btn2:hover{background:linear-gradient(#0B0E17,#0B0E17) padding-box,var(--rp-h,linear-gradient(100deg,#4656FF,#7C8BFF)) border-box!important}

/* sound tab on the right edge, vertically centred */
.hsnd{position:absolute;z-index:4;right:0;top:50%;transform:translateY(-50%);
  display:flex;flex-direction:column;align-items:center;gap:12px;padding:14px 11px 18px;
  border-radius:12px 0 0 12px;border:0;color:#fff;cursor:pointer;
  background:rgba(8,11,20,.72);
  font:700 11px/1 Montserrat,sans-serif;letter-spacing:.2em;text-transform:uppercase;white-space:nowrap;
  transition:background .3s var(--ease,ease),padding .3s var(--ease,ease)}
.hsnd::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:2px;border-radius:2px;background:rgba(255,255,255,.35);transition:background .3s}
.hsnd:hover{background:rgba(8,11,20,.9);padding-right:15px}
.hsnd:focus-visible{outline:2px solid #9DB4FF;outline-offset:2px}
.hsnd__ic{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:rgba(255,255,255,.08);flex:none}
.hsnd__ic svg{width:18px;height:18px;display:block}
.hsnd__t{writing-mode:vertical-rl;transform:rotate(180deg)}
.hsnd__eq{display:none;align-items:flex-end;gap:2.5px;height:14px}
.hsnd__eq b{display:block;width:3px;height:100%;border-radius:2px;background:linear-gradient(0deg,#E2433C,#F6A487);transform-origin:bottom;animation:hsndEq 1s ease-in-out infinite}
.hsnd__eq b:nth-child(2){animation-delay:-.35s;animation-duration:.8s}
.hsnd__eq b:nth-child(3){animation-delay:-.6s;animation-duration:1.15s}
.hsnd__eq b:nth-child(4){animation-delay:-.15s;animation-duration:.9s}
@keyframes hsndEq{0%,100%{transform:scaleY(.25)}50%{transform:scaleY(1)}}
.hsnd.is-on::before{background:linear-gradient(180deg,#C4142C,#E2433C 52%,#F6A487)}
.hsnd.is-on .hsnd__ic{background:rgba(226,67,60,.16)}
.hsnd.is-on .hsnd__ic svg{display:none}
.hsnd.is-on .hsnd__eq{display:flex}
html[dir=rtl] .hsnd{right:auto;left:0;border-radius:0 12px 12px 0}
html[dir=rtl] .hsnd::before{left:auto;right:0}
html[lang=ar] .hsnd{font-family:var(--ar,Cairo),sans-serif;letter-spacing:0;font-size:13px}

/* ---------- data-fit="fill": whole screen, pinned to the bottom (desktop and tablets) ---------- */
@media (min-width: 861px){
  .hero[data-hero=reel][data-fit=fill] .hreel{padding-top:0;height:100vh;height:100svh;min-height:520px;overflow:hidden;container-type:size}
  .hero[data-hero=reel][data-fit=fill] .hreel__frame{position:absolute;left:50%;bottom:0;margin:0;
    width:max(100cqw,177.78cqh);transform:translateX(-50%)}
  /* never closer than 24px to the screen edge when the sides are cropped */
  .hero[data-hero=reel][data-fit=fill] .hreel__cta{font-size:clamp(11px,calc(max(100cqw,177.78cqh) * .0073),15px)}
  .hero[data-hero=reel][data-fit=fill] .hsnd{right:calc((max(100cqw,177.78cqh) - 100cqw) / 2);top:calc(max(56.25cqw,100cqh) - 50cqh);transform:translateY(-50%)}   /* middle of the screen, even when the top is cropped */
  html[dir=rtl] .hero[data-hero=reel][data-fit=fill] .hsnd{right:auto;left:calc((max(100cqw,177.78cqh) - 100cqw) / 2)}
  /* keeps the nav readable over the picture */
  .hero[data-hero=reel][data-fit=fill] .hreel::before{content:"";position:absolute;left:0;right:0;top:0;height:170px;z-index:2;pointer-events:none;
    background:linear-gradient(180deg,rgba(4,6,13,.85) 0%,rgba(4,6,13,.55) 45%,rgba(4,6,13,0) 100%)}
  /* the WhatsApp bubble steps aside while the hero is on screen, and comes back on scroll */
  body.hreel-in .wa{opacity:0;visibility:hidden;transform:translateY(18px);transition:opacity .35s ease,transform .35s ease,visibility 0s linear .35s}
  body:not(.hreel-in) .wa{transition:opacity .35s ease,transform .35s ease}
}

/* phones: the buttons move under the video; the sound tab becomes icon-only */
@media (max-width: 860px){
  .hero[data-hero=reel] .hreel{padding-bottom:30px}
  .hreel__frame{aspect-ratio:auto;overflow:visible}
  .hreel__v{position:relative;inset:auto;height:auto;aspect-ratio:16/9}
  .hreel__cta{position:relative;left:auto;right:auto;top:auto;padding:22px var(--pad,24px) 0;gap:10px;max-width:640px;margin:0 auto;flex-wrap:wrap;font-size:13px}
  .hreel__cta .btn,.hreel__cta .btn2{flex:1 1 100%;justify-content:center;padding:16px 20px!important}
  .hsnd{top:calc(var(--fit-w) * .28125);padding:9px 8px 9px 10px;gap:0}   /* middle of the video's height */
  .hsnd__t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
@media (prefers-reduced-motion: reduce){ .hsnd__eq b{animation:none;transform:scaleY(.6)} }
