/* ==========================================================================
   KAY Scholar - 3D Magic Orbit Hero Banner
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;1,400;1,600&display=swap');

.magic-orbit-banner {
    isolation: isolate;
    position: relative;
    width: min(100% - 40px, 1440px);
    margin: 16px auto 42px;
    padding: clamp(24px, 3.2vw, 38px) 0 0;
    border-radius: 30px;
    background: radial-gradient(circle at 75% 45%, rgba(139, 92, 246, 0.3) 0%, rgba(30, 27, 75, 0.5) 35%, #080614 78%),
                linear-gradient(135deg, #090616 0%, #0d0a24 50%, #060410 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: none;
    overflow: hidden;
    color: #ffffff;
}

/* Ambient dynamic background glows */
.magic-ambient-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    z-index: 1;
}
.magic-ambient-glow.glow-1 {
    top: -20%;
    right: 15%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, rgba(112, 0, 255, 0.15) 50%, transparent 70%);
}
.magic-ambient-glow.glow-2 {
    bottom: -15%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(30, 58, 138, 0.15) 50%, transparent 70%);
}
.magic-ambient-glow.glow-3 {
    top: 20%;
    left: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(209, 150, 251, 0.18) 0%, transparent 70%);
}

/* Grid Layout */
.magic-banner-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    gap: clamp(32px, 5vw, 68px);
    align-items: end;
    position: relative;
    z-index: 2;
}

@media (max-width: 991px) {
    .magic-banner-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
}

/* Left Column Content */
.magic-banner-copy {
    padding-bottom: clamp(24px, 3.2vw, 36px);
}
@media (max-width: 991px) {
    .magic-banner-copy {
        padding-bottom: 0;
    }
}
.magic-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(192, 132, 252, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: #e9d5ff;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
}
.magic-pill-sparkle {
    color: #f2bc00;
    font-size: 14px;
    animation: sparkle-pulse 2s infinite ease-in-out;
}
@keyframes sparkle-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 6px #f2bc00); }
}

.magic-banner-heading {
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 12px;
}
.magic-gradient-glow {
    background: linear-gradient(135deg, #d196fb 0%, #f5d0fe 40%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(209, 150, 251, 0.45));
}
.magic-subheading {
    display: block;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 600;
    color: #cbd5e1;
    margin-top: 4px;
    letter-spacing: -0.01em;
}

.magic-banner-description {
    font-size: clamp(14px, 1.05vw, 16px);
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 20px;
    max-width: 560px;
}
@media (max-width: 991px) {
    .magic-banner-description {
        margin-left: auto;
        margin-right: auto;
    }
}

.magic-banner-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
@media (max-width: 991px) {
    .magic-banner-actions {
        justify-content: center;
    }
}

.magic-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f2bc00 0%, #eab308 100%);
    color: #0f172a !important;
    font-weight: 800;
    font-size: 14px;
    padding: 11px 28px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(242, 188, 0, 0.35);
}
.magic-btn-primary:hover {
    background: #fbbf24;
    color: #0f172a !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(242, 188, 0, 0.5);
}

.magic-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    font-size: 14px;
    padding: 11px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
.magic-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    border-color: rgba(209, 150, 251, 0.6);
    transform: translateY(-3px);
}

/* Highlights / perks row */
.magic-banner-highlights {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 991px) {
    .magic-banner-highlights {
        justify-content: center;
    }
}
.magic-highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}
.highlight-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.3);
    color: #d196fb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    flex-shrink: 0;
}
.highlight-text strong {
    display: block;
    font-size: 12.5px;
    color: #f1f5f9;
    font-weight: 700;
}
.highlight-text span {
    font-size: 11.5px;
    color: #94a3b8;
}

/* Right Column: Visual Stage */
.magic-banner-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    align-self: end;
    min-height: 380px;
    margin-bottom: 0;
}

.magic-stage-top-caption {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(19px, 2.1vw, 24px);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: #f8fafc;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(168, 85, 247, 0.5);
    margin-bottom: 6px;
    position: relative;
    z-index: 25;
    animation: caption-float 4s ease-in-out infinite alternate;
}
@keyframes caption-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

.magic-stage-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 380px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    perspective: 1000px;
    margin-bottom: 0;
}
@media (max-width: 576px) {
    .magic-stage-wrapper {
        height: 320px;
        max-width: 300px;
    }
}

/* Hand Light Flare behind fingertips */
.hand-light-flare {
    position: absolute;
    top: 33px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(209, 150, 251, 0.45) 0%, rgba(56, 189, 248, 0.25) 45%, transparent 70%);
    filter: blur(35px);
    pointer-events: none;
    z-index: 2;
    animation: flare-pulse 3s infinite ease-in-out;
}
@keyframes flare-pulse {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); filter: blur(30px); }
}

/* Starburst sparkle at top fingertip (perfectly centered on index fingertip) */
.hand-fingertip-flare {
    position: absolute;
    top: 33px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 14px 4px #ffffff,
                0 0 30px 10px rgba(209, 150, 251, 0.9),
                0 0 60px 20px rgba(56, 189, 248, 0.7);
    pointer-events: none;
    z-index: 15;
    animation: sparkle-tip 2.5s infinite ease-in-out alternate;
}
@keyframes sparkle-tip {
    0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.85; }
    100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; filter: drop-shadow(0 0 8px #ffffff); }
}

@media (max-width: 576px) {
    .hand-light-flare {
        top: 33px;
        width: 160px;
        height: 160px;
    }
    .hand-fingertip-flare {
        top: 33px;
    }
}

/* Hand Layer - anchored directly to bottom of banner */
.magic-hand-layer {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 185px;
    height: 350px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
@media (max-width: 576px) {
    .magic-hand-layer {
        width: 145px;
        height: 290px;
    }
}
.magic-hand-asset {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    filter: drop-shadow(0 15px 35px rgba(112, 0, 255, 0.45));
}

/* Orbit Track & 3D Volumetric Cubes */
.orbit-ring-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.orbit-cube {
    position: absolute;
    width: 50px;
    height: 50px;
    cursor: pointer;
    pointer-events: auto;
    transform-style: preserve-3d;
    will-change: transform, left, top;
}
@media (max-width: 576px) {
    .orbit-cube {
        width: 40px;
        height: 40px;
    }
}

/* Stable hit buffer: prevents hover loop & shaking at edges */
.orbit-cube::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 20px;
    pointer-events: auto;
    background: transparent;
    z-index: 1;
}

.cube-3d-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cube-side {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    pointer-events: none;
    backface-visibility: visible;
    box-sizing: border-box;
}
@media (max-width: 576px) {
    .cube-side {
        border-radius: 10px;
    }
}

/* 1. Back Plate (depth: -8px) */
.cube-back {
    transform: translateZ(-8px);
    background: #060410;
    border: 1.5px solid rgba(var(--brand-rgb, 168, 85, 247), 0.25);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.75);
}

/* 2. Extrusion Depth Layers (-3px and +3px) - create solid volumetric 3D block */
.cube-layer-2 {
    transform: translateZ(-3px);
    background: rgba(16, 12, 34, 0.96);
    border: 1.5px solid rgba(var(--brand-rgb, 168, 85, 247), 0.35);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.85);
}

.cube-layer-1 {
    transform: translateZ(3px);
    background: rgba(30, 22, 60, 0.97);
    border: 1.5px solid rgba(var(--brand-rgb, 168, 85, 247), 0.55);
}

/* 3. Front Face (+8px) with brand-tinted bevel and specular gloss */
.cube-front {
    transform: translateZ(8px);
    background: radial-gradient(130% 130% at 20% 20%,
        rgba(52, 38, 100, 0.96) 0%,
        rgba(24, 18, 52, 0.98) 60%,
        rgba(10, 8, 22, 0.99) 100%);
    border: 1.5px solid rgba(var(--brand-rgb, 192, 132, 252), 0.85);
    box-shadow:
        inset 0 1.5px 2px rgba(255, 255, 255, 0.7),
        inset 0 -2.5px 5px rgba(0, 0, 0, 0.8),
        0 0 18px rgba(var(--brand-rgb, 168, 85, 247), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Specular curved gloss sheen */
.cube-gloss {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    border-radius: 12px 12px 28px 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
}

/* 4. Icon (+14px) - floating elevated in 3D parallax */
.cube-icon {
    position: relative;
    transform: translateZ(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
    transition: transform 0.25s ease, filter 0.25s ease;
}
.cube-icon svg {
    max-width: 25px;
    max-height: 25px;
}
@media (max-width: 576px) {
    .cube-icon svg {
        max-width: 20px;
        max-height: 20px;
    }
}

/* Hover State - 3D Pop forward + intense brand glow (rock-steady, no jitter) */
.orbit-cube:hover .cube-3d-wrap,
.orbit-cube.is-hovered .cube-3d-wrap {
    transform: translateZ(24px) scale(1.14);
}
.orbit-cube:hover .cube-front,
.orbit-cube.is-hovered .cube-front {
    border-color: #38bdf8;
    box-shadow:
        inset 0 1.5px 3px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.8),
        0 0 28px rgba(var(--brand-rgb, 56, 189, 248), 0.9),
        0 16px 36px rgba(0, 0, 0, 0.9);
}
.orbit-cube:hover .cube-icon,
.orbit-cube.is-hovered .cube-icon {
    transform: translateZ(16px) scale(1.06);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px currentColor);
}

.cube-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 8, 25, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.6);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
    z-index: 50;
}
.orbit-cube:hover .cube-tooltip,
.orbit-cube.is-hovered .cube-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
    z-index: 50;
}
.orbit-cube:hover .cube-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}
.orbit-cube:hover .cube-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}
