/* ============================================
   Vexar.Chat Landing Page Styles
   Dark theme, neon cyan/blue, ring-sweep
   ============================================ */

:root {
    --bg: #0D1117;
    --surface: #161B22;
    --surface-light: #1C2333;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --primary: #00e4c3;
    --primary-dark: #00c4a7;
    --accent: #008fff;
    --accent-light: #33a5ff;
    --gradient: linear-gradient(135deg, #008fff 0%, #00b894 100%);
    --gradient-reverse: linear-gradient(135deg, #00b894, #008fff);
    --neon-glow: 0 0 20px rgba(0, 228, 195, 0.5), 0 0 40px rgba(0, 228, 195, 0.3), 0 0 60px rgba(0, 228, 195, 0.1);

    /* Ring-sweep variables */
    --ring-radius: 16px;
    --ring-thickness: 2px;
    --ring-speed: 2.8s;
    --ring-c1: rgba(0, 143, 255, .95);
    --ring-c2: rgba(0, 228, 195, .95);
    --ring-opacity: 0;
    --accent-red: #ED7475;
    --accent-red-light: #F09A9B;
}

/* ---- Gradient Text ---- */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Brand gradient with red accent from logo */
.gradient-text-brand {
    background: linear-gradient(135deg, #008fff 0%, #00e4c3 50%, #ED7475 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Glassmorphism Card ---- */
.glass-card {
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 228, 195, 0.1);
}

/* ---- Glow Effects ---- */
.glow {
    box-shadow: 0 0 60px rgba(0, 228, 195, 0.15),
                0 0 120px rgba(0, 143, 255, 0.08);
}

.glow-sm {
    box-shadow: 0 0 30px rgba(0, 228, 195, 0.1),
                0 0 60px rgba(0, 143, 255, 0.05);
}

/* ---- Gradient Border ---- */
.gradient-border {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: var(--gradient);
    z-index: -1;
}

/* ---- Primary Button ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 228, 195, 0.3), 0 2px 12px rgba(237, 116, 117, 0.2);
}

/* ---- Secondary Button ---- */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Animated Ring-Sweep Border (from vexar.io)
   ============================================ */
@property --_angle { syntax:"<angle>"; initial-value:0turn; inherits:false; }

@supports (background: conic-gradient(red, blue)) {
    .ring-sweep {
        position: relative;
        isolation: isolate;
        border-radius: var(--ring-radius);
        /* contain: paint убран — он обрезал neon glow снаружи элемента */
    }

    .ring-sweep::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: var(--ring-thickness);
        pointer-events: none;
        opacity: var(--ring-opacity);
        transition: opacity .3s ease, filter .3s ease;
        background:
            conic-gradient(from var(--_angle),
                transparent 0deg,
                var(--ring-c1) 60deg,
                transparent 120deg,
                transparent 210deg,
                var(--ring-c2) 270deg,
                transparent 330deg,
                transparent 360deg
            );
        -webkit-mask:
            linear-gradient(#000 0 0) content-box,
            linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        filter: drop-shadow(0 0 3px rgba(0, 228, 195, .4))
                drop-shadow(0 0 8px rgba(0, 143, 255, .3));
        animation: none;
    }

    @media (hover: hover) {
        .ring-sweep[data-ring="hover"]:hover::before,
        .ring-sweep:not([data-ring]):hover::before {
            animation: ring-spin var(--ring-speed) linear infinite;
            opacity: 1;
            filter: drop-shadow(0 0 6px rgba(0, 228, 195, .9))
                    drop-shadow(0 0 18px rgba(0, 143, 255, .7))
                    drop-shadow(0 0 40px rgba(0, 228, 195, .5))
                    drop-shadow(0 0 60px rgba(0, 143, 255, .3));
        }
    }

    .ring-sweep[data-ring="always"]::before {
        animation: ring-spin var(--ring-speed) linear infinite;
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(0, 228, 195, .9))
                drop-shadow(0 0 18px rgba(0, 143, 255, .7))
                drop-shadow(0 0 40px rgba(0, 228, 195, .5))
                drop-shadow(0 0 60px rgba(0, 143, 255, .3));
    }

    .ring-sweep[data-ring="off"]::before {
        animation: none !important;
        opacity: 0 !important;
        filter: none !important;
    }

    @keyframes ring-spin { to { --_angle: 1turn; } }
}

@supports not (background: conic-gradient(red, blue)) {
    .ring-sweep {
        box-shadow: 0 0 0 var(--ring-thickness) rgba(0, 228, 195, .9) inset,
                    0 0 24px rgba(0, 228, 195, .35),
                    0 0 48px rgba(0, 228, 195, .2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ring-sweep::before { animation: none !important; }
}

/* ---- Sticky Header ---- */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.landing-header.scrolled {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
}

.landing-header.mobile-open {
    background: rgba(13, 17, 23, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(13, 17, 23, 0.6) 0%,
        rgba(13, 17, 23, 0.75) 50%,
        rgba(13, 17, 23, 0.95) 100%
    );
    z-index: 1;
}

.hero-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ---- Mesh Gradient (fallback for video) ---- */
.mesh-gradient {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 143, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 228, 195, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(0, 255, 218, 0.08) 0%, transparent 50%);
}

/* ---- Logo Marquee ---- */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-container {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(9) { transition-delay: 0.45s; }

/* ---- Section Separator ---- */
.section-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ---- FAQ Accordion ---- */
.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.faq-item:hover,
.faq-item.active {
    border-color: var(--border-hover);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-answer.open {
    max-height: 300px;
}

/* ---- Pricing Card ---- */
.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
    position: relative;
    border-color: rgba(0, 228, 195, 0.35);
    box-shadow: 0 0 0 1px rgba(0, 143, 255, 0.15), 0 0 30px rgba(0, 228, 195, 0.1), 0 0 20px rgba(237, 116, 117, 0.08);
}
/* ::before освобождён для ring-sweep анимации */

/* ---- Platform Tabs ---- */
.platform-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    color: var(--text-secondary);
}

.platform-tab:hover {
    color: var(--text-primary);
}

.platform-tab.active {
    background: var(--primary);
    color: #0D1117;
    font-weight: 600;
}

/* ---- Mockup Frame ---- */
.mockup-laptop {
    position: relative;
    background: var(--surface);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.mockup-laptop .mockup-screen {
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border-radius: 8px;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mockup-laptop .mockup-bar {
    height: 24px;
    background: var(--surface);
    border-radius: 0 0 12px 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    margin: 0 15%;
}

.mockup-phone {
    background: var(--surface);
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 12px 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.mockup-phone .mockup-screen {
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border-radius: 20px;
    aspect-ratio: 9/19;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---- Step Screenshots ---- */
.step-screenshot img {
    transition: transform .25s ease, box-shadow .25s ease;
}
.step-screenshot:hover img {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

/* ---- Testimonial Card ---- */
.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.testimonial-card:hover {
    border-color: var(--border-hover);
}

/* ---- Stars ---- */
.stars {
    color: #FBBF24;
    letter-spacing: 2px;
}

/* ---- Widget Demo Container ---- */
.widget-demo-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

/* ---- Step connector ---- */
.step-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), var(--primary));
    margin: 0 auto;
}

@media (min-width: 768px) {
    .step-connector {
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, var(--accent), var(--primary));
    }
}

/* ---- Download Apps Section ---- */
.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.download-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.coming-soon-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 228, 195, 0.1);
    border: 1px solid rgba(0, 228, 195, 0.3);
    border-radius: 9999px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---- Responsive adjustments ---- */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .glass-card:hover {
        transform: none;
    }

    .pricing-card:hover {
        transform: none;
    }

    .download-card:hover {
        transform: none;
    }
}

/* ---- Language Selector ---- */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

/* ---- Pulse animation for badge ---- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 228, 195, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(0, 228, 195, 0); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ---- Smooth gradient divider ---- */
.gradient-divider {
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        rgba(0, 143, 255, 0.3),
        rgba(0, 228, 195, 0.3),
        transparent
    );
}

/* ---- CTA Section gradient ---- */
.cta-gradient {
    background: linear-gradient(135deg,
        rgba(0, 143, 255, 0.15) 0%,
        rgba(0, 228, 195, 0.1) 50%,
        rgba(0, 255, 218, 0.05) 100%
    );
    border: 1px solid rgba(0, 228, 195, 0.2);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---- Download Buttons ---- */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 143, 255, 0.3);
}

.download-btn-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.download-btn-green:hover {
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.download-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ============================================================
   HERO — Social Proof
   ============================================================ */
@keyframes hero-count-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-social-proof {
    animation: hero-count-in .6s ease forwards 1.5s;
    opacity: 0;
}

/* ============================================================
   SCREENSHOTS GALLERY
   ============================================================ */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.screenshot-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--surface);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.screenshot-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0,228,195,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(0,228,195,0.1);
}
.screenshot-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.screenshot-caption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

@media (max-width: 1024px) {
    .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .screenshots-grid { grid-template-columns: 1fr; gap: 12px; }
    .screenshot-card img { height: 200px; }
}

/* ============================================================
   HOW IT WORKS — Steps
   ============================================================ */
.steps-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 228, 195, 0.3);
    flex-shrink: 0;
}
.steps-item {
    position: relative;
}
.steps-item:not(:last-of-type)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 48px;
    width: 2px;
    height: calc(100% - 8px);
    background: linear-gradient(to bottom, rgba(0,228,195,0.35), transparent);
}
