/* ─── Reset & base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --brand:        #4F46E5;
  --brand-dark:   #3730A3;
  --brand-mid:    #6366F1;
  --brand-light:  #EEF2FF;
  --brand-ring:   #C7D2FE;

  --text:         #0F172A;
  --text-2:       #334155;
  --text-3:       #64748B;
  --text-4:       #94A3B8;

  --border:       #E2E8F0;
  --border-2:     #CBD5E1;

  --bg:           #FFFFFF;
  --bg-subtle:    #F8FAFC;
  --bg-muted:     #F1F5F9;

  --err:          #DC2626;
  --err-bg:       #FEF2F2;
  --err-ring:     #FECACA;

  --r-sm:  6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sh-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --sh:    0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .08);
  --sh-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .08);
  --sh-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .07);
  --sh-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .06);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; }
[hidden] { display: none !important; }

/* ─── Container ─── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--r);
  border: 2px solid transparent;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: var(--sh-md); }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: transparent;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--r);
  border: 2px solid var(--brand-ring);
  transition: background 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.btn-outline:hover { background: var(--brand-light); border-color: var(--brand); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }

.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* ─── Header / Nav ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(255 255 255 / .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.logo-icon { width: 28px; height: 28px; }
.logo span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-3);
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-muted); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
  margin-left: auto;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ─── Hero ─── */
.hero {
  background: linear-gradient(160deg, #EEF2FF 0%, #F5F3FF 40%, #F8FAFF 70%, #FFFFFF 100%);
  padding: 72px 24px 80px;
  text-align: center;
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px 5px 10px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--brand-ring);
  margin-bottom: 28px;
}
.hero-badge svg { width: 13px; height: 13px; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 60%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-3);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ─── Widget wrap ─── */
.widget-wrap { max-width: 600px; margin: 0 auto; }

/* ─── Upload zone (idle) ─── */
.upload-zone {
  background: var(--bg);
  border: 2px dashed var(--border-2);
  border-radius: var(--r-xl);
  padding: 48px 32px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  outline: none;
  box-shadow: var(--sh);
}
.upload-zone:hover,
.upload-zone:focus-visible {
  border-color: var(--brand-mid);
  background: var(--brand-light);
  box-shadow: 0 0 0 4px var(--brand-ring), var(--sh-md);
}
.upload-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 4px var(--brand-ring), var(--sh-lg);
  transform: scale(1.01);
}

.upload-zone-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.upload-icon-bg svg { width: 56px; height: 56px; }

.upload-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.upload-sub {
  font-size: 0.9rem;
  color: var(--text-3);
}

.upload-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.upload-link:hover { color: var(--brand-dark); }

.upload-hint {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-4);
  line-height: 1.6;
  transition: opacity 0.2s;
}

/* ─── Progress card ─── */
.progress-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--sh-lg);
}

.progress-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.file-thumb svg { width: 40px; height: 40px; flex-shrink: 0; }

.file-meta { flex: 1; min-width: 0; }

.file-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.78rem;
  color: var(--text-4);
  margin-top: 2px;
}

.cancel-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.cancel-btn svg { width: 16px; height: 16px; }
.cancel-btn:hover { background: var(--bg-muted); color: var(--err); }

.progress-track {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-mid) 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  0%   { opacity: 0; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}

.progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-status {
  font-size: 0.82rem;
  color: var(--text-3);
}

.progress-pct {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* ─── Error card ─── */
.error-card {
  background: var(--bg);
  border: 1px solid var(--err-ring);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  box-shadow: var(--sh-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.error-icon-wrap svg { width: 52px; height: 52px; }

.error-body { display: flex; flex-direction: column; gap: 6px; }

.error-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.error-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 420px;
}

.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.error-actions .btn-primary,
.error-actions .btn-outline {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

.error-meta {
  font-size: 0.72rem;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ─── Stats bar ─── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 20px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 36px;
  gap: 3px;
}
.stat-item strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-item span {
  font-size: 0.78rem;
  color: var(--text-4);
  font-weight: 500;
}

.stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ─── Generic section ─── */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-subtle); }

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  text-align: center;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  text-align: center;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-3);
  text-align: center;
  max-width: 480px;
  margin: 0 auto 56px;
  line-height: 1.7;
}

/* ─── Features grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: var(--sh-lg);
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--icon-bg);
  color: var(--icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.65;
}

/* ─── Steps / How it works ─── */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 240px;
  padding: 0 16px;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 2px solid var(--brand-ring);
}

.step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.65;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding-top: 14px;
  color: var(--text-4);
}
.step-arrow svg { width: 22px; height: 22px; }

/* ─── Pricing ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  align-items: start;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px 26px;
  position: relative;
  transition: box-shadow 0.2s;
}
.pricing-card:hover { box-shadow: var(--sh-lg); }

.pricing-card--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--sh-xl);
}

.pricing-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
}
.pricing-price strong {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.pricing-price span {
  font-size: 0.875rem;
  color: var(--text-4);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 24px;
}
.pricing-features li {
  font-size: 0.875rem;
  color: var(--text-2);
  padding-left: 22px;
  position: relative;
}
.feat-yes::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 700;
}
.feat-no {
  color: var(--text-4);
}
.feat-no::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--text-4);
}

.pricing-note {
  font-size: 0.75rem;
  color: var(--text-4);
  text-align: center;
  margin-top: 10px;
}

/* ─── Footer ─── */
.footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-top {
  display: flex;
  gap: 64px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand .logo span { font-size: 0.95rem; }
.footer-brand > p {
  font-size: 0.85rem;
  color: var(--text-3);
  line-height: 1.65;
}

.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.footer-social a svg { width: 16px; height: 16px; }
.footer-social a:hover { background: var(--brand-light); color: var(--brand); }

.footer-cols {
  flex: 1;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  min-width: 0;
}

.footer-col { flex: 1; min-width: 120px; }
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-3);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-4);
}

/* ─── Mobile menu overrides ─── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    box-shadow: var(--sh-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }

  .nav-actions { display: none; }

  .menu-btn {
    display: flex;
  }
  .menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn.open span:nth-child(2) { opacity: 0; }
  .menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .header { position: relative; }

  .stats-grid { gap: 4px 0; }
  .stat-sep { display: none; }
  .stat-item { padding: 8px 20px; }

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 0; }
  .step { max-width: 320px; }

  .footer-top { gap: 32px; }
  .footer-brand { flex: 0 0 100%; }

  .footer-bottom { flex-direction: column; text-align: center; }

  .hero { padding: 48px 20px 60px; }
}

@media (max-width: 480px) {
  .upload-zone { padding: 36px 20px; }
  .error-card { padding: 24px 20px; }
  .progress-card { padding: 18px; }
  .error-actions { flex-direction: column; }
  .error-actions .btn-primary,
  .error-actions .btn-outline { max-width: 100%; }
}
