/* Upload page styles */
.upload-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.upload-nav {
  padding: 1.25rem 4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}
.upload-nav-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}
.upload-nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }

.upload-hero {
  padding: 5rem 4rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.upload-hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.upload-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.upload-hero p {
  color: var(--fg-muted);
  font-size: 1.0625rem;
  max-width: 48ch;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* Drop zone */
.drop-zone {
  max-width: 680px;
  margin: 0 auto;
  border: 2px dashed var(--border);
  border-radius: 4px;
  padding: 4rem 2rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  background: var(--card);
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(212, 96, 58, 0.04);
}
.drop-zone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  color: var(--fg-muted);
}
.drop-zone h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.drop-zone p {
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-zone .formats {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

/* Progress */
.upload-progress {
  max-width: 680px;
  margin: 2rem auto 0;
  display: none;
}
.upload-progress.show { display: block; }
.progress-indicator-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.status-spinner {
  width: 22px;
  height: 22px;
  color: var(--accent);
  animation: spin-rotate 1s linear infinite;
  flex-shrink: 0;
}
@keyframes spin-rotate {
  to { transform: rotate(360deg); }
}
.progress-bar-wrap {
  background: var(--bg-alt);
  border-radius: 2px;
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}
.progress-status {
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-align: center;
}
.progress-status strong { color: var(--fg); }

/* Error */
.upload-error {
  max-width: 680px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.5rem;
  background: rgba(212, 96, 58, 0.08);
  border: 1px solid rgba(212, 96, 58, 0.3);
  border-radius: 2px;
  display: none;
  color: var(--accent);
  font-size: 0.9rem;
}
.upload-error.show { display: block; }

/* Done state */
.done-state {
  max-width: 640px;
  margin: 0 auto;
  display: none;
}
.done-state.show { display: block; }
.done-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2.5rem;
  text-align: center;
}
.done-check {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  background: rgba(212, 96, 58, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.done-card h2 {
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}
.done-card p { color: var(--fg-muted); margin-bottom: 2rem; font-size: 0.9375rem; }
.quality-table {
  text-align: left;
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 2rem;
}
.quality-table td {
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.quality-table td:first-child { color: var(--fg-muted); }
.quality-table td:last-child { color: var(--fg); font-weight: 500; text-align: right; }
.download-btn {
  display: inline-block;
  background: var(--fg);
  color: var(--fg-light);
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}
.download-btn:hover { background: var(--fg-muted); }
.try-again {
  display: block;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  text-decoration: none;
}
.try-again:hover { color: var(--fg); }

/* Onboarding overlay */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,25,23,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboarding-tooltip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(26,25,23,0.15);
}
.onboarding-tooltip-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.onboarding-tooltip h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--fg);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.onboarding-tooltip p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.onboarding-steps {
  list-style: none;
  margin-bottom: 1.5rem;
}
.onboarding-steps li {
  font-size: 0.875rem;
  color: var(--fg);
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.onboarding-steps li::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(212,96,58,0.1);
  border: 1px solid rgba(212,96,58,0.3);
  flex-shrink: 0;
}
.onboarding-time {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.onboarding-time-icon {
  color: var(--fg-muted);
  flex-shrink: 0;
}
.onboarding-time-text {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  line-height: 1.5;
}
.onboarding-time-text strong { color: var(--fg); }
.onboarding-cta {
  display: block;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  width: 100%;
  transition: background 0.2s;
}
.onboarding-cta:hover { background: var(--accent-warm); }

/* Drop zone tooltip ring */
.drop-zone.has-tooltip {
  position: relative;
}
.drop-zone-hint {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  animation: hint-bounce 1.5s ease-in-out infinite;
  letter-spacing: 0.02em;
}
.drop-zone-hint::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent);
}
@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

/* Spacer */
.upload-spacer { flex: 1; }

/* Footer */
.upload-footer {
  padding: 2rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.upload-footer-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}
.upload-footer-note { font-size: 0.8125rem; color: var(--fg-muted); }

@media (max-width: 768px) {
  .upload-nav { padding: 1.25rem 2rem; }
  .upload-hero { padding: 3rem 2rem 2rem; }
  .drop-zone { padding: 3rem 1.5rem; }
  .upload-footer { padding: 2rem; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}