/* ============================================================
   TextLens OCR — Global Stylesheet
   Design: Refined dark-mode-first SaaS aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:           #0d0f14;
  --bg-2:         #13161e;
  --bg-3:         #1a1e2a;
  --surface:      #1f2435;
  --surface-2:    #252a3a;
  --border:       rgba(255,255,255,0.07);
  --border-2:     rgba(255,255,255,0.12);
  --accent:       #00e5c3;
  --accent-dim:   rgba(0,229,195,0.12);
  --accent-glow:  rgba(0,229,195,0.25);
  --text-primary: #eef0f6;
  --text-secondary:#8b93b0;
  --text-muted:   #545d7a;
  --error:        #ff5f7e;
  --error-bg:     rgba(255,95,126,0.1);
  --success:      #00e5c3;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.3);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.5);
  --shadow-accent:0 0 40px rgba(0,229,195,0.15);
  --transition:   all 0.22s cubic-bezier(0.4,0,0.2,1);
  --nav-height:   68px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

[data-theme="light"] {
  --bg:           #f4f6fb;
  --bg-2:         #edf0f7;
  --bg-3:         #e5e9f3;
  --surface:      #ffffff;
  --surface-2:    #f8f9fc;
  --border:       rgba(0,0,0,0.07);
  --border-2:     rgba(0,0,0,0.13);
  --accent:       #00b89d;
  --accent-dim:   rgba(0,184,157,0.10);
  --accent-glow:  rgba(0,184,157,0.20);
  --text-primary: #111827;
  --text-secondary:#4b5680;
  --text-muted:   #8d96b5;
  --error:        #e0395a;
  --error-bg:     rgba(224,57,90,0.08);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.1);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.12);
  --shadow-accent:0 0 40px rgba(0,184,157,0.12);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.85; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-secondary); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Noise Overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="light"] .navbar {
  background: rgba(244,246,251,0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #0099ff);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0,229,195,0.35);
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 17px;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-2);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-md);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text-primary);
  background: var(--surface);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(0,229,195,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,195,0.2);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 18px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 48px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   OCR TOOL CARD
   ============================================================ */
.tool-section {
  padding-bottom: 80px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  position: relative;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

/* Upload Panel */
.upload-panel {
  padding: 36px;
  border-bottom: 1px solid var(--border);
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.panel-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  transition: var(--transition);
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--bg-3);
}

.drop-zone.drag-over::before { opacity: 1; }

.drop-zone.has-image {
  border-style: solid;
  border-color: var(--accent);
  padding: 16px;
}

.drop-icon {
  width: 64px;
  height: 64px;
  background: var(--surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.drop-zone:hover .drop-icon {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.drop-zone h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.drop-zone p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.drop-zone .or-divider {
  font-size: 0.78rem;
  color: var(--text-muted);
  position: relative;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}

.drop-zone .or-divider::before,
.drop-zone .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-2);
}

/* Preview */
#preview-container {
  display: none;
  position: relative;
}

#preview-container.visible { display: block; }

#image-preview {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.preview-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0d1a17;
  font-weight: 600;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 28px var(--accent-glow);
  opacity: 0.95;
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-2);
}

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

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(255,95,126,0.2);
}

.btn-danger:hover {
  background: rgba(255,95,126,0.18);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 7px 14px;
  gap: 6px;
}

.btn-lg {
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 16px;
}

#file-input { display: none; }

/* Upload Actions */
.upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.action-left { display: flex; gap: 10px; flex-wrap: wrap; }
.action-right { display: flex; gap: 10px; }

/* ── OCR Button ── */
#ocr-btn {
  min-width: 180px;
  justify-content: center;
}

/* ============================================================
   PROGRESS / LOADING
   ============================================================ */
.progress-wrap {
  padding: 20px 36px;
  border-bottom: 1px solid var(--border);
  display: none;
}

.progress-wrap.visible { display: block; }

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-pct {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.progress-bar-track {
  width: 100%;
  height: 4px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #0099ff);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================================
   OUTPUT PANEL
   ============================================================ */
.output-panel {
  padding: 36px;
}

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

.output-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#output-box {
  width: 100%;
  min-height: 220px;
  max-height: 480px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

#output-box:focus { border-color: var(--border-2); }

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text-muted);
  font-family: var(--font-body);
  gap: 10px;
  text-align: center;
}

.output-placeholder .placeholder-icon { font-size: 36px; opacity: 0.4; }
.output-placeholder p { font-size: 0.88rem; color: var(--text-muted); }

.output-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 320px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon { font-size: 18px; }
.toast-msg { font-size: 0.88rem; color: var(--text-primary); font-weight: 500; }

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }

/* ============================================================
   ERROR BANNER
   ============================================================ */
.error-banner {
  margin: 0 36px 16px;
  background: var(--error-bg);
  border: 1px solid rgba(255,95,126,0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  display: none;
}

.error-banner.visible { display: flex; }
.error-banner .err-icon { color: var(--error); font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.error-banner .err-text { font-size: 0.88rem; color: var(--error); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 { margin-bottom: 14px; }
.section-header p { max-width: 520px; margin: 0 auto; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step-num {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--border);
  position: absolute;
  top: 16px;
  right: 20px;
  line-height: 1;
  transition: var(--transition);
}

.step-card:hover .step-num { color: var(--accent-dim); }

.step-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(0,229,195,0.2);
}

.step-card h3 { font-size: 1.05rem; margin-bottom: 8px; }

/* ============================================================
   FEATURES
   ============================================================ */
.features-bg {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-item {
  padding: 28px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.feature-item:hover {
  background: var(--surface);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature-item h4 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.feature-item p { font-size: 0.88rem; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open { border-color: var(--accent); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  gap: 16px;
  transition: var(--transition);
}

.faq-q:hover { color: var(--accent); }

.faq-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--accent); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s ease;
}

.faq-item.open .faq-a { max-height: 500px; }

.faq-a p {
  padding: 0 22px 20px;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 14px; }

.footer-brand p {
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.7;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   INNER PAGE HEADER (About, Privacy, etc.)
   ============================================================ */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}

.page-hero .section-tag { margin-bottom: 10px; }

.page-hero h1 { margin-bottom: 12px; }

.page-hero p {
  max-width: 580px;
  font-size: 1rem;
}

/* ============================================================
   CONTENT PAGES (About, Privacy, Disclaimer)
   ============================================================ */
.content-body {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.content-body h2 {
  font-size: 1.4rem;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.content-body h3 {
  font-size: 1.05rem;
  margin-top: 28px;
  margin-bottom: 10px;
}

.content-body p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.content-body ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-body ul li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.7;
}

.content-body a { color: var(--accent); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.team-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), #0099ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}

.value-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.value-icon { font-size: 24px; margin-bottom: 12px; }
.value-card h4 { margin-bottom: 8px; }
.value-card p { font-size: 0.88rem; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 80px;
}

.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: fit-content;
}

.contact-info-card h3 { margin-bottom: 20px; }

.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child { border-bottom: none; }

.info-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.info-text h5 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-text p {
  font-size: 0.92rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.contact-form-card h3 { margin-bottom: 24px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ============================================================
   CTA STRIP
   ============================================================ */
.cta-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 52px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.cta-strip::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.cta-strip h2 { font-size: 1.8rem; margin-bottom: 8px; }
.cta-strip p { max-width: 400px; }
.cta-right { flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about-values { grid-template-columns: 1fr; }
  .cta-strip { flex-direction: column; text-align: center; }
  .cta-strip p { max-width: 100%; }
}

@media (max-width: 640px) {
  :root { --nav-height: 60px; }
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 36px; }
  .section { padding: 56px 0; }
  .upload-panel,
  .output-panel { padding: 24px 20px; }
  .progress-wrap { padding: 16px 20px; }
  .error-banner { margin: 0 20px 16px; }
  .upload-actions { flex-direction: column; }
  .action-left, .action-right { width: 100%; }
  .action-left .btn, .action-right .btn { flex: 1; justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .output-actions { flex-wrap: wrap; }
  .output-actions .btn { flex: 1; min-width: 0; justify-content: center; }
  .cta-strip { padding: 32px 24px; }
  .contact-form-card { padding: 24px 20px; }
  .contact-info-card { padding: 24px 20px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.d-none { display: none !important; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Fade-in animation for page load */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeUp 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

.animate-up:nth-child(2) { animation-delay: 0.1s; }
.animate-up:nth-child(3) { animation-delay: 0.2s; }
.animate-up:nth-child(4) { animation-delay: 0.3s; }
