/* 
   VIVID INTERNAL - Specialized Styles for Energo Nest Internal Pages
   Scope: These styles apply only to pages with the .page-vivid class.
   This ensures the homepage (which is perfect) remains UNTOUCHED.
*/

.page-vivid {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
}

.page-vivid h1,
.page-vivid h2,
.page-vivid h3,
.page-vivid h4 {
    letter-spacing: 1px !important;
}

/* Immersive Hero: The Vivid Stage */
.vivid-stage {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 120px 8%;
    overflow: hidden;
    background-color: var(--en-dark);
}

.vivid-stage-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6) grayscale(0.2);
    transform: scale(1.05) translate3d(0, 0, 0); /* Stabilized Layer */
    transition: transform 8s linear;
    z-index: 1;
}

.page-vivid:hover .vivid-stage-bg {
    transform: scale(1.15) translate3d(0, 0, 0); /* GPU Accelerated Zoom */
}

.vivid-stage-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(13,13,13,0.9) 20%, rgba(13,13,13,0.4) 60%, rgba(13,13,13,0.9) 90%);
    z-index: 2;
}

.vivid-stage-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.vivid-stage h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
    margin-bottom: 25px;
    letter-spacing: -3px;
    font-weight: 950;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.vivid-stage p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    line-height: 1.5;
    border-left: 2px solid var(--en-red);
    padding-left: 25px;
}

/* Glassmorphism Cards */
.vivid-glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 40px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0); /* Force 3D context */
}

.vivid-glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(238, 44, 44, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.vivid-glass-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, transparent 50%, rgba(238, 44, 44, 0.1) 50%);
    transition: 0.4s;
}

.vivid-glass-card:hover::after {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, transparent 50%, rgba(238, 44, 44, 0.2) 50%);
}

/* Typography Hardening */
.page-vivid h2 {
    font-weight: 950;
    letter-spacing: -2px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 40px;
}

.page-vivid .vertical-tag {
    display: inline-block;
    font-weight: 950;
    font-size: 0.7rem;
    color: var(--en-red);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-left: 3px solid var(--en-red);
    padding-left: 12px;
    line-height: 1;
}

/* Vivid Section Layout */
.vivid-section {
    padding: 120px 8%;
    background: var(--en-charcoal);
}

.vivid-section.dark {
    background: var(--en-dark);
}

/* Staggered Items Animation - Integrated with IntersectionObserver */
.reveal-up.active.delay-1 { transition-delay: 0.1s; }
.reveal-up.active.delay-2 { transition-delay: 0.2s; }
.reveal-up.active.delay-3 { transition-delay: 0.3s; }
.reveal-up.active.delay-4 { transition-delay: 0.4s; }

/* Micro-animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.vivid-float {
    animation: float 5s ease-in-out infinite;
}

/* Roadmap Vivid Style */
.vivid-roadmap {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    margin-top: 50px;
}

.vivid-roadmap::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--en-red), transparent);
    z-index: 1;
}

.vivid-step {
    flex: 1;
    position: relative;
    z-index: 2;
    text-align: center;
}

.vivid-step-num {
    width: 50px;
    height: 50px;
    background: var(--en-dark);
    border: 1px solid var(--en-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 900;
    color: var(--en-red);
    box-shadow: 0 0 20px var(--en-red-glow);
    transition: 0.4s;
}

.vivid-step:hover .vivid-step-num {
    background: var(--en-red);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--en-red);
}

/* Service Box Upgrade */
.vivid-svc-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vivid-svc-img {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    filter: brightness(0.8);
    transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.vivid-glass-card:hover .vivid-svc-img {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Vivid Spec Table */
.spec-table-vivid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.spec-table-vivid th {
    text-align: left;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--en-red);
    font-weight: 950;
    width: 35%;
}

.spec-table-vivid td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.spec-table-vivid tr:last-child th,
.spec-table-vivid tr:last-child td {
    border-bottom: none;
}

/* Project Cards Vivid Style */
.vivid-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 8% 120px;
}

.vivid-project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vivid-project-tag {
    font-family: var(--en-font-mono);
    font-size: 0.65rem;
    color: var(--en-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
}

.vivid-project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.vivid-project-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: auto;
}

.vivid-project-meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vivid-project-client {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Vivid Spec List for Supply */
.vivid-spec-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.vivid-spec-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--en-gray);
}

.vivid-spec-list li span:first-child {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--en-white);
}

.vivid-spec-list li span:last-child {
    font-family: var(--en-font-mono);
    color: var(--en-red);
    font-weight: 700;
}

/* Footer Symmetrical Hubs */
.v19-contact-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.v19-contact-row a {
    color: var(--en-white) !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    padding: 8px 15px;
    border: 1px solid var(--en-red);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(238, 44, 44, 0.05);
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.v19-contact-row a:hover {
    background: var(--en-red);
    box-shadow: 0 0 15px var(--en-red-glow);
    transform: translateY(-2px);
    color: #fff !important;
}

@media (max-width: 991px) {
    .v19-contact-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .v19-contact-row a {
        text-align: center;
        width: 100%;
        justify-content: center;
    }
}




/* Mobile Responsiveness for Vivid Internal */
@media (max-width: 991px) {
    .vivid-stage {
        padding: 100px 5%;
        min-height: 50vh;
    }

    .vivid-stage h1 {
        font-size: 2.8rem;
        letter-spacing: 0.5px;
    }

    .vivid-section {
        padding: 60px 20px;
    }

    .vivid-roadmap {
        flex-direction: column;
        gap: 40px;
    }

    .vivid-roadmap::before {
        left: 25px;
        top: 0;
        bottom: 0;
        width: 1px;
        height: auto;
        background: linear-gradient(to bottom, transparent, var(--en-red), transparent);
    }

    .vivid-step {
        text-align: left;
        display: flex;
        gap: 20px;
    }

    .vivid-step-num {
        margin: 0;
        flex-shrink: 0;
    }

    .vivid-project-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 80px;
    }

    .vivid-glass-card {
        padding: 25px;
    }

    /* Side-by-side sections to stack */
    .buying-section {
        flex-direction: column !important;
        gap: 30px;
    }

    .vivid-section div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .vivid-section div[style*="display: flex; flexDirection: row"] {
        flex-direction: column !important;
    }

    .vivid-section div[style*="display: flex; flexDirection: row-reverse"] {
        flex-direction: column !important;
    }
}
