.gs-home-hero {
    position: relative;
    isolation: isolate;
    container-type: inline-size;
    aspect-ratio: 1672 / 941;
    background: #050d1a url('../images/nebula/home-editing-studio.webp') center / cover no-repeat;
    color: #f7f8fc;
}

.gs-home-hero::after {
    content: "";
    position: absolute;
    inset: auto 17% 5%;
    height: 11%;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 48% 40%, #dcf7ffa6 0%, #37caff80 15%, transparent 48%),
        radial-gradient(ellipse at 26% 55%, #649aff73 0%, transparent 36%),
        radial-gradient(ellipse at 72% 52%, #c675ff73 0%, transparent 38%);
    filter: blur(clamp(4px, 0.65cqw, 12px));
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 240ms ease-out;
}

.gs-home-hero:has(> .gs-hero-frame.is-playing)::after {
    opacity: .34;
    animation: gs-hero-reflection 5s ease-in-out infinite alternate;
}

@keyframes gs-hero-reflection {
    from { transform: translateX(-2%) scaleX(.94); }
    to { transform: translateX(2%) scaleX(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .gs-home-hero::after {
        transition: none;
    }

    .gs-home-hero:has(> .gs-hero-frame.is-playing)::after {
        animation: none;
    }
}

.gs-home-hero .gs-hero-frame {
    position: absolute;
    inset: 15.1% 3.1% 17.7%;
    border-radius: 3.3cqw;
    isolation: isolate;
    box-shadow: 0 18px 30px -14px #010911;
}

.gs-home-hero .gs-hero-media,
.gs-home-hero .gs-hero-intro-slot,
.gs-home-hero .gs-hero-intro {
    display: contents;
}

.gs-home-hero .gs-hero-frame::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(90deg, #0c162a6b, #0b183526 43%, #11122c29);
}

.gs-home-hero .gs-hero-frame-edge {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 0 5px #1baafa);
}

.gs-home-hero .gs-hero-copy {
    position: absolute;
    top: 19%;
    left: 5.75%;
    width: 53%;
    z-index: 2;
    pointer-events: none;
}

.gs-home-hero .gs-hero-copy::before {
    content: "";
    display: block;
    width: 3.7cqw;
    height: 3px;
    margin-bottom: 1.1cqw;
    background: #45eeff;
    box-shadow: 0 0 12px #19b9e5;
}

.gs-home-hero h1 {
    margin: 0;
    font-size: 4.08cqw;
    font-weight: 600;
    line-height: .99;
    letter-spacing: -.044em;
}

.gs-home-hero h1 span {
    display: block;
    width: fit-content;
    color: #76c8ff;
    background: linear-gradient(96deg, #2de1f7, #68aaf2 42%, #cd94f4 69%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gs-home-hero .gs-hero-copy p {
    max-width: 34cqw;
    margin: 2.45cqw 0 0;
    color: #e9ebf3;
    font-size: 1.33cqw;
    line-height: 1.5;
}

.gs-home-hero .gs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.45cqw;
    margin-top: 2.35cqw;
}

.gs-home-hero .gs-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .9em;
    min-height: 3.35cqw;
    padding: 0 1.78cqw;
    border: 1px solid #c7dbf38c;
    border-radius: 99px;
    background: #18243780;
    color: inherit;
    font-size: 1.12cqw;
    white-space: nowrap;
    pointer-events: auto;
    text-decoration: none;
    cursor: pointer;
}

.gs-home-hero .gs-hero-cta-primary {
    border-color: #c8f9ff;
    background: linear-gradient(95deg, #008cadbe, #09172ecd 50%, #2d1851de);
    box-shadow: inset 3px 0 12px #34e5ff, inset -4px 0 10px #aa63ef, 0 0 14px #20cbff83;
    font-weight: 700;
}

.gs-home-hero button:focus-visible,
.gs-home-hero a:focus-visible {
    outline: 2px solid white;
    outline-offset: 5px;
}

.gs-home-hero .gs-hero-play {
    position: absolute;
    top: 50.8%;
    z-index: 2;
    left: 61.2%;
    transform: translate(-50%, -50%);
    width: 8.9cqw;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid #c5f4ff;
    border-radius: 50%;
    color: #fff;
    background: #042b50a8;
    box-shadow: inset 0 0 25px #1baefa, 0 0 24px #32cfff;
    cursor: pointer;
}

.gs-home-hero .gs-hero-play::after {
    content: "";
    position: absolute;
    inset: -25%;
    border: 1px dashed #60dfff9e;
    border-radius: 50%;
    outline: 1px dotted #45bbfa6b;
    outline-offset: 12px;
    pointer-events: none;
}

.gs-home-hero .gs-hero-triangle {
    display: inline-block;
    width: 1em;
    height: 1.13em;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.gs-home-hero .gs-hero-play .gs-hero-triangle {
    font-size: 2.75cqw;
    margin-left: .24em;
}

.gs-home-hero .gs-hero-video {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    overflow: hidden;
    border-radius: inherit;
    clip-path: url("#gsHeroFrameClip");
    /* Clear the lowest point of the curved top edge and the bottom stroke. */
    padding-block: 2.4cqw .65cqw;
}

.gs-home-hero .gs-hero-video:empty {
    display: none;
}

.gs-home-hero .gs-hero-video iframe,
.gs-home-hero .gs-hero-video video {
    display: block;
    width: min(100%, 61.8cqw);
    height: 100%;
    min-height: 0;
    border: 0;
}

.gs-home-hero .gs-hero-video video {
    object-fit: contain;
}

.gs-home-hero .is-playing .gs-hero-copy,
.gs-home-hero .has-player:not(.is-paused) .gs-hero-play {
    visibility: hidden;
}

.gs-home-hero .is-paused::before {
    background: linear-gradient(115deg, #061024ed, #081225ad 55%, #0c173933);
}

.gs-home-hero .gs-hero-status {
    position: absolute;
    z-index: 3;
    inset: auto 6% 13%;
    width: fit-content;
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 8px;
    background: #071426;
    font-size: 14px;
}

.gs-home-hero .gs-hero-status a { text-decoration: underline; }

@media (max-width: 900px) {
    .gs-home-hero {
        container-type: normal;
        aspect-ratio: auto;
        padding: 106px 16px clamp(50px, 12vw, 110px);
        background-position: 66% center;
    }

    /* Fixed shortcuts can sit over the controls on short or scrolled viewports. */
    body:has(.gs-home-hero .gs-hero-frame.has-player) :is(#floatingMinigameBtn, #backToTop) {
        visibility: hidden;
        pointer-events: none;
    }

    body:has(.gs-home-hero .gs-hero-frame.has-player) #mobileMenu[aria-hidden="true"] {
        pointer-events: none;
    }

    .gs-home-hero::after {
        inset: auto 10% 4%;
        height: 10%;
    }

    .gs-home-hero .gs-hero-frame {
        position: relative;
        inset: auto;
        border: 1px solid #75cfffad;
        border-radius: 25px;
        transition: border-color 420ms ease, box-shadow 420ms ease;
    }

    .gs-home-hero .gs-hero-frame.has-player::before {
        pointer-events: none;
    }

    .gs-home-hero .gs-hero-frame.has-player {
        isolation: auto;
        border-color: #7ce6ff;
        border-radius: 0;
        box-shadow: 0 0 14px #42cfff65, 0 0 25px #825cff45;
    }

    .gs-home-hero .gs-hero-intro-slot {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 1fr;
        transition: grid-template-rows 460ms cubic-bezier(.22, .8, .25, 1);
    }

    .gs-home-hero .gs-hero-intro {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        overflow: hidden;
    }

    .gs-home-hero .has-player:not(.is-paused) .gs-hero-intro-slot {
        grid-template-rows: 0fr;
        visibility: hidden;
    }

    .gs-home-hero .has-player .gs-hero-play {
        display: none;
    }

    .gs-home-hero .gs-hero-copy {
        padding: clamp(21px, 5vw, 45px) clamp(17px, 5vw, 45px) 0;
    }

    .gs-home-hero .has-player .gs-hero-copy {
        padding-bottom: clamp(21px, 5vw, 45px);
    }

    .gs-home-hero .is-paused .gs-hero-copy {
        animation: gs-hero-mobile-copy-in 420ms ease-out both;
    }

    @keyframes gs-hero-mobile-copy-in {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .gs-home-hero .gs-hero-frame::before {
        background: linear-gradient(165deg, #071021e8, #101b32c2 45%, #09183234 82%);
    }

    .gs-home-hero .gs-hero-frame-edge { display: none; }
    .gs-home-hero .gs-hero-copy { position: static; width: 100%; }
    .gs-home-hero .gs-hero-copy::before { width: 44px; margin-bottom: 17px; }
    .gs-home-hero h1 { font-size: clamp(29px, 7.2vw, 58px); line-height: 1.045; overflow-wrap: anywhere; }
    .gs-home-hero .gs-hero-copy p { max-width: 40ch; margin-top: 20px; font-size: clamp(15px, 2.6vw, 20px); }
    .gs-home-hero .gs-hero-actions { gap: 12px; margin-top: 22px; }
    .gs-home-hero .gs-hero-cta { min-height: 46px; padding-inline: 17px; font-size: 15px; }

    .gs-home-hero .gs-hero-play {
        position: relative;
        inset: auto;
        transform: none;
        width: clamp(70px, 14vw, 96px);
        margin: 38px 0;
    }

    .gs-home-hero .gs-hero-play .gs-hero-triangle { font-size: 26px; }
    .gs-home-hero .gs-hero-video {
        position: static;
        display: block;
        overflow: visible;
        padding: 0;
        clip-path: none;
        isolation: auto;
    }

    .gs-home-hero .gs-hero-video iframe,
    .gs-home-hero .gs-hero-video video {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        min-height: 220px;
    }

    .gs-home-hero .gs-hero-video iframe {
        pointer-events: auto;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .gs-home-hero .gs-hero-frame,
    .gs-home-hero .gs-hero-intro-slot {
        transition: none;
    }

    .gs-home-hero .is-paused .gs-hero-copy {
        animation: none;
    }
}

@media (min-width: 901px) {
    .gs-home-hero .gs-hero-frame::before {
        inset: 0;
        border-radius: 0;
        clip-path: url("#gsHeroFrameClip");
    }

    .gs-home-hero .gs-hero-frame.has-player:not(.is-paused)::before {
        border-radius: inherit;
        clip-path: none;
    }

    .gs-home-hero .is-paused .gs-hero-video {
        visibility: hidden;
    }

    .gs-home-hero .gs-hero-frame {
        --hero-player-width: min(67.2cqw, max(24rem, calc((100svh - 9rem) * 16 / 9)));
        --hero-player-height: calc(var(--hero-player-width) * 9 / 16);
        --hero-player-radius: clamp(14px, 1.65cqw, 28px);
        --hero-frame-time: 560ms;
        --hero-frame-ease: cubic-bezier(.22, .8, .25, 1);
        box-sizing: border-box;
        inset: 48.7% auto auto 50%;
        width: 93.8%;
        height: 67.2%;
        transform: translate(-50%, -50%);
        border: 1px solid transparent;
        transition:
            top var(--hero-frame-time) var(--hero-frame-ease),
            width var(--hero-frame-time) var(--hero-frame-ease),
            height var(--hero-frame-time) var(--hero-frame-ease),
            border-radius var(--hero-frame-time) var(--hero-frame-ease),
            border-color 280ms ease,
            background-color 320ms ease,
            box-shadow var(--hero-frame-time) ease;
    }

    .gs-home-hero .gs-hero-frame::after {
        content: "";
        position: absolute;
        inset: -2px;
        z-index: 3;
        border-radius: inherit;
        pointer-events: none;
    }

    .gs-home-hero .gs-hero-frame.has-player:not(.is-paused) {
        top: clamp(
            calc(6.75rem + var(--hero-player-height) / 2),
            48.7%,
            calc(100svh - 1rem - var(--hero-player-height) / 2)
        );
        width: var(--hero-player-width);
        height: var(--hero-player-height);
        border-color: #7ce6ff;
        border-radius: var(--hero-player-radius);
        background-color: #050d1a;
        box-shadow: 0 0 11px #42cfff85, 0 0 27px #825cff45, 0 18px 30px -14px #010911;
    }

    .gs-home-hero .gs-hero-frame.has-player:not(.is-paused)::after {
        animation: gs-hero-frame-compress var(--hero-frame-time) ease-out both;
    }

    .gs-home-hero .gs-hero-frame.is-paused::after {
        animation: gs-hero-frame-expand var(--hero-frame-time) ease-out both;
    }

    .gs-home-hero .gs-hero-frame-edge {
        transition: opacity 340ms ease-in-out;
    }

    .gs-home-hero .has-player:not(.is-paused) .gs-hero-frame-edge {
        opacity: 0;
    }

    .gs-home-hero .has-player:not(.is-paused) .gs-hero-video {
        clip-path: none;
        padding: 0;
        border-radius: calc(var(--hero-player-radius) - 1px);
    }

    .gs-home-hero .has-player:not(.is-paused) .gs-hero-video iframe,
    .gs-home-hero .has-player:not(.is-paused) .gs-hero-video video {
        width: 100%;
        border-radius: inherit;
    }

    .gs-home-hero .has-player:not(.is-paused) .gs-hero-copy {
        visibility: hidden;
    }

    @keyframes gs-hero-frame-compress {
        0%, 100% { box-shadow: 0 0 0 0 transparent; }
        42% { box-shadow: 0 0 20px 2px #38dfff9c, inset 0 0 12px #88e9ff63; }
    }

    @keyframes gs-hero-frame-expand {
        0%, 100% { box-shadow: 0 0 0 0 transparent; }
        42% { box-shadow: 0 0 20px 2px #9d79ff9c, inset 0 0 12px #58d9ff63; }
    }
}

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
    .gs-home-hero .gs-hero-frame,
    .gs-home-hero .gs-hero-frame-edge {
        transition: none;
    }

    .gs-home-hero .gs-hero-frame.has-player:not(.is-paused)::after,
    .gs-home-hero .gs-hero-frame.is-paused::after {
        animation: none;
    }
}
