/* Motion has its own layer: static content never depends on these effects. */
html {
    overflow-x: clip
}

/* Lenis owns interpolation; native smooth scroll must not animate layout refreshes. */
html.lenis {
    scroll-behavior: auto !important
}

/* Scroll-linked scenes own their position without browser scroll anchoring. */
html.motion-active {
    overflow-anchor: none
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

.motion-controls {
    display: flex;
    align-items: center;
    gap: 18px
}

.motion-controls button {
    padding: 9px 0;
    background: transparent;
    font-size: 11px;
    color: var(--muted);
    border-bottom: 1px solid #343d4a
}

.motion-controls button:hover {
    color: var(--blue)
}

.motion-controls [data-motion-toggle]::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--blue);
    border-radius: 50%;
    margin-right: 7px
}

.motion-controls [aria-pressed=true]::before {
    background: #828996
}

.motion-controls #replay-intro:disabled {
    opacity: .35;
    cursor: default
}

.title-line {
    overflow: clip;
    padding: 0 .1em .13em 0;
    margin-bottom: -.13em
}

.title-ink {
    display: block;
    transform-origin: 0 100%;
    will-change: transform
}

.word-mask {
    display: inline-block;
    overflow: clip;
    vertical-align: top;
    padding: 0 .08em .18em 0;
    margin-right: -.08em;
    margin-bottom: -.18em
}

.word-ink {
    display: inline-block;
    transform-origin: 0 100%
}

.motion-active .project-visual {
    perspective: 1000px
}

.motion-active .vr-image {
    transition: none
}

.hero-art::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    left: 20%;
    top: 22%;
    border-radius: 50%;
    background: #217dff;
    opacity: var(--aura-opacity, .05);
    filter: blur(65px);
    z-index: -1;
    pointer-events: none
}

.motion-story {
    position: relative;
    margin: 0 0 115px;
    background: #10151e;
    isolation: isolate
}

.story-stage {
    min-height: 100svh;
    overflow: clip;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px 5%;
    background: #10151e;
    isolation: isolate
}

.has-scroll-story {
    height: 280svh
}

.story-stage.is-scroll-story {
    height: 100svh;
    position: sticky;
    top: 0
}

.story-top,
.story-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 2;
    font-size: 11px;
    letter-spacing: .08em
}

.story-counter {
    font-family: monospace
}

.story-words {
    position: relative;
    display: grid;
    align-content: center;
    padding-block: 20px
}

.story-word {
    display: block;
    font-size: clamp(65px, 13vw, 210px);
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -.075em;
    text-align: center
}

.story-word>span {
    color: var(--blue)
}

.story-word:nth-child(2) {
    color: var(--blue)
}

.story-orbit {
    position: absolute;
    width: 55vw;
    height: 55vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    border: 1px solid #7299d22b;
    border-radius: 50%;
    z-index: -1;
    box-shadow: 0 0 0 80px #7299d209, 0 0 0 160px #7299d205
}

.story-bottom {
    font-size: 10px;
    line-height: 1.8;
    letter-spacing: .02em
}

.story-progress {
    width: 22%;
    height: 1px;
    background: #ffffff30;
    overflow: hidden
}

.story-progress i {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left
}

.motion-active .story-stage.is-scroll-story .story-words {
    display: block;
    height: 230px;
    width: 100%
}

.motion-active .is-scroll-story .story-word {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    line-height: 1;
    transform: translateY(-50%)
}

.motion-reduced .story-counter,
.motion-reduced .story-progress {
    display: none
}

.story-stage:not(.is-scroll-story) {
    height: auto;
    gap: 35px
}

.motion-active .process-step {
    --step-fill: 0%;
    background: none
}

.motion-active .process-step::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: var(--step-fill);
    height: 1px;
    background: var(--blue)
}

.motion-active .ai-focus {
    --ai-light: 0;
    background: radial-gradient(ellipse at 10% 60%, rgb(55 147 255 / var(--ai-light)), transparent 70%), linear-gradient(120deg, #111e30, #10151e)
}

@media(min-width:901px) {
    .motion-active .hero-content {
        perspective: 1300px
    }
}

@media(max-width:900px) {
    .motion-story {
        margin-bottom: 85px
    }

    .story-word {
        font-size: clamp(65px, 13vw, 120px)
    }

    .story-words {
        gap: 12px
    }

    .story-orbit {
        width: 90vw;
        height: 90vw
    }
}

@media(max-width:700px) {
    .hero-top {
        align-items: start;
        flex-direction: column;
        gap: 12px
    }

    .motion-controls {
        gap: 20px
    }

    .motion-controls button {
        font-size: 10px;
        padding-block: 7px
    }

    .hero-copy {
        padding-top: 27px
    }

    .story-stage {
        padding: 27px 20px
    }

    .story-top {
        font-size: 9px;
        gap: 12px
    }

    .story-bottom {
        font-size: 9px;
        align-items: end
    }

    .story-bottom>span:last-child {
        display: none
    }

    .story-progress {
        width: 30%
    }

    .motion-story {
        margin-bottom: 65px
    }

    .story-word {
        font-size: clamp(60px, 15vw, 100px)
    }
}

@media(prefers-reduced-motion:reduce) {
    html.motion-active {
        scroll-behavior: smooth
    }

    html.motion-active .cursor-halo {
        display: block
    }
}

@media(hover:none), (pointer:coarse) {
    html.motion-active .cursor-halo {
        display: none
    }
}

@media(max-width:700px) {
    html.motion-active .cursor-halo {
        display: none
    }
}