
/* =========================================================
   GLOBALT
========================================================= */

* {
    box-sizing: border-box;
}

.openaicontainer {
    margin: 0;

    overflow: hidden;

    background: #1e293b;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.stage {

    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #1e293b;

    overflow: hidden;
}

.scene {

    position: relative;

    width: min(100vw, 100vh);
    height: min(100vw, 100vh);

    overflow: hidden;

    background: #1e293b;
}


/* =========================================================
   GEMENSAM GLOW
========================================================= */

.glow {

    position: absolute;

    width: 70%;
    height: 35%;

    left: 15%;
    top: 35%;

    background: #38bdf8;

    opacity: .055;

    filter: blur(100px);

    border-radius: 50%;
}


/* =========================================================
   SCENE 0 – INTRO
========================================================= */

#introScene {

    position: absolute;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 10%;

    background: #1e293b;
}

.intro-text {

    max-width: 90%;

    text-align: center;

    color: #38bdf8;

    font-size: clamp(
        28px,
        5vw,
        64px
    );

    line-height: 1.2;

    font-weight: 600;

    letter-spacing: -1px;

    text-shadow:
        0 0 30px rgba(
            56,
            189,
            248,
            .12
        );
}

.intro-cursor {

    display: inline-block;

    width: 3px;

    height: .9em;

    margin-left: 5px;

    vertical-align: -5%;

    background: #f97316;

    animation: blink .7s infinite;
}


/* =========================================================
   BLINK
========================================================= */

@keyframes blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}


/* =========================================================
   SCENE 1 – WEBBLÄSARE
========================================================= */

#browserScene {

    position: absolute;

    inset: 0;
}

.browser-wrapper {

    position: absolute;

    width: 78%;

    left: 11%;

    top: 28%;

    transform-origin:
        50% 15%;
}


/*
    VIKTIGT:
    position: relative gör att .page
    positioneras korrekt inuti browsern.
*/

.browser {

    position: relative;

    width: 100%;

    aspect-ratio: 16 / 10;

    border-radius: 28px;

    overflow: hidden;

    background: #0f172a;

    box-shadow:
        0 40px 100px
        rgba(0,0,0,.45),

        0 0 0 2px
        rgba(56,189,248,.12);
}


/* =========================================================
   BROWSER TOP
========================================================= */

.browser-top {

    position: relative;

    z-index: 10;

    height: 12%;

    min-height: 50px;

    display: flex;

    align-items: center;

    padding: 0 3%;

    gap: 18px;

    background: #334155;
}


/* =========================================================
   TRAFFIC LIGHTS
========================================================= */

.traffic {

    display: flex;

    gap: 9px;

    flex-shrink: 0;
}

.traffic span {

    width: 13px;
    height: 13px;

    border-radius: 50%;

    background: #64748b;
}


/* =========================================================
   ADDRESS BAR
========================================================= */

.address {

    position: relative;

    flex: 1;

    height: 62%;

    display: flex;

    align-items: center;

    padding: 0 20px;

    border-radius: 12px;

    background: #1e293b;

    border:
        1px solid
        rgba(148,163,184,.22);

    color: #94a3b8;

    font-size:
        clamp(
            12px,
            2vw,
            25px
        );

    overflow: hidden;
}

.address-icon {

    margin-right: 12px;

    color: #64748b;
}

.url {

    white-space: nowrap;
}

.cursor {

    display: inline-block;

    width: 2px;

    height: 1.1em;

    margin-left: 2px;

    background: #38bdf8;

    animation: blink .7s infinite;
}


/* =========================================================
   BROWSER PAGE
========================================================= */

.page {

    position: absolute;

    z-index: 1;

    left: 0;
    right: 0;
    bottom: 0;

    top: 12%;

    background: #0f172a;
}


/* =========================================================
   SCENE 1 – CAMERA
========================================================= */

#browserWrapper {

    animation:
        browserIntro
        5.5s
        cubic-bezier(.65,0,.2,1)
        forwards;
}

@keyframes browserIntro {

    0% {

        transform:
            scale(.72)
            translateY(30px);
    }

    35% {

        transform:
            scale(.78)
            translateY(20px);
    }

    100% {

        transform:
            scale(1.45)
            translateY(80px);
    }
}


/* =========================================================
   ADDRESS FOCUS
========================================================= */

.address.scene1-focus {

    animation:
        addressFocus
        4s
        ease
        forwards;
}

@keyframes addressFocus {

    0% {

        border-color:
            rgba(148,163,184,.22);

        box-shadow: none;
    }

    50% {

        border-color:
            rgba(56,189,248,.3);
    }

    70% {

        border-color:
            #38bdf8;

        box-shadow:

            0 0 0 3px
            rgba(56,189,248,.12),

            0 0 35px
            rgba(56,189,248,.15);
    }

    100% {

        border-color:
            #38bdf8;

        box-shadow:

            0 0 0 3px
            rgba(56,189,248,.14),

            0 0 45px
            rgba(56,189,248,.18);
    }
}


/* =========================================================
   SCENE 2 – AI CHAT
========================================================= */

#chatScene {

    position: absolute;

    inset: 0;

    opacity: 0;

    transform: scale(1.08);

    pointer-events: none;
}

.chat-browser {

    position: absolute;

    width: 84%;

    height: 72%;

    left: 8%;

    top: 14%;

    border-radius: 28px;

    overflow: hidden;

    background: #0f172a;

    box-shadow:

        0 40px 100px
        rgba(0,0,0,.5),

        0 0 0 2px
        rgba(56,189,248,.1);
}


/* =========================================================
   CHAT TOP
========================================================= */

.chat-top {

    height: 10%;

    background: #334155;

    display: flex;

    align-items: center;

    padding: 0 25px;
}

.chat-title {

    color: #cbd5e1;

    font-size:
        clamp(
            14px,
            2vw,
            23px
        );

    font-weight: 600;
}


/* =========================================================
   CHAT BODY
========================================================= */

.chat-body {

    position: absolute;

    inset: 10% 0 0;

    padding: 7% 9%;

    background:

        radial-gradient(
            circle at 50% 35%,
            rgba(56,189,248,.07),
            transparent 45%
        ),

        #0f172a;
}


/* =========================================================
   AI LOGO
========================================================= */

.ai-logo {

    width: 65px;

    height: 65px;

    margin:
        0 auto 30px;

    border-radius: 50%;

    border:
        3px solid
        #38bdf8;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #38bdf8;

    font-size: 25px;

    font-weight: bold;
}


/* =========================================================
   CHAT INPUT
========================================================= */

.chat-input {

    position: absolute;

    left: 8%;

    right: 8%;

    bottom: 8%;

    min-height: 75px;

    display: flex;

    align-items: center;

    padding: 20px 25px;

    border-radius: 20px;

    background: #1e293b;

    border:
        2px solid
        rgba(148,163,184,.2);

    color: #e2e8f0;

    font-size:
        clamp(
            12px,
            1.75vw,
            21px
        );

    box-shadow:
        0 15px 40px
        rgba(0,0,0,.25);
}

.chat-input.focus {

    border-color: #38bdf8;

    box-shadow:

        0 0 0 4px
        rgba(56,189,248,.08),

        0 0 35px
        rgba(56,189,248,.12);
}


/* =========================================================
   SEND BUTTON
========================================================= */

.send-button {

    position: absolute;

    right: 18px;

    width: 45px;

    height: 45px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #38bdf8;

    color: #0f172a;

    font-weight: bold;
}


/* =========================================================
   SCENE 3 – AI SVAR
========================================================= */

#responseScene {

    position: absolute;

    inset: 0;

    opacity: 0;

    pointer-events: none;
}

.response-window {

    position: absolute;

    width: 78%;

    left: 11%;

    top: 17%;

    padding: 45px;

    border-radius: 28px;

    background: #0f172a;

    box-shadow:

        0 40px 100px
        rgba(0,0,0,.5),

        0 0 0 2px
        rgba(56,189,248,.1);
}


/* =========================================================
   RESPONSE HEADER
========================================================= */

.response-header {

    display: flex;

    align-items: center;

    gap: 18px;

    margin-bottom: 35px;

    color: #38bdf8;

    font-size:
        clamp(
            14px,
            2vw,
            22px
        );

    font-weight: bold;
}

.response-icon {

    width: 50px;

    height: 50px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        3px solid
        #38bdf8;
}


/* =========================================================
   RESPONSE TEXT
========================================================= */

.response-text {

    min-height: 130px;

    color: #e2e8f0;

    font-size:
        clamp(
            17px,
            2.7vw,
            31px
        );

    line-height: 1.5;
}


/* =========================================================
   DOWNLOAD BUTTON
========================================================= */

.download-button {

    margin-top: 40px;

    display: inline-flex;

    align-items: center;

    gap: 15px;

    padding: 18px 30px;

    border-radius: 14px;

    background: #38bdf8;

    color: #0f172a;

    font-size:
        clamp(
            15px,
            2vw,
            23px
        );

    font-weight: bold;

    opacity: 0;
}


/* =========================================================
   MOUSE
========================================================= */

.mouse {

    position: absolute;

    width: 38px;

    height: 50px;

    z-index: 20;

    transform:
        translate(-50%,-50%);
}

.mouse::before {

    content: "";

    position: absolute;

    width: 28px;

    height: 38px;

    border:
        3px solid
        white;

    border-radius: 12px;

    background: #1e293b;
}

.mouse::after {

    content: "";

    position: absolute;

    left: 12px;

    top: 7px;

    width: 4px;

    height: 10px;

    border-radius: 3px;

    background: white;
}


/* =========================================================
   CLICK RING
========================================================= */

.click-ring {

    position: absolute;

    width: 55px;

    height: 55px;

    border:
        4px solid
        #f97316;

    border-radius: 50%;

    transform:
        translate(-50%,-50%)
        scale(.3);

    opacity: 0;
}


/* =========================================================
   FILE
========================================================= */

.file {

    position: absolute;

    width: 90px;

    height: 115px;

    border-radius: 12px;

    background: #38bdf8;

    color: #0f172a;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-weight: bold;

    box-shadow:
        0 20px 50px
        rgba(0,0,0,.4);

    opacity: 0;
}

.file-icon {

    font-size: 32px;
}

.file-name {

    font-size: 14px;
}


/* =========================================================
   DOWNLOAD TARGET
========================================================= */

.download-target {

    z-index: 15;

    position: absolute;

    right: 4%;

    top: 2%;

    width: 70px;

    height: 55px;

    border-radius: 12px;

    background: #334155;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #38bdf8;

    font-size: 27px;

    opacity: 0;
}

.download-target::after {

    content: "";

    position: absolute;

    width: 13px;

    height: 13px;

    top: -4px;

    right: -4px;

    border-radius: 50%;

    background: #f97316;
}


/* =========================================================
   MOBILANPASSNING
========================================================= */

@media (max-width: 600px) {

    .browser {

        border-radius: 18px;
    }

    .browser-top {

        min-height: 38px;

        gap: 8px;

        padding: 0 3%;
    }

    .traffic {

        gap: 4px;
    }

    .traffic span {

        width: 7px;

        height: 7px;
    }

    .address {

        padding: 0 8px;

        border-radius: 7px;

        font-size: 10px;
    }

    .address-icon {

        margin-right: 5px;
    }

    .chat-browser {

        border-radius: 18px;
    }

    .response-window {

        padding: 25px;

        border-radius: 20px;
    }

    .response-header {

        margin-bottom: 20px;

        gap: 10px;
    }

    .response-icon {

        width: 38px;

        height: 38px;
    }

    .download-button {

        margin-top: 25px;

        padding: 14px 20px;
    }
}
