/* ==========================================================================
   Hero Variants — 6 Selectable Styles
   Scoped via [data-hero-variant="N"]
   ========================================================================== */

/* ---------- Shared Background Layer ---------- */
.hero-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

/* ==========================================================================
   VARIANT 1: Split Personality (Creative <-> Tech)
   ========================================================================== */
[data-hero-variant="1"] .hero-split-left,
[data-hero-variant="1"] .hero-split-right {
    position: absolute;
    top: 0;
    width: 55%;
    height: 100%;
    transition: none;
}

[data-hero-variant="1"] .hero-split-left {
    left: 0;
    background: linear-gradient(135deg, #1A1A2E 0%, #2d1b4e 40%, #4a1942 70%, #1A1A2E 100%);
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    animation: heroSplitSlideLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

[data-hero-variant="1"] .hero-split-right {
    right: 0;
    background:
        linear-gradient(135deg, #0F0F1A 0%, #1A1A2E 50%, #0d1f2d 100%);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
    animation: heroSplitSlideRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Grid pattern on tech side */
[data-hero-variant="1"] .hero-split-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 107, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.6;
}

/* Gradient splash on creative side */
[data-hero-variant="1"] .hero-split-left::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, rgba(147, 51, 234, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

@keyframes heroSplitSlideLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes heroSplitSlideRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Floating decorative elements */
[data-hero-variant="1"] .hero-floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.float-el {
    position: absolute;
    font-size: 24px;
    opacity: 0.15;
    color: var(--color-primary);
    animation: floatBob 6s ease-in-out infinite;
}

.float-el--brackets {
    top: 18%;
    right: 12%;
    font-size: 36px;
    font-family: monospace;
    font-weight: 700;
    animation-delay: 0s;
}

.float-el--pen {
    top: 30%;
    left: 8%;
    font-size: 28px;
    animation-delay: -1s;
    animation-duration: 7s;
}

.float-el--swatch {
    bottom: 30%;
    left: 15%;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--color-primary), #9333ea);
    border-radius: 4px;
    animation-delay: -2s;
    animation-duration: 5s;
}

.float-el--code {
    bottom: 20%;
    right: 18%;
    font-family: monospace;
    font-weight: 700;
    font-size: 20px;
    animation-delay: -3s;
    animation-duration: 8s;
}

.float-el--circle {
    top: 60%;
    left: 40%;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    animation-delay: -1.5s;
    animation-duration: 6.5s;
}

.float-el--star {
    top: 15%;
    left: 35%;
    font-size: 18px;
    animation-delay: -4s;
    animation-duration: 7.5s;
}

@keyframes floatBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

/* Text entrance */
[data-hero-variant="1"] .hero-content {
    animation: heroFadeUp 0.6s 0.4s ease both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   VARIANT 2: Interactive Particle Canvas
   ========================================================================== */
[data-hero-variant="2"] .hero-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

[data-hero-variant="2"] .hero-cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-hero-variant="2"]:hover .hero-cursor-glow {
    opacity: 1;
}

/* Staggered clip-path text reveal */
[data-hero-variant="2"] .hero-brand {
    animation: clipReveal 0.6s 0.2s ease both;
}

[data-hero-variant="2"] .hero-title {
    animation: clipReveal 0.6s 0.4s ease both;
}

[data-hero-variant="2"] .hero-subtitle {
    animation: clipReveal 0.6s 0.6s ease both;
}

[data-hero-variant="2"] .hero-cta {
    animation: heroFadeUp 0.6s 0.8s ease both;
}

@keyframes clipReveal {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

/* ==========================================================================
   VARIANT 3: Showcase Reel Background
   ========================================================================== */
[data-hero-variant="3"] .hero-slideshow {
    position: absolute;
    inset: 0;
}

[data-hero-variant="3"] .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
    animation: kenBurns 20s ease-in-out infinite;
}

[data-hero-variant="3"] .hero-slide.active {
    opacity: 1;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Darker overlay for text readability */
[data-hero-variant="3"] .hero-overlay {
    background:
        linear-gradient(180deg, rgba(15, 15, 26, 0.7) 0%, rgba(15, 15, 26, 0.85) 100%);
}

/* Glassmorphism card for text */
[data-hero-variant="3"] .hero-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 620px;
    animation: heroFadeUp 0.8s 0.3s ease both;
}

/* ==========================================================================
   VARIANT 4: 3D Floating Cards
   ========================================================================== */
[data-hero-variant="4"] {
    background: linear-gradient(135deg, #0F0F1A 0%, #1A1A2E 50%, #0d1f2d 100%);
}

[data-hero-variant="4"] .hero-floating-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    perspective: 1000px;
}

.hero-card {
    position: absolute;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.15s ease;
    animation: cardBob 6s ease-in-out infinite;
    will-change: transform;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card positions & sizes */
.hero-card--1 {
    width: 260px;
    height: 180px;
    top: 12%;
    right: 5%;
    animation-delay: 0s;
    animation-name: cardEntrance1, cardBob;
    animation-duration: 0.7s, 6s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94), ease-in-out;
    animation-delay: 0.2s, 0.9s;
    animation-fill-mode: both, none;
    animation-iteration-count: 1, infinite;
}

.hero-card--2 {
    width: 200px;
    height: 140px;
    top: 55%;
    right: 15%;
    animation-name: cardEntrance2, cardBob;
    animation-duration: 0.7s, 7s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94), ease-in-out;
    animation-delay: 0.4s, 1.1s;
    animation-fill-mode: both, none;
    animation-iteration-count: 1, infinite;
}

.hero-card--3 {
    width: 220px;
    height: 160px;
    bottom: 10%;
    right: 35%;
    animation-name: cardEntrance3, cardBob;
    animation-duration: 0.7s, 5.5s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94), ease-in-out;
    animation-delay: 0.6s, 1.3s;
    animation-fill-mode: both, none;
    animation-iteration-count: 1, infinite;
}

.hero-card--4 {
    width: 180px;
    height: 130px;
    top: 35%;
    right: 40%;
    animation-name: cardEntrance4, cardBob;
    animation-duration: 0.7s, 6.5s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94), ease-in-out;
    animation-delay: 0.8s, 1.5s;
    animation-fill-mode: both, none;
    animation-iteration-count: 1, infinite;
}

@keyframes cardBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes cardEntrance1 {
    from { opacity: 0; transform: translate(80px, -60px) rotateY(-15deg); }
    to { opacity: 1; transform: translate(0, 0) rotateY(0); }
}

@keyframes cardEntrance2 {
    from { opacity: 0; transform: translate(60px, 40px) rotateY(10deg); }
    to { opacity: 1; transform: translate(0, 0) rotateY(0); }
}

@keyframes cardEntrance3 {
    from { opacity: 0; transform: translate(-40px, 60px) rotateX(10deg); }
    to { opacity: 1; transform: translate(0, 0) rotateX(0); }
}

@keyframes cardEntrance4 {
    from { opacity: 0; transform: translate(40px, -40px) rotateY(-8deg); }
    to { opacity: 1; transform: translate(0, 0) rotateY(0); }
}

[data-hero-variant="4"] .hero-content {
    animation: heroFadeUp 0.6s 0.3s ease both;
}

/* ==========================================================================
   VARIANT 5: Morphing Blob + Showcase
   ========================================================================== */
[data-hero-variant="5"] .hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-hero-variant="5"] .hero-blob-wrap {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    height: 420px;
    z-index: 0;
}

.hero-blob-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Blob shape morph */
#blobPath {
    animation: blobMorph 12s ease-in-out infinite;
}

.hero-blob-outline {
    animation: blobMorph 12s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% {
        d: path("M440,320Q410,390,340,430Q270,470,190,440Q110,410,70,340Q30,270,70,190Q110,110,190,70Q270,30,340,70Q410,110,440,190Q470,270,440,320Z");
    }
    25% {
        d: path("M420,300Q380,370,310,420Q240,470,170,420Q100,370,80,300Q60,230,100,160Q140,90,210,60Q280,30,350,80Q420,130,440,210Q460,290,420,300Z");
    }
    50% {
        d: path("M430,340Q400,410,320,440Q240,470,160,430Q80,390,60,310Q40,230,80,160Q120,90,200,50Q280,10,360,60Q440,110,450,200Q460,290,430,340Z");
    }
    75% {
        d: path("M450,310Q420,380,340,410Q260,440,180,420Q100,400,70,320Q40,240,80,170Q120,100,200,80Q280,60,350,90Q420,120,450,200Q480,280,450,310Z");
    }
}

/* Image cycling inside blob */
.hero-blob-image {
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-blob-image.active {
    opacity: 1;
}

/* Accent line animations on text side */
[data-hero-variant="5"] .hero-brand::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    margin-top: 8px;
    border-radius: 2px;
    animation: accentGrow 0.8s 0.5s ease both;
}

@keyframes accentGrow {
    to { width: 60px; }
}

[data-hero-variant="5"] .hero-content {
    position: relative;
    z-index: 2;
    animation: heroFadeUp 0.6s 0.3s ease both;
}

/* ==========================================================================
   VARIANT 6: 3D Floating Cards + Interactive Particle Canvas
   ========================================================================== */
[data-hero-variant="6"] {
    background: linear-gradient(135deg, #0F0F1A 0%, #1A1A2E 50%, #0d1f2d 100%);
}

[data-hero-variant="6"] .hero-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

[data-hero-variant="6"] .hero-cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-hero-variant="6"]:hover .hero-cursor-glow {
    opacity: 1;
}

[data-hero-variant="6"] .hero-floating-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    perspective: 1000px;
    z-index: 1;
}

/* Cards get a subtle glow to stand out over particles */
[data-hero-variant="6"] .hero-card {
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 107, 0, 0.08);
}

[data-hero-variant="6"] .hero-content {
    animation: heroFadeUp 0.6s 0.3s ease both;
}

/* ==========================================================================
   RESPONSIVE — All Variants
   ========================================================================== */

/* ---- 992px ---- */
@media (max-width: 992px) {
    /* V1: widen clips for overlap */
    [data-hero-variant="1"] .hero-split-left,
    [data-hero-variant="1"] .hero-split-right {
        width: 60%;
    }

    /* V4: reposition cards closer */
    .hero-card--1 { width: 200px; height: 140px; right: 2%; }
    .hero-card--2 { width: 160px; height: 110px; right: 8%; }
    .hero-card--3 { width: 180px; height: 130px; right: 20%; }
    .hero-card--4 { width: 150px; height: 110px; right: 28%; }

    /* V5: smaller blob */
    [data-hero-variant="5"] .hero-blob-wrap {
        width: 320px;
        height: 320px;
        right: 2%;
    }

    /* V3: smaller glass card padding */
    [data-hero-variant="3"] .hero-content {
        padding: 36px 28px;
    }
}

/* ---- 768px ---- */
@media (max-width: 768px) {
    /* V4: cards behind text at reduced opacity */
    .hero-card { opacity: 0.3; }
    .hero-card--1 { width: 160px; height: 110px; top: 10%; right: 5%; }
    .hero-card--2 { width: 130px; height: 90px; top: 50%; right: 5%; }
    .hero-card--3 { width: 140px; height: 100px; bottom: 5%; right: 15%; }
    .hero-card--4 { width: 120px; height: 85px; top: 30%; right: 25%; }

    /* V5: blob below text */
    [data-hero-variant="5"] .hero-blob-wrap {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 280px;
        height: 280px;
        margin: 20px auto 0;
    }

    [data-hero-variant="5"] .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    /* V3: full-width glass card */
    [data-hero-variant="3"] .hero-content {
        padding: 28px 24px;
        max-width: 100%;
    }

    /* V1: full overlay blend */
    [data-hero-variant="1"] .hero-split-left {
        width: 100%;
        clip-path: none;
    }

    [data-hero-variant="1"] .hero-split-right {
        width: 100%;
        clip-path: none;
        opacity: 0.3;
    }

    .float-el { display: none; }
}

/* ---- 576px ---- */
@media (max-width: 576px) {
    .hero-card { display: none; }

    [data-hero-variant="5"] .hero-blob-wrap {
        width: 220px;
        height: 220px;
    }

    [data-hero-variant="3"] .hero-content {
        padding: 24px 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* ---- 480px ---- */
@media (max-width: 480px) {
    [data-hero-variant="5"] .hero-blob-wrap {
        width: 180px;
        height: 180px;
    }
}

/* ==========================================================================
   PREFERS REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    [data-hero-variant="1"] .hero-split-left,
    [data-hero-variant="1"] .hero-split-right {
        animation: none;
    }

    .float-el {
        animation: none;
    }

    [data-hero-variant="2"] .hero-brand,
    [data-hero-variant="2"] .hero-title,
    [data-hero-variant="2"] .hero-subtitle,
    [data-hero-variant="2"] .hero-cta {
        animation: none;
        clip-path: none;
        opacity: 1;
    }

    [data-hero-variant="3"] .hero-slide {
        animation: none;
    }

    .hero-card {
        animation: none !important;
        opacity: 1;
    }

    #blobPath,
    .hero-blob-outline {
        animation: none;
    }

    [data-hero-variant="1"] .hero-content,
    [data-hero-variant="3"] .hero-content,
    [data-hero-variant="4"] .hero-content,
    [data-hero-variant="5"] .hero-content,
    [data-hero-variant="6"] .hero-content {
        animation: none;
        opacity: 1;
    }

    [data-hero-variant="5"] .hero-brand::after {
        animation: none;
        width: 60px;
    }
}
