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

:root {
    --bg: #0b0f19;
    --bg-surface: #131a2b;
    --bg-card: #1a2338;
    --text: #e2e8f0;
    --text-muted: #8892a4;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --border: #1e293b;
    --radius: 8px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

code {
    font-family: var(--mono);
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

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

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

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.nav-brand:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    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);
}

/* ===== Hero ===== */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%),
        var(--bg);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

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

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

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

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

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

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

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

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.label {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-links {
    text-align: center;
    margin-top: 48px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Feature Cards ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

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

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

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

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

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

/* ===== Screenshot Gallery ===== */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.screenshot-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.screenshot-item {
    cursor: pointer;
}

.screenshot-item img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.screenshot-item:hover img {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.screenshot-caption {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 12px;
}

/* Extension screenshots are narrow popups — constrain width */
.screenshot-gallery-ext {
    grid-template-columns: repeat(3, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

.screenshot-item-narrow img {
    max-width: 260px;
    height: 400px;
    object-fit: contain;
    margin: 0 auto;
}

/* ===== Steps ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

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

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* ===== Divider ===== */
.divider hr {
    border: none;
    border-top: 1px solid var(--border);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

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

.footer-links h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

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

.footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 16px;
}

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

/* ===== Why Section ===== */
.why-section {
    text-align: center;
}

.why-content {
    max-width: 640px;
    margin: 0 auto;
}

.why-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.why-content em {
    font-style: italic;
    color: var(--accent);
}

.why-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.why-content strong {
    color: var(--text);
}

/* ===== Image Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 16px;
}

.modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 201;
}

.modal-close:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 20px;
    }

    .hero {
        padding: 130px 0 70px;
    }

    .section {
        padding: 70px 0;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

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

    .screenshot-gallery {
        grid-template-columns: 1fr;
    }
}
