/* ============================================
   mp3towav.online — Stylesheet
   Dark theme · Orange accents · Audio vibes
   ============================================ */

:root {
    --bg: #09090b;
    --surface: #141416;
    --surface-2: #1c1c1f;
    --border: #27272a;
    --border-hover: #3f3f46;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #8a8a93;
    --primary: #f97316;
    --primary-hover: #fb923c;
    --primary-glow: rgba(249, 115, 22, 0.15);
    --primary-glow-strong: rgba(249, 115, 22, 0.3);
    --success: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.15);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.15);
    --font-main: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 10px;
    --radius-lg: 16px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    background-image: none;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Layout */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Site Navigation ---- */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
}

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

.nav-links a:hover,
.nav-links a.active { color: var(--primary); }

/* ---- Header ---- */
header {
    padding: 0 0 0.5rem;
    text-align: center;
    flex-shrink: 0;
}

.tagline {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0.75rem;
}

/* ---- Main (centered) ---- */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Converter Section ---- */
.converter {
    padding: 0;
    width: 100%;
}

.converter .container {
    width: 100%;
}

/* Trust line below drop zone */
.trust-line {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
    letter-spacing: 0.01em;
}

/* ---- Drop Zone ---- */
.drop-zone {
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, border-style 0.3s ease, box-shadow 0.4s ease, background 0.3s ease;
    background: var(--surface);
    position: relative;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.drop-zone > div {
    width: 100%;
}

.drop-zone:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.drop-zone:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.drop-zone.dragover {
    border-color: var(--primary);
    border-style: solid;
    box-shadow: 0 0 60px var(--primary-glow), inset 0 0 60px var(--primary-glow);
}

.drop-zone.done {
    border-color: var(--success);
    border-style: solid;
    box-shadow: 0 0 40px var(--success-glow);
    cursor: default;
}

.drop-zone.error {
    border-color: var(--error);
    border-style: solid;
    box-shadow: 0 0 40px var(--error-glow);
    cursor: default;
}

/* ---- Waveform Animation ---- */
.waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    margin-bottom: 1.5rem;
}

.waveform .bar {
    width: 5px;
    border-radius: 3px;
    background: var(--primary);
    animation: wave 1.2s ease-in-out infinite;
    will-change: transform;
}

.waveform .bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.waveform .bar:nth-child(2) { height: 20px; animation-delay: 0.12s; }
.waveform .bar:nth-child(3) { height: 30px; animation-delay: 0.24s; }
.waveform .bar:nth-child(4) { height: 38px; animation-delay: 0.18s; }
.waveform .bar:nth-child(5) { height: 30px; animation-delay: 0.3s; }
.waveform .bar:nth-child(6) { height: 20px; animation-delay: 0.06s; }
.waveform .bar:nth-child(7) { height: 12px; animation-delay: 0.36s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.35); opacity: 0.35; }
    50% { transform: scaleY(1); opacity: 1; }
}

.drop-zone.dragover .waveform .bar {
    animation-duration: 0.5s;
}

/* ---- Drop Zone: Idle Text ---- */
.drop-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.drop-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.browse-link {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.browse-link:hover {
    color: var(--primary-hover);
}

.drop-limit {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* ---- Drop Zone: Loading State ---- */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.dot {
    animation: blink 1.4s infinite;
    opacity: 0;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.loading-subtext {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Drop Zone: Converting State ---- */
.converting-file {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    word-break: break-all;
}

.progress-track {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px var(--primary-glow-strong);
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* ---- Drop Zone: Done State ---- */
.done-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin: 0 auto 1rem;
    animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.done-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ---- File Comparison ---- */
.file-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.file-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-align: left;
    min-width: 180px;
}

.file-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.file-name {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    word-break: break-all;
    margin-bottom: 0.25rem;
}

.file-size {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}

.file-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ---- Drop Zone: Error State ---- */
.error-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--error);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 1rem;
    animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.error-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-bottom: 0.75rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 24px var(--primary-glow-strong);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--surface-2);
}


/* ---- Footer ---- */
footer {
    padding: 1rem 0;
    text-align: center;
    flex-shrink: 0;
}

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

/* ---- Utilities ---- */
.hidden {
    display: none !important;
}

/* ---- SEO Content Sections ---- */
.seo-content {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.container-wide {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Trust Bar */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.trust-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.trust-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.trust-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* SEO Hero Image */
.seo-hero-img {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 0 auto 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* SEO Sections */
.seo-section {
    margin-bottom: 3rem;
}

.seo-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.seo-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    line-height: 1.7;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.step-card:hover {
    border-color: var(--border-hover);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--border-hover);
}

.feature-card strong {
    display: block;
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

/* SEO FAQ */
.seo-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seo-faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

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

.seo-faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.seo-faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 1rem;
}

.seo-faq-item[open] summary::after {
    content: '\2212';
}

.seo-answer {
    padding: 0 1.25rem 1rem;
}

.seo-answer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.seo-answer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .site-nav {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    header {
        padding: 0 0 0.25rem;
    }

    .drop-zone {
        padding: 3rem 1.5rem;
        min-height: 240px;
    }

    .drop-text {
        font-size: 1.1rem;
    }

    .progress-text {
        font-size: 1.5rem;
    }

    .file-comparison {
        flex-direction: column;
    }

    .file-info {
        min-width: unset;
        width: 100%;
    }

    .file-arrow {
        transform: rotate(90deg);
    }

    .trust-bar {
        flex-direction: column;
        align-items: center;
    }

    .trust-item {
        max-width: 100%;
        width: 100%;
    }

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

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

    .seo-section h2 {
        font-size: 1.25rem;
    }
}
