/* =========================================================
   AlterMind — Sphere Layout
   File: assets/css/sphere.css
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    background: #111417;
    color: #f5f2ea;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    overflow-x: hidden;
}

.sphere-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 68% 48%,
            rgba(142, 104, 40, 0.34) 0%,
            rgba(56, 44, 28, 0.18) 24%,
            rgba(17, 20, 23, 0) 54%
        ),
        linear-gradient(
            180deg,
            #111417 0%,
            #0b0d0f 100%
        );
}

.sphere-stage {
    position: relative;

    width: min(
        1440px,
        100%
    );

    min-height: 100vh;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(420px, 0.82fr)
        minmax(560px, 1.18fr);

    align-items: center;

    padding:
        0 40px;

    overflow: visible;
}

.sphere-content {
    position: relative;

    z-index: 5;

    width: 100%;
    max-width: 520px;

    margin: 0;
}

.sphere-eyebrow {
    margin:
        0 0 28px;

    color:
        rgba(226, 194, 125, 0.72);

    font-size:
        13px;

    font-weight:
        700;

    line-height:
        1;

    letter-spacing:
        0.22em;

    text-transform:
        uppercase;
}

.sphere-title {
    margin: 0;

    color: #f5f2ea;

    font-size:
        clamp(
            54px,
            5.2vw,
            78px
        );

    font-weight:
        700;

    line-height:
        0.98;

    letter-spacing:
        -0.055em;
}

.sphere-description {
    max-width: 510px;

    margin:
        30px 0 0;

    color:
        rgba(
            184,
            178,
            166,
            0.72
        );

    font-size:
        17px;

    line-height:
        1.75;
}

/* =========================================================
   SPHERE VISUAL
   ========================================================= */

.sphere-visual {
    position: relative;

    z-index: 1;

    width: 100%;

    /*
     * Original reference uses a large hero visual area.
     */
    min-height: 560px;

    height: 560px;

    display: grid;

    place-items: center;

    isolation: isolate;

    overflow: visible;
}

/*
 * Broad atmospheric field behind the actual sphere.

 * This is deliberately much larger and softer than the
 * neural network itself.
 */
.sphere-visual::before {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 500px;
    height: 500px;

    transform:
        translate(
            -50%,
            -50%
        );

    border-radius: 50%;

    pointer-events: none;

    z-index: 0;

    background:
        radial-gradient(
            circle,
            rgba(
                198,
                146,
                58,
                0.16
            ) 0%,
            rgba(
                198,
                146,
                58,
                0.085
            ) 18%,
            rgba(
                142,
                104,
                40,
                0.035
            ) 42%,
            rgba(
                142,
                104,
                40,
                0
            ) 72%
        );

    filter:
        blur(18px);

    opacity: 0.92;
}

/*
 * Very subtle outer field boundary.
 */
.sphere-visual::after {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 500px;
    height: 500px;

    transform:
        translate(
            -50%,
            -50%
        );

    border:
        1px solid
        rgba(
            198,
            146,
            58,
            0.045
        );

    border-radius: 50%;

    pointer-events: none;

    z-index: 0;
}

/* =========================================================
   CANVAS
   ========================================================= */

#aiSphere {
    position: relative;

    z-index: 3;

    display: block;

    width: 100%;

    /*
     * Original source:
     * width: 100%;
     * height: 560px;
     */
    height: 560px;

    max-width: 560px;

    margin: 0 auto;

    background:
        transparent;

    cursor:
        crosshair;

    touch-action:
        none;

    image-rendering:
        auto;
}

/*
 * Keep the canvas visually larger than the old compact
 * implementation while preserving its actual 560px height.
 */
.sphere-visual #aiSphere {
    transform:
        scale(1.08);

    transform-origin:
        center center;
}

/* =========================================================
   DECORATIVE HERO ORBITS
   ========================================================= */

.hero-orbit {
    position: absolute;

    top: 50%;
    left: 50%;

    border:
        1px solid
        rgba(
            198,
            146,
            58,
            0.10
        );

    border-radius: 50%;

    transform:
        translate(
            -50%,
            -50%
        );

    transform-origin:
        center center;

    pointer-events: none;

    z-index: 1;

    will-change:
        transform;
}

.orbit-1 {
    width: 320px;
    height: 320px;

    border-color:
        rgba(
            226,
            194,
            125,
            0.13
        );

    opacity:
        0.72;
}

.orbit-2 {
    width: 470px;
    height: 470px;

    border-color:
        rgba(
            198,
            146,
            58,
            0.085
        );

    opacity:
        0.60;
}

.orbit-3 {
    width: 500px;
    height: 500px;

    border-color:
        rgba(
            198,
            146,
            58,
            0.055
        );

    opacity:
        0.48;
}

/*
 * Small orbit signal points.
 */
.orbit-1::after,
.orbit-2::after,
.orbit-3::after {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 5px;
    height: 5px;

    margin:
        -2.5px;

    border-radius: 50%;

    background:
        rgba(
            226,
            194,
            125,
            0.68
        );

    box-shadow:
        0 0 12px
        rgba(
            198,
            146,
            58,
            0.58
        );

    opacity:
        0.52;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.sphere-content ::selection,
.sphere-stage ::selection {
    background:
        rgba(
            198,
            146,
            58,
            0.24
        );

    color:
        #f5f2ea;
}

#aiSphere:focus-visible {
    outline:
        1px solid
        rgba(
            226,
            194,
            125,
            0.85
        );

    outline-offset:
        5px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .sphere-stage {
        grid-template-columns:
            1fr;

        gap:
            40px;

        padding:
            70px 32px;
    }

    .sphere-content {
        max-width:
            850px;

        margin:
            0 auto;

        text-align:
            center;
    }

    .sphere-description {
        margin-left:
            auto;

        margin-right:
            auto;
    }

    .sphere-visual {
        min-height:
            560px;

        height:
            560px;
    }

    #aiSphere {
        height:
            560px;
    }
}

@media (max-width: 980px) {
    .sphere-stage {
        padding:
            60px 28px;
    }

    .sphere-content {
        max-width:
            760px;
    }

    .sphere-title {
        font-size:
            clamp(
                48px,
                7vw,
                64px
            );
    }

    .sphere-visual {
        min-height:
            520px;

        height:
            520px;
    }

    #aiSphere {
        height:
            520px;
    }

    .sphere-visual #aiSphere {
        transform:
            scale(1.02);
    }

    .orbit-1 {
        width:
            300px;

        height:
            300px;
    }

    .orbit-2 {
        width:
            430px;

        height:
            430px;
    }

    .orbit-3 {
        width:
            560px;

        height:
            560px;
    }

    .sphere-visual::before,
    .sphere-visual::after {
        width:
            560px;

        height:
            560px;
    }
}

@media (max-width: 768px) {
    .sphere-stage {
        display:
            flex;

        flex-direction:
            column;

        justify-content:
            flex-start;

        gap:
            0;

        min-height:
            100vh;

        padding:
            95px 20px 40px;
    }

    .sphere-content {
        width:
            100%;

        max-width:
            620px;

        margin:
            0 auto;

        text-align:
            center;
    }

    .sphere-eyebrow {
        margin-bottom:
            20px;

        font-size:
            11px;
    }

    .sphere-title {
        font-size:
            clamp(
                40px,
                9vw,
                56px
            );
    }

    .sphere-description {
        margin-top:
            22px;

        font-size:
            15px;

        line-height:
            1.65;
    }

    .sphere-visual {
        width:
            100%;

        min-height:
            420px;

        height:
            420px;

        margin-top:
            10px;
    }

    #aiSphere {
        height:
            420px;

        max-width:
            560px;
    }

    .sphere-visual #aiSphere {
        transform:
            scale(1);
    }

    .orbit-1 {
        width:
            250px;

        height:
            250px;
    }

    .orbit-2 {
        width:
            350px;

        height:
            350px;
    }

    .orbit-3 {
        width:
            460px;

        height:
            460px;
    }

    .sphere-visual::before,
    .sphere-visual::after {
        width:
            470px;

        height:
            470px;
    }
}

@media (max-width: 480px) {
    .sphere-stage {
        padding:
            80px 16px 30px;
    }

    .sphere-title {
        font-size:
            38px;

        line-height:
            1;
    }

    .sphere-description {
        font-size:
            14px;
    }

    .sphere-visual {
        min-height:
            340px;

        height:
            340px;
    }

    #aiSphere {
        height:
            340px;
    }

    .orbit-1 {
        width:
            210px;

        height:
            210px;
    }

    .orbit-2 {
        width:
            290px;

        height:
            290px;
    }

    .orbit-3 {
        width:
            370px;

        height:
            370px;
    }

    .sphere-visual::before,
    .sphere-visual::after {
        width:
            390px;

        height:
            390px;
    }
}

@media (max-height: 700px) and (min-width: 769px) {
    .sphere-stage {
        padding-top:
            30px;

        padding-bottom:
            30px;
    }

    .sphere-visual,
    #aiSphere {
        height:
            500px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sphere-visual #aiSphere {
        transform:
            none;
    }
}