/* =========================================
   RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {

    --background: #020307;
    --background-2: #05070d;

    --white: #f5f7ff;
    --muted: #747a8c;

    --cyan: #27f5eb;
    --blue: #2777ff;

    --line: rgba(255, 255, 255, 0.08);

}


/* =========================================
   BODY
========================================= */

html,
body {

    width: 100%;
    height: 100%;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            #090d18 0%,
            var(--background) 55%,
            #000 100%
        );

    color: var(--white);

    font-family:
        "Inter",
        Arial,
        sans-serif;

}


/* =========================================
   INTRO
========================================= */

.intro {

    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            #101625 0%,
            #03050a 50%,
            #000 100%
        );

    transition:
        opacity 1s ease,
        transform 1.1s cubic-bezier(
            0.76,
            0,
            0.24,
            1
        );

}


.intro-hide {

    opacity: 0;

    transform:
        scale(1.15);

    pointer-events: none;

}


.intro-noise {

    position: absolute;

    inset: -100px;

    opacity: 0.07;

    background-image:
        url(
            "data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"
        );

    pointer-events: none;

}


.intro-content {

    position: relative;

    width: min(
        900px,
        90vw
    );

    text-align: center;

}


.intro-small {

    font-size: 11px;

    letter-spacing: 0.45em;

    color: var(--cyan);

    margin-bottom: 30px;

    animation:
        fadeUp 1.2s ease both;

}


.intro h1 {

    font-size:
        clamp(
            55px,
            11vw,
            150px
        );

    line-height: 0.82;

    font-weight: 900;

    letter-spacing: -0.07em;

    text-transform: uppercase;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #aab1c5 45%,
            #4f5567 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;

    animation:
        titleIn 1.4s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        )
        both;

}


.intro-line {

    width: 120px;

    height: 1px;

    margin: 42px auto 25px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--cyan),
            transparent
        );

    animation:
        lineIn 1.5s ease both;

}


.intro p {

    color: var(--muted);

    font-size: 12px;

    letter-spacing: 0.25em;

    text-transform: uppercase;

    margin-bottom: 22px;

}


#startButton {

    border: 1px solid
        rgba(
            39,
            245,
            235,
            0.35
        );

    background:
        rgba(
            39,
            245,
            235,
            0.04
        );

    color: var(--cyan);

    padding:
        15px
        40px;

    font-size: 11px;

    letter-spacing: 0.35em;

    cursor: pointer;

    transition:
        0.3s ease;

}


#startButton:hover {

    background:
        rgba(
            39,
            245,
            235,
            0.13
        );

    border-color:
        var(--cyan);

    box-shadow:
        0 0 35px
        rgba(
            39,
            245,
            235,
            0.18
        );

    transform:
        translateY(-2px);

}


/* =========================================
   MAIN
========================================= */

.main {

    position: fixed;

    inset: 0;

    opacity: 0;

    transform:
        scale(1.04);

    transition:
        opacity 1.5s ease,
        transform 1.5s ease;

}


.main.visible {

    opacity: 1;

    transform:
        scale(1);

}


.hidden {

    display: none;

}


/* =========================================
   BACKGROUND
========================================= */

.background {

    position: absolute;

    inset: 0;

    overflow: hidden;

}


.grid {

    position: absolute;

    inset: -50%;

    background-image:

        linear-gradient(
            rgba(
                255,
                255,
                255,
                0.025
            )
            1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(
                255,
                255,
                255,
                0.025
            )
            1px,
            transparent 1px
        );

    background-size:
        60px
        60px;

    transform:
        perspective(500px)
        rotateX(55deg)
        translateY(25%);

    transform-origin:
        center bottom;

    animation:
        gridMove 18s
        linear
        infinite;

}


.orb {

    position: absolute;

    border-radius: 50%;

    filter:
        blur(100px);

    opacity: 0.16;

    animation:
        float 12s
        ease-in-out
        infinite alternate;

}


.orb-one {

    width: 500px;
    height: 500px;

    background:
        var(--cyan);

    top: -300px;
    left: -150px;

}


.orb-two {

    width: 450px;
    height: 450px;

    background:
        var(--blue);

    bottom: -300px;
    right: -150px;

    animation-delay:
        -5s;

}


.light {

    position: absolute;

    width: 1px;

    height: 80vh;

    background:
        linear-gradient(
            transparent,
            rgba(
                39,
                245,
                235,
                0.25
            ),
            transparent
        );

    transform:
        rotate(25deg);

    filter:
        blur(1px);

}


.light-one {

    left: 20%;

    top: -20%;

    animation:
        lightMove 10s
        ease-in-out
        infinite;

}


.light-two {

    right: 20%;

    bottom: -20%;

    transform:
        rotate(-25deg);

    animation:
        lightMove 13s
        ease-in-out
        infinite
        reverse;

}


/* =========================================
   NOISE
========================================= */

.noise {

    position: absolute;

    inset: -100px;

    pointer-events: none;

    opacity: 0.035;

    z-index: 2;

    background-image:
        url(
            "data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"
        );

}


/* =========================================
   TOP
========================================= */

.top {

    position: absolute;

    top: 35px;

    left: 45px;
    right: 45px;

    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    z-index: 5;

    font-size: 9px;

    letter-spacing:
        0.25em;

    color:
        var(--muted);

}


.top-left {

    display: flex;

    align-items:
        center;

    gap: 10px;

}


.status-dot {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        var(--cyan);

    box-shadow:
        0 0 15px
        var(--cyan);

    animation:
        pulse 2s
        infinite;

}


/* =========================================
   HERO
========================================= */

.hero {

    position: absolute;

    z-index: 4;

    inset: 0;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content:
        center;

    padding:
        80px 30px;

}


.eyebrow {

    display: flex;

    align-items:
        center;

    gap: 15px;

    color:
        var(--muted);

    font-size: 9px;

    letter-spacing:
        0.5em;

    margin-bottom:
        35px;

    animation:
        fadeUp 1.5s 0.3s
        both;

}


.eyebrow span {

    width: 35px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--cyan)
        );

}


.eyebrow span:last-child {

    background:
        linear-gradient(
            90deg,
            var(--cyan),
            transparent
        );

}


/* =========================================
   MESSAGE
========================================= */

.message {

    max-width:
        1000px;

    text-align:
        center;

    font-size:
        clamp(
            18px,
            3vw,
            38px
        );

    line-height: 1.1;

    font-weight: 800;

    letter-spacing:
        -0.04em;

    text-transform:
        uppercase;

    margin-bottom:
        35px;

    color:
        rgba(
            255,
            255,
            255,
            0.92
        );

    animation:
        fadeUp 1.5s 0.45s
        both;

}


/* =========================================
   COUNTDOWN
========================================= */

.countdown {

    display: flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        clamp(
            12px,
            3vw,
            45px
        );

    animation:
        countdownIn 1.8s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        )
        0.25s
        both;

}


.time-unit {

    display: flex;

    flex-direction:
        column;

    align-items:
        center;

}


.number {

    font-size:
        clamp(
            70px,
            13vw,
            190px
        );

    font-weight:
        800;

    line-height:
        0.85;

    letter-spacing:
        -0.08em;

    font-variant-numeric:
        tabular-nums;

    color:
        #f6f8ff;

    text-shadow:

        0 0 20px
        rgba(
            255,
            255,
            255,
            0.06
        ),

        0 0 80px
        rgba(
            39,
            245,
            235,
            0.08
        );

}


.label {

    margin-top:
        25px;

    color:
        #555b6c;

    font-size:
        8px;

    font-weight:
        600;

    letter-spacing:
        0.4em;

}


.separator {

    align-self:
        flex-start;

    margin-top:
        clamp(
            0px,
            1vw,
            18px
        );

    font-size:
        clamp(
            45px,
            8vw,
            100px
        );

    color:
        rgba(
            39,
            245,
            235,
            0.5
        );

    animation:
        blink 1s
        steps(1)
        infinite;

}


/* =========================================
   PROGRESS
========================================= */

.progress-container {

    width:
        min(
            850px,
            80vw
        );

    margin-top:
        65px;

    animation:
        fadeUp 1.5s
        0.8s
        both;

}


.progress-track {

    position: relative;

    width: 100%;

    height: 1px;

    background:
        rgba(
            255,
            255,
            255,
            0.09
        );

}


.progress {

    position: relative;

    width: 0%;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--blue),
            var(--cyan)
        );

    box-shadow:
        0 0 15px
        rgba(
            39,
            245,
            235,
            0.5
        );

    transition:
        width 0.25s linear;

}


.progress::after {

    content: "";

    position: absolute;

    right: 0;

    top: 50%;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        var(--cyan);

    transform:
        translate(
            50%,
            -50%
        );

    box-shadow:
        0 0 15px
        var(--cyan);

}


.progress-info {

    display: flex;

    justify-content:
        space-between;

    margin-top:
        10px;

    color:
        #454b5b;

    font-size:
        7px;

    letter-spacing:
        0.15em;

}


/* =========================================
   SUBTITLE
========================================= */

.subtitle {

    margin-top:
        45px;

    color:
        var(--muted);

    font-size:
        9px;

    letter-spacing:
        0.35em;

    text-transform:
        uppercase;

    animation:
        fadeUp 1.5s
        1s
        both;

}


/* =========================================
   SOUND
========================================= */

.sound-button {

    position: absolute;

    bottom: 70px;

    display: flex;

    align-items:
        center;

    gap: 10px;

    border: none;

    background: none;

    color:
        #555b6c;

    font-family:
        inherit;

    font-size: 8px;

    letter-spacing:
        0.25em;

    cursor: pointer;

    transition:
        color 0.3s ease;

}


.sound-button:hover {

    color:
        var(--cyan);

}


.sound-icon {

    font-size:
        7px;

    color:
        var(--cyan);

    animation:
        pulse 2s
        infinite;

}


/* =========================================
   FOOTER
========================================= */

.bottom {

    position: absolute;

    bottom: 30px;

    left: 45px;
    right: 45px;

    display: flex;

    justify-content:
        space-between;

    color:
        #363b49;

    font-size:
        7px;

    letter-spacing:
        0.25em;

    z-index: 5;

}


/* =========================================
   END SCREEN
========================================= */

.end-screen {

    position: fixed;

    inset: 0;

    z-index: 200;

    display: flex;

    align-items:
        center;

    justify-content:
        center;

    background:
        #000;

    opacity: 0;

    transform:
        scale(1.08);

    transition:
        opacity 1.5s ease,
        transform 2s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        );

}


.end-visible {

    opacity: 1;

    transform:
        scale(1);

}


.end-glow {

    position: absolute;

    width: 40vw;

    height: 40vw;

    max-width: 600px;
    max-height: 600px;

    border-radius: 50%;

    background:
        var(--cyan);

    filter:
        blur(180px);

    opacity:
        0.12;

    animation:
        endPulse 4s
        infinite
        alternate;

}


.end-content {

    position: relative;

    text-align:
        center;

}


.end-small {

    color:
        var(--cyan);

    font-size:
        10px;

    letter-spacing:
        0.5em;

    margin-bottom:
        30px;

}


.end-content h2 {

    font-size:
        clamp(
            70px,
            14vw,
            220px
        );

    line-height:
        0.85;

    font-weight:
        900;

    letter-spacing:
        -0.08em;

    color:
        white;

    text-shadow:
        0 0 80px
        rgba(
            39,
            245,
            235,
            0.3
        );

}


.end-line {

    width:
        100px;

    height: 1px;

    background:
        var(--cyan);

    margin:
        40px auto;

    box-shadow:
        0 0 20px
        var(--cyan);

}


.end-content p {

    color:
        var(--muted);

    font-size:
        10px;

    letter-spacing:
        0.35em;

    text-transform:
        uppercase;

}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes fadeUp {

    from {

        opacity: 0;

        transform:
            translateY(25px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


@keyframes titleIn {

    from {

        opacity: 0;

        transform:
            scale(0.85)
            translateY(30px);

        filter:
            blur(12px);

    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);

        filter:
            blur(0);

    }

}


@keyframes countdownIn {

    from {

        opacity: 0;

        transform:
            scale(0.8);

        filter:
            blur(15px);

    }

    to {

        opacity: 1;

        transform:
            scale(1);

        filter:
            blur(0);

    }

}


@keyframes lineIn {

    from {

        opacity: 0;

        width: 0;

    }

    to {

        opacity: 1;

        width: 120px;

    }

}


@keyframes pulse {

    0%,
    100% {

        opacity: 0.4;

        transform:
            scale(0.8);

    }

    50% {

        opacity: 1;

        transform:
            scale(1.2);

    }

}


@keyframes blink {

    0%,
    45% {

        opacity: 1;

    }

    46%,
    100% {

        opacity: 0.25;

    }

}


@keyframes gridMove {

    from {

        transform:
            perspective(500px)
            rotateX(55deg)
            translateY(25%);

    }

    to {

        transform:
            perspective(500px)
            rotateX(55deg)
            translateY(31%);

    }

}


@keyframes float {

    from {

        transform:
            translate(
                -20px,
                -20px
            );

    }

    to {

        transform:
            translate(
                80px,
                60px
            );

    }

}


@keyframes lightMove {

    0% {

        opacity: 0;

    }

    50% {

        opacity: 1;

    }

    100% {

        opacity: 0;

    }

}


@keyframes endPulse {

    from {

        transform:
            scale(0.8);

        opacity:
            0.07;

    }

    to {

        transform:
            scale(1.2);

        opacity:
            0.16;

    }

}


.main-fade {

    opacity: 0 !important;

    transform:
        scale(0.92) !important;

}


/* =========================================
   MOBILE
========================================= */

@media (
    max-width: 650px
) {

    .top {

        top: 22px;

        left: 20px;
        right: 20px;

    }


    .top-right {

        display: none;

    }


    .bottom {

        left: 20px;
        right: 20px;

        bottom: 20px;

    }


    .hero {

        padding:
            60px 15px;

    }


    .message {

        max-width:
            90vw;

        margin-bottom:
            30px;

    }


    .countdown {

        gap:
            7px;

    }


    .number {

        font-size:
            clamp(
                48px,
                16vw,
                90px
            );

    }


    .label {

        font-size:
            6px;

        margin-top:
            18px;

        letter-spacing:
            0.25em;

    }


    .separator {

        font-size:
            38px;

    }


    .progress-container {

        width:
            88vw;

        margin-top:
            45px;

    }


    .subtitle {

        text-align:
            center;

        line-height:
            1.8;

        max-width:
            80vw;

    }


    .sound-button {

        bottom:
            55px;

    }


    .intro h1 {

        font-size:
            20vw;

    }

}
