/* ===== KGL PREMIUM WOW — Fluidité & polish ultra-premium ===== */

body {
    animation: bodyFadeIn 0.6s ease forwards;
}

@keyframes bodyFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Hero cinematic --- */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(197, 160, 40, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(14, 77, 62, 0.2) 0%, transparent 50%);
    pointer-events: none;
    animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(5, 7, 6, 0.75) 0%,
        rgba(5, 7, 6, 0.45) 40%,
        rgba(14, 77, 62, 0.55) 100%
    ) !important;
}

.hero-content h1 .gradient-text {
    background: linear-gradient(135deg, #fff 0%, #FFD700 45%, #C5A028 70%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 8s linear infinite;
}

@keyframes shimmerText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* --- Reveal animations --- */
.wow-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.wow-reveal.wow-visible {
    opacity: 1;
    transform: translateY(0);
}

.wow-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.wow-reveal-left.wow-visible {
    opacity: 1;
    transform: translateX(0);
}

.wow-reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.wow-reveal-scale.wow-visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Premium cards --- */
.service-card,
.service-card-large,
.sector-card,
.why-item,
.stat-item-large,
.testimonial-content {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease !important;
}

.service-card:hover,
.sector-card:hover,
.why-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(197, 160, 40, 0.15),
                0 0 40px rgba(197, 160, 40, 0.08) !important;
}

/* --- Buttons premium --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 16px 40px rgba(14, 77, 62, 0.45),
                0 0 24px rgba(197, 160, 40, 0.15) !important;
}

.btn-outline {
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.btn-outline:hover {
    transform: translateY(-3px) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25),
                inset 0 0 20px rgba(197, 160, 40, 0.05) !important;
}

/* --- Header premium glass --- */
header {
    transition: background 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                backdrop-filter 0.5s ease,
                box-shadow 0.5s ease,
                padding 0.4s ease !important;
}

header.scrolled {
    background: rgba(5, 7, 6, 0.82) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35),
                0 1px 0 rgba(197, 160, 40, 0.08) inset !important;
}

.header-values-bar {
    position: relative;
}

.header-values-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 40, 0.35), transparent);
}

/* --- Scroll progress bar --- */
#scroll-progress {
    height: 2px !important;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-gold), var(--accent-green)) !important;
    background-size: 200% 100%;
    animation: progressShine 3s linear infinite;
}

@keyframes progressShine {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* --- Section labels --- */
.section-label {
    letter-spacing: 0.2em !important;
    position: relative;
    display: inline-block;
}

.section-label::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
    margin: 8px auto 0;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title.wow-visible .section-label::after,
.wow-visible .section-label::after {
    transform: scaleX(1);
}

/* --- Stats counter glow --- */
.stat-number,
.h-stat-num,
.counter {
    font-variant-numeric: tabular-nums;
    transition: text-shadow 0.4s ease;
}

.stat-item-large.wow-visible .stat-number,
.h-stat.wow-visible .h-stat-num {
    text-shadow: 0 0 30px rgba(197, 160, 40, 0.3);
}

/* --- Preloader premium --- */
#preloader {
    background: radial-gradient(ellipse at center, #0D110F 0%, #050706 100%) !important;
}

.preloader-progress {
    background: linear-gradient(90deg, var(--accent-green), var(--accent-gold)) !important;
    box-shadow: 0 0 20px rgba(197, 160, 40, 0.4);
}

/* --- Partners marquee smooth --- */
.partners-track {
    animation-timing-function: linear !important;
}

/* --- Footer premium --- */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 40, 0.4), transparent);
}

/* --- Page headers --- */
.page-header,
.executive-header {
    position: relative;
    overflow: hidden;
}

.page-header::after,
.executive-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--primary-bg), transparent);
    pointer-events: none;
    z-index: 2;
}

/* --- Light mode refinements --- */
[data-theme="light"] header.scrolled {
    background: rgba(248, 246, 241, 0.88) !important;
}

[data-theme="light"] .hero-overlay {
    background: linear-gradient(180deg, rgba(248, 246, 241, 0.85) 0%, rgba(14, 77, 62, 0.4) 100%) !important;
}

[data-theme="light"] .hero-content h1 .gradient-text {
    background: linear-gradient(135deg, #1A1A1A 0%, #9A7B1A 50%, #C5A028 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

/* --- Smooth focus --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .wow-reveal,
    .wow-reveal-left,
    .wow-reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero::before,
    .hero-content h1 .gradient-text,
    #scroll-progress {
        animation: none !important;
    }
}
