/**
 * Wave Hero Block - Multiple Bubbles Styles
 * File: assets/css/blocks/wave-hero.css
 * Version: 3.1
 */

/* ========================================================================
   Enhanced Wave Hero Block Styles v5.0
   ======================================================================== */

/* ========================================================================
   Base Structure
   ======================================================================== */
.wave-hero-bubble {
    position: relative;
    width: 100%;
    padding: 120px 0;
    overflow: hidden;
    background: var(--bg-color, #0A0F1C);
    color: var(--text-color, #FFFFFF);
}

/* Gradient Background Support */
.wave-hero-bubble.has-gradient-bg {
    background: linear-gradient(135deg, 
        var(--gradient-color-1, #0A0F1C) 0%, 
        var(--gradient-color-2, #1A1F2C) 50%, 
        var(--gradient-color-3, #2A2F3C) 100%);
}

.wave-hero-bubble.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Float Container - for background motion */
.wave-hero-float-container {
    position: relative;
    width: 100%;
    will-change: transform;
}

/* ========================================================================
   Background Elements
   ======================================================================== */
.wave-hero-bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float-particle 25s infinite ease-in-out;
    animation-delay: var(--particle-delay, 0s);
    filter: blur(1px);
}

.bg-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.bg-particle:nth-child(2) { left: 30%; top: 60%; animation-delay: 3s; }
.bg-particle:nth-child(3) { left: 60%; top: 40%; animation-delay: 6s; }
.bg-particle:nth-child(4) { left: 80%; top: 70%; animation-delay: 9s; }
.bg-particle:nth-child(5) { left: 45%; top: 30%; animation-delay: 12s; }
.bg-particle:nth-child(6) { left: 15%; top: 80%; animation-delay: 15s; }
.bg-particle:nth-child(7) { left: 70%; top: 20%; animation-delay: 18s; }
.bg-particle:nth-child(8) { left: 85%; top: 50%; animation-delay: 21s; }

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    50% {
        transform: translateY(-120px) translateX(60px) scale(1.2);
        opacity: 0.6;
    }
    90% {
        opacity: 0.3;
    }
}

/* ========================================================================
   Content Container
   ======================================================================== */
.wave-hero-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    z-index: 10;
}

.wave-hero-content {
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* ========================================================================
   Typography - Enhanced Hierarchy
   ======================================================================== */
.wave-hero-eyebrow {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.4;
    margin: 0 0 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
    color: var(--accent-color, #7B61FF);
}

.wave-hero-small-heading {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 2.75rem;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    opacity: 1;
}

.wave-hero-main-heading {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin: 0 0 2.5rem;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    perspective: 1000px;
    position: relative;
}

/* Enhanced character styles for scramble effect */
.wave-hero-main-heading .char {
    display: inline-block;
    will-change: transform, opacity;
    backface-visibility: hidden;
    position: relative;
}

.wave-hero-main-heading .scrambling {
    color: var(--accent-color, #7B61FF);
    transform: rotateX(180deg) scale(0.8);
}

.wave-hero-main-heading .scrambled {
    opacity: 0.5;
}

.wave-hero-description {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1.375rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
    opacity: 1;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* ========================================================================
   CTA Button Styles
   ======================================================================== */
.wave-hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.wave-hero-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.wave-hero-button.primary {
    background: var(--accent-color, #7B61FF);
    color: white;
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.3);
}

.wave-hero-button.primary:hover {
    background: white;
    color: var(--accent-color, #7B61FF);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(123, 97, 255, 0.4);
}

.wave-hero-button.outline {
    background: transparent;
    color: white;
    border-color: white;
}

.wave-hero-button.outline:hover {
    background: white;
    color: var(--bg-color, #0A0F1C);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
}

.wave-hero-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.wave-hero-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.1);
}

/* Button arrow animation */
.wave-hero-button .button-arrow {
    transition: transform 0.3s ease;
}

.wave-hero-button:hover .button-arrow {
    transform: translateX(4px);
}

/* ========================================================================
   Wave Graphic - Enhanced
   ======================================================================== */
.wave-hero-graphic {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wave-hero-graphic img,
.wave-hero-graphic svg {
    width: 100%;
    max-width: 450px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(123, 97, 255, 0.4));
    transition: all 0.3s ease;
}

.wave-hero-graphic:hover img,
.wave-hero-graphic:hover svg {
    filter: drop-shadow(0 0 40px rgba(123, 97, 255, 0.6));
    transform: scale(1.05);
}

/* Enhanced wave hand animation */
.wave-hand {
    max-width: 400px;
    /* animation: wave-enhanced 3s ease-in-out infinite; */
    transform-origin: 70% 90%;
    filter: drop-shadow(0 0 20px rgba(123, 97, 255, 0.3));
}

/* Lightning bolt animation */
.lightning-bolt {
    max-width: 300px;
    transform-origin: center;
    filter: drop-shadow(0 0 30px rgba(123, 97, 255, 0.5));
}

.lightning-main {
    animation: lightning-flash 2s ease-in-out infinite;
    transform-origin: center;
}

.lightning-glow {
    animation: lightning-glow 2s ease-in-out infinite;
    transform-origin: center;
    filter: blur(2px);
}

/* Lightning animation for custom uploaded images */
.lightning-animated {
    animation: lightning-flash 2s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 30px rgba(123, 97, 255, 0.5));
}

/* Wave animation for custom uploaded images */
.wave-animated {
    animation: wave-enhanced 3s ease-in-out infinite;
    transform-origin: 70% 90%;
    filter: drop-shadow(0 0 20px rgba(123, 97, 255, 0.3));
}

@keyframes lightning-flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    10% {
        opacity: 1;
        transform: scale(1.1) rotate(2deg);
    }
    20% {
        opacity: 0.8;
        transform: scale(0.9) rotate(-1deg);
    }
    30% {
        opacity: 1;
        transform: scale(1.05) rotate(1deg);
    }
    40% {
        opacity: 0.9;
        transform: scale(0.95) rotate(-0.5deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    60% {
        opacity: 0.7;
        transform: scale(0.8) rotate(-2deg);
    }
    70% {
        opacity: 1;
        transform: scale(1.2) rotate(3deg);
    }
    80% {
        opacity: 0.6;
        transform: scale(0.7) rotate(-1deg);
    }
    90% {
        opacity: 1;
        transform: scale(1.1) rotate(1deg);
    }
}

@keyframes lightning-glow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1.2);
    }
    10% {
        opacity: 0.8;
        transform: scale(1.3);
    }
    20% {
        opacity: 0.4;
        transform: scale(1.1);
    }
    30% {
        opacity: 0.7;
        transform: scale(1.25);
    }
    40% {
        opacity: 0.5;
        transform: scale(1.15);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
    60% {
        opacity: 0.3;
        transform: scale(1.05);
    }
    70% {
        opacity: 0.9;
        transform: scale(1.4);
    }
    80% {
        opacity: 0.2;
        transform: scale(1);
    }
    90% {
        opacity: 0.7;
        transform: scale(1.3);
    }
}

@keyframes wave-enhanced {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* ========================================================================
   Responsive Design - Enhanced
   ======================================================================== */
@media (max-width: 1200px) {
    .wave-hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .wave-hero-small-heading {
        font-size: 2.5rem;
    }
    
    .wave-hero-main-heading {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }
    
    .wave-hero-description {
        font-size: 1.25rem;
    }
    
    .wave-hero-graphic img,
    .wave-hero-graphic svg {
        max-width: 400px;
    }
}

@media (max-width: 1024px) {
    .wave-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .wave-hero-small-heading {
        font-size: 2.25rem;
    }
    
    .wave-hero-main-heading {
        font-size: clamp(1.75rem, 4vw, 3rem);
    }
    
    .wave-hero-description {
        font-size: 1.125rem;
        margin: 0 auto 3rem;
    }
    
    .wave-hero-cta {
        justify-content: center;
    }
    
    .wave-hero-graphic {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .wave-hero-graphic img,
    .wave-hero-graphic svg {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .wave-hero-bubble {
        padding: 2rem 0;
    }
    
    .wave-hero-container {
        padding: 0 1.5rem;
    }
    
    .wave-hero-content {
        gap: 2.5rem;
    }
    
    .wave-hero-eyebrow {
        font-size: 1rem;
    }
    
    .wave-hero-small-heading {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .wave-hero-main-heading {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 2rem;
    }
    
    .wave-hero-description {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }
    
    .wave-hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .wave-hero-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 0.875rem;
    }
    
    .wave-hero-graphic {
        max-width: 280px;
    }
    
    .wave-hero-graphic img,
    .wave-hero-graphic svg {
        max-width: 280px;
    }
    
    .wave-hand {
        max-width: 250px;
    }
    
    .lightning-bolt {
        max-width: 200px;
    }
}

/* ========================================================================
   Reduced Motion Support
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
    .wave-hero-bubble * {
        animation: none !important;
        transition: none !important;
    }
    
    .wave-hero-main-heading .char {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .bg-particle {
        display: none;
    }
    
    .lightning-main,
    .lightning-glow,
    .lightning-animated,
    .wave-animated {
        animation: none !important;
        transform: none !important;
    }
}

/* ========================================================================
   Multiple Bubble System - Ultra Realistic
   ======================================================================== */
.bubble-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5; /* Behind content but above background */
}

.floating-bubble-wrapper {
    position: absolute;
    will-change: transform;
    transform-origin: center;
    bottom: 0; /* Start from bottom */
}

.floating-bubble {
    filter: drop-shadow(0 0 25px rgba(0, 212, 170, 0.5)) 
            drop-shadow(0 0 45px rgba(123, 97, 255, 0.3))
            drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    will-change: transform;
    opacity: 0.9;
}

/* Individual bubble physics with complex motion */
.bubble-main {
    animation: bubble-complex-shimmer 5s ease-in-out infinite;
    transform-origin: center;
}

/* Chromatic aberration animations */
.chromatic-red {
    animation: chromatic-shift-red 4s ease-in-out infinite;
}

.chromatic-blue {
    animation: chromatic-shift-blue 4s ease-in-out infinite;
}

@keyframes chromatic-shift-red {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-1px); }
}

@keyframes chromatic-shift-blue {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(1px); }
}

/* Inner refraction ring */
.refraction-ring {
    animation: refraction-rotate 20s linear infinite;
}

@keyframes refraction-rotate {
    from { transform: rotate(-20deg); }
    to { transform: rotate(340deg); }
}

/* Bottom reflection animation */
.bottom-reflection {
    animation: reflection-wave 3s ease-in-out infinite;
}

@keyframes reflection-wave {
    0%, 100% { 
        opacity: 0.3;
        d: path("M 25 65 Q 50 75 75 65");
    }
    50% { 
        opacity: 0.5;
        d: path("M 25 65 Q 50 72 75 65");
    }
}

/* Vary animation timing for each bubble */
.bubble-0 .bubble-main { animation-delay: 0s; animation-duration: 4.5s; }
.bubble-1 .bubble-main { animation-delay: 0.3s; animation-duration: 5s; }
.bubble-2 .bubble-main { animation-delay: 0.6s; animation-duration: 4.8s; }
.bubble-3 .bubble-main { animation-delay: 0.9s; animation-duration: 5.2s; }
.bubble-4 .bubble-main { animation-delay: 1.2s; animation-duration: 4.6s; }
.bubble-5 .bubble-main { animation-delay: 1.5s; animation-duration: 5.1s; }
.bubble-6 .bubble-main { animation-delay: 1.8s; animation-duration: 4.9s; }
.bubble-7 .bubble-main { animation-delay: 2.1s; animation-duration: 4.7s; }

@keyframes bubble-complex-shimmer {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1) saturate(1) contrast(1);
        transform: scale(1) translateY(0) rotateZ(0deg);
    }
    20% {
        filter: hue-rotate(10deg) brightness(1.05) saturate(1.1) contrast(1.05);
        transform: scale(1.01) translateY(-1px) rotateZ(0.5deg);
    }
    40% {
        filter: hue-rotate(-8deg) brightness(1.08) saturate(1.05) contrast(1.02);
        transform: scale(0.99) translateY(0.5px) rotateZ(-0.3deg);
    }
    60% {
        filter: hue-rotate(5deg) brightness(1.03) saturate(1.08) contrast(1.01);
        transform: scale(1.005) translateY(-0.5px) rotateZ(0.2deg);
    }
    80% {
        filter: hue-rotate(-3deg) brightness(1.06) saturate(1.03) contrast(1.03);
        transform: scale(0.995) translateY(1px) rotateZ(-0.4deg);
    }
}

/* Bubble highlights with organic movement */
.bubble-shine {
    animation: bubble-highlight-organic 6s ease-in-out infinite;
    transform-origin: center;
}

.bubble-shine-2 {
    animation: bubble-highlight-small 4.5s ease-in-out infinite;
    animation-delay: -2s;
}

.bubble-shine-3 {
    animation: bubble-highlight-tiny 3s ease-in-out infinite;
    animation-delay: -1s;
}

@keyframes bubble-highlight-organic {
    0%, 100% {
        opacity: 0.7;
        transform: translateX(0) translateY(0) scale(1) skewX(0deg);
    }
    25% {
        opacity: 0.75;
        transform: translateX(1px) translateY(-2px) scale(1.02) skewX(2deg);
    }
    50% {
        opacity: 0.8;
        transform: translateX(2px) translateY(-3px) scale(1.05) skewX(-1deg);
    }
    75% {
        opacity: 0.75;
        transform: translateX(1px) translateY(-1px) scale(1.02) skewX(1deg);
    }
}

@keyframes bubble-highlight-small {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(0) translateY(0) scale(1);
    }
    50% {
        opacity: 0.65;
        transform: translateX(-1px) translateY(-2px) scale(1.1);
    }
}

@keyframes bubble-highlight-tiny {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.45;
        transform: scale(1.2);
    }
}

/* Animated spots */
.spot-1 { animation: spot-twinkle 2s ease-in-out infinite; }
.spot-2 { animation: spot-twinkle 2.5s ease-in-out infinite 0.5s; }
.spot-3 { animation: spot-twinkle 3s ease-in-out infinite 1s; }
.spot-4 { animation: spot-twinkle 2.2s ease-in-out infinite 1.5s; }

@keyframes spot-twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* Burst particles with enhanced glow */
.burst-particles circle {
    will-change: transform, opacity;
    filter: blur(0.3px) brightness(1.5);
    mix-blend-mode: screen;
}

/* ========================================================================
   Debug Panel (Development Only)
   ======================================================================== */
.wave-hero-debug {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    z-index: 9999;
}

.wave-hero-debug span {
    color: #00D4AA;
    font-weight: bold;
}

/* ─── Real-looking bubbles ─────────────────────────────── */
.floating-bubble {
  mix-blend-mode: screen;
  transition: filter .3s ease;
}

.bubble-main {
  stroke: rgba(255,255,255,.35);
  stroke-width: .4;
}

.paper-plane-wrapper      { filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.paper-plane-svg polygon  { vector-effect: non-scaling-stroke;
                            stroke: rgba(0,0,0,.05); stroke-width:.5; }

.wave-hero-graphic img.js-wvh-graphic {
    transform-origin: 70% 90%;
    display: block;
}
