/* Nova's stage at rest: the star art, its rings, moons and pixels, the ignition and the sweep.
   Rules outside the motion block are the still state; motion is opt-in.
   --su is the stage unit: one art px, the board's 1536 x 1024 star art drawn at 0.8 of the frame
   from 900 px up and at 0.29 on a phone. Everything inside the art is calc(n * var(--su)). */

/* The reveal's radius: a registered length, so the mask can grow it frame by frame */
@property --reveal {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

.nova-stage {
    --su: var(--hu);
    /* The dive's progress: 0 at rest; nova-stage.js runs it to 1 while the voice is open (desktop) */
    --dive: 0;
    position: absolute;
    width: calc(1536 * var(--su));
    height: calc(1024 * var(--su));
    pointer-events: none;
    /* Screen the whole stage so the artwork's black sky blends with the page,
       including through the reveal and breathing layers' stacking contexts. */
    mix-blend-mode: screen;
}

.nova-persp {
    position: absolute;
    inset: 0;
    perspective: 1800px;
    transform-origin: calc(812 * var(--su)) calc(495 * var(--su));
}

/* The home copy fades out so it does not show behind the open dialog. The targets carry no
   animation of their own: a finished fill-mode both animation would hold its last keyframe */
html[data-au-overlay="voice"] .hero-words {
    opacity: 0;
}

.nova-tilt {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform-origin: calc(812 * var(--su)) calc(495 * var(--su));
}

/* Rings and moons: the paths are written by nova-stage.js */
.nova-orbin {
    position: absolute;
    inset: 0;
}

.nova-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* The board's strokes (HomeScroll-q4v8.dc.html, the rings' svgs): the same art px at every width, no filter. The
   glow paths are the 150 x 36 rings' lines drawn wide and faint; nova-stage.js gives each its line's path. */
.nova-ring,
.nova-glowring {
    stroke-dasharray: 1 1;
    stroke-linecap: round;
}

.nova-glowring-b {
    stroke: #7C83FF;
    stroke-opacity: 0.1;
    stroke-width: 5;
}

.nova-glowring-f {
    stroke: #7C83FF;
    stroke-opacity: 0.22;
    stroke-width: 6;
}

.nova-ring-b1 {
    stroke: #9BA1FF;
    stroke-opacity: 0.36;
    stroke-width: 1.3;
}

.nova-ring-b2 {
    stroke: #C9CCFF;
    stroke-opacity: 0.18;
    stroke-width: 1;
}

.nova-ring-f1 {
    stroke: #B9BEFF;
    stroke-opacity: 0.95;
    stroke-width: 1.5;
}

.nova-ring-f2 {
    stroke: #C9CCFF;
    stroke-opacity: 0.5;
    stroke-width: 1;
}

/* Phase colours: nova-voice.js publishes the phase on <html>; the stage rings follow it */
html[data-nova-phase="connect"] .nova-ring,
html[data-nova-phase="listen"] .nova-ring {
    stroke: #8F95FF;
}

html[data-nova-phase="hear"] .nova-ring {
    stroke: #A7ACFF;
}

html[data-nova-phase="think"] .nova-ring {
    stroke: #B9A6FF;
}

html[data-nova-phase="speak"] .nova-ring {
    stroke: #E6E8FF;
}

.nova-moon {
    fill: #E6E8FF;
}

.nova-moon-back {
    fill: #B9A6FF;
    fill-opacity: 0.55;
}

/* The art: its reveal, settle and breathing wrap the picture, the sweep and the pixels */
.nova-nrev,
.nova-reveal,
.nova-nsettle,
.nova-breathe {
    position: absolute;
    inset: 0;
}

.nova-nsettle {
    transform-origin: calc(812 * var(--su)) calc(495 * var(--su));
}

.nova-breathe {
    transform-origin: 55% 62%;
    /* The reveal/settle wrappers isolate their contents. Give the image's
       screen blend the same dark base as the page inside those wrappers. */
    background: var(--au-bg);
    /* Feather the artwork's border without cutting into Nova or the letters. */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 90%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 90%, transparent);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.nova-breathe img {
    display: block;
    width: calc(1536 * var(--su));
    height: calc(1024 * var(--su));
    mix-blend-mode: screen;
    /* Remove the supplied navy sky's low blue floor before screening it. */
    filter: brightness(.96) contrast(1.1);
}


.nova-blend {
    position: absolute;
    inset: 0;
    transform-origin: 50% 62%;
    mix-blend-mode: screen;
    opacity: 0.85;
}

/* Pixels: the layers live in the art's own 1536 x 1024 space */
.nova-space {
    position: absolute;
    left: 0;
    top: 0;
    width: calc(1536 * var(--su));
    height: calc(1024 * var(--su));
}

.nova-dot {
    position: absolute;
    left: calc(var(--x) * var(--su));
    top: calc(var(--y) * var(--su));
    width: calc(var(--s) * var(--su));
    height: calc(var(--s) * var(--su));
    background: var(--c);
    opacity: var(--o);
    animation-duration: calc(var(--du) * 1s);
    animation-delay: calc(var(--dl) * 1s);
}

.nova-dot-glow {
    box-shadow: 0 0 calc(var(--b) * var(--su)) var(--gc, var(--c));
}

.nova-dot-hollow {
    box-sizing: border-box;
    border: calc(1 * var(--su)) solid var(--c);
    background: none;
}

.nova-dots-gather .nova-dot {
    opacity: 0;
    /* From the dot's home to the star, and its orbit's radius (--gr, with --ga the bearing it leaves the ring at,
       both written by nova-stage.js): au-gath turns the dot round the star on them before it snaps home */
    --hx: calc((812 - var(--x) - var(--s) / 2) * var(--su));
    --hy: calc((495 - var(--y) - var(--s) / 2) * var(--su));
    --gR: calc(var(--gr) * var(--su));
}

/* The dive exists only on the desktop drawing below */
.nova-dive {
    display: none;
}

/* A soft band of light crosses her, masked by the art so it lights only the picture */
.nova-sweep {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: url(/assets/img/nova-star.webp?v=9cb65096);
    mask-image: url(/assets/img/nova-star.webp?v=9cb65096);
    /* The source has an opaque sky: light the bright artwork, not its rectangle. */
    mask-mode: luminance;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.nova-sweep-band {
    position: absolute;
    top: 0;
    left: 0;
    width: 22%;
    height: 100%;
    mix-blend-mode: screen;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(220, 226, 255, 0.16) 38%, rgba(255, 255, 255, 0.42) 50%, rgba(220, 226, 255, 0.16) 62%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-110%) skewX(-14deg);
}

/* One violet ring leaves the star as the headline rises and crosses the art; the sweep's mask keeps it on the picture.
   At rest it is a clear speck at the star: 2000 art px across, it reaches the art's far corner */
.nova-sweep::after {
    content: "";
    position: absolute;
    left: calc(-188 * var(--su));
    top: calc(-505 * var(--su));
    width: calc(2000 * var(--su));
    height: calc(2000 * var(--su));
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(124, 92, 255, 0) 82%, rgba(124, 92, 255, 0.55) 90%, rgba(170, 120, 255, 0.95) 95%, rgba(157, 123, 255, 0) 100%);
    opacity: 0;
    transform: scale(0.04);
}

/* The ignition at the star: a flash, a flare and a ring that burst once, then a glow that stays */
.nova-ignite {
    display: block;
    position: absolute;
    left: calc(812 * var(--su));
    top: calc(495 * var(--su));
    width: 0;
    height: 0;
}

.nova-ignite div {
    position: absolute;
}

.nova-flash {
    left: calc(-130 * var(--su));
    top: calc(-130 * var(--su));
    width: calc(260 * var(--su));
    height: calc(260 * var(--su));
    border-radius: 50%;
    background: radial-gradient(circle, #FFFFFF 0%, rgba(220, 224, 255, 0.85) 16%, rgba(124, 131, 255, 0.35) 40%, rgba(124, 131, 255, 0) 70%);
    opacity: 0;
}

.nova-flare {
    left: calc(-520 * var(--su));
    top: calc(-2 * var(--su));
    width: calc(1040 * var(--su));
    height: calc(4 * var(--su));
    border-radius: calc(4 * var(--su));
    background: linear-gradient(90deg, rgba(124, 131, 255, 0) 0%, rgba(170, 176, 255, 0.5) 30%, #FFFFFF 50%, rgba(170, 176, 255, 0.5) 70%, rgba(124, 131, 255, 0) 100%);
    opacity: 0;
}

.nova-shock {
    left: calc(-330 * var(--su));
    top: calc(-330 * var(--su));
    width: calc(660 * var(--su));
    height: calc(660 * var(--su));
    box-sizing: border-box;
    border-radius: 50%;
    border: calc(1.5 * var(--su)) solid rgba(201, 204, 255, 0.7);
    box-shadow: 0 0 calc(30 * var(--su)) rgba(124, 131, 255, 0.35), inset 0 0 calc(30 * var(--su)) rgba(124, 131, 255, 0.25);
    opacity: 0;
}

.nova-glow {
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    scale: 1.15;
}

.nova-rays {
    left: calc(-320 * var(--su));
    top: calc(-320 * var(--su));
    width: calc(640 * var(--su));
    height: calc(640 * var(--su));
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(210, 214, 255, 0.11) 0deg 0.9deg, rgba(0, 0, 0, 0) 0.9deg 15deg);
    -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.4) 18%, transparent 46%);
    mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.4) 18%, transparent 46%);
}

.nova-glow-halo {
    left: calc(-140 * var(--su));
    top: calc(-140 * var(--su));
    width: calc(280 * var(--su));
    height: calc(280 * var(--su));
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(160, 166, 255, 0.28) 22%, rgba(124, 131, 255, 0.08) 48%, rgba(124, 131, 255, 0) 70%);
}

.nova-anam {
    left: calc(-200 * var(--su));
    top: calc(-1 * var(--su));
    width: calc(400 * var(--su));
    height: calc(2 * var(--su));
    border-radius: calc(2 * var(--su));
    background: linear-gradient(90deg, rgba(124, 131, 255, 0) 0%, rgba(160, 166, 255, 0.22) 28%, rgba(240, 242, 255, 0.95) 50%, rgba(160, 166, 255, 0.22) 72%, rgba(124, 131, 255, 0) 100%);
    transform-origin: 50% 50%;
}

.nova-anam-wide {
    left: calc(-240 * var(--su));
    top: calc(-20 * var(--su));
    width: calc(480 * var(--su));
    height: calc(40 * var(--su));
    border-radius: 50%;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(140, 148, 255, 0.32) 0%, rgba(124, 131, 255, 0) 72%);
}

.nova-spark {
    left: calc(-100 * var(--su));
    top: calc(-100 * var(--su));
    width: calc(200 * var(--su));
    height: calc(200 * var(--su));
}

.nova-spark span {
    position: absolute;
    left: calc(99 * var(--su));
    top: 0;
    width: calc(2 * var(--su));
    height: calc(200 * var(--su));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
}

.nova-spark span + span {
    left: 0;
    top: calc(99 * var(--su));
    width: calc(200 * var(--su));
    height: calc(2 * var(--su));
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
}

.nova-glow-core {
    left: calc(-18 * var(--su));
    top: calc(-18 * var(--su));
    width: calc(36 * var(--su));
    height: calc(36 * var(--su));
    border-radius: 50%;
    background: radial-gradient(circle, #FFFFFF 0%, rgba(230, 232, 255, 0.9) 35%, rgba(124, 131, 255, 0) 72%);
}

/* Desktop: the art is drawn at 0.8 of the frame from frame (-28, -56), so --su is one art px and the
   star sits at (812, 495). The stage's own box starts at the frame's top and the art sits 56 frame px
   above it, because film.js scales down a screen whose content reaches outside the frame. */
@media (min-width: 900px) {
    .nova-stage {
        --su: calc(0.8 * var(--hu));
        left: calc(var(--fx) - 28 * var(--hu));
        top: var(--fy);
        height: calc(1024 * var(--su) - 56 * var(--hu));
    }

    .nova-persp {
        top: calc(-56 * var(--hu));
        bottom: auto;
        height: calc(1024 * var(--su));
    }

    /* The dive (D-8): nova-stage.js runs --dive from 0 to 1 over 1.9 s while the voice is open and back once it
       ends; every part below is drawn from it through the board's smoothsteps (HomeHero-k3m8.dc.html,
       renderVals()): the art moves toward the frame's centre, grows, blurs and fades, streaks and sparks rush
       out of the star, a flash fills the screen and clears, and the bust comes forward with its rings. */
    .nova-stage {
        --dv-grow-t: clamp(0, var(--dive) / 0.62, 1);
        --dv-grow: calc(var(--dv-grow-t) * var(--dv-grow-t) * (3 - 2 * var(--dv-grow-t)));
        --dv-move-t: clamp(0, var(--dive) / 0.55, 1);
        --dv-move: calc(var(--dv-move-t) * var(--dv-move-t) * (3 - 2 * var(--dv-move-t)));
        --dv-blur-t: clamp(0, (var(--dive) - 0.2) / 0.35, 1);
        --dv-blur: calc(var(--dv-blur-t) * var(--dv-blur-t) * (3 - 2 * var(--dv-blur-t)));
        --dv-fade-t: clamp(0, (var(--dive) - 0.4) / 0.2, 1);
        --dv-fade: calc(var(--dv-fade-t) * var(--dv-fade-t) * (3 - 2 * var(--dv-fade-t)));
        --dv-warp-in-t: clamp(0, (var(--dive) - 0.04) / 0.18, 1);
        --dv-warp-in: calc(var(--dv-warp-in-t) * var(--dv-warp-in-t) * (3 - 2 * var(--dv-warp-in-t)));
        --dv-warp-out-t: clamp(0, (var(--dive) - 0.45) / 0.21, 1);
        --dv-warp-out: calc(var(--dv-warp-out-t) * var(--dv-warp-out-t) * (3 - 2 * var(--dv-warp-out-t)));
        --dv-warp-run-t: clamp(0, (var(--dive) - 0.04) / 0.56, 1);
        --dv-warp-run: calc(var(--dv-warp-run-t) * var(--dv-warp-run-t) * (3 - 2 * var(--dv-warp-run-t)));
        --dv-warp-len-t: clamp(0, (var(--dive) - 0.04) / 0.36, 1);
        --dv-warp-len: calc(var(--dv-warp-len-t) * var(--dv-warp-len-t) * (3 - 2 * var(--dv-warp-len-t)));
        --dv-spark-t: clamp(0, (var(--dive) - 0.06) / 0.56, 1);
        --dv-spark: calc(var(--dv-spark-t) * var(--dv-spark-t) * (3 - 2 * var(--dv-spark-t)));
        --dv-flash-in-t: clamp(0, (var(--dive) - 0.22) / 0.28, 1);
        --dv-flash-in: calc(var(--dv-flash-in-t) * var(--dv-flash-in-t) * (3 - 2 * var(--dv-flash-in-t)));
        --dv-flash-out-t: clamp(0, (var(--dive) - 0.58) / 0.3, 1);
        --dv-flash-out: calc(var(--dv-flash-out-t) * var(--dv-flash-out-t) * (3 - 2 * var(--dv-flash-out-t)));
        --dv-flash-grow-t: clamp(0, (var(--dive) - 0.22) / 0.4, 1);
        --dv-flash-grow: calc(var(--dv-flash-grow-t) * var(--dv-flash-grow-t) * (3 - 2 * var(--dv-flash-grow-t)));
        --dv-bust-in-t: clamp(0, (var(--dive) - 0.56) / 0.3, 1);
        --dv-bust-in: calc(var(--dv-bust-in-t) * var(--dv-bust-in-t) * (3 - 2 * var(--dv-bust-in-t)));
        --dv-bust-grow-t: clamp(0, (var(--dive) - 0.56) / 0.44, 1);
        --dv-bust-grow: calc(var(--dv-bust-grow-t) * var(--dv-bust-grow-t) * (3 - 2 * var(--dv-bust-grow-t)));
        --dv-bust-sharp-t: clamp(0, (var(--dive) - 0.56) / 0.34, 1);
        --dv-bust-sharp: calc(var(--dv-bust-sharp-t) * var(--dv-bust-sharp-t) * (3 - 2 * var(--dv-bust-sharp-t)));
        --dv-rings-t: clamp(0, (var(--dive) - 0.72) / 0.28, 1);
        --dv-rings: calc(var(--dv-rings-t) * var(--dv-rings-t) * (3 - 2 * var(--dv-rings-t)));
    }

    .nova-persp {
        translate: calc(98 * var(--dv-move) * var(--hu)) calc(110 * var(--dv-move) * var(--hu));
        scale: calc(1 + 9 * var(--dv-grow) * var(--dv-grow));
        filter: blur(calc(6 * var(--dv-blur) * var(--hu)));
        opacity: calc(1 - var(--dv-fade));
    }

    /* The dive's own layer, in frame px from the frame's corner, (28, 0) from the stage's */
    .nova-dive {
        display: block;
        position: absolute;
        left: calc(28 * var(--hu));
        top: 0;
        width: calc(1440 * var(--hu));
        height: calc(900 * var(--hu));
        pointer-events: none;
    }

    .nova-warp,
    .nova-dive-flash {
        position: absolute;
        left: calc(622 * var(--hu));
        top: calc(340 * var(--hu));
        width: 0;
        height: 0;
        translate: calc(98 * var(--dv-move) * var(--hu)) calc(110 * var(--dv-move) * var(--hu));
        mix-blend-mode: screen;
    }

    .nova-warp {
        opacity: calc(var(--dv-warp-in) * (1 - var(--dv-warp-out)));
    }

    .nova-warp-streak {
        position: absolute;
        left: 0;
        top: 0;
        width: calc(var(--w) * var(--hu));
        height: calc(1.5 * var(--hu));
        transform-origin: 0 50%;
        transform: rotate(calc(var(--a) * 1deg)) translateX(calc((40 + 760 * var(--dv-warp-run)) * var(--hu))) scaleX(calc(0.2 + 1.6 * var(--dv-warp-len)));
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(221, 224, 255, 0.95) 60%, rgba(255, 255, 255, 0));
    }

    .nova-warp-spark {
        position: absolute;
        left: 0;
        top: 0;
        width: calc(var(--s) * var(--hu));
        height: calc(var(--s) * var(--hu));
        background: var(--c);
        box-shadow: 0 0 calc(var(--g) * var(--hu)) rgba(124, 131, 255, 0.8);
        transform: rotate(calc(var(--a) * 1deg)) translateX(calc((30 + 900 * var(--dv-spark)) * var(--k) * var(--hu))) rotate(calc(var(--r) * 1deg));
    }

    .nova-dive-flash {
        opacity: calc(var(--dv-flash-in) * (1 - var(--dv-flash-out)));
    }

    .nova-dive-flash div {
        position: absolute;
        left: calc(-700 * var(--hu));
        top: calc(-700 * var(--hu));
        width: calc(1400 * var(--hu));
        height: calc(1400 * var(--hu));
        border-radius: 50%;
        scale: calc(0.15 + 1.6 * var(--dv-flash-grow));
        background: radial-gradient(circle, #FFFFFF 0%, #DCDFFF 8%, rgba(140, 146, 255, 0.75) 20%, rgba(91, 108, 255, 0.32) 38%, rgba(3, 3, 10, 0) 62%);
    }

    .nova-dive-rings {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        opacity: var(--dv-rings);
    }

    .nova-dive-r1b { stroke: #9BA1FF; stroke-opacity: 0.35; stroke-width: 1.3; }
    .nova-dive-r2b { stroke: #C9CCFF; stroke-opacity: 0.18; stroke-width: 1; }
    .nova-dive-r1f { stroke: #9BA1FF; stroke-opacity: 0.85; stroke-width: 1.3; }
    .nova-dive-r2f { stroke: #C9CCFF; stroke-opacity: 0.5; stroke-width: 1; }

    .nova-bust {
        position: absolute;
        left: calc(470 * var(--hu));
        top: calc(280 * var(--hu));
        width: calc(500 * var(--hu));
        height: calc(500 * var(--hu));
        transform-origin: 50% 62%;
        opacity: var(--dv-bust-in);
        scale: calc(0.82 + 0.18 * var(--dv-bust-grow));
        filter: blur(calc((1 - var(--dv-bust-sharp)) * 14 * var(--hu)));
    }

    .nova-bust-glow {
        position: absolute;
        left: calc(50 * var(--hu));
        top: calc(40 * var(--hu));
        width: calc(400 * var(--hu));
        height: calc(400 * var(--hu));
        border-radius: 50%;
        background: radial-gradient(circle, color-mix(in srgb, var(--au-accent) 12%, transparent) 0%, rgba(3, 3, 10, 0) 65%);
    }

    .nova-bust img {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
    }
}

/* Phone: the same art drawn at 0.29 from frame (-19.9, 44), with no tag */
@media not all and (min-width: 900px) {
    .nova-stage {
        --su: calc(0.29 * var(--hu));
        left: calc(var(--fx) - 19.9 * var(--hu));
        top: calc(var(--fy) + 44 * var(--hu));
    }

    /* While a conversation is open the phone's Nova moves aside, as the board's wrapper does; the desktop dives.
       The persp turns about the star, which rests at 215.58 frame px (-19.9 + 812 * 0.29), so the move left of
       20.58 puts it on the window's centre, 195, at 0.42 / 0.4634 = 0.906 of its rest size. */
    html[data-au-overlay="voice"] .nova-persp {
        translate: calc(-20.58 * var(--hu)) 0;
        scale: calc(0.42 / 0.4634);
    }
}

/* Motion is opt-in: the rules above are the still states */
@media (prefers-reduced-motion: no-preference) {
    @keyframes au-nform{from{opacity:0;filter:blur(10px)}to{opacity:1;filter:none}}
    @keyframes au-nsettle{from{transform:scale(1.035) translateY(calc(10 * var(--su)))}to{transform:none}}
    @keyframes au-breathe{from{transform:scale(1) translateY(0)}to{transform:scale(1.012) translateY(calc(-4 * var(--su)))}}
    @keyframes au-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
    /* The reveal opens a circle from the star: 0 to 1200 art px, the mask below adds a 200 art px soft edge */
    @keyframes cn-reveal{from{--reveal:0px}to{--reveal:calc(1200 * var(--su))}}
    /* au-fadein is declared once, in hero.css, which loads first */
    /* A load dot leaves its start, turns 260 degrees round the star on a widening spiral (six points, the last 46
       degrees apart on its ring), then snaps home on the rule's own curve and fades */
    @keyframes au-gath{0%{opacity:0;transform:translate(calc(var(--sx) * var(--su)),calc(var(--sy) * var(--su))) rotate(calc(var(--r) * 1deg)) scale(1.6);animation-timing-function:ease-in}10%{opacity:var(--o)}13%{transform:translate(calc(var(--hx) + var(--gR) * .4 * cos(var(--ga) * 1deg - 260deg)),calc(var(--hy) + var(--gR) * .4 * sin(var(--ga) * 1deg - 260deg))) rotate(calc(var(--r) * .85deg)) scale(1.25);animation-timing-function:linear}21%{transform:translate(calc(var(--hx) + var(--gR) * .65 * cos(var(--ga) * 1deg - 195deg)),calc(var(--hy) + var(--gR) * .65 * sin(var(--ga) * 1deg - 195deg))) rotate(calc(var(--r) * .7deg)) scale(1);animation-timing-function:linear}28%{transform:translate(calc(var(--hx) + var(--gR) * .85 * cos(var(--ga) * 1deg - 140deg)),calc(var(--hy) + var(--gR) * .85 * sin(var(--ga) * 1deg - 140deg))) rotate(calc(var(--r) * .55deg)) scale(.85);animation-timing-function:linear}35%{transform:translate(calc(var(--hx) + var(--gR) * 1 * cos(var(--ga) * 1deg - 92deg)),calc(var(--hy) + var(--gR) * 1 * sin(var(--ga) * 1deg - 92deg))) rotate(calc(var(--r) * .42deg)) scale(.75);animation-timing-function:linear}41.5%{transform:translate(calc(var(--hx) + var(--gR) * 1 * cos(var(--ga) * 1deg - 46deg)),calc(var(--hy) + var(--gR) * 1 * sin(var(--ga) * 1deg - 46deg))) rotate(calc(var(--r) * .3deg)) scale(.7);animation-timing-function:linear}48%{transform:translate(calc(var(--hx) + var(--gR) * 1 * cos(var(--ga) * 1deg)),calc(var(--hy) + var(--gR) * 1 * sin(var(--ga) * 1deg))) rotate(calc(var(--r) * .2deg)) scale(.7)}68%{opacity:var(--o);transform:translate(0,0) rotate(0deg) scale(1)}100%{opacity:0;transform:translate(0,0) rotate(0deg) scale(.5)}}
    @keyframes au-pxdr{0%{opacity:0;transform:translate(0,0) scale(1)}14%{opacity:var(--o)}100%{opacity:0;transform:translate(calc(var(--dx) * var(--su)),calc(var(--dy) * var(--su))) scale(.45)}}
    @keyframes au-pxtw{0%,58%,100%{opacity:0}76%{opacity:var(--o)}}
    @keyframes au-ignite{0%{opacity:0;transform:scale(.2)}16%{opacity:1;transform:scale(1.3)}42%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(2.2)}}
    @keyframes au-flare{0%{opacity:0;transform:scaleX(.05)}20%{opacity:1;transform:scaleX(1)}100%{opacity:0;transform:scaleX(1.4)}}
    @keyframes au-shock{0%{opacity:0;transform:scale(.06)}10%{opacity:.75}100%{opacity:0;transform:scale(1)}}
    @keyframes au-ripple{0%{opacity:0;transform:scale(.04)}12%{opacity:1}65%{opacity:.85}100%{opacity:0;transform:scale(1)}}
    @keyframes au-glowin{0%{opacity:0;transform:scale(0)}30%{opacity:1;transform:scale(2.6)}100%{opacity:1;transform:scale(1)}}
    /* The star's turning rays, breathing glow, streaks, sparkle, sweep and lights use these six
       keyframes, declared here once; nothing else loads them */
    @keyframes making-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
    @keyframes making-sweep{0%{transform:translateX(-110%) skewX(-14deg)}40%,100%{transform:translateX(460%) skewX(-14deg)}}
    @keyframes making-halo{from{transform:scale(.9);opacity:.75}to{transform:scale(1.12);opacity:1}}
    @keyframes making-anam{from{transform:scaleX(.82);opacity:.7}to{transform:scaleX(1.08);opacity:1}}
    @keyframes making-spark{from{transform:rotate(0deg) scale(.85);opacity:.6}to{transform:rotate(45deg) scale(1.05);opacity:1}}
    @keyframes making-bokeh{from{transform:translate(0,0)}to{transform:translate(var(--bx),var(--by))}}

    .nova-orbin { animation: au-fadein 1.8s ease 1.3s both; }
    .nova-moon { animation: au-fadein 1.2s ease 3s both; }
    .nova-drawb { animation: au-draw 1.3s cubic-bezier(.65,0,.35,1) 1.9s both; }
    .nova-drawf { animation: au-draw 1.3s cubic-bezier(.65,0,.35,1) 2.4s both; }
    .nova-dots-back { animation: au-fadein 1.6s ease 2.2s both; }
    .nova-dots-art { animation: au-fadein 1.6s ease 2.3s both; }
    .nova-nrev { animation: au-nform 2.1s cubic-bezier(.4,0,.2,1) 1.15s both; }
    /* The circle opening from the star: unmasked before and after, so a screen without motion shows the art whole */
    .nova-reveal {
        /* The smaller of the load's reveal and the film's dissolve, which film.js writes as art px on the stage while the
           page leaves the top and leaves out at rest (1500 art px covers the whole art) */
        --cut: min(var(--reveal), calc(var(--dissolve, 1500) * var(--su)));
        -webkit-mask-image: radial-gradient(circle at calc(812 * var(--su)) calc(495 * var(--su)), #000 var(--cut), transparent calc(var(--cut) + 200 * var(--su)));
        mask-image: radial-gradient(circle at calc(812 * var(--su)) calc(495 * var(--su)), #000 var(--cut), transparent calc(var(--cut) + 200 * var(--su)));
        animation: cn-reveal 3s cubic-bezier(.45,0,.25,1) .8s both;
    }
    .nova-nsettle { animation: au-nsettle 3.2s cubic-bezier(.16,1,.3,1) .9s both; }
    .nova-breathe { animation: au-breathe 8s ease-in-out infinite alternate; }
    .nova-dot-twinkle { animation-name: au-pxtw; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
    .nova-dot-drift { animation-name: au-pxdr; animation-timing-function: linear; animation-iteration-count: infinite; }
    .nova-dots-gather .nova-dot { animation-name: au-gath; animation-timing-function: cubic-bezier(.22,.8,.28,1); animation-fill-mode: both; }

    /* The star ignites on load, then its glow breathes, its rays turn and the sweep crosses her */
    .nova-flash { animation: au-ignite 2.5s cubic-bezier(.2,.7,.2,1) .1s both; }
    .nova-flare { animation: au-flare 1.9s cubic-bezier(.2,.7,.2,1) .2s both; }
    .nova-shock { animation: au-shock 2.4s cubic-bezier(.16,1,.3,1) .45s both; }
    .nova-glow { animation: au-glowin 1.8s cubic-bezier(.2,.7,.2,1) .1s both; }
    .nova-rays { animation: making-spin 120s linear infinite; }
    .nova-glow-halo { animation: making-halo 4.5s ease-in-out infinite alternate; }
    .nova-anam { animation: making-anam 6s ease-in-out infinite alternate; }
    .nova-anam-wide { animation-delay: -2s; }
    .nova-spark { animation: making-spark 10s ease-in-out infinite alternate; }
    .nova-glow-core { animation: making-halo 2.6s ease-in-out infinite alternate; }
    .nova-sweep-band { animation: making-sweep 9s cubic-bezier(.45,0,.25,1) 3.4s infinite; }
    /* The ring starts 0.1 s before the headline rises (hero.css, .hero-lineup at 1.85 s) and trails the dots' landings outward */
    .nova-sweep::after { animation: au-ripple 1.6s cubic-bezier(.3,.3,.6,1) 1.75s; }

    /* The phone's move into and out of a conversation (the desktop's dive is drawn from --dive), and the
       home copy fading with it */
    @media not all and (min-width: 900px) {
        .nova-persp { transition: translate 1.3s cubic-bezier(.3,0,.2,1), scale 1.3s cubic-bezier(.3,0,.2,1); }
    }
    .hero-words { transition: opacity .3s ease; }
}

/* Reduced motion: nothing runs, the stage shows its final state at once.
   The base rules already are that state (opacity 1, no filter, no transform,
   stroke-dashoffset 0); the gather dots stay hidden there. */
@media (prefers-reduced-motion: reduce) {
    .nova-orbin,
    .nova-moon,
    .nova-ring,
    .nova-dots-back,
    .nova-dots-art,
    .nova-nrev,
    .nova-reveal,
    .nova-nsettle,
    .nova-breathe,
    .nova-dot,
    .nova-persp,
    .nova-flash,
    .nova-flare,
    .nova-shock,
    .nova-glow,
    .nova-rays,
    .nova-glow-halo,
    .nova-anam,
    .nova-spark,
    .nova-glow-core,
    .nova-sweep-band {
        animation: none;
        transition: none;
    }
}
