/* ═══════════════════════════════════════════════════
   RESPONSIVE DESIGN — Mobile First
   ═══════════════════════════════════════════════════ */

/* ── Mobile Base (< 640px) ── */
.header__nav {
    display: none;
}

/* Mobile nav open state — toggled by menu-toggle button */
.header__nav--open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-lg);
    z-index: 99;
}

.header__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

.hero__title {
    font-size: var(--font-size-xl);
}

.ascii-logo {
    font-size: 0.45rem;
}

.dropzone {
    padding: var(--space-xl) var(--space-md);
}

.format-selector {
    gap: var(--space-xs);
}

.format-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
}

.stats {
    grid-template-columns: repeat(2, 1fr);
}

.file-card {
    flex-direction: column;
    align-items: flex-start;
}

.file-card__preview {
    width: 100%;
    height: 120px;
}

.file-card__actions {
    width: 100%;
    justify-content: flex-end;
}

/* ── Tablet (≥ 640px) ── */
@media (min-width: 640px) {
    .ascii-logo {
        font-size: 0.6rem;
    }

    .hero__title {
        font-size: var(--font-size-2xl);
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .file-card {
        flex-direction: row;
        align-items: center;
    }

    .file-card__preview {
        width: 48px;
        height: 48px;
    }

    .file-card__actions {
        width: auto;
    }

    .format-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-sm);
    }
}

/* ── Desktop (≥ 768px) ── */
@media (min-width: 768px) {
    .header__nav {
        display: flex;
    }

    .header__menu-btn {
        display: none;
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .ascii-logo {
        font-size: var(--font-size-xs);
    }

    .dropzone {
        padding: var(--space-3xl) var(--space-xl);
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Wide Desktop (≥ 1024px) ── */
@media (min-width: 1024px) {
    :root {
        --max-width: 1100px;
    }
}

/* ── Print ── */
@media print {

    .crt-overlay,
    .header,
    .theme-switcher,
    .dropzone,
    .footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}