/* ── Reset & Base ────────────────────────────────────────── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-alt: #0f0f18;
    --surface: #16161f;
    --surface-hover: #1e1e2a;
    --border: #2a2a3a;
    --text: #e4e4ec;
    --text-muted: #9090a8;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --gradient: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.08));
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 1.2em;
}

ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-weight: 600;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

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

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

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text) !important;
    font-size: 0.85rem;
}

.nav-btn:hover {
    background: var(--surface-hover);
    color: var(--text) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
    padding: calc(var(--nav-height) + 80px) 0 100px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    color: var(--text);
    transform: translateY(-1px);
}

/* ── Carousel ─────────────────────────────────────────────── */

.carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    outline: none;
}

.carousel-viewport {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    aspect-ratio: 16 / 9.2;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-img {
    width: 100%;
    height: 100%;
}

.carousel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

.carousel-img-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.carousel-img-mobile img {
    width: auto;
    height: 100%;
    max-width: 45%;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Nav buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-80%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(8px);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.carousel-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

.carousel-prev { left: -56px; }
.carousel-next { right: -56px; }

/* Info bar */
.carousel-info {
    text-align: center;
    padding: 20px 16px 8px;
}

.carousel-label {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.carousel-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 0 4px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.carousel-dot:hover:not(.active) {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.2);
}

/* ── Sections ────────────────────────────────────────────── */

.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto 60px;
}

/* ── Features ────────────────────────────────────────────── */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: border-color 0.3s, transform 0.2s;
}

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

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary-light);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Feature highlight */

.feature-highlight {
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    gap: 48px;
    align-items: center;
}

.feature-highlight-content {
    flex: 1;
}

.feature-highlight h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-highlight p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.resource-modes {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.resource-mode {
    text-align: center;
    padding: 20px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 110px;
}

.resource-mode-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.resource-mode-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.resource-mode-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Credits ──────────────────────────────────────────────── */

.credits-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
}

.credits-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.credits-icon svg {
    width: 26px;
    height: 26px;
    color: #ec4899;
}

.credits-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.credits-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.credits-card a:not(.btn) {
    color: var(--primary-light);
    font-weight: 600;
}

.credits-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Installation ─────────────────────────────────────────── */

.install-steps {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.install-step {
    display: flex;
    gap: 24px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.step-content ul {
    margin-bottom: 8px;
}

.step-content li {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.code-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-top: 8px;
}

.code-block pre {
    padding: 16px 20px;
    margin: 0;
}

.code-block code {
    background: none;
    padding: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── Configuration ────────────────────────────────────────── */

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.config-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.config-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.config-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.config-card ul {
    margin-top: 8px;
}

.config-card li {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.85rem;
}

.config-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.config-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.config-table tr:last-child td {
    border-bottom: none;
}

/* ── Tech ─────────────────────────────────────────────────── */

.tech-section {
    padding: 60px 0;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.tech-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-highlight {
        flex-direction: column;
        padding: 32px;
    }

    .resource-modes {
        width: 100%;
        justify-content: center;
    }

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

    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
    .carousel-btn {
        width: 36px;
        height: 36px;
        background: rgba(10, 10, 15, 0.85);
    }
    .carousel-btn svg { width: 16px; height: 16px; }
}

@media (max-width: 640px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-toggle {
        display: flex;
    }

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

    .hero {
        padding: calc(var(--nav-height) + 48px) 0 64px;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .section {
        padding: 64px 0;
    }

    .resource-modes {
        flex-direction: column;
        align-items: center;
    }

    .resource-mode {
        min-width: 160px;
    }

    .install-step {
        flex-direction: column;
        gap: 12px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 24px;
    }

    .carousel-prev { left: 4px; }
    .carousel-next { right: 4px; }
    .carousel-btn {
        width: 32px;
        height: 32px;
    }

    .carousel-img-mobile img {
        max-width: 60%;
    }
}
