:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1f1c17;
  --ink-soft: #6b655a;
  --ink-faint: #9a9384;
  --border: #e6e1d6;
  --accent: #e07b39;
  --accent-strong: #c96a2d;
  --accent-soft: #fbeadc;
  --success: #2f9e63;
  --danger: #d04545;
  --shadow: 0 1px 2px rgba(31, 28, 23, 0.04), 0 8px 24px rgba(31, 28, 23, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1e1b17;
    --surface-2: #26221c;
    --ink: #f0ece4;
    --ink-soft: #b4ac9d;
    --ink-faint: #7d766a;
    --border: #37322a;
    --accent: #ed8a48;
    --accent-strong: #f0985c;
    --accent-soft: #3a2a1c;
    --success: #4cc388;
    --danger: #e06b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */
.site-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.brand-name { font-size: 17px; }

.brand-tag {
  color: var(--ink-faint);
  font-size: 13px;
}

/* Layout */
.container {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* Hero */
.hero { text-align: center; margin: 24px 0 32px; }

.hero h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.hero .arrow { color: var(--accent); font-weight: 400; }

.lede {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}

/* Dropzone */
.dropzone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow);
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.005);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 24px;
  text-align: center;
}

.dropzone-icon { font-size: 44px; line-height: 1; }

.dropzone-title {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 0;
}

.dropzone-sub {
  color: var(--ink-soft);
  margin: 0;
  font-size: 15px;
}

.dropzone-sub .link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone-hint {
  color: var(--ink-faint);
  font-size: 13px;
  margin: 12px 0 0;
}

/* Status */
.status {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 14px;
}

.status.error {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(208, 69, 69, 0.06);
}

/* Results */
.results { margin-top: 32px; }

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.results-toolbar h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
}

.results-actions { display: flex; gap: 10px; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
  font-family: inherit;
}

.btn:active { transform: translateY(1px); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-strong); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--border);
}

.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* File list */
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.file-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.file-meta {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-state {
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-state .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  display: inline-block;
}

.file-state.ready .dot { background: var(--success); }
.file-state.ready { color: var(--success); }
.file-state.error .dot { background: var(--danger); }
.file-state.error { color: var(--danger); }

.file-actions { display: flex; gap: 8px; flex-shrink: 0; }

.file-download {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.file-download:hover:not(:disabled) { background: var(--border); }
.file-download:disabled { opacity: 0.4; cursor: not-allowed; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.site-footer p { margin: 0; }

/* Lead funnel */
.site-footer .site-footer-promo {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

.site-footer-promo a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.results-upsell {
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.results-upsell p { margin: 0; }

.results-upsell a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 16px 16px 48px; }
  .site-header { padding: 14px 16px; }
  .dropzone-inner { padding: 40px 16px; }
  .results-toolbar { flex-direction: column; align-items: stretch; }
  .results-actions { justify-content: stretch; }
  .results-actions .btn { flex: 1; }
  .file-item { flex-wrap: wrap; }
}
