:root {
    --bg: #0c1110;
    --bg-deep: #0a0d0c;
    --surface: #121a18;
    --surface-soft: #16201d;
    --text: #f5f2ea;
    --muted: #c2b8a6;
    --accent: #f2b447;
    --accent-2: #4fd1c5;
    --success: #69d7a2;
    --danger: #ff6b6b;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 20%, #1c2a27 0%, transparent 55%),
        radial-gradient(circle at 80% 10%, #1b1f26 0%, transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    min-height: 100vh;
}

code {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9em;
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.glow {
    position: absolute;
    filter: blur(60px);
    opacity: 0.45;
}

.glow-one {
    width: 320px;
    height: 320px;
    top: 80px;
    left: 5%;
    background: rgba(79, 209, 197, 0.35);
}

.glow-two {
    width: 420px;
    height: 420px;
    top: 240px;
    right: 8%;
    background: rgba(242, 180, 71, 0.25);
}

.glow-three {
    width: 240px;
    height: 240px;
    bottom: 80px;
    left: 35%;
    background: rgba(120, 190, 150, 0.25);
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    align-items: center;
    margin-bottom: 32px;
}

.hero-copy h1 {
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin: 12px 0 12px;
}

.hero-copy .subhead {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--accent-2);
    margin: 0;
}

.hero-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
}

.hero-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.hero-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-value {
    font-weight: 600;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h2 {
    margin-top: 0;
    font-family: "Fraunces", "Times New Roman", serif;
}

.upload-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--muted);
}

.field input,
.field select {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.95rem;
}

.primary,
.secondary,
.ghost {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary {
    background: var(--accent);
    color: #1d1406;
    font-weight: 600;
    box-shadow: 0 12px 20px rgba(242, 180, 71, 0.25);
}

.primary:hover {
    transform: translateY(-1px);
}

.secondary {
    background: rgba(79, 209, 197, 0.15);
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.secondary.disabled {
    opacity: 0.5;
    cursor: default;
}

.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
}

.info {
    background: linear-gradient(150deg, rgba(242, 180, 71, 0.12), rgba(79, 209, 197, 0.08));
}

.steps {
    list-style: decimal;
    padding-left: 18px;
    color: var(--muted);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.pill {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--text);
}

.notice {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.notice.success {
    background: rgba(105, 215, 162, 0.12);
    color: var(--success);
}

.notice.error {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
}

.jobs {
    display: grid;
    gap: 16px;
}

.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jobs-list {
    display: grid;
    gap: 12px;
}

.job {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.job.empty {
    grid-template-columns: 1fr;
    text-align: center;
    color: var(--muted);
}

.job-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.job-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.job-status {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.status {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.status.done {
    color: var(--success);
    background: rgba(105, 215, 162, 0.2);
}

.status.failed {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.2);
}

.status.processing {
    color: var(--accent-2);
    background: rgba(79, 209, 197, 0.2);
}

.progress {
    width: 140px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    width: 0%;
    transition: width 0.4s ease;
}

[data-animate] {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 0.8s ease forwards;
}

[data-animate]:nth-of-type(2) {
    animation-delay: 0.08s;
}

[data-animate]:nth-of-type(3) {
    animation-delay: 0.16s;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .job {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .job-status {
        justify-items: start;
    }

    .progress {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
