:root {
    --bg: #0a0a0c;
    --bg-alt: #08080a;
    --accent: #2f7bff;
    --accent-rgb: 47, 123, 255;
    --text-strong: #f7f7f5;
    --text: #f4f4f4;
    --text-soft: #c3c3c8;
    --text-muted: #b6b6bc;
    --text-dim: #8a8a92;
    --text-dimmer: #6a6a72;
    --text-faint: #5a5a62;
    --line: rgba(255, 255, 255, 0.06);
    --line-strong: rgba(255, 255, 255, 0.08);
    --ease: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    letter-spacing: -0.01em;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; }
.container { max-width: 1240px; margin: 0 auto; width: 100%; }

@keyframes glowDrift {
    0%   { transform: translate(-8%, -6%) scale(1); }
    50%  { transform: translate(8%, 8%) scale(1.18); }
    100% { transform: translate(-8%, -6%) scale(1); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .35; transform: scale(.8); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].is-shown { opacity: 1; transform: none; }

/* Progress bar */
.progress-track {
    position: fixed; top: 0; left: 0; right: 0;
    height: 2px; z-index: 60;
    background: rgba(255, 255, 255, 0.04);
}
.progress-fill {
    height: 100%; width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transition: width .1s linear;
}

/* Nav */
.navbar {
    position: fixed; top: 2px; left: 0; right: 0;
    z-index: 50;
    padding: 18px 32px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(10, 10, 12, 0.6);
    border-bottom: 1px solid var(--line);
}
.nav-container {
    max-width: 1240px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    display: flex; align-items: center; gap: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; letter-spacing: 0.18em; font-weight: 500;
    color: var(--text); text-decoration: none;
}
.logo-icon { width: 22px; height: 22px; object-fit: contain; }
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 12px var(--accent);
    animation: pulse 2.4s ease-in-out infinite;
}
.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.14em;
    color: var(--text-dim); text-decoration: none;
    transition: color .3s ease;
}
.nav-links a:hover { color: var(--accent); }
.lang-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.12em;
    color: var(--text); background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 100px; padding: 7px 13px; cursor: pointer;
    display: flex; align-items: center; gap: 7px;
    transition: border-color .3s ease, color .3s ease;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn .dot { width: 5px; height: 5px; box-shadow: none; animation: none; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    text-decoration: none; cursor: pointer;
    padding: 16px 26px; border-radius: 100px;
    font-size: 15px; font-family: inherit;
    border: none;
}
.btn-primary {
    background: var(--accent); color: var(--bg);
    font-weight: 600; letter-spacing: -0.01em;
    transition: transform .3s ease, box-shadow .3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.25);
}
.btn-secondary {
    background: transparent; color: var(--text);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: border-color .3s ease, color .3s ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
    position: relative; min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 140px 32px 90px; overflow: hidden;
}
.hero-glow {
    position: absolute; top: 50%; left: 50%;
    width: 120vw; height: 120vh; margin-left: -60vw; margin-top: -60vh;
    background: radial-gradient(circle at 60% 40%, rgba(var(--accent-rgb), 0.12), transparent 45%);
    animation: glowDrift 18s ease-in-out infinite; pointer-events: none;
}
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 50% 45%, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 45%, black, transparent 80%);
    pointer-events: none;
}
.hero-inner { position: relative; }
.eyebrow {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.2em; color: var(--text-dim);
    margin-bottom: 34px;
}
.eyebrow .status { display: flex; align-items: center; gap: 9px; color: var(--accent); }
.eyebrow .status .dot { width: 7px; height: 7px; box-shadow: 0 0 10px var(--accent); }
.eyebrow .sep { opacity: 0.4; }
.hero h1 {
    font-size: clamp(4rem, 14vw, 12rem); font-weight: 600;
    line-height: 0.86; letter-spacing: -0.045em; color: var(--text-strong);
}
.hero h1 span { color: var(--accent); }
.hero-sub {
    font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 400;
    color: var(--text-soft); margin-top: 24px; max-width: 620px;
    line-height: 1.4; text-wrap: pretty;
}
.hero-desc {
    font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--text-muted);
    margin-top: 22px; max-width: 600px; line-height: 1.6; text-wrap: pretty;
}
.cta-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 42px; }

/* Particles */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.particle {
    position: absolute; border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.25);
    animation: float 6s ease-in-out infinite;
}

/* Sections */
.section { position: relative; padding: 120px 32px; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; margin-bottom: 14px;
}
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.16em; color: var(--accent);
}
.section-title {
    font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 500;
    letter-spacing: -0.03em; color: var(--text);
}
.section-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted);
    max-width: 560px; margin-top: 14px; margin-bottom: 56px; line-height: 1.5;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}
.feature-card {
    background: var(--bg-alt);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    padding: 32px;
    transition: border-color .4s var(--ease), transform .4s var(--ease), background .4s var(--ease);
}
.section.alt .feature-card { background: rgba(255, 255, 255, 0.02); }
.feature-card:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(var(--accent-rgb), 0.04);
    transform: translateY(-4px);
}
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--accent);
    margin-bottom: 22px; padding: 12px;
}
.feature-icon.text-icon { padding: 0; }
.feature-icon img { width: 100%; height: 100%; object-fit: contain; }
.feature-title {
    font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em;
    color: var(--text-strong); margin-bottom: 12px;
}
.feature-description { color: var(--text-dim); line-height: 1.6; font-size: 0.98rem; }

/* Screenshots */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 20px;
}
.screenshot-card {
    background: var(--bg-alt);
    border: 1px solid var(--line-strong);
    border-radius: 18px; overflow: hidden;
    transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.screenshot-card:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    transform: translateY(-4px);
}
.screenshot-img {
    width: 100%; aspect-ratio: 16/9;
    background: #050506;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dimmer); font-size: 0.95rem;
    border-bottom: 1px solid var(--line-strong);
    overflow: hidden; position: relative; cursor: pointer;
}
.screenshot-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.screenshot-card:hover .screenshot-img img { transform: scale(1.02); }
.screenshot-img:hover::after {
    content: attr(data-zoom-label);
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0, 0, 0, 0.85); color: var(--text);
    padding: 5px 10px; border-radius: 6px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em;
}
.screenshot-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-dimmer);
}
.screenshot-content { padding: 22px 24px; }
.screenshot-title { font-size: 1.15rem; font-weight: 600; color: var(--text-strong); margin-bottom: 8px; }
.screenshot-description { color: var(--text-dim); line-height: 1.5; font-size: 0.95rem; }

/* Download */
.download {
    position: relative; overflow: hidden;
    border-top: 1px solid var(--line);
    padding: 120px 32px;
}
.download-glow {
    position: absolute; bottom: -40%; left: 50%;
    width: 90vw; height: 90vh; margin-left: -45vw;
    background: radial-gradient(circle at 50% 100%, rgba(var(--accent-rgb), 0.1), transparent 55%);
    pointer-events: none;
}
.download-inner { position: relative; text-align: center; }
.download-title {
    font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 600;
    letter-spacing: -0.04em; line-height: 0.95; color: var(--text-strong);
    margin-top: 14px;
}
.download-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted);
    max-width: 520px; margin: 24px auto 0; line-height: 1.55;
}
.download-info {
    background: var(--bg-alt);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    padding: 28px; margin: 44px auto 0; max-width: 460px;
    text-align: left;
}
.version-info {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.98rem; color: var(--text-soft);
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.version-info:last-child { border-bottom: none; }
.version-info strong {
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    letter-spacing: 0.08em; color: var(--text-dimmer); font-weight: 500;
    text-transform: uppercase;
}
.cta-buttons.center { justify-content: center; margin-top: 36px; }
.download-stats {
    display: flex; justify-content: center; gap: 56px;
    margin-top: 56px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
    font-size: 2.4rem; font-weight: 600; letter-spacing: -0.02em;
    color: var(--accent); display: block;
}
.stat-label {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    letter-spacing: 0.12em; color: var(--text-dimmer); text-transform: uppercase;
    margin-top: 8px;
}

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 32px; }
.footer-content { max-width: 1240px; margin: 0 auto; text-align: center; }
.footer-links {
    display: flex; justify-content: center; gap: 28px;
    margin-bottom: 22px; flex-wrap: wrap;
}
.footer-links a {
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    letter-spacing: 0.1em; color: var(--text-dim);
    text-decoration: none; cursor: pointer; transition: color .3s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-text {
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    letter-spacing: 0.06em; color: var(--text-faint);
}

/* Image Modal */
.image-modal {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.image-modal.active { opacity: 1; visibility: visible; }
.modal-content {
    position: relative; max-width: 95vw; max-height: 95vh;
    background: var(--bg-alt);
    border: 1px solid var(--line-strong);
    border-radius: 16px; overflow: hidden;
    transform: scale(0.9) translateY(30px); transition: all 0.3s ease;
}
.image-modal.active .modal-content { transform: scale(1) translateY(0); }
.modal-image { width: 100%; height: auto; max-height: 80vh; object-fit: contain; display: block; }
.modal-header {
    padding: 16px 20px; background: var(--bg);
    border-bottom: 1px solid var(--line-strong);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 1.05rem; font-weight: 600; color: var(--text-strong); }
.modal-close {
    background: none; border: none; font-size: 1.3rem;
    color: var(--text-dim); cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.modal-close:hover { background: var(--bg); color: var(--accent); transform: rotate(90deg); }
.modal-footer {
    padding: 14px 20px; background: var(--bg);
    border-top: 1px solid var(--line-strong); text-align: center;
}
.modal-description { color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; }

/* Loading */
.loading {
    position: fixed; inset: 0; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.loading.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader {
    width: 48px; height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.musical-confetti {
    position: fixed; pointer-events: none; z-index: 9998;
    font-weight: bold; user-select: none; will-change: transform;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .cta-buttons { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .download-stats { gap: 32px; }
    .hero { padding: 130px 24px 80px; }
    .hero h1 { font-size: clamp(3rem, 13vw, 6rem); }
    .section { padding: 90px 24px; }
    .download { padding: 90px 24px; }
}
