/* WG Soft Tech — Premium v3 */

:root {
    --font-display: 'Outfit', sans-serif;
    --font-family: 'DM Sans', sans-serif;

    --gradient-mesh:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(16, 185, 129, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 60% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    --radius-xl: 28px;
}

body.is-loading { overflow: hidden; }

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0c1222;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader__inner { text-align: center; color: white; }

.preloader__logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
    animation: bounceIn 0.7s ease;
}

.preloader__w { color: #fff; }
.preloader__g { color: #10b981; }

.preloader__bar {
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin: 0 auto 14px;
    overflow: hidden;
}

.preloader__bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #10b981, #f97316, #3b82f6);
    border-radius: 4px;
    animation: preloadBar 1.2s ease-in-out infinite;
}

.preloader__inner p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

@keyframes preloadBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Cursor glow */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover .cursor-glow { opacity: 1; }

@media (max-width: 1024px) {
    .cursor-glow { display: none; }
}

/* Theme toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
    background: rgba(16, 185, 129, 0.08);
}

.theme-toggle__icon--moon { display: none; }

body.theme-dark .theme-toggle__icon--sun { display: none; }
body.theme-dark .theme-toggle__icon--moon { display: block; }

/* Testimonials — grid on desktop, slider on mobile */
.testimonials {
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.testimonials__slider {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 0;
}

.testimonial-card {
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card__stars {
    color: #f97316;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.testimonial-card p {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--color-text);
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-brand);
    color: white;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-card__author strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.testimonial-card__author span {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.testimonials__dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.testimonials__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--border-strong);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.testimonials__dot--active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

/* Desktop grid — override slider absolute positioning */
@media (min-width: 769px) {
    .testimonials--grid .testimonials__slider {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        min-height: 0;
    }

    .testimonials--grid .testimonial-card {
        position: static;
        inset: auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .testimonials--grid .testimonial-card p {
        flex: 1;
    }

    .testimonials--grid .testimonial-card--active {
        box-shadow: var(--shadow-md);
    }

    .testimonials--grid .testimonial-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(16, 185, 129, 0.25);
    }

    .testimonials--grid .testimonials__dots {
        display: none !important;
    }
}

/* Mobile slider */
@media (max-width: 768px) {
    .testimonials__slider {
        max-width: 720px;
        min-height: 280px;
    }

    .testimonial-card {
        position: absolute;
        inset: 0;
        opacity: 0;
        transform: translateY(20px) scale(0.97);
        pointer-events: none;
    }

    .testimonial-card--active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        box-shadow: var(--shadow-lg);
    }

    .testimonials__dots {
        display: flex;
    }

    .testimonial-card { padding: 28px 24px; }
    .testimonial-card p { font-size: 1rem; }
}

/* 3D tilt on cards */
@media (hover: hover) and (pointer: fine) {
    .about__card,
    .service-card--featured,
    .solution-item--featured,
    .crypto__service-item,
    .testimonials--grid .testimonial-card {
        will-change: transform;
    }
}

/* Dark mode — site-v3 */
body.site-v3.theme-dark {
    --surface: #111827;
    --surface-2: #0f172a;
    --surface-3: #1e293b;
    --cream: #0f172a;
    --cream-2: #1e293b;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-bg: #0c1222;
    background: #0c1222;
    color: #e2e8f0;
}

body.site-v3.theme-dark .header {
    background: rgba(12, 18, 34, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.site-v3.theme-dark .brand-logo__name-w { color: white; }

body.site-v3.theme-dark .brand-logo__tagline { color: #94a3b8; }

body.site-v3.theme-dark .nav__link { color: #94a3b8; }

body.site-v3.theme-dark .nav__link:hover,
body.site-v3.theme-dark .nav__link.active {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
}

body.site-v3.theme-dark .nav__link--cta {
    background: #10b981;
    color: white !important;
}

body.site-v3.theme-dark .nav__toggle span { background: #e2e8f0; }

body.site-v3.theme-dark .theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

body.site-v3.theme-dark .about,
body.site-v3.theme-dark .showcase,
body.site-v3.theme-dark .tech-stack,
body.site-v3.theme-dark .solutions,
body.site-v3.theme-dark .process,
body.site-v3.theme-dark .testimonials,
body.site-v3.theme-dark .contact {
    background: #0c1222;
}

body.site-v3.theme-dark .section__title { color: #f1f5f9; }

body.site-v3.theme-dark .section__tag {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

body.site-v3.theme-dark .about__card,
body.site-v3.theme-dark .solution-item--featured,
body.site-v3.theme-dark .tech-pill,
body.site-v3.theme-dark .contact__item,
body.site-v3.theme-dark .contact__form--full,
body.site-v3.theme-dark .process__step-content,
body.site-v3.theme-dark .testimonial-card {
    background: #151d2e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.site-v3.theme-dark .process__step-num {
    box-shadow: 0 0 0 4px #0c1222, 0 0 0 6px color-mix(in srgb, var(--step-color, #6366f1) 25%, transparent);
}

body.site-v3.theme-dark .process__step-content h4 { color: #f1f5f9; }

body.site-v3.theme-dark .showcase__item {
    background: #151d2e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.site-v3.theme-dark .showcase__item span {
    background: #151d2e;
    color: #e2e8f0;
}

body.site-v3.theme-dark .tech-pill:hover {
    background: #1e293b;
    border-color: #10b981;
}

body.site-v3.theme-dark .form__group input,
body.site-v3.theme-dark .form__group select,
body.site-v3.theme-dark .form__group textarea {
    background: #0c1222;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

body.site-v3.theme-dark .form__group input:focus,
body.site-v3.theme-dark .form__group select:focus,
body.site-v3.theme-dark .form__group textarea:focus {
    background: #111827;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

body.site-v3.theme-dark .mobile-bar {
    background: rgba(12, 18, 34, 0.96);
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.site-v3.theme-dark .mobile-bar__btn--call {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

body.site-v3.theme-dark .mobile-bar__btn--whatsapp {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
}

body.site-v3.theme-dark .mobile-bar__btn--contact {
    background: #10b981;
    color: white;
}

body.site-v3.theme-dark .preloader { background: #0c1222; }

body.site-v3.theme-dark .cursor-glow {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

@media (max-width: 768px) {
    .theme-toggle { margin-left: auto; margin-right: 4px; }

    body.site-v3.theme-dark .nav__menu {
        background: rgba(12, 18, 34, 0.98);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .preloader__logo,
    .preloader__bar span {
        animation: none !important;
    }
}
