/* Kenvora Global Solutions - Custom CSS */

/* Custom CSS Variables */
:root {
    /* Color System */
    --color-bg-main: #0F1623;
    --color-bg-surface: #1A1F2E;
    --color-text-main: #ffffff;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;

    /* Accent Colors */
    --color-accent-primary: #0a418e;
    --color-accent-secondary: #6366f1;
    --color-accent-magenta: #8C0358;

    /* Border Colors */
    --color-border-subtle: rgba(255, 255, 255, 0.08);
    --color-border-medium: rgba(255, 255, 255, 0.12);

    /* Shadows */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-hard: 0 20px 25px -5px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-lg: 1rem;
    --radius-2xl: 1.5rem;
}

/* Font Family Override */
.font-serif {
    font-family: 'Ubuntu', sans-serif;
}

.text-shadow-hero {
    text-shadow:
        0 10px 40px rgba(0, 0, 0, 0.9),
        0 0 80px rgba(0, 0, 0, 0.8),
        0 0 150px rgba(0, 0, 0, 0.8);
}

/* Text Shadow Utilities for Better Readability */
.text-shadow-lg {
    text-shadow: 0 4px 16px rgba(84, 83, 83, 0.8), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.text-shadow-md {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.text-shadow-glow {
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 0, 0, 0.4);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Body Animation - Smooth Fade In */
body {
    animation: bodyFadeIn 0.8s ease-in-out;
}

@keyframes bodyFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

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

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

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

@keyframes scroll-down {

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

    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(10, 65, 142, 0.4)) drop-shadow(0 0 40px rgba(10, 65, 142, 0.2));
        opacity: 0.9;
    }

    50% {
        filter: drop-shadow(0 0 50px rgba(10, 65, 142, 0.7)) drop-shadow(0 0 100px rgba(10, 65, 142, 0.4));
        opacity: 1;
    }
}

.logo-highlight {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional Spotlight Aura behind logo */
.logo-highlight::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(10, 65, 142, 0.25) 0%, transparent 70%);
    z-index: -1;
    opacity: 0.4;
    filter: blur(15px);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-highlight:hover::after {
    width: 220%;
    height: 220%;
    opacity: 0.6;
    background: radial-gradient(circle, rgba(10, 65, 142, 0.35) 0%, transparent 75%);
}

.logo-highlight::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: all 0.5s ease;
}

.logo-highlight:hover::before {
    opacity: 1;
}

/* Logo Visibility Filter for Dark Mode */
.logo-white {
    filter: brightness(0) invert(1);
}

/* New Hero Animations */
@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-15px) translateX(10px);
    }

    50% {
        transform: translateY(-25px) translateX(-5px);
    }

    75% {
        transform: translateY(-10px) translateX(-10px);
    }
}

@keyframes float-medium {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    33% {
        transform: translateY(-20px) translateX(15px);
    }

    66% {
        transform: translateY(-10px) translateX(-10px);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1) rotate(45deg);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.1) rotate(45deg);
    }
}

@keyframes twinkle {

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

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes draw-line {
    0% {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
        opacity: 0;
    }

    20% {
        opacity: 0.3;
    }

    100% {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
        opacity: 0.3;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 6s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-twinkle {
    animation: twinkle 3s ease-in-out infinite;
}

.animate-draw-line {
    animation: draw-line 5s ease-in-out infinite;
}

.animate-scroll-down {
    animation: scroll-down 2s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

/* Advanced Scroll Animations */
.scroll-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.scroll-fade-in.visible {
    opacity: 1;
}

.scroll-slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slide-left {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for sequential animations */
.scroll-delay-1 {
    transition-delay: 0.1s;
}

.scroll-delay-2 {
    transition-delay: 0.2s;
}

.scroll-delay-3 {
    transition-delay: 0.3s;
}

.scroll-delay-4 {
    transition-delay: 0.4s;
}

.scroll-delay-5 {
    transition-delay: 0.5s;
}

/* Professional Card Styles (Uses @apply) */
.bento-card {
    @apply bg-[var(--color-bg-surface)] rounded-[var(--radius-2xl)] p-6 border border-[var(--color-border-subtle)];
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hard);
    border-color: rgba(10, 65, 142, 0.3);
}

/* Article Content Typography */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.article-content h2 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--color-accent-primary);
}

.article-content h3 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    marker-color: var(--color-accent-primary);
}

.article-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--color-accent-secondary);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.article-content a:hover {
    color: var(--color-accent-primary);
}

.article-content blockquote {
    border-left: 4px solid var(--color-accent-magenta);
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
    color: var(--color-text-main);
}

.article-content img {
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: var(--shadow-soft);
}

.article-content figure {
    margin: 2rem 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Glass Morphism Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navbar 3D Projection & Glass Effect */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    background: rgba(11, 16, 27, 0.8);
    /* Updated to match footer #0B101B with opacity */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3D Glass Highlight Top Edge */
.glass-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    z-index: 10;
}

.glass-nav.scrolled {
    background: rgba(11, 16, 27, 0.95) !important;
    /* Updated to match footer #0B101B */
    border-bottom: 1px solid rgba(10, 65, 142, 0.2);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 10px 15px -5px rgba(10, 65, 142, 0.1);
    transform: translateY(0);
}

/* Nav Link 3D Micro-interactions */
.nav-link-3d {
    position: relative;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-text-main);
}

.nav-link-3d:hover {
    color: var(--color-accent-magenta) !important;
    text-shadow: 0 0 20px rgba(140, 3, 88, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.nav-link-3d.active {
    color: var(--color-accent-magenta) !important;
    text-shadow: 0 0 15px rgba(140, 3, 88, 0.5);
    background: rgba(140, 3, 88, 0.05);
    border-bottom: 2px solid var(--color-accent-magenta);
}

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

::-webkit-scrollbar-track {
    background: var(--color-bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-primary);
}

/* Professional Selection Color */
::selection {
    background: var(--color-accent-primary);
    color: white;
}

/* Service Flip Card Styles */
.service-flip-card {
    perspective: 1000px;
    height: 480px;
    /* Increased height to accommodate content */
    width: 100%;
}

.service-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.service-flip-card:hover .service-flip-card-inner {
    transform: rotateY(180deg);
}

.service-flip-card-front,
.service-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.service-flip-card-front {
    z-index: 2;
    background: var(--color-bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-flip-card-back {
    transform: rotateY(180deg);
    background: #0F1623;
    /* Solid Dark Background matching bg-main */
    border: 1px solid var(--color-accent-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    box-shadow: var(--shadow-hard);
    text-align: center;
}

.service-flip-card-back h3 {
    color: white;
    transform: translateZ(30px);
    margin-bottom: 1rem;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.service-flip-card-back p {
    color: var(--color-text-secondary);
    transform: translateZ(20px);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-flip-card-back .btn-explore {
    transform: translateZ(40px);
    background: white;
    color: black;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.service-flip-card-back .btn-explore:hover {
    background: var(--color-accent-primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(10, 65, 142, 0.5);
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #1A1F2E 0%, #0F1623 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out, transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    /* Subtle zoom out on exit */
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    width: 100%;
    /* Ensure content takes width for responsive centering */
}

.preloader-logo {
    width: 250px;
    /* Increased Desktop Size */
    height: auto;
    margin-bottom: 3.5rem;
    animation: preloader-logo-breathe 3s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(10, 65, 142, 0.5));
}

.preloader-text-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 4rem;
}

.preloader-welcome {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    opacity: 0;
    animation: fade-up 0.8s ease-out forwards 0.3s;
}

.preloader-title {
    font-family: 'Ubuntu', sans-serif;
    font-size: 7rem;
    /* Massive Desktop Size */
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.02em;

    /* Enhanced Text Fill Animation */
    background: linear-gradient(to right,
            #ffffff 20%,
            #cbd5e1 40%,
            var(--color-accent-primary) 60%,
            #ffffff 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    opacity: 0;
    animation:
        fade-up 0.8s ease-out forwards 0.5s,
        text-shimmer 3s linear infinite;
    /* Continuous shimmer fill */

    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.preloader-progress {
    width: 400px;
    /* Increased Desktop Size */
    height: 6px;
    /* Increased from 3px */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    opacity: 0;
    animation: fade-in 0.5s ease-out forwards 0.8s;
}

.preloader-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
    animation: progress-fill 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.9s;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .preloader-logo {
        width: 160px;
        /* Smaller Logo on Mobile */
        margin-bottom: 2.5rem;
    }

    .preloader-welcome {
        font-size: 0.9rem;
        letter-spacing: 0.25em;
    }

    .preloader-title {
        font-size: 3.5rem;
        /* Readable Title on Mobile */
    }

    .preloader-text-container {
        margin-bottom: 3rem;
    }

    .preloader-progress {
        width: 80%;
        /* Fluid width on mobile */
        max-width: 300px;
    }
}

/* Preloader Animations */
@keyframes preloader-logo-breathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(10, 65, 142, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 40px rgba(10, 65, 142, 0.7));
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes progress-fill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes text-shimmer {
    to {
        background-position: 200% center;
    }
}