/* 
 * ULTRA HERO SYSTEM - LAYER 1-5 STYLING
 * An extreme WebGL-style cinematic aesthetic for Promote Out.
 */

/*=============================================================================
 * 1. BASE HERO CONTAINER & SCROLL LOCK
 *============================================================================*/

.ultra-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 800px;
    background: #080808;
    /* Extremely dark cinematic base */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    /* Essential for 3D tilt layer 2 */
}

/* Subtle grain texture over everything */
.ultra-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    /* Above everything but buttons */
    pointer-events: none;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPjxyZWN0IHdpZHRoPSI0IiBoZWlnaHQ9IjQiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4wNCIvPjwvc3ZnPg==') repeat;
    opacity: 0.6;
}

/* Cursor Glow Trail */
.cursor-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(189, 224, 56, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    transition: transform 0.1s ease-out;
    /* Smooth follow */
    filter: blur(40px);
}

/*=============================================================================
 * 2. LAYER 1: CINEMATIC BACKGROUNDS
 *============================================================================*/

.l1-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    /* Bleed edge for parallax */
    z-index: 1;
    will-change: transform;
}

/* Global Grid Base */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    opacity: 0.4;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 50px;
    }
}

/* Floating Particles (Generic) */
.particle-field {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    animation: driftUp 40s linear infinite;
}

@keyframes driftUp {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 -100px;
    }
}

/*=============================================================================
 * 3. LAYER 2: 3D OBJECT CONTAINERS
 *============================================================================*/

.l2-object {
    position: absolute;
    right: 15%;
    /* Positioned on the right usually */
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    z-index: 10;
    will-change: transform;
    /* Transformation handled by JS mouse tracker */
    transform-style: preserve-3d;
}

@media (max-width: 1024px) {
    .l2-object {
        opacity: 0.2;
        /* Fade back on mobile */
        right: 50%;
        transform: translate(50%, -50%);
        z-index: 1;
    }
}

/*=============================================================================
 * 4. LAYER 3 & 4: KINETIC TYPOGRAPHY & SUBTEXT
 *============================================================================*/

.l3-content {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    max-width: 800px;
    z-index: 20;
    will-change: transform;
}

.service-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(189, 224, 56, 0.05);
    /* Extremely subtle */
    color: var(--primary);
    border: 1px solid rgba(189, 224, 56, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeUp 1s ease 0.2s forwards;
    transform: translateY(20px);
}

.ultra-headline {
    font-size: clamp(3.5rem, 6vw, 6rem);
    line-height: 1.05;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: #fff;
    /* Words will be wrapped in spans by JS for staggered reveal */
}

.ultra-headline .word {
    display: inline-block;
    opacity: 0;
    filter: blur(20px);
    transform: translateZ(100px) translateY(30px) rotateX(-20deg);
    will-change: filter, transform, opacity;
    /* Animation class added via JS */
}

.ultra-headline .word.reveal {
    animation: wordReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wordReveal {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: translateZ(100px) translateY(50px) rotateX(-30deg);
    }

    100% {
        opacity: 1;
        filter: blur(0px);
        transform: translateZ(0) translateY(0) rotateX(0deg);
    }
}

.ultra-subtext {
    font-size: 1.3rem;
    color: #a0a0a0;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 3.5rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 1s forwards;
    /* Delayed after headline */
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .l3-content {
        left: 5%;
        text-align: center;
        max-width: 90%;
    }

    .ultra-subtext {
        margin: 0 auto 3rem;
    }
}

/*=============================================================================
 * 5. LAYER 5: FLOATING CTA PANEL (MAGNETIC)
 *============================================================================*/

.l5-cta {
    display: inline-flex;
    position: relative;
    z-index: 60;
    /* Above grain */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 1.2s forwards;
}

.magnetic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    /* Magnetic transform handled by JS */
    will-change: transform;
    overflow: hidden;
    position: relative;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(189, 224, 56, 0.2), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.magnetic-btn:hover {
    background: rgba(189, 224, 56, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 30px rgba(189, 224, 56, 0.2);
}

.magnetic-btn:hover::before {
    left: 150%;
}

/*=============================================================================
 * SPECIFIC 3D OBJECT DESIGNS (Injectable via Python)
 *============================================================================*/

/* 1. ADS DASHBOARD */
.obj-ads .dashboard-plane {
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(189, 224, 56, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transform: rotateX(20deg) rotateY(-20deg) translateZ(0);
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(189, 224, 56, 0.1);
    padding: 30px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 20px;
}

.obj-ads .metric-bar {
    height: 40px;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.obj-ads .metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #111, var(--primary));
    width: 0%;
    animation: fillBar 2s cubic-bezier(0.16, 1, 0.3, 1) forwards 1s;
}

.obj-ads .graph-line {
    width: 100%;
    height: 100%;
    border-bottom: 2px solid var(--primary);
    background: linear-gradient(to top, rgba(189, 224, 56, 0.2), transparent);
    clip-path: polygon(0 100%, 0 80%, 20% 60%, 40% 70%, 60% 30%, 80% 40%, 100% 10%, 100% 100%);
    animation: riseGraph 2s ease forwards 1s;
    opacity: 0;
}

@keyframes fillBar {
    to {
        width: 85%;
    }
}

@keyframes riseGraph {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. SEO SEARCH GRID */
.obj-seo .seo-pyramid {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotateX(10deg) rotateY(-15deg);
}

.obj-seo .layer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
}

.obj-seo .layer-1 {
    width: 300px;
    height: 100px;
    transform: translateZ(-50px) translateY(50px);
    animation: stackUp 1s ease 1.2s forwards;
}

.obj-seo .layer-2 {
    width: 200px;
    height: 80px;
    transform: translateZ(0px) translateY(20px);
    animation: stackUp 1s ease 1.4s forwards;
}

.obj-seo .layer-3 {
    width: 100px;
    height: 60px;
    transform: translateZ(50px) translateY(-10px);
    background: rgba(189, 224, 56, 0.1);
    border-color: var(--primary);
    animation: stackUp 1s ease 1.6s forwards;
    box-shadow: 0 0 40px rgba(189, 224, 56, 0.3);
}

@keyframes stackUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
    }
}

/* 3. AI NEURAL SPHERE */
.obj-ai {
    display: flex;
    justify-content: center;
    align-items: center;
}

.obj-ai .core-sphere {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--primary), #111);
    box-shadow: 0 0 60px rgba(189, 224, 56, 0.4), inset -20px -20px 40px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: floatSphere 6s ease-in-out infinite;
    z-index: 5;
}

.obj-ai .ring {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
}

.obj-ai .ring-1 {
    animation: spinRing 10s linear infinite;
    border-right-color: var(--primary);
}

.obj-ai .ring-2 {
    width: 400px;
    height: 400px;
    animation: spinRing 15s linear infinite reverse;
    border-left-color: var(--primary);
    transform: translate(-50%, -50%) rotateY(70deg);
}

@keyframes floatSphere {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes spinRing {
    to {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }
}

/* 4. SOCIAL FEED CARDS */
.obj-social {
    position: relative;
    perspective: 1000px;
}

.obj-social .feed-card {
    position: absolute;
    width: 220px;
    height: 350px;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    top: 50%;
    left: 50%;
    padding: 20px;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 0;
}

.obj-social .card-1 {
    animation: fanOut1 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
    z-index: 1;
}

.obj-social .card-2 {
    background: rgba(26, 26, 26, 0.9);
    border-color: rgba(189, 224, 56, 0.3);
    animation: fanOut2 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
    z-index: 2;
    box-shadow: 0 0 30px rgba(189, 224, 56, 0.1);
}

.obj-social .card-3 {
    animation: fanOut3 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
    z-index: 3;
}

@keyframes fanOut1 {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateX(-100px) rotate(-15deg) translateZ(-50px);
    }
}

@keyframes fanOut2 {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(-20px) translateZ(20px);
    }
}

@keyframes fanOut3 {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateX(100px) rotate(15deg) translateZ(-20px);
    }
}

/* 5. CONTENT ARCHITECTURE */
.obj-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.obj-content .document {
    width: 250px;
    height: 320px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(10, 10, 10, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.8);
    transform: rotateX(20deg) rotateY(-20deg);
}

.obj-content .text-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 20px;
    position: relative;
    overflow: hidden;
}

.obj-content .text-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(189, 224, 56, 0.5), transparent);
    animation: scanLine 3s linear infinite;
}

.obj-content .text-line:nth-child(even)::after {
    animation-delay: 1.5s;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

@keyframes scanLine {
    to {
        left: 200%;
    }
}

/* 6. ANALYTICS GLOBE/NODE */
.obj-analytics {
    position: relative;
}

.obj-analytics .data-node {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 1px solid rgba(189, 224, 56, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: center;
    justify-content: center;
    transform: rotateX(30deg) rotateZ(15deg);
    transform-style: preserve-3d;
}

.obj-analytics .data-cube {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: 0.3s;
    transform: translateZ(0);
}

.obj-analytics .data-cube:nth-child(3n) {
    background: rgba(189, 224, 56, 0.1);
    border-color: var(--primary);
    animation: popCube 4s infinite alternate;
}

.obj-analytics .data-cube:nth-child(5n) {
    background: rgba(255, 255, 255, 0.1);
    animation: popCube 3s infinite alternate-reverse;
}

@keyframes popCube {
    to {
        transform: translateZ(40px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }
}

/* 7. DESIGN FLOATING SHAPES */
.obj-design {
    position: relative;
}

.obj-design .shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
}

.obj-design .s-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border-color: var(--primary);
    background: rgba(189, 224, 56, 0.05);
    top: 10%;
    left: 20%;
    animation: float1 8s ease-in-out infinite;
}

.obj-design .s-square {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    bottom: 10%;
    right: 20%;
    animation: float2 10s ease-in-out infinite;
}

.obj-design .s-pill {
    width: 200px;
    height: 60px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0);
    }

    50% {
        transform: translate(20px, 30px) rotate(15deg);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0);
    }

    50% {
        transform: translate(-30px, -20px) rotate(-20deg);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    50% {
        transform: translate(-40%, -60%) rotate(60deg);
    }
}

/* 8. EMAIL WORKFLOW */
.obj-email .workflow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotateX(20deg) rotateY(-10deg);
}

.obj-email .orb {
    width: 60px;
    height: 60px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
}

.obj-email .orb-main {
    border-color: var(--primary);
    background: rgba(189, 224, 56, 0.1);
    box-shadow: 0 0 30px rgba(189, 224, 56, 0.2);
}

.obj-email .path-line {
    position: absolute;
    width: 2px;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.obj-email .packet {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: -4px;
    filter: drop-shadow(0 0 5px var(--primary));
    animation: sendPacket 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes sendPacket {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}