/* ==========================================================================
   Wave Hero Block - Responsive Design
   Mobile-First Approach with Progressive Enhancement
   ========================================================================== */

/* ==========================================================================
   Mobile Base Styles (320px - 767px)
   ========================================================================== */
@media (max-width: 767px) {
    /* Main section adjustments */
    .wave-hero-bubble {
        height: auto !important;
        max-height: none !important;
        padding: 80px 0 60px; /* Restored original padding */
        overflow: visible !important;
    }
    
    /* Remove GSAP inline styles on mobile */
    .wave-hero-bubble[style*="max-width"],
    .wave-hero-bubble[style*="width"],
    .wave-hero-bubble[style*="height"] {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Remove pin-spacer wrapper effects */
    .pin-spacer {
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        position: static !important;
        display: block !important;
        overflow: visible !important;
    }
    
    /* Container adjustments */
    .wave-hero-container {
        padding: 3rem 1rem; /* Good padding on all sides */
        max-width: 100%;
        height: auto;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative;
    }
    
    /* Force left alignment for all text elements */
    .wave-hero-bubble * {
        text-align: left !important;
    }
    
    .wave-hero-bubble .wave-hero-cta {
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    /* Content layout - single column on mobile */
    .wave-hero-content {
        display: block !important; /* Change from grid to block */
        width: 100%;
        text-align: left !important;
        position: relative;
        z-index: 10;
    }
    
    .wave-hero-content--full {
        display: block !important;
        text-align: left !important;
    }
    
    .wave-hero-text {
        max-width: 100%;
        padding: 0;
        text-align: left !important;
        display: block;
        position: relative;
    }
    
    /* Typography adjustments - all left-aligned */
    .wave-hero-eyebrow {
        font-size: 0.875rem; /* 14px */
        margin-bottom: 0.625rem; /* Slightly reduced */
        letter-spacing: 0.08em;
        text-align: left !important;
    }
    
    .wave-hero-small-heading {
        font-size: 1.5rem; /* 24px */
        font-size: clamp(1.25rem, 4vw, 1.75rem);
        line-height: 1.3;
        margin-bottom: 0.875rem; /* Slightly reduced */
        text-align: left !important;
    }
    
    .wave-hero-main-heading {
        font-size: 2.5rem; /* 40px base */
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.1;
        margin-bottom: 1.25rem; /* Slightly reduced */
        letter-spacing: -0.02em;
        word-wrap: break-word;
        hyphens: manual;
        text-align: left !important;
    }
    
    /* Character animation adjustments */
    .wave-hero-main-heading .wave-char,
    .wave-hero-main-heading .char {
        display: inline-block;
        font-size: inherit;
    }
    
    .wave-hero-description {
        font-size: 1rem; /* 16px */
        font-size: clamp(0.95rem, 2.5vw, 1.125rem);
        line-height: 1.5;
        margin-bottom: 1.75rem; /* Slightly reduced */
        max-width: 100%;
        text-align: left !important;
    }
    
    /* CTA Button adjustments - left-aligned */
    .wave-hero-cta {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .wave-hero-button {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
        justify-content: center;
    }
    
    /* Background particles - reduce for performance */
    .wave-hero-bg-particles {
        display: none; /* Hide on mobile for better performance */
    }
    
    /* Disable float animation on mobile */
    .wave-hero-float-container {
        animation: none !important;
        transform: none !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Ensure all elements are visible */
    .wave-hero-bubble .js-wvh-small,
    .wave-hero-bubble .js-wvh-main,
    .wave-hero-bubble .js-wvh-desc,
    .wave-hero-bubble .wave-hero-small-heading,
    .wave-hero-bubble .wave-hero-main-heading,
    .wave-hero-bubble .wave-hero-description {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        position: relative !important;
        display: block !important;
    }
}

/* ==========================================================================
   Small Mobile (320px - 374px)
   ========================================================================== */
@media (max-width: 374px) {
    .wave-hero-bubble {
        padding: 60px 0 40px;
    }
    
    .wave-hero-container {
        padding: 0 0.75rem;
    }
    
    .wave-hero-small-heading {
        font-size: 1.25rem; /* 20px */
    }
    
    .wave-hero-main-heading {
        font-size: 1.75rem; /* 28px */
        margin-bottom: 1.25rem;
    }
    
    .wave-hero-description {
        font-size: 0.9375rem; /* 15px */
    }
    
    .wave-hero-button {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        max-width: 260px;
    }
}

/* ==========================================================================
   Medium Mobile (375px - 479px)
   ========================================================================== */
@media (min-width: 375px) and (max-width: 479px) {
    .wave-hero-small-heading {
        font-size: 1.375rem; /* 22px */
    }
    
    .wave-hero-main-heading {
        font-size: 2.25rem; /* 36px */
    }
    
    .wave-hero-description {
        font-size: 1rem; /* 16px */
    }
}

/* ==========================================================================
   Large Mobile (480px - 767px)
   ========================================================================== */
@media (min-width: 480px) and (max-width: 767px) {
    .wave-hero-bubble {
        padding: 80px 0 60px;
    }
    
    .wave-hero-container {
        padding: 0 1.5rem;
    }
    
    .wave-hero-small-heading {
        font-size: 1.625rem; /* 26px */
    }
    
    .wave-hero-main-heading {
        font-size: 2.75rem; /* 44px */
        margin-bottom: 2rem;
    }
    
    .wave-hero-description {
        font-size: 1.125rem; /* 18px */
    }
    
    .wave-hero-cta {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .wave-hero-button {
        width: auto;
        min-width: 140px;
    }
}

/* ==========================================================================
   Tablet Portrait (768px - 900px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 900px) {
    .wave-hero-bubble {
        padding: 120px 0 80px;
    }
    
    .wave-hero-container {
        padding: 0 2rem;
    }
    
    .wave-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .wave-hero-eyebrow {
        font-size: 1rem;
    }
    
    .wave-hero-small-heading {
        font-size: 2rem; /* 32px */
        margin-bottom: 1.25rem;
    }
    
    .wave-hero-main-heading {
        font-size: 3.5rem; /* 56px */
        font-size: clamp(3rem, 7vw, 4rem);
        margin-bottom: 2rem;
    }
    
    .wave-hero-description {
        font-size: 1.25rem; /* 20px */
        max-width: 600px;
        margin: 0 auto 2.5rem;
    }
    
    .wave-hero-cta {
        justify-content: flex-start;
    }
    
    .wave-hero-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Re-enable particles with reduced count */
    .wave-hero-bg-particles {
        display: block;
    }
    
    .bg-particle:nth-child(n+5) {
        display: none; /* Show only first 4 particles */
    }
}

/* ==========================================================================
   Tablet Landscape (901px - 1024px)
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1024px) {
    .wave-hero-bubble {
    }
    
    .wave-hero-container {
        padding: 0 3rem;
    }
    
    .wave-hero-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 3rem;
        text-align: left;
    }
    
    .wave-hero-small-heading {
        font-size: 2.25rem; /* 36px */
    }
    
    .wave-hero-main-heading {
        font-size: 3rem; /* 48px */
        font-size: clamp(2.5rem, 5vw, 3.5rem);
    }
    
    .wave-hero-description {
        font-size: 1.25rem; /* 20px */
    }
    
    /* Show all particles */
    .wave-hero-bg-particles {
        display: block;
    }
    
    .bg-particle {
        display: block;
    }
}

/* ==========================================================================
   Small Desktop (1025px - 1280px)
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1280px) {
    .wave-hero-container {
        max-width: 1200px;
    }
    
    .wave-hero-main-heading {
        font-size: clamp(3rem, 5vw, 3.75rem);
    }
    
    .wave-hero-description {
        font-size: 1.375rem;
    }
}

/* ==========================================================================
   Landscape Orientation Mobile
   ========================================================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .wave-hero-bubble {
        padding: 40px 0;
    }
    
    .wave-hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .wave-hero-small-heading {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .wave-hero-main-heading {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .wave-hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .wave-hero-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   GSAP ScrollTrigger Overrides
   ========================================================================== */
@media (max-width: 767px) {
    /* Disable GSAP pinning on mobile */
    [data-gsap="wave-hero-bubble"] {
        position: relative !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Reset GSAP inline styles */
    [data-gsap] {
        translate: none !important;
        rotate: none !important;
        scale: none !important;
    }
    
    /* Disable character animations on mobile */
    .js-wvh-small,
    .js-wvh-main,
    .js-wvh-desc {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .wave-char {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .wave-hero-float-container,
    .bg-particle,
    .wave-char,
    [data-gsap] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .wave-hero-button {
        min-height: 44px; /* iOS touch target */
        -webkit-tap-highlight-color: transparent;
    }
    
    .wave-hero-button:active {
        transform: scale(0.98);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .wave-hero-main-heading {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
    .wave-hero-bubble {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .wave-hero-float-container {
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }
}

/* Print styles */
@media print {
    .wave-hero-bubble {
        height: auto;
        min-height: auto;
        page-break-inside: avoid;
    }
    
    .wave-hero-bg-particles,
    .wave-hero-float-container {
        display: none;
    }
    
    .wave-hero-main-heading {
        font-size: 24pt !important;
        color: black !important;
    }
    
    .wave-hero-description {
        font-size: 12pt !important;
        color: black !important;
    }
    
    .wave-hero-button {
        display: none;
    }
}
