/* ============================================
     NEXORA HERO - SLOWER FLIP TRANSITIONS
     ============================================ */

/* ----- Hero Wrapper ----- */
.hero-wrapper {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #0f172a;
    min-height: 100vh;
}

/* Dark gradient overlay */
.hero-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 2;
}

/* ----- Background Image with Zoom/Breath ----- */
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: url('assets/work3.jpeg') center/cover no-repeat;
    z-index: 1;
    animation: zoomBreath 18s ease-in-out infinite alternate;
    transform: scale(1);
    filter: brightness(0.65) saturate(1.1);
}

@keyframes zoomBreath {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* ----- Sliding "Flip" Layers - SLOWER TIMING ----- */
.flip-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 10;
    animation: flipUp 6s cubic-bezier(0.86, 0, 0.07, 1) forwards;
    transform-origin: top center;
    pointer-events: none;
}

.layer-1 {
    background-color: #0f172a;
    animation-delay: 0.5s;
    z-index: 13;
}
.layer-2 {
    background-color: #1e293b;
    animation-delay: 2.5s;
    z-index: 12;
}
.layer-3 {
    background-color: #5E4CE6;
    animation-delay: 4.5s;
    z-index: 11;
}

@keyframes flipUp {
    0% {
        transform: translateY(0) scaleY(1);
    }
    100% {
        transform: translateY(-100%) scaleY(1);
    }
}

/* ----- Hero Content - Text Reveals ----- */
.hero-content {
    position: relative;
    z-index: 15;
    padding: 0 2rem 0 6rem;
    max-width: 820px;
    text-align: left;
    margin-left: 0;
    animation: textReveal 1.5s ease-out forwards 1.5s;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
     PURPLE LAYER ADAPTATIONS
     ============================================ */

/* Default: "Tomorrow" is purple on dark layers */
.hero-content h1 span {
    color: #5E4CE6 !important;
    font-style: italic;
    display: inline-block;
    text-shadow: 0 2px 30px rgba(79, 70, 229, 0.5);
    transition: color 1.2s ease, text-shadow 1.2s ease;
}

/* When purple layer is revealed, "Tomorrow" turns WHITE */
body .hero-content h1 span.purple-ready {
    color: #ffffff !important;
    text-shadow: 0 2px 30px rgba(255, 255, 255, 0.3);
}

/* Paragraph gets lighter on purple */
body .hero-content p.purple-ready {
    color: #ffffff !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* ----- BUTTON - FLIPS ON PURPLE LAYER ----- */

/* DEFAULT (Before purple layer): White background with purple text */
.btn-primary {
    background: #ffffff !important;
    color: #5E4CE6 !important;
    padding: 0.9rem 2.6rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.6s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #f0edff !important;
    box-shadow: 0 12px 45px rgba(255, 255, 255, 0.4);
}

/* AFTER purple layer: Purple background with WHITE text */
body .btn-primary.purple-ready {
    background: #5E4CE6 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 30px rgba(94, 76, 230, 0.4);
    animation: beat-glow 2s infinite;
}

@keyframes beat-glow {
    0% { box-shadow: 0 0 0 0 rgba(94, 76, 230, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(94, 76, 230, 0); }
    100% { box-shadow: 0 0 0 0 rgba(94, 76, 230, 0); }
}

body .btn-primary.purple-ready:hover {
    transform: translateY(-3px);
    background: #6d5dfc !important;
    box-shadow: 0 12px 45px rgba(94, 76, 230, 0.55);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.9rem 2.6rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    transition: all 0.6s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #5E4CE6;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

body .btn-secondary.purple-ready {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

body .btn-secondary.purple-ready:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

/* ----- Typography (base styles) ----- */
.hero-content h1 {
    color: #ffffff !important;
    font-size: clamp(3rem, 7vw, 5.2rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    }
    100% {
        text-shadow: 0 4px 50px rgba(94, 76, 230, 0.3), 0 4px 30px rgba(0, 0, 0, 0.6);
    }
}

.hero-content p {
    color: #f1f5f9 !important;
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    max-width: 580px;
    margin: 1.2rem 0 2rem 0;
    line-height: 1.8;
    opacity: 0.95;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    animation: textRevealP 1.5s ease-out forwards 2s;
    opacity: 0;
    transform: translateY(30px);
    transition: color 1.2s ease, text-shadow 1.2s ease;
}

@keyframes textRevealP {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* ----- Buttons Container ----- */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
    animation: textRevealButtons 1.5s ease-out forwards 2.5s;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes textRevealButtons {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
     ADDITIONAL TEXT ON LAYER 1
     ============================================ */
.layer-text {
    position: absolute;
    bottom: 15%;
    right: 8%;
    z-index: 14;
    color: rgba(255, 255, 255, 0.08);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
    animation: layerTextFade 6s ease-out forwards;
    opacity: 0;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

@keyframes layerTextFade {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    30% {
        opacity: 0.15;
        transform: scale(1);
    }
    100% {
        opacity: 0.15;
        transform: scale(1);
    }
}

/* ============================================
     PREMIUM MOBILE RESPONSIVE - ATTRACTIVE DESIGN
     ============================================ */

@media (max-width: 991px) {
    .hero-content {
        padding: 0 2rem !important;
        max-width: 650px;
        text-align: left !important;
    }
    .layer-text {
        font-size: clamp(3rem, 8vw, 5rem);
        right: 5%;
    }
}

@media (max-width: 768px) {
    .hero-wrapper {
        justify-content: center;
        align-items: center;
    }
    
    .hero-content {
        text-align: center !important;
        padding: 0 1.8rem !important;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }
    
    /* Larger, bolder heading */
    .hero-content h1 {
        font-size: clamp(2.8rem, 12vw, 4rem) !important;
        font-weight: 800 !important;
        line-height: 1.05 !important;
        letter-spacing: -0.03em !important;
        margin-bottom: 0.8rem !important;
        text-shadow: 0 8px 40px rgba(0, 0, 0, 0.7) !important;
    }
    
    .hero-content h1 span {
        display: block;
        font-size: clamp(2.8rem, 12vw, 4rem) !important;
        margin-top: 0.2rem;
    }
    
    /* Premium paragraph */
    .hero-content p {
        font-size: clamp(1.05rem, 3vw, 1.2rem) !important;
        line-height: 1.8 !important;
        max-width: 100% !important;
        margin: 0.8rem auto 1.8rem auto !important;
        font-weight: 300 !important;
        opacity: 0.92 !important;
        text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6) !important;
        letter-spacing: 0.01em;
    }
    
    /* Button container - premium centered */
    .hero-cta {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 340px !important;
        margin: 0 auto !important;
        gap: 0.8rem !important;
    }
    
    /* Premium buttons - reduced width, better alignment */
    .btn-primary,
    .btn-secondary {
        padding: 0.85rem 1.5rem !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        width: 100% !important;
        max-width: 320px !important;
        justify-content: center !important;
        text-align: center !important;
        letter-spacing: 0.03em !important;
        border-radius: 50px !important;
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    }
    
    /* Primary button - premium glow */
    .btn-primary {
        box-shadow: 0 8px 35px rgba(94, 76, 230, 0.35) !important;
        background: #5E4CE6 !important;
        color: #ffffff !important;
    }
    
    .btn-primary:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 12px 45px rgba(94, 76, 230, 0.5) !important;
    }
    
    /* Secondary button - premium glass */
    .btn-secondary {
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
    }
    
    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
        transform: translateY(-2px) !important;
    }
    
    .hero-bg-image {
        filter: brightness(0.5) saturate(1.1);
    }
    
    .layer-text {
        display: none;
    }
    
    /* Mobile purple adaptations */
    body .hero-content h1 span.purple-ready {
        color: #ffffff !important;
    }
    
    body .btn-primary.purple-ready {
        background: #5E4CE6 !important;
        color: #ffffff !important;
        box-shadow: 0 8px 35px rgba(94, 76, 230, 0.4) !important;
        animation: beat-glow 2s infinite;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 1.2rem !important;
    }
    
    .hero-content h1 {
        font-size: clamp(2.2rem, 14vw, 3.2rem) !important;
    }
    
    .hero-content h1 span {
        font-size: clamp(2.2rem, 14vw, 3.2rem) !important;
    }
    
    .hero-content p {
        font-size: clamp(0.95rem, 3.5vw, 1.05rem) !important;
        line-height: 1.7 !important;
        margin: 0.6rem auto 1.5rem auto !important;
    }
    
    .hero-cta {
        max-width: 280px !important;
        gap: 0.7rem !important;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.7rem 1.2rem !important;
        font-size: 0.85rem !important;
        max-width: 280px !important;
        border-radius: 45px !important;
    }
    
    .hero-bg-image {
        filter: brightness(0.45);
    }
}

/* ============================================
     ULTRA SPECIFIC - FORCE PURPLE READY
     ============================================ */

body .hero-content h1 span.purple-ready,
html body .hero-content h1 span.purple-ready,
.hero-content h1 span.purple-ready.purple-ready {
    color: #ffffff !important;
    text-shadow: 0 2px 30px rgba(255, 255, 255, 0.3) !important;
}

body .btn-primary.purple-ready,
html body .btn-primary.purple-ready,
.btn-primary.purple-ready.purple-ready {
    background: #5E4CE6 !important;
    color: #ffffff !important;
}

body .hero-content p.purple-ready,
html body .hero-content p.purple-ready,
.hero-content p.purple-ready.purple-ready {
    color: #ffffff !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2) !important;
}

/* ----- Safari/iOS fix for 100vh issues ----- */
@supports (-webkit-touch-callout: none) {
    .hero-wrapper,
    .hero-bg-image,
    .flip-layer {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}