/* ============================================================
   Xlab Landing – Modern glassmorphism + gradient design
   ============================================================ */

:root {
    --xlab-primary: #2563eb;
    --xlab-primary-light: #3b82f6;
    --xlab-accent: #06b6d4;
    --xlab-dark: #0f172a;
    --xlab-dark-mid: #1e293b;
    --xlab-surface: rgba(255, 255, 255, 0.06);
    --xlab-glass: rgba(255, 255, 255, 0.08);
    --xlab-glass-border: rgba(255, 255, 255, 0.12);
    --xlab-text: #e2e8f0;
    --xlab-text-muted: #94a3b8;
    --xlab-radius: 16px;
    --xlab-radius-sm: 10px;
    --xlab-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --xlab-gradient-subtle: linear-gradient(135deg, rgba(37,99,235,.15) 0%, rgba(6,182,212,.10) 100%);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--xlab-dark);
    color: var(--xlab-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */
.xnav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, .82);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--xlab-glass-border);
    transition: background .3s;
}

.xnav-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    text-decoration: none;
}

.xnav-brand i {
    background: var(--xlab-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.35rem;
}

.xnav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.xnav-links a {
    color: var(--xlab-text-muted);
    text-decoration: none;
    padding: .45rem 1rem;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 500;
    transition: color .2s, background .2s;
}

.xnav-links a:hover,
.xnav-links a.active {
    color: #fff;
    background: var(--xlab-glass);
}

.xnav-cta {
    background: var(--xlab-gradient) !important;
    color: #fff !important;
    padding: .5rem 1.25rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

.xnav-cta:hover {
    opacity: .9;
}

/* Mobile hamburger */
.xnav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .xnav-toggle { display: block; }
    .xnav-links {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(15,23,42,.96);
        backdrop-filter: blur(18px);
        padding: 1rem;
        gap: .25rem;
        transform: translateY(-120%);
        opacity: 0;
        transition: transform .35s ease, opacity .3s;
    }
    .xnav-links.open {
        transform: translateY(0);
        opacity: 1;
    }
    .xnav-links a {
        width: 100%;
        padding: .7rem 1rem;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 2rem 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,.22) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(6,182,212,.12) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content { position: relative; max-width: 800px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--xlab-glass);
    border: 1px solid var(--xlab-glass-border);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--xlab-accent);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 1.25rem;
    letter-spacing: -.025em;
}

.hero h1 .gradient-text {
    background: var(--xlab-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--xlab-text-muted);
    max-width: 580px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn-xlab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: var(--xlab-radius-sm);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    border: none;
    cursor: pointer;
}

.btn-xlab:hover { transform: translateY(-2px); }

.btn-xlab-primary {
    background: var(--xlab-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37,99,235,.35);
}

.btn-xlab-primary:hover {
    box-shadow: 0 6px 28px rgba(37,99,235,.45);
    color: #fff;
}

.btn-xlab-outline {
    background: transparent;
    color: var(--xlab-text);
    border: 1px solid var(--xlab-glass-border);
    backdrop-filter: blur(8px);
}

.btn-xlab-outline:hover {
    background: var(--xlab-glass);
    color: #fff;
}

/* ---------- Section ---------- */
.xsection {
    padding: 100px 2rem;
    position: relative;
}

.xsection-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 4rem;
}

.xsection-label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--xlab-accent);
    margin-bottom: .5rem;
}

.xsection-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 1rem;
    letter-spacing: -.02em;
}

.xsection-header p {
    color: var(--xlab-text-muted);
    font-size: 1.05rem;
}

/* ---------- Cards / Glass ---------- */
.glass-card {
    background: var(--xlab-glass);
    border: 1px solid var(--xlab-glass-border);
    border-radius: var(--xlab-radius);
    padding: 2rem;
    backdrop-filter: blur(12px);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    border-color: rgba(255,255,255,.18);
}

.glass-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--xlab-gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--xlab-primary-light);
    margin-bottom: 1.25rem;
}

.glass-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .6rem;
}

.glass-card p {
    color: var(--xlab-text-muted);
    font-size: .92rem;
    margin: 0;
}

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- Products ---------- */
.product-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto 5rem;
    align-items: center;
}

.product-row:nth-child(even) { flex-direction: row-reverse; }

.product-visual {
    flex: 1 1 380px;
    min-height: 280px;
    border-radius: var(--xlab-radius);
    background: var(--xlab-gradient-subtle);
    border: 1px solid var(--xlab-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--xlab-primary-light);
    position: relative;
    overflow: hidden;
}

.product-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(37,99,235,.18), transparent 60%);
}

.product-info {
    flex: 1 1 380px;
}

.product-info .tag {
    display: inline-block;
    background: var(--xlab-gradient-subtle);
    border: 1px solid var(--xlab-glass-border);
    color: var(--xlab-accent);
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .75rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .75rem;
}

.product-info h3 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 .75rem;
}

.product-info p {
    color: var(--xlab-text-muted);
    margin: 0 0 1.5rem;
    font-size: .97rem;
}

.product-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
}

.product-info ul li {
    padding: .35rem 0;
    font-size: .9rem;
    color: var(--xlab-text-muted);
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.product-info ul li i {
    color: var(--xlab-accent);
    font-size: .75rem;
    flex-shrink: 0;
}

/* ---------- Stats ---------- */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    flex: 1 1 160px;
}

.stat-item .num {
    font-size: 2.4rem;
    font-weight: 800;
    background: var(--xlab-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item .label {
    font-size: .85rem;
    color: var(--xlab-text-muted);
    margin-top: .25rem;
}

/* ---------- Team ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-card {
    text-align: center;
    padding: 2.5rem 2rem 2rem;
}

.team-card .avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    background: var(--xlab-gradient-subtle);
    border: 2px solid var(--xlab-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--xlab-primary-light);
}

.team-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.team-card .role {
    font-size: .82rem;
    color: var(--xlab-accent);
    font-weight: 600;
    margin-bottom: .75rem;
}

.team-card p {
    font-size: .85rem;
    color: var(--xlab-text-muted);
    margin: 0 0 1rem;
}

.team-card .socials {
    display: flex;
    gap: .5rem;
    justify-content: center;
}

.team-card .socials a {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--xlab-glass);
    border: 1px solid var(--xlab-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--xlab-text-muted);
    font-size: .85rem;
    transition: color .2s, background .2s;
    text-decoration: none;
}

.team-card .socials a:hover {
    color: #fff;
    background: var(--xlab-gradient-subtle);
}

/* ---------- Changelog / Timeline ---------- */
.timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--xlab-glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--xlab-gradient);
    border: 2px solid var(--xlab-dark);
    box-shadow: 0 0 0 3px rgba(37,99,235,.25);
}

.timeline-item .ver {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.timeline-item .date {
    font-size: .78rem;
    color: var(--xlab-text-muted);
    margin-left: .5rem;
}

.timeline-item p {
    color: var(--xlab-text-muted);
    font-size: .88rem;
    margin: .35rem 0 0;
}

/* ---------- CTA section ---------- */
.cta-section {
    text-align: center;
    padding: 80px 2rem;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(37,99,235,.12) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 1rem;
    position: relative;
}

.cta-section p {
    color: var(--xlab-text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
}

/* ---------- Footer ---------- */
.xfooter {
    border-top: 1px solid var(--xlab-glass-border);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    font-size: .8rem;
    color: var(--xlab-text-muted);
}

.xfooter strong {
    color: var(--xlab-text);
}

.xfooter p {
    margin: .35rem 0;
}

/* ---------- Divider ---------- */
.section-divider {
    border: none;
    border-top: 1px solid var(--xlab-glass-border);
    margin: 0;
}

/* ---------- Scroll Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Utilities ---------- */
.bg-darker { background: var(--xlab-dark-mid); }

/* ---------- Screenshot Carousel ---------- */
.screenshot-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0a0e17;
    border-radius: var(--xlab-radius);
    overflow: hidden;
}

.carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
}

.carousel-img.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .85rem;
    opacity: 0;
    transition: opacity .25s, background .2s;
    z-index: 2;
}

.screenshot-carousel:hover .carousel-btn { opacity: 1; }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-btn:hover { background: rgba(37,99,235,.7); }

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.carousel-dot.active {
    background: var(--xlab-primary-light);
    transform: scale(1.3);
}

/* ---------- Download Page ---------- */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.download-card {
    padding: 2.5rem 2rem;
    text-align: center;
}

.download-card .dl-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--xlab-gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--xlab-primary-light);
    margin: 0 auto 1.5rem;
}

.download-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}

.download-card .dl-version {
    font-size: .8rem;
    color: var(--xlab-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.download-card p {
    color: var(--xlab-text-muted);
    font-size: .9rem;
    margin: 0 0 1.5rem;
}

.download-card .btn-xlab {
    width: 100%;
    justify-content: center;
}
