/* Hilal motion module: splash.
   The app's opening (App/Root/LaunchSplashView.swift), drawn by splash.js on a canvas fixed over
   the whole viewport when the page opens at its top, the Skip button, and the pill in the hero
   that plays it again. Every rule is scoped under .m-splash. The script only adds classes:
     <html>          .is-opening (set in <head>: the page will open with it)   .sp-on (playing)
     .splash         .is-on (on the page)   .is-in (fading in for a replay)
                     .is-out (lifting away)   .is-skip (skipped: lift faster)
     .scene__replay  .is-on (shown: the opening is not playing) */

/* Before the script has drawn anything the canvas already shows the two fixed parts of the first
   frame, the launch colour and the glass arch, which is the app's launch screen. The arch is
   83.8 x 100 points, 45 points above the middle. splash.js measures the viewport the same way:
   an upright one is 393 points wide (or 760 tall, if that is smaller), a wide one 560 points tall. */
.m-splash .splash{position:fixed;left:0;top:0;width:100%;height:100%;z-index:200;
  background:#070B15 url(/Hilal/assets/launch-mark.webp) 50% calc(50% - min(11.45vw,5.92vh)) / min(21.32vw,11.03vh) auto no-repeat;
  cursor:pointer;-webkit-tap-highlight-color:transparent;transform-origin:50% 46%;
  transition:opacity .8s ease-out,transform 1.2s var(--ease)}
@media (min-aspect-ratio:5/4){
  .m-splash .splash{background-position:50% calc(50% - 8.04vh);background-size:14.96vh auto}
}
.m-splash.is-opening .splash,.m-splash .splash.is-on{display:block}
/* A replay fades in over the page in .4s. */
.m-splash .splash.is-in{transition:opacity .4s ease}
/* The end: the opening lifts away and the hero comes in under it. .8s after its 6 seconds; .35s
   when skipped, the app's own crossfade. splash.js counts the same three durations. */
.m-splash .splash.is-out{opacity:0;transform:scale(1.05);pointer-events:none}
.m-splash .splash.is-out.is-skip{transition:opacity .35s ease-out,transform .35s ease-out}

/* Skip: small, at the foot of the opening, for people who would rather read. */
.m-splash .splash__skip{display:inline-flex;align-items:center;justify-content:center;position:fixed;z-index:201;
  left:50%;bottom:max(22px,env(safe-area-inset-bottom));min-width:88px;min-height:40px;padding:0 18px;margin:0;
  border-radius:999px;border:1px solid rgba(246,242,232,.26);background:rgba(7,11,21,.42);color:rgba(246,242,232,.86);
  font:500 .82rem/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;cursor:pointer;
  -webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;
  opacity:0;visibility:hidden;transform:translate3d(-50%,8px,0);
  transition:opacity .3s ease,transform .5s var(--ease),background .25s,visibility 0s .3s}
.m-splash.sp-on .splash__skip{opacity:1;visibility:visible;transform:translate3d(-50%,0,0);
  transition:opacity .8s ease .9s,transform .9s var(--ease) .9s,background .25s,visibility 0s}
.m-splash .splash__skip:focus-visible{outline:3px solid #E9C06A;outline-offset:3px}
@media (hover:hover){.m-splash .splash__skip:hover{background:rgba(246,242,232,.14);color:#F6F2E8}}

/* The pill that plays the opening again: a small ghost button beside the foot of the phone,
   under the arch's right leg, where nothing else in the scene reaches. */
.m-splash .scene__replay{display:inline-flex;align-items:center;gap:7px;position:absolute;z-index:4;
  left:calc(70.5% + 10px);top:calc(106.5% - 18px);min-height:36px;margin:0;padding:0 14px 0 11px;
  border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink);
  font:600 .8rem/1 var(--sans);letter-spacing:.01em;white-space:nowrap;cursor:pointer;
  -webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;
  opacity:0;visibility:hidden;transform:translate3d(0,6px,0);
  transition:opacity .35s ease,transform .5s var(--ease),background .25s,visibility 0s .35s}
.m-splash .scene__replay.is-on{opacity:1;visibility:visible;transform:none;
  transition:opacity .6s ease,transform .7s var(--ease),background .25s,visibility 0s}
/* A finger-sized target around the small pill. */
.m-splash .scene__replay::before{content:'';position:absolute;inset:-6px}
.m-splash .scene__replay svg{width:15px;height:15px;flex:none;transition:transform .6s var(--ease)}
.m-splash .scene__replay:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:999px}
@media (hover:hover){
  .m-splash .scene__replay:hover{background:var(--card-2)}
  .m-splash .scene__replay.is-on:hover{transform:translate3d(0,-2px,0)}
  .m-splash .scene__replay:hover svg{transform:rotate(-70deg)}
}
@media (min-width:1020px){
  .m-splash .scene__replay{left:calc(70.5% + 30px)}
}
