/* ========================================
   DILIGENT EDUCATIONS - IMMERSIVE EFFECTS
   Advanced Visual & Interactive Effects
   ======================================== */

/* ==========================================
   PARALLAX SCROLLING
   ========================================== */
.parallax-wrapper {
    position: relative;
    overflow: hidden;
    perspective: 1px;
    height: 100vh;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.parallax-layer-back {
    transform: translateZ(-1px) scale(2);
}

.parallax-layer-base {
    transform: translateZ(0);
}

.parallax-layer-front {
    transform: translateZ(0.5px) scale(0.5);
}

/* ==========================================
   SCROLL-TRIGGERED REVEALS
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered reveals */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-stagger.revealed>*:nth-child(1) {
    transition-delay: 0s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.revealed>*:nth-child(2) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.revealed>*:nth-child(3) {
    transition-delay: 0.2s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.revealed>*:nth-child(4) {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.revealed>*:nth-child(5) {
    transition-delay: 0.4s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.revealed>*:nth-child(6) {
    transition-delay: 0.5s;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   INTERACTIVE CURSOR EFFECTS
   ========================================== */
.cursor-grow-target {
    cursor: none;
}

.cursor-grow-target:hover~.cursor .cursor-ring {
    transform: scale(2);
    border-color: var(--primary);
}

/* ==========================================
   MOUSE FOLLOW EFFECTS
   ========================================== */
.mouse-follow {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

.mouse-glow {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center,
            rgba(99, 102, 241, 0.15) 0%,
            transparent 70%);
    transform: translate(-50%, -50%);
}

/* ==========================================
   SPLIT SCREEN EFFECTS
   ========================================== */
.split-screen {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.split-left,
.split-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: flex 0.5s ease;
}

.split-screen:hover .split-left,
.split-screen:hover .split-right {
    flex: 1;
}

.split-left:hover {
    flex: 1.5;
}

.split-right:hover {
    flex: 1.5;
}

/* ==========================================
   SMOOTH SECTION TRANSITIONS
   ========================================== */
.section-transition {
    position: relative;
}

.section-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, var(--dark), transparent);
    pointer-events: none;
    z-index: 2;
}

.section-transition::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--dark), transparent);
    pointer-events: none;
    z-index: 2;
}

/* ==========================================
   DEPTH EFFECTS
   ========================================== */
.depth-layer {
    position: relative;
}

.depth-layer-1 {
    z-index: 1;
}

.depth-layer-2 {
    z-index: 2;
}

.depth-layer-3 {
    z-index: 3;
}

.depth-layer-4 {
    z-index: 4;
}

.depth-layer-5 {
    z-index: 5;
}

/* Depth shadows */
.depth-shadow-1 {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.depth-shadow-2 {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.depth-shadow-3 {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   STICKY ELEMENTS
   ========================================== */
.sticky-element {
    position: sticky;
    top: 100px;
}

.sticky-section {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   HORIZONTAL SCROLL SECTIONS
   ========================================== */
.horizontal-scroll-wrapper {
    width: 100%;
    overflow-x: hidden;
}

.horizontal-scroll-container {
    display: flex;
    width: max-content;
    gap: 40px;
    padding: 40px;
    transition: transform 0.1s ease-out;
}

.horizontal-scroll-item {
    flex-shrink: 0;
    width: 400px;
}

/* ==========================================
   ZOOM ON SCROLL
   ========================================== */
.zoom-on-scroll {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.zoom-on-scroll.zoomed {
    transform: scale(1.1);
}

/* ==========================================
   MASK REVEAL
   ========================================== */
.mask-reveal {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.mask-reveal.revealed {
    clip-path: inset(0 0 0 0);
}

.mask-reveal-circle {
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.mask-reveal-circle.revealed {
    clip-path: circle(100% at 50% 50%);
}

/* ==========================================
   TEXT EFFECTS
   ========================================== */
.text-scramble {
    font-family: var(--font-accent);
    letter-spacing: 2px;
}

.text-split-lines .line {
    display: block;
    overflow: hidden;
}

.text-split-lines .line-inner {
    display: block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.text-split-lines.revealed .line-inner {
    transform: translateY(0);
}

/* ==========================================
   COUNTER ANIMATION
   ========================================== */
.counter {
    font-family: var(--font-accent);
    font-variant-numeric: tabular-nums;
}

.counter-animate {
    transition: all 0.3s ease;
}

/* ==========================================
   PROGRESS INDICATORS
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(99, 102, 241, 0.2);
    z-index: 1000;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s ease;
}

/* ==========================================
   INTERACTIVE CARDS
   ========================================== */
.interactive-card {
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.interactive-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(99, 102, 241, 0.1) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.interactive-card:hover::before {
    opacity: 1;
}

/* ==========================================
   AMBIENT BACKGROUNDS
   ========================================== */
.ambient-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: ambientFloat 20s ease-in-out infinite;
}

.ambient-orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.2);
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.ambient-orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(14, 165, 233, 0.15);
    bottom: -20%;
    right: -10%;
    animation-delay: -7s;
}

.ambient-orb-3 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes ambientFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.9);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.05);
    }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 992px) {
    .split-screen {
        flex-direction: column;
        height: auto;
    }

    .split-left,
    .split-right {
        height: 50vh;
    }

    .horizontal-scroll-item {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .ambient-orb {
        filter: blur(60px);
    }

    .ambient-orb-1 {
        width: 300px;
        height: 300px;
    }

    .ambient-orb-2 {
        width: 250px;
        height: 250px;
    }

    .ambient-orb-3 {
        width: 200px;
        height: 200px;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-stagger>*,
    .mask-reveal,
    .mask-reveal-circle,
    .text-split-lines .line-inner {
        transition: none;
        opacity: 1;
        transform: none;
        clip-path: none;
    }

    .ambient-orb {
        animation: none;
    }

    .zoom-on-scroll {
        transition: none;
    }
}