/**
 * Hero intro as in Jonko's Figma prototype (component "MacBook Pro 16" - 28", 126:1579), Board #2166.
 * Step 1 (Figma 6.25 s SLOW spring, here ease-out): the top light glides down onto the logo, a light beam sweeps
 * across from left to right, the title comes from twice its size and fades in, the menu drops 41 px and fades in.
 * Step 2 (Figma 1.022 s GENTLE): tagline, buttons, "as mentioned in" and the scroll mouse rise 150 px and fade in.
 * html.jm-intro is set in <head> (functions.php) before the first paint; hero-intro.js runs the steps.
 * Individual transform properties (translate, scale) keep the elements' own transforms intact.
 */

/* the beam: a tall ellipse of light (1013 x 7319 at 1728 px), colour-dodge like the design */
.hero-intro-beam {
    position: absolute;
    left: -27.1%;
    top: 35.9%;
    width: 58.6vw;
    height: 423.6vw;
    translate: -50% -50%;
    rotate: 15deg;
    background: radial-gradient(50% 50% at 50% 50%,
        #cfd1d9 0%,
        #71778d 35.7%,
        #484d5b 54.43%,
        #000000 100%);
    mix-blend-mode: color-dodge;
    pointer-events: none;
    z-index: 9; /* under the title: the light passes behind the letters */
    opacity: 0;
}

/* start state */
html.jm-intro .hero-header {
    opacity: 0;
    translate: 0 -41px;
}
html.jm-intro .hero-title {
    opacity: 0;
    scale: 2;
}
html.jm-intro .hero-tagline,
html.jm-intro .hero-cta,
html.jm-intro .hero-mentions,
html.jm-intro .hero-scroll {
    opacity: 0;
    translate: 0 150px;
}
html.jm-intro .hero-gradient-sphere3 {
    translate: 0 -260px;
}
html.jm-intro .hero-intro-beam {
    opacity: 0.55; /* the site background is brighter than the design's, full strength burns the letters */
}

/* step 1 */
html.jm-intro.jm-intro-run .hero-header,
html.jm-intro.jm-intro-run .hero-title {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    transition: opacity 3.2s cubic-bezier(0.16, 1, 0.3, 1), translate 4.5s cubic-bezier(0.16, 1, 0.3, 1), scale 4.5s cubic-bezier(0.16, 1, 0.3, 1);
}
html.jm-intro.jm-intro-run .hero-gradient-sphere3 {
    translate: 0 0;
    transition: translate 4.5s cubic-bezier(0.16, 1, 0.3, 1);
}
html.jm-intro.jm-intro-run .hero-intro-beam {
    left: 122.9%;
    rotate: -15deg;
    transition: left 4.2s cubic-bezier(0.33, 1, 0.68, 1), rotate 4.2s cubic-bezier(0.33, 1, 0.68, 1);
}

/* step 2 */
html.jm-intro.jm-intro-step2 .hero-tagline,
html.jm-intro.jm-intro-step2 .hero-cta,
html.jm-intro.jm-intro-step2 .hero-mentions,
html.jm-intro.jm-intro-step2 .hero-scroll {
    opacity: 1;
    translate: 0 0;
    transition: opacity 1.022s cubic-bezier(0.22, 1, 0.36, 1), translate 1.022s cubic-bezier(0.34, 1.2, 0.64, 1);
}
html.jm-intro.jm-intro-step2 .hero-intro-beam {
    opacity: 0;
    transition: left 4.2s cubic-bezier(0.33, 1, 0.68, 1), rotate 4.2s cubic-bezier(0.33, 1, 0.68, 1), opacity 1.5s ease;
}
