/* ==========================================================================
   FaxLock — Dark 3D Glassmorphism Theme
   ========================================================================== */

:root {
  --bg: #0B1120;
  --bg-soft: #0F172A;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --primary: #14B8A6;
  --primary-dark: #0D9488;
  --primary-glow: rgba(20, 184, 166, 0.4);
  --primary-soft: rgba(20, 184, 166, 0.1);
  --danger: #F87171;
  --warning: #FBBF24;
  --success: #10B981;
  --radius: 20px;
  --radius-lg: 32px;
  --radius-sm: 12px;
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.5);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Theme-swappable tokens */
  --glass-bg: rgba(15, 23, 42, 0.95);
  --input-bg: rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(11, 17, 32, 0.7);
  --overlay-bg: rgba(11, 17, 32, 0.85);
  --grid-line: rgba(20, 184, 166, 0.04);
  --orb-opacity: var(--orb-opacity);
  --btn-text: #0B1120;
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-soft: #F1F5F9;
  --surface: rgba(15, 23, 42, 0.03);
  --surface-hover: rgba(15, 23, 42, 0.06);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  --primary: #0D9488;
  --primary-dark: #0F766E;
  --primary-glow: rgba(13, 148, 136, 0.3);
  --primary-soft: rgba(13, 148, 136, 0.1);

  --glass-bg: rgba(255, 255, 255, 0.95);
  --input-bg: rgba(15, 23, 42, 0.04);
  --nav-bg: rgba(248, 250, 252, 0.85);
  --overlay-bg: rgba(248, 250, 252, 0.85);
  --grid-line: rgba(13, 148, 136, 0.1);
  --orb-opacity: 0.18;
  --shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.12);
  --btn-text: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #5EEAD4; }

/* ── Background Effects ── */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: var(--orb-opacity);
  pointer-events: none;
  animation: float 14s infinite ease-in-out alternate;
}
.orb-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.orb-2 { width: 320px; height: 320px; background: #06B6D4; bottom: -80px; right: -80px; animation-delay: -4s; }
.orb-3 { width: 280px; height: 280px; background: #0EA5E9; top: 45%; left: 45%; animation-delay: -8s; opacity: 0.15; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 50px) scale(1.1); }
}

.shard {
  position: fixed;
  border: 1px solid rgba(20, 184, 166, 0.25);
  background: rgba(20, 184, 166, 0.04);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
  pointer-events: none;
  animation: float-shard 8s infinite ease-in-out alternate;
}
.shard-1 { width: 60px; height: 60px; top: 20%; left: 6%; animation-delay: 0s; border-radius: 12px; transform: rotate(15deg); }
.shard-2 { width: 40px; height: 40px; top: 65%; right: 8%; animation-delay: -3s; border-radius: 50%; }
.shard-3 { width: 80px; height: 80px; bottom: 12%; left: 28%; animation-delay: -6s; border-radius: 16px; transform: rotate(45deg); }

@keyframes float-shard {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(20px, -30px) rotate(15deg); }
}

/* ── Theme Toggle Button ── */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: rotate(15deg);
}
.theme-toggle .theme-icon-light { display: none; }
.theme-toggle .theme-icon-dark { display: inline; }
[data-theme="light"] .theme-toggle .theme-icon-light { display: inline; }
[data-theme="light"] .theme-toggle .theme-icon-dark { display: none; }

/* ── Logo (blend-mode integration) ── */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
}
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.logo:hover .logo-img {
  transform: scale(1.06);
}
/* Light mode: multiply makes white backgrounds disappear */

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  line-height: 1;
}

/* ── Header / Nav ── */
#mainHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 20px var(--primary-glow);
}
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }

#mainHeader nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
#mainHeader nav > a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
#mainHeader nav > a:hover { color: var(--text); }

.lang-switcher { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 3px; }
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 99px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active { background: var(--primary); color: var(--btn-text); }
.lang-btn:hover:not(.active) { color: var(--text); }

.btn-primary {
  background: var(--primary);
  color: var(--btn-text) !important;
  padding: 10px 22px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 24px var(--primary-glow); color: var(--btn-text) !important; }

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 48px 60px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  gap: 60px;
}
.hero-left { flex: 1; max-width: 620px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.25);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.badge .dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px var(--primary); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }

.hero-left h1 {
  font-size: 60px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  text-shadow: 0 0 80px var(--primary-glow);
}
.hero-left h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-left > p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}

.features { display: flex; flex-direction: column; gap: 12px; }
.feature { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 15px; }
.feature-icon {
  width: 22px; height: 22px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Widget (Glass Card) ── */
.widget-container {
  flex: 1;
  max-width: 480px;
  perspective: 1000px;
}
.widget {
  background: var(--glass-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(20, 184, 166, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s;
}
.widget:hover {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 40px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.widget-title { font-size: 20px; font-weight: 700; color: var(--text); }
.widget-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.widget-icon {
  width: 40px; height: 40px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ── Steps Indicator ── */
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s;
}
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s;
}
.step.active { color: var(--primary); }
.step.active .step-num { background: var(--primary); color: var(--btn-text); border-color: var(--primary); box-shadow: 0 0 16px var(--primary-glow); }
.step.completed .step-num { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.step.completed { color: var(--primary); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}
.step-line.completed { background: var(--primary); }

/* ── Step Content ── */
.step-content { display: none; }
.step-content.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-label .optional { color: var(--text-dim); font-weight: 400; }

.form-input, .form-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 0 20px var(--primary-glow);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }

textarea.form-input { resize: vertical; min-height: 80px; }

.input-group {
  display: flex;
  align-items: stretch;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 0 20px var(--primary-glow);
}
.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  border-right: 1px solid var(--border);
}
.input-group .form-input {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.input-group .form-input:focus { box-shadow: none; }

.input-error {
  display: none;
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}
.input-error.show { display: block; }

.file-hint, .optional { font-size: 12px; color: var(--text-dim); }

/* ── File Drop ── */
.file-drop {
  border: 2px dashed rgba(20, 184, 166, 0.35);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(20, 184, 166, 0.04);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  position: relative;
}
.file-drop:hover, .file-drop.drag-over {
  background: rgba(20, 184, 166, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.file-drop.has-file { border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.file-icon { font-size: 32px; margin-bottom: 10px; }
.file-drop #fileText { color: var(--text); font-weight: 600; font-size: 15px; }
.file-drop .file-name { font-weight: 700; color: var(--primary); margin-bottom: 4px; word-break: break-all; }
.file-drop .file-meta { font-size: 12px; color: var(--text-muted); }
.file-drop input[type="file"] { display: none; }

.file-progress { display: none; height: 4px; background: var(--border); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.file-progress-bar { height: 100%; width: 0%; background: var(--primary); transition: width 0.3s; }

/* ── PDF Preview ── */
.pdf-preview-container {
  display: none;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 18px;
}
.pdf-preview-container.show { display: block; }
.pdf-preview-canvas { width: 100%; height: auto; border-radius: 8px; display: block; max-height: 200px; object-fit: contain; }
.pdf-meta { display: flex; gap: 8px; margin-top: 10px; justify-content: center; flex-wrap: wrap; }
.pdf-meta-badge {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Cover Page ── */
.cover-page-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  cursor: pointer;
}
.cover-page-toggle input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.cover-page-toggle label { color: var(--text-muted); font-size: 13px; cursor: pointer; }

.cover-page-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.cover-page-form.show { max-height: 500px; }

.cover-preview-box {
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 16px;
}

/* ── Buttons ── */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 30px var(--primary-glow); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-back:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.btn-row { display: flex; gap: 12px; margin-top: 20px; }
.btn-row .btn-submit { flex: 1; }

/* ── Review Box ── */
.review-box {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.review-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: 12px;
}
.review-row:last-child { border-bottom: none; }
.review-label { color: var(--text-muted); font-weight: 500; }
.review-value { color: var(--text); font-weight: 600; text-align: right; word-break: break-word; }
.review-value a { color: var(--primary); font-size: 12px; margin-left: 6px; font-weight: 500; }

/* ── Promo / Price ── */
.promo-row { display: flex; gap: 8px; }
.promo-row .form-input { flex: 1; }
.promo-message { font-size: 13px; margin-top: 6px; }
.promo-message.success { color: var(--success); }
.promo-message.error { color: var(--danger); }

.price-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.price-left { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.price-right { font-size: 32px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }

.hint-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 16px;
  line-height: 1.8;
}
.hint-text .lock { color: var(--primary); }

/* ── Spinner ── */
.spinner { display: none; text-align: center; padding: 20px 0; color: var(--text-muted); font-size: 14px; }
.spinner.show { display: block; }
.spinner-ring {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result ── */
.result {
  display: none;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
}
.result.show { display: block; animation: fadeIn 0.4s ease; }
.result.success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: #6EE7B7; }
.result.warning { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); color: #FCD34D; }
.result strong { display: block; margin-bottom: 8px; font-size: 16px; color: var(--text); }

.preview-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

/* ── Light Theme Result Boxes ── */
[data-theme="light"] .result.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #065F46;
}
[data-theme="light"] .result.success strong { color: #064E3B; }

[data-theme="light"] .result.warning {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.35);
  color: #92400E;
}
[data-theme="light"] .result.warning strong { color: #78350F; }

[data-theme="light"] .result a,
[data-theme="light"] .preview-link { color: var(--primary-dark); }

[data-theme="light"] .result b,
[data-theme="light"] .result strong b { color: #78350F; }

/* ── Light Theme Promo Message ── */
[data-theme="light"] .promo-message.success { color: #047857; }
[data-theme="light"] .promo-message.error { color: #B91C1C; }

/* ── Light Theme Stripe Error ── */
[data-theme="light"] #stripe-error { color: #B91C1C !important; }

/* ── Light Theme Toast ── */
[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.98);
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

/* ── Light Theme Spinner Ring ── */
[data-theme="light"] .spinner-ring { border-color: rgba(15, 23, 42, 0.1); border-top-color: var(--primary); }

/* ── Light Theme Transmitting Modal text ── */
[data-theme="light"] .transmitting-title { color: #0F172A; }
[data-theme="light"] .transmitting-subtitle { color: #475569; }

/* ── Modals ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.3s ease; }
.modal {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(20, 184, 166, 0.15);
}
.modal-wide { max-width: 640px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.modal-title { font-size: 20px; font-weight: 700; }
.modal-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--surface-hover); color: var(--text); }

.stripe-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
#stripe-card-element {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.btn-pay {
  width: 100%;
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn-pay:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 30px var(--primary-glow); }
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Email Preview Modal ── */
.email-preview-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.email-preview-header-row { display: flex; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.email-preview-header-label { color: var(--text-muted); min-width: 60px; font-weight: 500; }
.email-preview-header-value { color: var(--text); font-weight: 600; word-break: break-all; }
.email-preview-body {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
.email-preview-footer { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Transmitting ── */
.transmitting { padding: 20px 0; }
.transmitting-title { font-size: 20px; font-weight: 700; margin: 16px 0 8px; }
.transmitting-subtitle { font-size: 14px; color: var(--text-muted); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  min-width: 260px;
  max-width: 380px;
  pointer-events: auto;
}
.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast-error { border-color: rgba(248, 113, 113, 0.4); }
.toast-warning { border-color: rgba(251, 191, 36, 0.4); }
.toast-info { border-color: rgba(20, 184, 166, 0.4); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ── Stats / Pricing ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding: 60px 48px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--primary-glow);
}
.stat-number {
  font-size: 44px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}
.stat-number span { color: var(--text); font-weight: 600; }
.stat-label { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Use Cases / How it works ── */
.use-cases {
  padding: 60px 48px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.section-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.case-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--primary-glow);
}
.case-number {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 48px;
  font-weight: 800;
  color: rgba(20, 184, 166, 0.1);
  line-height: 1;
}
.case-icon {
  width: 56px; height: 56px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  box-shadow: 0 0 24px var(--primary-glow);
}
.case-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.case-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ── FAQ ── */
.faq-section {
  padding: 60px 48px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.faq-item {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: rgba(20, 184, 166, 0.3); }
.faq-question {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--primary); }
.faq-question::after { content: '+'; font-size: 24px; color: var(--primary); font-weight: 300; transition: transform 0.3s; }
.faq-question.open::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.faq-answer-content { padding-bottom: 20px; }

/* ── Footer ── */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 10;
  margin-top: 60px;
}
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { font-size: 13px; color: var(--text-dim); line-height: 1.8; }

/* ── Cookie Banner ── */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 600px;
  width: calc(100% - 40px);
  z-index: 900;
  box-shadow: var(--shadow-lg);
  align-items: center;
  gap: 16px;
}
.cookie-banner.show { display: flex; }
.cookie-text { flex: 1; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.cookie-text strong { color: var(--text); }
.cookie-text a { color: var(--primary); }
.cookie-btn {
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  padding: 10px 20px;
  border-radius: 99px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-2px); box-shadow: 0 0 20px var(--primary-glow); }

/* ── Scroll Animations ── */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 968px) {
  .grid-bg, .shard { display: none; }
  #mainHeader { padding: 16px 20px; }
  #mainHeader nav { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .hero { flex-direction: column; padding: 40px 20px; gap: 40px; }
  .hero-left h1 { font-size: 38px; letter-spacing: -1px; }
  .hero-left > p { font-size: 15px; }
  .widget { padding: 20px; }
  .stats, .use-cases, .faq-section { padding: 40px 20px; }
  .section-title { font-size: 28px; }
  .toast-container { right: 12px; left: 12px; }
  .toast { min-width: auto; width: 100%; }
  .cookie-banner { flex-direction: column; text-align: center; }
}


/* ── Compact Upload Success State ── */
.file-drop.has-file {
  min-height: auto !important;
  padding: 16px 24px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px;
}

/* Ensure the text and meta data sit inline nicely */
.file-drop.has-file .file-meta,
.file-drop.has-file #fileText {
  margin: 0 !important;
  line-height: 1.2;
}

/* If the checkmark icon needs a specific size */
.file-drop.has-file .file-icon {
  font-size: 24px;
  margin: 0 !important;
}
