:root {
  --bg: oklch(0.16 0.03 252);
  --bg-soft: oklch(0.22 0.03 250);
  --surface: oklch(0.25 0.03 252 / 0.9);
  --surface-strong: oklch(0.3 0.04 252 / 0.92);
  --ink: oklch(0.95 0.02 95);
  --muted: oklch(0.77 0.03 95);
  --accent: oklch(0.73 0.16 68);
  --accent-strong: oklch(0.67 0.18 45);
  --outline: oklch(0.5 0.03 250 / 0.45);
  --danger: oklch(0.66 0.19 25);
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --radius: 24px;
  --shadow: 0 24px 80px oklch(0.05 0.02 250 / 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Onest", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, oklch(0.38 0.08 252 / 0.4), transparent 26%),
    radial-gradient(circle at 85% 18%, oklch(0.68 0.12 70 / 0.18), transparent 22%),
    linear-gradient(145deg, var(--bg) 0%, oklch(0.12 0.02 250) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.95 0.01 95 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.95 0.01 95 / 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
  pointer-events: none;
}

.page-shell {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: var(--space-lg) 0 var(--space-3xl);
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg) 0 var(--space-2xl);
}

.brand-lockup {
  display: grid;
  gap: var(--space-xs);
}

.brand-kicker,
.eyebrow,
.panel-kicker,
.status-kicker,
.feature-label,
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: oklch(0.8 0.05 85 / 0.78);
}

.brand-name,
h1,
h2,
h3 {
  font-family: "Archivo Expanded", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-name {
  font-size: clamp(1.5rem, 2vw, 1.9rem);
}

.topbar-note {
  max-width: 28ch;
  display: grid;
  gap: 6px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}

.topbar-link {
  color: var(--accent);
  text-decoration: none;
}

.topbar-link:hover {
  color: oklch(0.82 0.14 75);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.hero-copy,
.upload-panel {
  position: relative;
}

.hero-copy {
  display: grid;
  gap: var(--space-lg);
  padding-top: var(--space-lg);
}

h1 {
  margin: 0;
  max-width: 10.5ch;
  font-size: clamp(3.2rem, 6vw, 6.2rem);
  line-height: 0.94;
}

.lede {
  max-width: 60ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.feature-band > div,
.upload-panel {
  border: 1px solid var(--outline);
  background: linear-gradient(180deg, var(--surface) 0%, oklch(0.21 0.03 250 / 0.92) 100%);
  box-shadow: var(--shadow);
}

.feature-band > div {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border-radius: 20px;
}

.feature-band strong,
.stats-grid strong {
  font-size: 1.05rem;
}

.pipeline-list {
  display: grid;
  gap: var(--space-sm);
  padding-left: 1.2rem;
  max-width: 60ch;
  color: var(--ink);
  line-height: 1.6;
}

.upload-panel {
  overflow: hidden;
  border-radius: var(--radius);
  padding: var(--space-xl);
}

.upload-panel::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, oklch(0.72 0.15 68 / 0.28), transparent 70%);
  pointer-events: none;
}

.panel-header {
  display: grid;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.panel-header h2,
#status-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
}

.upload-form {
  display: grid;
  gap: var(--space-md);
}

.dropzone {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-xl);
  min-height: 240px;
  border-radius: 20px;
  border: 1px dashed oklch(0.74 0.07 80 / 0.5);
  background:
    linear-gradient(180deg, oklch(0.29 0.03 252 / 0.8), oklch(0.22 0.03 252 / 0.86)),
    linear-gradient(135deg, oklch(0.6 0.09 72 / 0.12), transparent 45%);
  align-content: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  transform: translateY(-2px);
  border-color: oklch(0.76 0.11 75 / 0.9);
}

.dropzone input {
  display: none;
}

.dropzone-title {
  font-family: "Archivo Expanded", sans-serif;
  font-size: 1.2rem;
  line-height: 1.3;
}

.dropzone-subtitle,
.selected-file,
.status-phase,
.status-error,
.download-link,
.status-chip,
.pipeline-list,
.feature-band strong,
.stats-grid strong,
.primary-button,
.topbar-note,
.lede {
  font-variant-ligatures: common-ligatures;
}

.dropzone-subtitle,
.selected-file,
.status-phase,
.status-error,
.download-link {
  color: var(--muted);
}

.selected-file {
  font-size: 0.95rem;
}

.primary-button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 180ms ease, filter 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: oklch(0.16 0.03 250);
  cursor: pointer;
}

.primary-button:hover,
.download-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status-shell {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--outline);
}

.status-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-md);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: oklch(0.35 0.05 252 / 0.78);
  color: var(--ink);
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: oklch(0.33 0.03 250 / 0.82);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, oklch(0.82 0.12 90) 100%);
  transition: width 240ms ease;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.stats-grid > div {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-radius: 18px;
  background: oklch(0.28 0.03 250 / 0.82);
}

.status-error {
  margin: 0;
  color: var(--danger);
}

.download-link {
  width: fit-content;
  background: oklch(0.9 0.02 90);
  color: oklch(0.19 0.03 252);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal-up 650ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-delay {
  animation-delay: 120ms;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .topbar,
  .status-heading-row {
    align-items: start;
    flex-direction: column;
  }

  .topbar-note {
    text-align: left;
  }

  .hero-grid,
  .feature-band,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-bottom: var(--space-2xl);
  }

  .upload-panel,
  .feature-band > div,
  .stats-grid > div,
  .dropzone {
    border-radius: 18px;
  }

  .upload-panel {
    padding: var(--space-lg);
  }

  .dropzone {
    min-height: 210px;
    padding: var(--space-lg);
  }

  .primary-button,
  .download-link,
  .status-chip {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}