/* Pageflip Compress - identity styles
   Dark base + electric cyan. No tech-startup blue gradient. */

:root {
    --bg-0: #07090F;
    --bg-1: #0A0E1A;
    --bg-2: #11162A;
    --bg-3: #1A2140;
    --line: #1F2742;
    --text: #E8ECF7;
    --muted: #8892B5;
    --muted-2: #5C6587;

    --accent: #00E5D4;
    --accent-glow: rgba(0, 229, 212, 0.35);
    --accent-soft: rgba(0, 229, 212, 0.10);
    --accent-2: #C4FF3D;
    --danger: #FF4D6D;

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body {
    background:
        radial-gradient(1200px 600px at 50% -200px, rgba(0, 229, 212, 0.10), transparent 60%),
        radial-gradient(900px 500px at 80% 100%, rgba(196, 255, 61, 0.04), transparent 60%),
        var(--bg-0);
}

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

.link-accent { color: var(--accent); }
.link-muted { color: var(--muted); }

.hidden { display: none !important; }

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px;
    max-width: 1200px;
    margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    box-shadow: 0 0 20px var(--accent-glow);
    position: relative;
}
.logo-mark::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 3px;
    background: var(--bg-0);
}
.logo-text {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}
.logo-text em {
    font-style: normal;
    color: var(--accent);
    font-weight: 600;
}
.topbar-nav { display: flex; gap: 24px; font-size: 14px; }
.topbar-nav a { color: var(--muted); }
.topbar-nav a:hover { color: var(--text); }

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

/* Hero */
.hero {
    text-align: center;
    padding: 64px 0 48px;
}
.hero h1 {
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0 0 20px;
}
.accent {
    color: var(--accent);
    text-shadow: 0 0 40px var(--accent-glow);
}
.hero .lead {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 40px;
}

/* Dropzone */
.dropzone {
    max-width: 640px;
    margin: 0 auto;
    border: 2px dashed var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-1);
    padding: 56px 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(400px 200px at 50% 50%, var(--accent-soft), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-drag {
    border-color: var(--accent);
    background: var(--bg-2);
    transform: translateY(-2px);
    outline: none;
}
.dropzone:hover::before, .dropzone.is-drag::before { opacity: 1; }
.dz-inner { position: relative; }
.dz-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    color: var(--accent);
    opacity: 0.85;
}
.dz-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}
.dz-sub {
    color: var(--muted);
    font-size: 14px;
}
.limits-line {
    text-align: center;
    margin-top: 18px;
    color: var(--muted-2);
    font-size: 13px;
}

/* Process view */
.process {
    padding: 80px 0;
    display: flex;
    justify-content: center;
}
.process-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 40px;
    width: 100%;
    max-width: 560px;
    text-align: center;
}
.proc-filename {
    font-family: var(--font-mono);
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
    word-break: break-all;
}
.progress-track {
    height: 8px;
    background: var(--bg-3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    transition: width 0.4s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}
.proc-status {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Result view */
.result {
    padding: 64px 0;
    display: flex;
    justify-content: center;
}
.result-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 44px;
    width: 100%;
    max-width: 640px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.result-headline {
    text-align: center;
    margin-bottom: 36px;
}
.result-saved {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.result-ratio {
    font-size: 72px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.03em;
    text-shadow: 0 0 40px var(--accent-glow);
}

.result-bar-wrap {
    margin-bottom: 32px;
}
.result-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 100px;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}
.result-bar-label {
    color: var(--muted);
}
.result-bar {
    height: 14px;
    background: var(--bg-3);
    border-radius: 4px;
    overflow: hidden;
}
.result-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-bar-fill.original { background: var(--bg-3); border: 1px solid var(--line); }
.result-bar-fill.compressed {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px var(--accent-glow);
}
.result-bar-val {
    text-align: right;
    font-family: var(--font-mono);
    color: var(--text);
    font-size: 13px;
}

.result-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.result-meta > div {
    text-align: center;
}
.result-meta span {
    display: block;
    font-size: 11px;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.result-meta strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.type-breakdown {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    justify-content: center;
}
.type-pill {
    background: var(--bg-2);
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 5px 11px;
    border-radius: 100px;
    font-size: 12px;
    font-family: var(--font-mono);
}
.type-pill strong {
    color: var(--accent);
    margin-left: 4px;
}

.btn-download {
    display: block;
    width: 100%;
    background: var(--accent);
    color: var(--bg-0);
    text-align: center;
    padding: 16px;
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    margin-bottom: 12px;
    transition: all 0.15s;
    box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-download:hover {
    background: var(--accent-2);
    color: var(--bg-0);
    transform: translateY(-1px);
    box-shadow: 0 0 30px var(--accent-glow);
}
.btn-ghost {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 13px;
    border-radius: var(--r-md);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cta-pageflip {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* Error */
.error-view {
    padding: 80px 0;
    display: flex;
    justify-content: center;
}
.error-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 40px;
    text-align: center;
    max-width: 480px;
}
.error-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 77, 109, 0.12);
    color: var(--danger);
    font-size: 26px;
    font-weight: 700;
    line-height: 56px;
    margin: 0 auto 20px;
}
.error-msg {
    color: var(--text);
    margin-bottom: 24px;
}

/* How it works */
.how {
    padding: 80px 0 64px;
}
.how h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 48px;
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.how-step {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 28px;
}
.how-num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 13px;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}
.how-step h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
}
.how-step p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

/* Footer */
.footer {
    border-top: 1px solid var(--line);
    margin-top: 48px;
    padding: 32px 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted-2);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 720px) {
    .topbar { padding: 18px 20px; }
    .hero { padding: 40px 0 32px; }
    .dropzone { padding: 40px 20px; }
    .result-card, .process-card, .error-card { padding: 28px; }
    .result-ratio { font-size: 56px; }
    .result-bar-row {
        grid-template-columns: 80px 1fr 80px;
        gap: 10px;
        font-size: 12px;
    }
    .result-meta { grid-template-columns: 1fr; gap: 12px; padding: 16px 0; }
    .how-grid { grid-template-columns: 1fr; }
    .footer { flex-direction: column; align-items: flex-start; }
}
