/* ==========================================================================
   HERO PREMIUM INTERACTIONS & ANIMATIONS
   ========================================================================== */

/* ==========================================================================
   PREMIUM TYPOGRAPHY - Sora Font
   ========================================================================== */
.wp-block-cover h1.wp-block-heading {
    font-family: 'Sora', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: normal !important;
    font-size: clamp(2rem, 5vw, 3.2rem) !important;
    line-height: 1.15 !important;
}

/* CSS-only headline animation (replaces letter-by-letter JS) */
.wp-block-cover h1.wp-block-heading.hero-headline-animated {
    animation: headlineReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes headlineReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(8px);
        clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Ensure text container has enough width */
.wp-block-cover .wp-block-group {
    max-width: 55% !important;
}

.wp-block-cover .wp-block-cover__inner-container {
    max-width: 100% !important;
    width: 100% !important;
}

.wp-block-cover .is-style-text-annotation,
.wp-block-cover p.is-style-text-annotation {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
}

.wp-block-cover p:not(.is-style-text-annotation) {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.wp-block-cover .wp-block-button__link {
    font-family: 'Sora', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
}

/* ==========================================================================
   REMOVE LINK UNDERLINES
   ========================================================================== */
.wp-block-cover a,
.wp-block-cover a:hover,
.wp-block-cover a:focus,
.wp-block-cover a:visited,
.wp-block-cover .wp-block-button__link,
.wp-block-cover .wp-block-button__link:hover {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   VERTICAL CONTAINER LINES - Structural Background
   ========================================================================== */
.hero-container-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-container-lines::before,
.hero-container-lines::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(94, 200, 181, 0.15) 20%, 
        rgba(94, 200, 181, 0.25) 50%, 
        rgba(94, 200, 181, 0.15) 80%, 
        transparent 100%);
}

.hero-container-lines::before {
    left: 20%;
}

.hero-container-lines::after {
    right: 20%;
}

.hero-line-center {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(140, 70, 170, 0.1) 30%, 
        rgba(140, 70, 170, 0.2) 50%, 
        rgba(140, 70, 170, 0.1) 70%, 
        transparent 100%);
}

.hero-line-left,
.hero-line-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(210, 120, 40, 0.1) 25%, 
        rgba(210, 120, 40, 0.15) 50%, 
        rgba(210, 120, 40, 0.1) 75%, 
        transparent 100%);
}

.hero-line-left {
    left: 35%;
}

.hero-line-right {
    right: 35%;
}

/* ==========================================================================
   ALPHA MASKING - Left & Right Edge Fade
   ========================================================================== */
.hero-alpha-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 6;
    pointer-events: none;
}

.hero-alpha-mask-left {
    left: 0;
    width: 15%;
    background: linear-gradient(90deg, 
        rgba(248, 249, 250, 1) 0%, 
        rgba(248, 249, 250, 0.8) 30%,
        rgba(248, 249, 250, 0) 100%);
}

.hero-alpha-mask-right {
    right: 0;
    width: 10%;
    background: linear-gradient(270deg, 
        rgba(248, 249, 250, 1) 0%, 
        rgba(248, 249, 250, 0.6) 40%,
        rgba(248, 249, 250, 0) 100%);
}

/* ==========================================================================
   SONAR RIPPLE ANIMATION - Behind Image
   ========================================================================== */
.hero-sonar-container {
    position: absolute;
    top: 50%;
    right: 25%;
    transform: translate(50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.hero-sonar-ripple {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(94, 200, 181, 0.3);
    animation: sonarPulse 4s ease-out infinite;
}

.hero-sonar-ripple:nth-child(1) {
    animation-delay: 0s;
}

.hero-sonar-ripple:nth-child(2) {
    animation-delay: 1s;
}

.hero-sonar-ripple:nth-child(3) {
    animation-delay: 2s;
}

.hero-sonar-ripple:nth-child(4) {
    animation-delay: 3s;
}

@keyframes sonarPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.6;
        border-color: rgba(94, 200, 181, 0.4);
    }
    50% {
        opacity: 0.3;
        border-color: rgba(140, 70, 170, 0.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
        border-color: rgba(210, 120, 40, 0.1);
    }
}

/* ==========================================================================
   HERO IMAGE - Clip-Path Intro, Blur-In, Mouse Glow
   ========================================================================== */
.wp-block-cover .wp-block-cover__image-background {
    /* Clip-path intro animation */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation: heroImageReveal 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards,
               heroBlurIn 1.2s ease-out forwards;
    transform-origin: center center;
}

@keyframes heroImageReveal {
    0% {
        clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
        transform: scale(1.1) translateY(20px);
        opacity: 0;
    }
    50% {
        clip-path: polygon(0 50%, 100% 50%, 100% 50%, 0 50%);
        opacity: 0.7;
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes heroBlurIn {
    0% {
        filter: blur(20px);
    }
    100% {
        filter: blur(0);
    }
}

/* Mouse position glow effect container */
.hero-image-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(94, 200, 181, 0.4) 0%, 
        rgba(94, 200, 181, 0.1) 40%,
        transparent 70%);
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    filter: blur(30px);
}

.wp-block-cover:hover .hero-image-glow {
    opacity: 1;
}

/* ==========================================================================
   HEADLINE - Letter-by-Letter Clip Slide Animation
   ========================================================================== */
.wp-block-cover h1.wp-block-heading {
    overflow: hidden;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: letterSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-letter.space {
    width: 0.3em;
}

@keyframes letterSlideIn {
    0% {
        opacity: 0;
        transform: translateY(100%);
        clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Fallback for non-JS: show text immediately */
.no-js .wp-block-cover h1.wp-block-heading .hero-letter,
.wp-block-cover h1.wp-block-heading:not(.animated) {
    opacity: 1;
    transform: none;
    animation: none;
}

/* ==========================================================================
   SUBTITLE & DESCRIPTION - Fade In Animations
   ========================================================================== */
.wp-block-cover .is-style-text-annotation {
    opacity: 0;
    animation: fadeSlideIn 0.8s ease-out 0.3s forwards;
}

.wp-block-cover p:not(.is-style-text-annotation):not(.wp-block-button__link) {
    opacity: 0;
    animation: fadeSlideIn 0.8s ease-out 0.6s forwards;
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ==========================================================================
   CTA BUTTONS - Premium Gradient Border & Beam Effect
   ========================================================================== */
.wp-block-cover .wp-block-button {
    position: relative;
    opacity: 0;
    animation: fadeSlideIn 0.8s ease-out 0.9s forwards;
}

.wp-block-cover .wp-block-button__link {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(30, 130, 110, 1) 0%, 
        rgba(40, 120, 140, 1) 100%) !important;
    border: none !important;
    z-index: 1;
}

/* Gradient border effect */
.wp-block-cover .wp-block-button__link::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        rgba(94, 200, 181, 1) 0%, 
        rgba(140, 70, 170, 0.8) 50%,
        rgba(210, 120, 40, 1) 100%);
    border-radius: 9999px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wp-block-cover .wp-block-button__link:hover::before {
    opacity: 1;
}

/* Animated beam effect on hover */
.wp-block-cover .wp-block-button__link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    transition: none;
}

.wp-block-cover .wp-block-button__link:hover::after {
    animation: beamSlide 0.6s ease-out;
}

@keyframes beamSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Outline button special styling - More Visible */
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(30, 100, 90, 0.8) !important;
    color: rgba(30, 100, 90, 1) !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 130, 110, 0.15) !important;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(30, 130, 110, 1) 0%, 
        rgba(40, 100, 120, 1) 100%);
    border-radius: 9999px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover {
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(30, 130, 110, 0.3) !important;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover::before {
    opacity: 1;
}

/* ==========================================================================
   PARALLAX BACKGROUND
   ========================================================================== */
.wp-block-cover.has-parallax-bg .hero-animated-bg {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .hero-container-lines::before { left: 10%; }
    .hero-container-lines::after { right: 10%; }
    .hero-line-left { left: 25%; }
    .hero-line-right { right: 25%; }
    
    .hero-alpha-mask-left { width: 8%; }
    .hero-alpha-mask-right { width: 5%; }
    
    .hero-sonar-ripple {
        width: 150px;
        height: 150px;
    }
    
    .hero-image-glow {
        width: 100px;
        height: 100px;
    }
    
    /* Simplify animations on mobile */
    .hero-letter {
        animation-duration: 0.4s;
    }
    
    @keyframes heroImageReveal {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .hero-container-lines::before,
    .hero-container-lines::after,
    .hero-line-center,
    .hero-line-left,
    .hero-line-right {
        opacity: 0.5;
    }
    
    .hero-sonar-container {
        display: none;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .wp-block-cover .wp-block-cover__image-background,
    .hero-letter,
    .wp-block-cover .is-style-text-annotation,
    .wp-block-cover p,
    .wp-block-cover .wp-block-button,
    .hero-sonar-ripple {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
    
    .wp-block-cover .wp-block-button__link::after {
        display: none;
    }
}
