@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("assets/fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
        U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("assets/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}

:root {
    --black: #000000;
    --surface: #1d1d1f;
    --text: #f5f5f7;
    --text-muted: #86868b;
    --accent: #2997ff;
    --accent-strong: #0071e3;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--black);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
}

.page {
    margin: auto;
    width: 100%;
    padding: 32px 0;
}

/* ------------------------------------------------------------------ hero */

.hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 22px 48px;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.07;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.subhead {
    margin: 14px auto 0;
    max-width: 520px;
    font-size: clamp(17px, 2.4vw, 21px);
    line-height: 1.38;
    letter-spacing: -0.008em;
    color: var(--text-muted);
}

/* ------------------------------------------------------------- converter */

.converter {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 22px;
}

.converter-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 24px;
}

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 44px 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.drop-zone:hover,
.drop-zone:focus-visible {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.drop-zone:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.converter-card.is-dragging .drop-zone {
    border-color: var(--accent);
    background: rgba(41, 151, 255, 0.08);
}

.drop-zone.is-disabled {
    opacity: 0.5;
    cursor: default;
}

.drop-icon {
    width: 44px;
    height: 44px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.drop-title {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.drop-hint {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------------------------------------------------------- upload state */

.upload-state {
    padding: 30px 8px;
    text-align: center;
}

.status-text {
    margin: 0 0 18px;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 420px;
    margin: 0 auto;
}

.progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.3s var(--ease);
}

.progress-percent {
    min-width: 44px;
    text-align: right;
    font-size: 14px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.upload-state .text-button {
    margin-top: 18px;
}

/* --------------------------------------------------------------- buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 980px;
    background: var(--accent-strong);
    color: #ffffff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.3s var(--ease), transform 0.15s var(--ease);
}

.button:hover {
    background: #0077ed;
    text-decoration: none;
}

.button:active {
    transform: scale(0.98);
}

.text-button {
    background: none;
    border: none;
    padding: 8px 10px;
    color: var(--accent);
    font-family: inherit;
    font-size: 17px;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color 0.2s var(--ease);
}

.text-button:hover {
    text-decoration: underline;
}

/* ----------------------------------------------------------- error/result */

.error-box {
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 69, 58, 0.12);
    color: #ff453a;
    font-size: 15px;
    text-align: center;
}

.result-card {
    padding: 30px 8px;
    text-align: center;
}

.result-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.012em;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

/* ---------------------------------------------------------------- motion */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

.hero h1,
.subhead,
.converter-card {
    animation: rise 0.8s var(--ease) both;
}

.subhead {
    animation-delay: 0.08s;
}

.converter-card {
    animation-delay: 0.16s;
}

@media (max-width: 640px) {
    .hero {
        padding: 0 20px 36px;
    }

    .converter {
        padding: 0 20px;
    }

    .converter-card {
        padding: 16px;
    }

    .drop-zone {
        padding: 36px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.001s !important;
    }
}
