/* VelvetCSV — Design System
 * Extends Industrial Precision (Gobvantage Standard)
 * Pure CSS, no framework, mobile-first, min-width 375px
 */

/* ── Fonts ───────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,18,400;1,18,500;1,18,600&display=swap');

/* ── Base Tokens (Industrial Precision — do not alter) ───────── */
:root {
  /* Surfaces */
  --color-bg:              #f7f9fb;
  --color-surface-low:     #f0f4f7;
  --color-surface-lowest:  #ffffff;

  /* Brand */
  --color-primary:         #4b6171;
  --color-primary-dim:     #3f5564;

  /* Text */
  --color-text-base:       #1a2630;
  --color-text-muted:      #5a7080;
  --color-text-on-primary: #f2f8ff;

  /* ── VelvetCSV product accent (slate-indigo "velvet" identity) */
  --color-velvet:          #4e4f7a;
  --color-velvet-dim:      #413263;

  /* Status */
  --color-status-green:    #2d6a4f;
  --color-status-green-bg: #e8f5ee;
  --color-status-orange:   #b45309;
  --color-status-orange-bg:#fef3e2;
  --color-status-error:    #991b1b;
  --color-status-error-bg: #fde8e8;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;

  /* Container */
  --container-max: 1100px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-base);
  background-color: var(--color-bg);
  min-width: 375px;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout helpers ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Typography ──────────────────────────────────────────────── */
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text-base);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--color-text-base);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--color-text-base);
}

.label-cap {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.text-small  { font-size: 0.75rem; }
.text-muted  { color: var(--color-text-muted); }
.text-mono   { font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace; font-size: 0.8125rem; }

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  background-color: var(--color-surface-lowest);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-base);
  text-decoration: none;
  line-height: 1;
}

.nav__brand:hover { text-decoration: none; }

.nav__brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.nav__brand-name {
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.nav__brand-name .wm-velvet {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text-base);
}

.nav__brand-name .wm-csv {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-velvet);
  margin-left: -1px;
}

/* Legacy dot kept hidden — replaced by SVG mark */
.nav__brand-dot { display: none; }

.nav__user-email {
  font-size: 0.75rem;
  color: var(--color-text-muted, #6b7280);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* free tier counter in nav */
.free-counter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.free-counter__bar {
  width: 60px;
  height: 4px;
  background-color: var(--color-surface-low);
  border-radius: 2px;
  overflow: hidden;
}

.free-counter__fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

.free-counter--warning .free-counter__text { color: var(--color-status-orange); }
.free-counter--warning .free-counter__fill  { background-color: var(--color-status-orange); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn--primary:hover { background-color: var(--color-primary-dim); text-decoration: none; }
.btn--primary:active { background-color: var(--color-velvet-dim); }

.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
  padding-inline: 12px;
}
.btn--ghost:hover {
  text-decoration: none;
  color: var(--color-primary-dim);
  background-color: var(--color-surface-low);
}

.btn--lg {
  padding: 13px 28px;
  font-size: 1rem;
}

.btn--full { width: 100%; }

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  position: relative;
  background-color: #1a2630;
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 11vw, 140px);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(78, 79, 122, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 15% 90%, rgba(75, 97, 113, 0.45) 0%, transparent 55%),
    linear-gradient(180deg, #1a2630 0%, #15202a 100%);
  z-index: -1;
}

.hero__bg::after {
  /* subtle grid texture */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 248, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 248, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 80%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-block;
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 248, 255, 0.55);
  padding: 6px 12px;
  border: 1px solid rgba(242, 248, 255, 0.14);
  border-radius: 999px;
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--color-text-on-primary);
  text-wrap: balance;
}

.hero__title-accent {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #d8c8ff 0%, #a9b8d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1,
.hero__subtitle {
  color: var(--color-text-on-primary);
}

.hero h1 .wm-velvet {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.hero h1 .wm-csv {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero__subtitle {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(242, 248, 255, 0.72);
  margin-top: var(--space-lg);
  max-width: 480px;
}

.hero__subtitle .wm-velvet {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: #fff;
}
.hero__subtitle .wm-csv {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #d8c8ff;
}

.hero__cta {
  margin-top: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.hero__cta .btn--primary {
  background-color: #ffffff;
  color: #1a2630;
}
.hero__cta .btn--primary:hover {
  background-color: #d8c8ff;
}

.btn__arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform var(--transition-fast);
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.hero__secondary {
  font-size: 0.9375rem;
  color: rgba(242, 248, 255, 0.7);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 248, 255, 0.25);
  padding-bottom: 2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.hero__secondary:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-decoration: none;
}

.hero--compact { padding: var(--space-xl) 0; }
.hero--compact h1 { font-size: 1.75rem; }
.hero--compact .hero__subtitle { margin-top: var(--space-sm); }

.hero__trust {
  margin-top: var(--space-xl);
  font-size: 0.75rem;
  color: rgba(242, 248, 255, 0.45);
  letter-spacing: 0.04em;
  line-height: 1.7;
}
.hero__trust strong {
  color: rgba(242, 248, 255, 0.78);
  font-weight: 500;
}

/* ── Hero Visual: Before/After CSV ──────────────────────────── */
.hero__viz {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.hero-viz {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  color: rgba(242, 248, 255, 0.85);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
  transform: perspective(1200px) rotateY(-4deg);
  transform-origin: right center;
}

.hero-viz--after {
  transform: perspective(1200px) rotateY(4deg) translateY(-8px);
  transform-origin: left center;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(216, 200, 255, 0.25);
}

.hero-viz__chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-viz__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
}

.hero-viz__filename {
  margin-left: 6px;
  font-size: 0.625rem;
  color: rgba(242, 248, 255, 0.55);
  letter-spacing: 0.02em;
}

.hero-viz__badge {
  margin-left: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #2d6a4f;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
}

.hero-viz__rows {
  padding: 4px 0;
}

.hero-viz__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.hero-viz__row > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-viz__row--head {
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 248, 255, 0.45);
  border-top: none;
  padding-top: 8px;
  padding-bottom: 8px;
}

.hero-viz__row--messy {
  color: rgba(242, 248, 255, 0.55);
}
.hero-viz__row--messy span:nth-child(2) {
  color: rgba(242, 248, 255, 0.7);
}
.hero-viz__row--messy span:nth-child(3) {
  color: rgba(242, 248, 255, 0.4);
  font-style: italic;
}

.hero-viz--after .hero-viz__row {
  grid-template-columns: 0.9fr 1.4fr 0.7fr;
}

.hero-viz__row--clean {
  color: rgba(242, 248, 255, 0.92);
}
.hero-viz__row--clean span:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hero-viz__arrow {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d8c8ff 0%, #a9b8d6 100%);
  color: #1a2630;
  border-radius: 50%;
  box-shadow: 0 8px 20px -4px rgba(216, 200, 255, 0.5);
  z-index: 1;
}
.hero-viz__arrow svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 880px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .hero__copy { text-align: center; }
  .hero__copy .hero__subtitle { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__viz { max-width: 540px; margin-inline: auto; }
}

.hero--compact { padding: var(--space-xl) 0; }
.hero--compact h1 { font-size: 1.75rem; }
.hero--compact .hero__subtitle { margin-top: var(--space-sm); }

/* ── How It Works ────────────────────────────────────────────── */
.how-it-works {
  background-color: var(--color-surface-low);
  padding: var(--space-2xl) 0;
}

.how-it-works__intro {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: calc(var(--space-xl) * -1 + var(--space-md)) auto 0;
  font-size: 0.9375rem;
}

.how-it-works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  align-items: start;
}

.step {
  text-align: left;
  position: relative;
  padding-top: 4px;
}

.step__icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__icon-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-velvet));
  opacity: 0.08;
}

.step__icon {
  width: 26px;
  height: 26px;
  color: var(--color-velvet);
  position: relative;
  transition: transform 300ms ease;
}

.step--active .step__icon-wrap::before {
  opacity: 0.18;
}
.step--active .step__icon {
  transform: scale(1.06);
}
.step--active .step__title {
  color: var(--color-velvet);
}

.step__number {
  position: absolute;
  top: 0;
  right: 0;
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
  margin-bottom: 0;
  display: inline-block;
}

.step__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.step__desc {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ── How It Works · Animated demo ────────────────────────────── */
.how-demo {
  margin: var(--space-2xl) auto 0;
  max-width: 760px;
  background-color: var(--color-surface-lowest);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(26, 38, 48, 0.04),
    0 12px 40px -12px rgba(26, 38, 48, 0.18);
  overflow: hidden;
  position: relative;
}

.how-demo__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background-color: var(--color-surface-low);
  border-bottom: 1px solid rgba(26, 38, 48, 0.05);
}

.how-demo__chrome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(26, 38, 48, 0.15);
}

.how-demo__chrome-label {
  margin-left: 10px;
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.how-demo__progress {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.how-demo__progress-pip {
  width: 18px;
  height: 3px;
  background-color: rgba(26, 38, 48, 0.12);
  border-radius: 2px;
  transition: background-color 400ms ease;
}

.how-demo__progress-pip.is-active {
  background-color: var(--color-velvet);
}

.how-demo__stage {
  position: relative;
  height: 360px;
  background-color: var(--color-surface-lowest);
  overflow: hidden;
}

.how-demo__scene {
  position: absolute;
  inset: 0;
  padding: var(--space-xl) var(--space-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
  pointer-events: none;
}

.how-demo__scene.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Scene 1 — Upload */
.demo-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.demo-upload__zone {
  width: 100%;
  max-width: 420px;
  background-color: var(--color-surface-low);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  transition: background-color 300ms ease;
}

.demo-upload__zone::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--color-text-muted);
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 300ms ease, border-color 300ms ease;
}

.is-active .demo-upload__zone--dragging {
  background-color: #ddeaf4;
}

.is-active .demo-upload__zone--dragging::after {
  opacity: 1;
  border-color: var(--color-primary);
}

.demo-upload__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto var(--space-sm);
  color: var(--color-text-muted);
  transition: color 300ms ease, transform 300ms ease;
}

.is-active .demo-upload__zone--dragging .demo-upload__icon {
  color: var(--color-primary);
  transform: translateY(-4px);
}

.demo-upload__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-base);
}

.demo-upload__sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Floating CSV file ghost that drops into the zone */
.demo-upload__file {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-surface-lowest);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-base);
  box-shadow: 0 6px 18px -6px rgba(26, 38, 48, 0.25);
  opacity: 0;
}

.is-active .demo-upload__file {
  animation: demo-file-drop 2200ms ease-in-out infinite;
}

@keyframes demo-file-drop {
  0%   { opacity: 0; transform: translate(-50%, -40px) rotate(-3deg); }
  18%  { opacity: 1; transform: translate(-50%, -40px) rotate(-3deg); }
  55%  { opacity: 1; transform: translate(-50%,  62px) rotate(0deg); }
  75%  { opacity: 0; transform: translate(-50%,  62px) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -40px) rotate(-3deg); }
}

.demo-upload__file-glyph {
  width: 12px;
  height: 14px;
  color: var(--color-velvet);
}

/* Scene 2 — Verify (column mapper) */
.demo-verify {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  height: 100%;
}

.demo-verify__detected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-status-green-bg);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-status-green);
  align-self: flex-start;
}

.demo-verify__check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-status-green);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
}

.demo-verify__mapper {
  background-color: var(--color-surface-low);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 1;
}

.demo-verify__head {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 8px;
  padding: 8px 14px;
  background-color: rgba(26, 38, 48, 0.04);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.demo-verify__row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 0.8125rem;
  background-color: var(--color-surface-lowest);
  border-top: 1px solid rgba(26, 38, 48, 0.04);
  opacity: 0;
  transform: translateX(-6px);
}

.is-active .demo-verify__row {
  animation: demo-row-in 500ms ease forwards;
}

.is-active .demo-verify__row:nth-child(1) { animation-delay: 200ms; }
.is-active .demo-verify__row:nth-child(2) { animation-delay: 380ms; }
.is-active .demo-verify__row:nth-child(3) { animation-delay: 560ms; }
.is-active .demo-verify__row:nth-child(4) { animation-delay: 740ms; }

@keyframes demo-row-in {
  to { opacity: 1; transform: translateX(0); }
}

.demo-verify__chip {
  display: inline-flex;
  align-items: center;
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.75rem;
  background-color: var(--color-surface-low);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  position: relative;
  overflow: hidden;
  align-self: center;
  justify-self: start;
}

.demo-verify__chip::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background-color: var(--color-status-green);
}

.demo-verify__chip--review::before {
  background-color: var(--color-status-orange);
}

.demo-verify__arrow {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.demo-verify__field {
  font-size: 0.8125rem;
  color: var(--color-text-base);
  font-weight: 500;
  align-self: center;
}

/* Scene 3 — Download */
.demo-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--space-md);
  position: relative;
}

.demo-download__file {
  width: 96px;
  height: 120px;
  background-color: var(--color-surface-lowest);
  border-radius: 8px;
  box-shadow: 0 8px 24px -8px rgba(26, 38, 48, 0.25);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(26, 38, 48, 0.06);
}

.demo-download__file::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 24px;
  height: 24px;
  background:
    linear-gradient(225deg, var(--color-surface-low) 50%, transparent 50%);
}

.demo-download__file-rows {
  position: absolute;
  top: 32px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-download__file-rows span {
  height: 3px;
  border-radius: 2px;
  background-color: var(--color-surface-low);
}

.demo-download__file-rows span:nth-child(1) { width: 70%; background-color: var(--color-velvet); opacity: 0.7; }
.demo-download__file-rows span:nth-child(2) { width: 90%; }
.demo-download__file-rows span:nth-child(3) { width: 60%; }
.demo-download__file-rows span:nth-child(4) { width: 80%; }
.demo-download__file-rows span:nth-child(5) { width: 50%; }

.demo-download__label {
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.demo-download__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.is-active .demo-download__btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  animation: demo-shimmer 2200ms ease-in-out infinite;
}

@keyframes demo-shimmer {
  0%, 30%   { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.demo-download__arrow {
  width: 14px;
  height: 14px;
}

.is-active .demo-download__file {
  animation: demo-file-bob 2400ms ease-in-out infinite;
}

@keyframes demo-file-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ── Section ─────────────────────────────────────────────────── */
.section {
  padding: var(--space-xl) 0;
}

.section__eyebrow {
  display: block;
  text-align: center;
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-velvet);
  margin-bottom: var(--space-md);
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-xl);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section__title em {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--color-velvet);
}

/* ── Upload Zone ─────────────────────────────────────────────── */
.upload-zone {
  background-color: var(--color-surface-low);
  border-radius: var(--radius-md);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  transition: background-color var(--transition-fast);
  position: relative;
  cursor: pointer;
}

/* Dashed visual boundary — achieved via inset box-shadow, not border */
.upload-zone::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 2px transparent;
  border: 2px dashed var(--color-text-muted);
  opacity: 0.35;
  pointer-events: none;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.upload-zone:hover,
.upload-zone--hover {
  background-color: #e8f0f7;
}

.upload-zone:hover::after,
.upload-zone--hover::after {
  opacity: 0.65;
  border-color: var(--color-primary);
}

.upload-zone--drag {
  background-color: #ddeaf4;
}

.upload-zone--drag::after {
  opacity: 1;
  border-color: var(--color-primary);
}

.upload-zone__icon {
  width: 40px;
  height: 40px;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.upload-zone:hover .upload-zone__icon,
.upload-zone--hover .upload-zone__icon {
  color: var(--color-primary);
}

.upload-zone__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-base);
  margin-bottom: var(--space-sm);
}

.upload-zone__sub {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.upload-zone__browse {
  color: var(--color-primary);
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Loaded state */
.upload-zone--loaded {
  background-color: var(--color-surface-lowest);
  cursor: default;
}

.upload-zone__file {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--color-surface-low);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.upload-zone__remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  margin-left: var(--space-xs);
  cursor: pointer;
}
.upload-zone__remove:hover { color: var(--color-status-error); }

/* hidden file input */
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ── Detection Badge ─────────────────────────────────────────── */
.detection-badge {
  display: none; /* shown via JS class toggle */
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--color-status-green-bg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
}

.detection-badge--visible { display: flex; }

.detection-badge--warning {
  background-color: var(--color-status-orange-bg);
}

.detection-badge__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-status-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  flex-shrink: 0;
}

.detection-badge--warning .detection-badge__icon {
  background-color: var(--color-status-orange);
}

.detection-badge__text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-status-green);
}

.detection-badge--warning .detection-badge__text {
  color: var(--color-status-orange);
}

.detection-badge__action {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ── Column Mapper ───────────────────────────────────────────── */
.column-mapper {
  background-color: var(--color-surface-lowest);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--space-lg);
}

.column-mapper__header {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface-low);
}

.column-mapper__row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  min-height: 48px;
  border-top: 1px solid transparent; /* no visible border */
}

.column-mapper__row + .column-mapper__row {
  background-image: linear-gradient(var(--color-surface-low), var(--color-surface-low));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}

.mapper-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-base);
  background-color: var(--color-surface-low);
  border-radius: var(--radius-sm);
  padding: 4px var(--space-sm);
  position: relative;
  overflow: hidden;
}

/* left accent strip */
.mapper-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.mapper-chip--confident::before  { background-color: var(--color-status-green); }
.mapper-chip--review::before     { background-color: var(--color-status-orange); }

.mapper-arrow {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1rem;
  user-select: none;
}

/* QB field dropdown */
.mapper-select {
  width: 100%;
  padding: 6px var(--space-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--color-text-base);
  background-color: var(--color-surface-lowest);
  border: none;
  border-radius: var(--radius-sm);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
  cursor: pointer;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow var(--transition-fast);
}

.mapper-select:focus {
  /* bottom-stroke focus indicator — no full border */
  box-shadow: inset 0 -2px 0 0 var(--color-primary);
}

/* ── Preview Table ───────────────────────────────────────────── */
.preview-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-lg);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-lowest);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.preview-table thead {
  position: sticky;
  top: 0;
  background-color: var(--color-surface-low);
  z-index: 1;
}

.preview-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 10px 16px;
  text-align: left;
}

.preview-table td {
  font-family: "Cascadia Code", "Fira Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  color: var(--color-text-base);
  padding: 10px 16px;
}

.preview-table tbody tr:nth-child(odd) {
  background-color: var(--color-surface-low);
}

.preview-table tbody tr:nth-child(even) {
  background-color: var(--color-surface-lowest);
}

/* ── Upgrade Banner ──────────────────────────────────────────── */
.upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background-color: var(--color-surface-low);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-lg);
  position: relative;
  overflow: hidden;
}

/* velvet accent strip — left edge via background, not border */
.upgrade-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-velvet);
}

.upgrade-banner__text {
  font-size: 0.875rem;
  color: var(--color-text-base);
}

.upgrade-banner__text strong { font-weight: 600; }

/* ── Upgrade Modal ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(26, 38, 48, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal-overlay--visible { display: flex; }

.modal {
  background-color: var(--color-surface-lowest);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-xl);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(26, 38, 48, 0.18);
}

.modal__close {
  float: right;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  margin-top: -4px;
}
.modal__close:hover { color: var(--color-text-base); }

.modal__title { margin-bottom: var(--space-sm); }
.modal__sub   { color: var(--color-text-muted); margin-bottom: var(--space-xl); }

/* ── Form Elements ───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: var(--space-xs); }
.form-group + .form-group { margin-top: var(--space-md); }

.form-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form-input {
  width: 100%;
  padding: 10px var(--space-md);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--color-text-base);
  background-color: var(--color-surface-lowest);
  border: none;
  border-radius: var(--radius-sm);
  outline: none;
  box-shadow: 0 0 0 0 transparent, inset 0 0 0 1px var(--color-surface-low);
  transition: box-shadow var(--transition-fast);
}

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

.form-input:focus {
  box-shadow: 0 0 0 0 transparent, inset 0 -2px 0 0 var(--color-primary);
}

/* ── Pricing Cards ───────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 680px;
  margin-inline: auto;
}

.pricing-card {
  background-color: var(--color-surface-low);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
}

.pricing-card--featured {
  background-color: var(--color-surface-lowest);
  position: relative;
  padding-top: calc(var(--space-xl) + 4px);
}

/* top accent strip for featured card */
.pricing-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--color-velvet);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.pricing-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background-color: var(--color-velvet);
  color: var(--color-text-on-primary);
  padding: 2px var(--space-sm);
  border-radius: 9999px;
  margin-bottom: var(--space-sm);
}

.pricing-card__plan {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.pricing-card__price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-base);
  line-height: 1;
}

.pricing-card__price sup {
  font-size: 1rem;
  font-weight: 600;
  vertical-align: top;
  margin-top: 6px;
  display: inline-block;
}

.pricing-card__period {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.pricing-card__features {
  list-style: none;
  flex: 1;
  margin-bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pricing-card__features li {
  font-size: 0.875rem;
  color: var(--color-text-base);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.pricing-card__features li::before {
  content: '✓';
  color: var(--color-status-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Feature Comparison Table ────────────────────────────────── */
.comparison-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-xl);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-md) var(--space-md);
  text-align: left;
  font-size: 0.875rem;
}

.comparison-table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background-color: var(--color-surface-lowest);
}

.comparison-table tbody tr:nth-child(odd)  { background-color: var(--color-surface-low); }
.comparison-table tbody tr:nth-child(even) { background-color: var(--color-surface-lowest); }

.check-yes { color: var(--color-status-green); font-weight: 700; }
.check-no  { color: var(--color-text-muted); }

/* ── Download / Action Area ──────────────────────────────────── */
.action-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background-color: var(--color-surface-low);
  padding: var(--space-xl) 0;
  margin-top: var(--space-2xl);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.footer__links a {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer__links a:hover {
  color: var(--color-text-base);
  text-decoration: underline;
}

/* ── App page layout helpers ─────────────────────────────────── */
.app-section {
  background-color: var(--color-surface-lowest);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-lg);
}

.app-section__title {
  margin-bottom: var(--space-md);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  h1 { font-size: 1.75rem; }

  .nav__brand-name { display: none; }

  .how-it-works__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .column-mapper__row {
    grid-template-columns: 1fr 20px 1fr;
    gap: var(--space-xs);
  }

  .action-area {
    flex-direction: column;
    align-items: stretch;
  }

  .upgrade-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 479px) {
  .hero { padding: var(--space-xl) 0; }
  .hero h1 { font-size: 1.5rem; }
  .modal { padding: var(--space-xl) var(--space-md); }
}
