:root {
    --navy: #050508;
    --dark-purple: #07070b;
    --vivid-blue: #00d2ff;
    --vivid-purple: #9d50bb;
    --text-color: #e6f1ff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    /* Premium Brand Palette (vividappstudio.in) */
    --v-violet: #A78BFA;
    --v-purple: #C084FC;
    --v-orange: #F97316;
    --v-gold: #D4AF37;
    --v-dark-obsidian: #030303;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at center, #0B0B0F 0%, #030305 100%);
    background-attachment: fixed;
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Assets/vivid-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--navy);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, var(--v-violet), var(--v-orange), var(--v-gold));
    border-radius: 10px;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

.glass-nav {
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--vivid-blue);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* Typography & Gradient Loop */
@keyframes gradient-loop {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b,
.vivid-logo,
.gradient-text,
.step-number,
.whatsapp-text {
    /* Direction: Structured Horizontal Flow */
    background: linear-gradient(to right, var(--v-violet), var(--v-purple), var(--v-orange), var(--v-gold), var(--v-violet));
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: cinematic-flow 8s linear infinite;
    font-weight: 800;
}

@keyframes cinematic-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 400% 50%;
    }
}

/* Typing Effect Dynamic Word & Cursor */
.dynamic-word {
    display: inline-block;
    /* Ensure it occupies space and renders correctly */
    -webkit-text-fill-color: white;
    /* Ensure it is visible against the dark bg */
    text-shadow: 0 0 10px var(--b-purple);
    border-right: 4px solid var(--b-purple);
    animation: blink-cursor 0.75s step-end infinite;
    padding-right: 8px;
    margin-left: 5px;
    vertical-align: bottom;
}

@keyframes blink-cursor {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--b-purple);
    }
}

/* Hero Carousel */
.hero-carousel {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    height: 100%;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transform: scale(1.15);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 5;
    transform: scale(1);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark atmospheric overlay with radial glows - images remain visible in background */
    background:
        radial-gradient(900px at 20% 20%, rgba(139, 92, 246, 0.15), transparent 60%),
        radial-gradient(800px at 80% 15%, rgba(249, 115, 22, 0.1), transparent 60%),
        radial-gradient(1000px at 50% 80%, rgba(139, 92, 246, 0.08), transparent 60%),
        rgba(3, 3, 5, 0.90);
    /* Precise 10% reduction for optimal balance */
    /* Dark base to push text forward */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-top: 15vh;
    /* Added 20%-style top spacing */
    z-index: 2;
}

.carousel-overlay h1 {
    font-size: 4rem;
    /* Reduced by 20% */
    font-weight: 700;
    /* Slightly lighter weight */
    margin-bottom: 2rem;
    line-height: 1.2;
    min-height: 120px;
    width: 90%;
    /* Force boundary containment */
    max-width: 1400px;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 1);
    letter-spacing: -1px;
    word-wrap: break-word;
    /* Ensure long words wrap */
    display: block;

    /* Hero Headline Gradient - Strictly Horizontal 90deg Flow */
    background: linear-gradient(90deg, var(--v-violet), var(--v-purple), var(--v-orange), var(--v-gold), var(--v-violet));
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: cinematic-flow 8s linear infinite;
}

.carousel-overlay p {
    font-size: 1.5rem;
    max-width: 1000px;
    margin-bottom: 3rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Button Loop Animation */
@keyframes button-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.btn {
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.btn-loop {
    position: relative;
    /* Diagonal 135deg Gradient for Buttons */
    background: linear-gradient(135deg, #8B5CF6 0%, #c026d3 35%, #F97316 70%, #D4AF37 100%);
    background-size: 200% 200%;
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 14px !important;

    /* Extreme Glow Shadow System */
    box-shadow:
        0 0 25px rgba(139, 92, 246, 0.6),
        0 0 45px rgba(249, 115, 22, 0.3),
        0 0 35px rgba(212, 175, 55, 0.2);

    z-index: 1;
    overflow: visible;
}

/* Rotating Border Glow Logic */
.btn-loop::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #8B5CF6, #F97316, #D4AF37, #8B5CF6);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: inherit;
    animation: glow-spin 4s linear infinite;
    opacity: 0.8;
}

@keyframes glow-spin {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-minimal {
    position: relative;
    background: linear-gradient(135deg, #8B5CF6 0%, #c026d3 35%, #F97316 70%, #D4AF37 100%);
    background-size: 400% 400%;
    border: none !important;
    border-radius: 12px !important;
    color: white !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1rem !important;
    padding: 1rem 1.2rem !important;
    /* Reduced horizontal space per user request */
    width: fit-content !important;
    /* Forces minimal, non-stretched footprint */
    transition: all 0.4s ease;
    animation: glow-spin 4s linear infinite;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4) !important;
    z-index: 1;
}

.btn-minimal:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6) !important;
}

.btn-minimal::before {
    display: none !important;
    /* No extra glow borders for minimal look */
}

/* Original btn-minimal hover effect */
.btn-loop:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.btn.glass {
    border: 2px solid var(--vivid-blue);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    margin-left: 20px;
}

/* Layout Padding Fixes */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3%;
}

.vivid-logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
}

.brand-logo {
    height: 80px;
    width: 80px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--vivid-blue);
}

.vivid-logo {
    font-size: 1.6rem;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--vivid-blue);
}

section {
    padding: 140px 3%;
}

.section-title {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 6rem;
}

/* 3x2 Grid Setup */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.grid-3x2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 3rem;
}

.card {
    padding: 4rem 3rem;
    transition: 0.5s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

.card h3,
.card h4 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.card p {
    font-size: 1.15rem;
    opacity: 0.8;
}

.card:hover {
    transform: translateY(-15px);
    border-color: var(--vivid-blue);
    background: rgba(255, 255, 255, 0.1);
}

/* Hierarchy Grids */
.lineage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.lineage-item h4 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Step Numbers */
.step-number {
    font-size: 6rem;
    font-weight: 900;
    opacity: 0.15;
    position: absolute;
    top: -20px;
    right: 30px;
}

.process-card {
    position: relative;
    overflow: hidden;
}

/* Footer Styling (Expanded Footer) */
.footer {
    padding: 60px 3% 30px;
    background: rgba(0, 0, 0, 0.85);
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.6;
    transition: 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--vivid-blue);
}

.footer-bottom p {
    margin-bottom: 1rem;
    opacity: 0.7;
    font-size: 1.1rem;
}

/* WhatsApp Widget */
.whatsapp-fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 10000;
    text-decoration: none;
}

.whatsapp-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.whatsapp-icon-wrapper {
    width: 80px;
    height: 80px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    animation: bounce-pulse 3s infinite ease-in-out;
}

.whatsapp-icon-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.whatsapp-text {
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--vivid-blue);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 800;
    opacity: 0;
    transform: translateX(20px);
    transition: 0.5s;
}

.whatsapp-fab:hover .whatsapp-text {
    opacity: 1;
    transform: translateX(0);
}

/* Animations */
@keyframes bounce-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* --- Finalized Contact Section (Architectural Fix) --- */
.contact-section {
    padding: 150px 3% 120px;
    background: transparent;
}

.contact-wrapper {
    background: rgba(11, 11, 15, 0.7) !important;
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 40px !important;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    margin: 0 auto;
    max-width: 1400px !important;
    overflow: hidden;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    padding: 6rem !important;
}

.contact-form-side {
    display: flex;
    flex-direction: column;
}

.contact-form-side h2 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.contact-form-side p {
    font-size: 1.25rem;
    opacity: 0.8;
    margin-bottom: 3.5rem !important;
}

.contact-form-side form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.contact-form-side input,
.contact-form-side select,
.contact-form-side textarea {
    width: 100%;
    padding: 1.5rem;
    border-radius: 15px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.contact-form-side input:focus,
.contact-form-side select:focus,
.contact-form-side textarea:focus {
    outline: none;
    border-color: var(--v-violet) !important;
    background: rgba(139, 92, 246, 0.05) !important;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
    transform: translateY(-3px);
}

.contact-info-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4rem;
    padding-right: 5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.info-item h3 {
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem !important;
    opacity: 0.6;
}

.info-item p {
    font-size: 2rem !important;
    font-weight: 800 !important;
    line-height: 1.2;
}

.info-item p a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.info-item p a:hover {
    color: var(--v-orange) !important;
    text-decoration: underline;
}

/* Fix Hero Typography again for consistency */
.carousel-overlay h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    width: 90%;
    max-width: 1400px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 1200px) {

    .grid,
    .grid-3x2,
    .lineage-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-overlay h1 {
        font-size: 2.8rem;
        /* Reduced by 20% */
    }
}

@media (max-width: 768px) {

    .grid,
    .grid-3x2,
    .lineage-grid {
        grid-template-columns: 1fr;
    }

    .carousel-overlay h1 {
        font-size: 2rem;
        /* Reduced by 20% */
    }

    .nav-links {
        display: none;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 3rem;
    }

    .contact-info-side {
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding-top: 3rem;
        padding-left: 0;
    }
}