/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #09090b;
    --bg-raised: #111113;
    --bg-card: #141416;
    --bg-card-hover: #1a1a1d;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.1);
    --orange: #f97316;
    --orange-soft: rgba(249, 115, 22, 0.12);
    --orange-glow: rgba(249, 115, 22, 0.25);
    --text: #ededef;
    --text-secondary: #a1a1a6;
    --text-muted: #5a5a60;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ── Nav ── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 300ms;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text);
}

.nav-logo {
    color: var(--orange);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 200ms;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-discord {
    display: flex;
    align-items: center;
    color: var(--text-muted) !important;
    transition: color 200ms !important;
}

.nav-discord:hover {
    color: #5865F2 !important;
}

/* ── Hero ── */
.hero {
    position: relative;
    padding: 140px 24px 100px;
    overflow: hidden;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 30%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(249, 115, 22, 0.15);
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text);
    margin-bottom: 20px;
}

.hero-accent {
    color: var(--orange);
}

.hero-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 48px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: transform 150ms, box-shadow 150ms, background 150ms;
}

.btn-primary:hover {
    background: #fb923c;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--orange-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-hover);
    transition: color 150ms, border-color 150ms, background 150ms;
}

.btn-secondary:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-hover);
}

/* App Window Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.app-window {
    background: #0c0c0e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(249, 115, 22, 0.06);
    max-width: 380px;
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 400ms;
}

.app-window:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 24px 70px rgba(0, 0, 0, 0.7),
        0 0 100px rgba(249, 115, 22, 0.1);
}

.app-window-bar {
    padding: 10px 14px;
    background: #0f0f11;
    border-bottom: 1px solid var(--border);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27272a;
}

.window-dots .dot-close {
    background: #3f3f46;
}

.app-img {
    width: 100%;
    display: block;
}

/* ── Sections ── */
.section {
    padding: 100px 24px;
}

.section-dark {
    background: var(--bg-raised);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--orange);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Features Grid ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 24px;
    transition: border-color 250ms, background 250ms, transform 250ms;
}

.feature-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--orange-soft);
    border-radius: 8px;
    color: var(--orange);
    margin-bottom: 18px;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* ── Steps ── */
.steps {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-num {
    font-size: 32px;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
    min-width: 52px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.step-content a {
    color: var(--orange);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 150ms;
}

.step-content a:hover {
    border-color: var(--orange);
}

.step-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--border-hover), transparent);
    margin-left: 26px;
    flex-shrink: 0;
}

/* ── Download ── */
.download-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.download-info .section-tag {
    margin-bottom: 12px;
}

.download-info h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 12px;
}

.download-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.download-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-item {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.meta-label {
    color: var(--text-muted);
    min-width: 70px;
    font-weight: 500;
}

.meta-val {
    color: var(--text-secondary);
    font-weight: 600;
}

.download-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--orange);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 10px;
    transition: transform 150ms, box-shadow 150ms, background 150ms;
}

.btn-download:hover {
    background: #fb923c;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--orange-glow);
}

.btn-download:active {
    transform: translateY(0);
}

.download-note {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 200ms;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-right {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .download-block {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 32px 24px;
    }

    .download-meta {
        align-items: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 120px 16px 60px;
    }
    .hero h1 {
        font-size: 28px;
        letter-spacing: -1px;
    }
    .hero-stats {
        flex-direction: column;
        gap: 12px;
    }
    .stat-divider {
        width: 40px;
        height: 1px;
    }
    .section {
        padding: 60px 16px;
    }
    .section-header h2 {
        font-size: 28px;
    }
    .features-grid {
        gap: 12px;
    }
    
    /* Navbar Mobile Fix */
    .nav-brand span {
        display: none;
    }
    .nav-links {
        gap: 14px;
    }
    .nav-links a {
        font-size: 13px;
    }
    
    /* Articles Mobile Fix */
    .article-container {
        padding: 0 16px;
        margin: 100px auto 60px;
    }
    .article-header h1 {
        font-size: 32px;
    }
    .hub-header {
        padding: 100px 16px 40px;
    }
    .hub-header h1 {
        font-size: 36px;
    }
    .articles-grid {
        padding: 0 16px;
        grid-template-columns: 1fr;
    }
}

/* ── Downloads Page ── */
.releases-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.loading-state {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--orange);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.release-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    transition: border-color 250ms, transform 250ms;
}

.release-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.release-latest-badge {
    display: inline-block;
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.release-header {
    margin-bottom: 16px;
}

.release-version {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.release-date {
    font-size: 13px;
    color: var(--text-muted);
}

.release-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.release-body ul {
    padding-left: 20px;
    margin-top: 8px;
}

.release-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 200px;
}

.release-download-count {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--text);
    color: var(--bg);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    width: 100%;
    transition: background 150ms;
}

.btn-download-sm:hover {
    background: #fff;
}

.btn-download-sm svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .release-card {
        flex-direction: column;
        gap: 24px;
    }
    .release-actions {
        width: 100%;
        align-items: center;
    }
}

/* ── FAQ Section ── */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 250ms;
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-item[open] {
    border-color: rgba(249, 115, 22, 0.2);
}

.faq-item summary {
    padding: 20px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color 200ms;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 200ms;
}

.faq-item[open] summary::after {
    content: '−';
    color: var(--orange);
}

.faq-item summary:hover {
    color: var(--orange);
}

.faq-item p {
    padding: 0 24px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.faq-item a {
    color: var(--orange);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 150ms;
}

.faq-item a:hover {
    border-color: var(--orange);
}

/* --- Article Pages --- */
.article-container {
    max-width: 800px;
    margin: 120px auto 80px;
    padding: 0 24px;
}
.article-header {
    text-align: center;
    margin-bottom: 40px;
}
.article-header h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}
.article-header p {
    font-size: 18px;
    color: var(--text-muted);
}
.article-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.article-content h2 {
    font-size: 24px;
    margin: 32px 0 16px;
    color: var(--text-main);
}
.article-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.article-content ul, .article-content ol {
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-left: 20px;
    line-height: 1.6;
}
.article-content li {
    margin-bottom: 8px;
}
.article-cta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-top: 48px;
}
.article-cta h3 {
    margin-bottom: 12px;
    font-size: 20px;
}
.article-cta p {
    margin-bottom: 24px;
}
.support-note {
    background: var(--orange-soft);
    border-left: 4px solid var(--orange);
    padding: 16px;
    border-radius: 4px;
    color: var(--text-main);
    font-size: 15px;
    margin-bottom: 24px;
}

/* --- Articles Hub Grid --- */
.hub-header {
    text-align: center;
    padding: 120px 24px 60px;
}
.hub-header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}
.hub-header p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 24px;
}
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--orange);
}
.card-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}
.card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}
