/* ==========================================================
   SARZAMIN DANAYI
   SMART ACADEMIC COUNSELING
   HERO 3D / ROOT CONNECTED
   ========================================================== */


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

.scroll-hero {
    position: relative;

    width: 100%;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--color-background-soft) 0%,
            var(--color-surface-soft) 45%,
            var(--color-background) 100%
        );
}


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

.hero-slide {
    position: relative;

    width: 100%;

    min-height: calc(100dvh - var(--header-height));
    height: calc(100dvh - var(--header-height));

    display: grid;

    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: clamp(
        var(--space-6),
        5vw,
        100px
    );

    padding:
        var(--space-10)
        clamp(
            var(--space-6),
            8vw,
            130px
        );

    overflow: hidden;

    isolation: isolate;

    scroll-snap-align: start;

    perspective: 1400px;
}


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

.hero-slide::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: -3;

    pointer-events: none;
}

.hero-slide::after {
    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    border-radius: var(--radius-round);

    filter: blur(5px);

    opacity: .5;

    z-index: -2;

    pointer-events: none;

    transition:
        transform 1.2s ease,
        opacity 1.2s ease;
}


/* ==========================================================
   SLIDE 01
   PURPLE / BLUE
========================================================== */

.hero-slide-1 {
    background:
        radial-gradient(
            circle at 82% 35%,
            rgba(108, 92, 231, .14),
            transparent 32%
        ),

        radial-gradient(
            circle at 15% 75%,
            rgba(45, 197, 220, .08),
            transparent 35%
        ),

        linear-gradient(
            135deg,
            var(--color-surface) 0%,
            var(--color-surface-soft) 52%,
            var(--color-background) 100%
        );
}

.hero-slide-1::after {
    right: -180px;

    top: 50%;

    transform:
        translateY(-50%)
        scale(.8);

    background:
        radial-gradient(
            circle,
            rgba(108, 92, 231, .20),
            transparent 68%
        );
}


/* ==========================================================
   SLIDE 02
   CYAN / BLUE
========================================================== */

.hero-slide-2 {
    background:
        radial-gradient(
            circle at 18% 35%,
            rgba(45, 197, 220, .12),
            transparent 30%
        ),

        radial-gradient(
            circle at 85% 75%,
            rgba(108, 92, 231, .08),
            transparent 35%
        ),

        linear-gradient(
            135deg,
            var(--color-background-soft) 0%,
            var(--color-surface-soft) 55%,
            var(--color-background) 100%
        );
}

.hero-slide-2::after {
    left: -180px;

    top: 50%;

    transform:
        translateY(-50%)
        scale(.8);

    background:
        radial-gradient(
            circle,
            rgba(45, 197, 220, .17),
            transparent 68%
        );
}


/* ==========================================================
   SLIDE 03
   VIOLET / WARM ACCENT
========================================================== */

.hero-slide-3 {
    background:
        radial-gradient(
            circle at 82% 40%,
            rgba(255, 213, 74, .10),
            transparent 27%
        ),

        radial-gradient(
            circle at 15% 70%,
            rgba(108, 92, 231, .12),
            transparent 34%
        ),

        linear-gradient(
            135deg,
            var(--color-surface) 0%,
            var(--color-surface-soft) 55%,
            var(--color-background) 100%
        );
}

.hero-slide-3::after {
    right: -190px;

    top: 52%;

    transform:
        translateY(-50%)
        scale(.8);

    background:
        radial-gradient(
            circle,
            rgba(108, 92, 231, .16),
            transparent 68%
        );
}


/* ==========================================================
   ACTIVE ATMOSPHERE
========================================================== */

.hero-slide.active::after {
    transform:
        translateY(-50%)
        scale(1.15);

    opacity: .85;
}


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

.hero-visual {
    position: relative;

    width: 100%;

    min-height: 460px;

    display: flex;

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

    transform-style: preserve-3d;
}


/* ==========================================================
   IMAGE WRAPPER
========================================================== */

.hero-image-wrap {
    position: relative;

    width:
        min(
            100%,
            650px
        );

    aspect-ratio: 1 / .82;

    display: flex;

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

    transform-style: preserve-3d;

    opacity: 0;

    transition:
        opacity .9s ease,
        transform 1.15s cubic-bezier(
            .16,
            1,
            .3,
            1
        );
}


/* ==========================================================
   3D IMAGE SHADOW / FLOOR
========================================================== */

.hero-image-wrap::before {
    content: "";

    position: absolute;

    width: 72%;
    height: 14%;

    left: 14%;
    bottom: 7%;

    border-radius: var(--radius-round);

    background:
        radial-gradient(
            ellipse,
            rgba(36, 55, 70, .22),
            transparent 70%
        );

    filter: blur(16px);

    transform:
        translateZ(-80px)
        scaleX(.9);

    opacity: .65;
}


/* ==========================================================
   3D LIGHT
========================================================== */

.hero-image-wrap::after {
    content: "";

    position: absolute;

    width: 85%;
    height: 85%;

    border-radius: var(--radius-round);

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, .62),
            rgba(255, 255, 255, 0) 68%
        );

    filter: blur(12px);

    transform:
        translateZ(-40px);

    pointer-events: none;
}


/* ==========================================================
   IMAGE
========================================================== */

.hero-image {
    position: relative;

    z-index: 2;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: var(--radius-2xl);

    filter:
        drop-shadow(
            0 30px 35px
            rgba(34, 44, 66, .13)
        )

        drop-shadow(
            0 10px 18px
            rgba(108, 92, 231, .08)
        );

    transform:
        translateZ(70px)
        rotateY(0deg)
        rotateX(0deg)
        scale(.92);

    transition:
        transform 1.2s cubic-bezier(
            .16,
            1,
            .3,
            1
        ),
        filter .8s ease;
}


/* ==========================================================
   IMAGE HOVER
========================================================== */

.hero-image-wrap:hover .hero-image {
    transform:
        translateZ(95px)
        rotateY(-3deg)
        rotateX(2deg)
        scale(.96);

    filter:
        drop-shadow(
            0 38px 45px
            rgba(34, 44, 66, .17)
        )

        drop-shadow(
            0 14px 25px
            rgba(108, 92, 231, .12)
        );
}


/* ==========================================================
   CONTENT
========================================================== */

.hero-content {
    position: relative;

    z-index: 5;

    max-width: 620px;

    direction: rtl;

    text-align: right;

    opacity: 0;

    transform:
        translateX(-90px)
        translateZ(-80px);

    transition:
        opacity .85s ease,
        transform 1.05s cubic-bezier(
            .16,
            1,
            .3,
            1
        );
}


/* ==========================================================
   ACTIVE CONTENT
========================================================== */

.hero-slide.active .hero-content {
    opacity: 1;

    transform:
        translateX(0)
        translateZ(0);
}

.hero-slide.active .hero-image-wrap {
    opacity: 1;

    transform:
        translateZ(0)
        translateX(0)
        rotateY(0deg);
}

.hero-slide.active .hero-image {
    transform:
        translateZ(70px)
        rotateY(0deg)
        rotateX(0deg)
        scale(1);
}


/* ==========================================================
   SLIDE 01 / 03
   IMAGE RIGHT - CONTENT LEFT
========================================================== */

.hero-slide-1 .hero-visual,
.hero-slide-3 .hero-visual {
    order: 2;
}

.hero-slide-1 .hero-content,
.hero-slide-3 .hero-content {
    order: 1;

    transform:
        translateX(-90px)
        translateZ(-80px);
}

.hero-slide-1 .hero-image-wrap,
.hero-slide-3 .hero-image-wrap {
    transform:
        translateX(70px)
        translateZ(-80px)
        rotateY(-7deg);
}


/* ==========================================================
   SLIDE 02
   IMAGE LEFT - CONTENT RIGHT
========================================================== */

.hero-slide-2 .hero-visual {
    order: 1;
}

.hero-slide-2 .hero-content {
    order: 2;

    transform:
        translateX(90px)
        translateZ(-80px);
}

.hero-slide-2 .hero-image-wrap {
    transform:
        translateX(-70px)
        translateZ(-80px)
        rotateY(7deg);
}


/* ==========================================================
   ACTIVE IMAGE DIRECTION
========================================================== */

.hero-slide-1.active .hero-image-wrap,
.hero-slide-3.active .hero-image-wrap {
    transform:
        translateX(0)
        translateZ(0)
        rotateY(0deg);
}

.hero-slide-2.active .hero-image-wrap {
    transform:
        translateX(0)
        translateZ(0)
        rotateY(0deg);
}


/* ==========================================================
   BADGE
========================================================== */

.hero-content .badge {
    display: inline-flex;

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

    padding:
        var(--space-2)
        var(--space-4);

    margin-bottom: var(--space-5);

    border-radius: var(--radius-pill);

    background:
        rgba(108, 92, 231, .09);

    border:
        var(--border-width)
        solid
        rgba(108, 92, 231, .15);

    color: var(--color-primary);

    font-size: var(--font-size-sm);

    font-weight: var(--font-weight-bold);

    line-height: 1;

    box-shadow:
        var(--shadow-sm);

    backdrop-filter: blur(12px);

    -webkit-backdrop-filter: blur(12px);
}


/* ==========================================================
   HEADINGS
========================================================== */

.hero-content h1,
.hero-content h2 {
    margin: 0 0 var(--space-5);

    max-width: 600px;

    color: var(--color-text);

    font-size:
        clamp(
            30px,
            4.1vw,
            var(--font-size-5xl)
        );

    font-weight: var(--font-weight-extrabold);

    line-height: 1.45;

    letter-spacing: -.8px;
}

.hero-content h1 span,
.hero-content h2 span {
    display: block;

    color: var(--color-primary);
}


/* ==========================================================
   DESCRIPTION
========================================================== */

.hero-content p {
    max-width: 540px;

    margin: 0 0 var(--space-6);

    color: var(--color-text-secondary);

    font-size:
        clamp(
            15px,
            1.3vw,
            var(--font-size-lg)
        );

    font-weight: var(--font-weight-regular);

    line-height: 2;
}


/* ==========================================================
   CTA
========================================================== */

.cta-btn {
    position: relative;

    display: inline-flex;

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

    min-width: 165px;
    min-height: var(--button-height-lg);

    padding:
        var(--space-3)
        var(--space-7);

    border-radius: var(--radius-md);

    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-primary-dark)
        );

    color: var(--color-text-light);

    font-size: var(--font-size-sm);

    font-weight: var(--font-weight-bold);

    text-decoration: none;

    box-shadow:
        var(--shadow-primary),

        inset 0 1px 0
        rgba(255, 255, 255, .25);

    overflow: hidden;

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.cta-btn::before {
    content: "";

    position: absolute;

    top: 0;
    left: -120%;

    width: 80%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, .25),
            transparent
        );

    transform: skewX(-20deg);

    transition:
        left .6s ease;
}

.cta-btn:hover {
    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow-lg),

        inset 0 1px 0
        rgba(255, 255, 255, .3);
}

.cta-btn:hover::before {
    left: 140%;
}

.cta-btn:active {
    transform:
        translateY(-1px);
}


/* ==========================================================
   SCROLL DOTS
========================================================== */

.scroll-dots {
    position: fixed;

    top: 50%;
    left: var(--space-6);

    transform:
        translateY(-50%);

    z-index: var(--z-sticky);

    display: flex;

    flex-direction: column;
    align-items: center;

    gap: var(--space-3);

    padding:
        var(--space-3)
        var(--space-2);

    border-radius: var(--radius-pill);

    background:
        rgba(255, 255, 255, .55);

    border:
        var(--border-width)
        solid
        rgba(255, 255, 255, .75);

    box-shadow:
        var(--shadow-md);

    backdrop-filter: blur(14px);

    -webkit-backdrop-filter: blur(14px);

    opacity: 1;

    transition:
        opacity var(--transition-slow),
        transform var(--transition-slow);
}

.scroll-dots.hidden {
    opacity: 0;

    pointer-events: none;

    transform:
        translateY(-50%)
        translateX(-15px);
}


/* ==========================================================
   DOT
========================================================== */

.scroll-dots .dot {
    position: relative;

    width: 11px;
    height: 11px;

    padding: 0;

    border: 0;

    border-radius: var(--radius-round);

    background:
        rgba(108, 92, 231, .20);

    box-shadow:
        inset 0 0 0 1px
        rgba(108, 92, 231, .12);

    cursor: pointer;

    transition:
        transform var(--transition-normal),
        background-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.scroll-dots .dot:hover {
    transform: scale(1.2);

    background:
        rgba(108, 92, 231, .45);
}

.scroll-dots .dot.active {
    width: 12px;
    height: 12px;

    background:
        var(--color-primary);

    transform:
        scale(1.15);

    box-shadow:
        0 0 0 5px
        rgba(108, 92, 231, .12),

        var(--shadow-primary);
}


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

.after-hero {
    position: relative;

    min-height: 500px;

    display: flex;

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

    padding:
        var(--space-13)
        var(--space-6);

    overflow: hidden;

    direction: rtl;

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(108, 92, 231, .10),
            transparent 38%
        ),

        linear-gradient(
            180deg,
            var(--color-background),
            var(--color-surface)
        );
}

.after-hero::before {
    content: "";

    position: absolute;

    width: 400px;
    height: 400px;

    border-radius: var(--radius-round);

    top: -250px;
    right: 10%;

    background:
        rgba(45, 197, 220, .08);

    filter: blur(50px);
}

.after-hero-inner {
    position: relative;

    z-index: 2;

    max-width: 700px;
}

.after-hero-badge {
    display: inline-block;

    margin-bottom: var(--space-4);

    padding:
        var(--space-2)
        var(--space-4);

    border-radius: var(--radius-pill);

    background:
        rgba(108, 92, 231, .08);

    color: var(--color-primary);

    font-size: var(--font-size-xs);

    font-weight: var(--font-weight-bold);
}

.after-hero h2 {
    margin: 0 0 var(--space-4);

    color: var(--color-text);

    font-size:
        clamp(
            28px,
            4vw,
            44px
        );

    font-weight: var(--font-weight-extrabold);

    line-height: 1.5;
}

.after-hero p {
    max-width: 580px;

    margin: 0 auto var(--space-6);

    color: var(--color-text-secondary);

    font-size: var(--font-size-md);

    line-height: var(--line-height-relaxed);
}

.after-hero-btn {
    display: inline-flex;

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

    min-height: var(--button-height-lg);

    padding:
        var(--space-3)
        var(--space-7);

    border-radius: var(--radius-md);

    background:
        var(--color-primary);

    color: var(--color-text-light);

    text-decoration: none;

    font-weight: var(--font-weight-bold);

    box-shadow:
        var(--shadow-primary);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.after-hero-btn:hover {
    transform:
        translateY(-3px);

    box-shadow:
        var(--shadow-lg);
}


/* ==========================================================
   TABLET / SMALL DESKTOP
   <= 1100px
========================================================== */

@media (max-width: 1100px) {

    .hero-slide {
        gap: var(--space-7);

        padding-inline:
            var(--space-9);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size:
            clamp(
                30px,
                4vw,
                46px
            );
    }

    .hero-image-wrap {
        width: 100%;
    }
}


/* ==========================================================
   TABLET
   <= 900px
========================================================== */

@media (max-width: 900px) {

    .hero-slide {
        gap: var(--space-6);

        padding-inline:
            var(--space-7);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: var(--font-size-4xl);
    }

    .hero-content p {
        font-size: var(--font-size-md);
    }

    .hero-visual {
        min-height: 400px;
    }
}


/* ==========================================================
   MOBILE
   <= 600px
========================================================== */

@media (max-width: 600px) {

    .scroll-hero {
        overflow: hidden;
    }

    .hero-slide {
        min-height:
            calc(
                100svh -
                var(--header-height)
            );

        height: auto;

        grid-template-columns: 1fr;

        grid-template-rows:
            auto auto;

        gap: var(--space-2);

        padding:
            var(--space-9)
            var(--space-5)
            var(--space-10);

        text-align: center;
    }


    /* تصویر همیشه بالا */

    .hero-slide-1 .hero-visual,
    .hero-slide-2 .hero-visual,
    .hero-slide-3 .hero-visual {
        order: 1;
    }


    /* متن همیشه پایین */

    .hero-slide-1 .hero-content,
    .hero-slide-2 .hero-content,
    .hero-slide-3 .hero-content {
        order: 2;

        text-align: center;

        transform:
            translateY(45px)
            translateZ(-50px);
    }

    .hero-slide.active .hero-content {
        transform:
            translateY(0)
            translateZ(0);
    }


    .hero-visual {
        min-height: 42vh;

        width: 100%;
    }

    .hero-image-wrap {
        width:
            min(
                100%,
                430px
            );

        aspect-ratio: 1 / .88;
    }

    .hero-image {
        transform:
            translateZ(35px)
            scale(.92);
    }

    .hero-slide.active .hero-image {
        transform:
            translateZ(45px)
            scale(1);
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content .badge {
        margin-bottom: var(--space-3);

        font-size: var(--font-size-xs);
    }

    .hero-content h1,
    .hero-content h2 {
        margin-bottom: var(--space-3);

        font-size:
            clamp(
                27px,
                8vw,
                36px
            );

        line-height: 1.55;

        letter-spacing: -.4px;
    }

    .hero-content p {
        margin-bottom: var(--space-5);

        font-size: var(--font-size-sm);

        line-height: var(--line-height-relaxed);
    }

    .cta-btn {
        min-height:
            var(--button-height-md);

        padding:
            var(--space-3)
            var(--space-6);

        font-size: var(--font-size-sm);
    }

    .scroll-dots {
        display: none;
    }

    .after-hero {
        min-height: 430px;

        padding:
            var(--space-12)
            var(--space-5);
    }
}


/* ==========================================================
   SMALL MOBILE
   <= 480px
========================================================== */

@media (max-width: 480px) {

    .hero-slide {
        padding:
            var(--space-7)
            var(--space-4)
            var(--space-9);
    }

    .hero-visual {
        min-height: 37vh;
    }

    .hero-image-wrap {
        width: 100%;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: var(--font-size-3xl);
    }

    .hero-content p {
        font-size: var(--font-size-sm);
    }

    .cta-btn {
        width: 100%;
        max-width: 260px;
    }

    .after-hero {
        padding-inline:
            var(--space-4);
    }
}


/* ==========================================================
   EXTRA SMALL MOBILE
   <= 360px
========================================================== */

@media (max-width: 360px) {

    .hero-slide {
        padding:
            var(--space-6)
            var(--space-3)
            var(--space-8);
    }

    .hero-visual {
        min-height: 34vh;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: var(--font-size-2xl);

        line-height: 1.5;
    }

    .hero-content p {
        font-size: var(--font-size-xs);

        line-height: var(--line-height-relaxed);
    }

    .hero-content .badge {
        padding-inline:
            var(--space-3);

        font-size: 11px;
    }

    .cta-btn {
        min-height:
            var(--button-height-md);

        padding-inline:
            var(--space-5);
    }

    .after-hero {
        min-height: 380px;

        padding:
            var(--space-10)
            var(--space-3);
    }

    .after-hero h2 {
        font-size: var(--font-size-2xl);
    }

    .after-hero p {
        font-size: var(--font-size-sm);
    }
}


/* ==========================================================
   ACCESSIBILITY
========================================================== */

.cta-btn:focus-visible,
.after-hero-btn:focus-visible,
.scroll-dots .dot:focus-visible {
    outline:
        3px solid
        rgba(45, 197, 220, .45);

    outline-offset: 4px;
}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .scroll-hero *,
    .scroll-hero *::before,
    .scroll-hero *::after,
    .after-hero,
    .after-hero *,
    .after-hero *::before,
    .after-hero *::after {
        scroll-behavior: auto !important;

        transition-duration:
            .01ms !important;

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;
    }
}