:root {
  --bg: #ffffff;
  --bg-alt: #f5f6fa;
  --surface: #ffffff;
  --text: #0f1424;
  --muted: #5b6275;
  --border: #e3e6ee;
  --accent: #0d9488;
  --accent-strong: #0b7a70;
  --accent-soft: #e6f6f4;
  --on-accent: #ffffff;
  --bad: #c2410c;
  --bad-soft: #fdecdf;
  --add: #15803d;
  --add-soft: #e5f5ea;
  --del-soft: #fde8e8;
  --del: #b42318;
  --hero-from: #f2fbfa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 20, 36, .06), 0 8px 24px rgba(15, 20, 36, .06);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-alt: #10162a;
    --surface: #141b31;
    --text: #e8ebf3;
    --muted: #9aa3b8;
    --border: #252d47;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #0f2e2d;
    --on-accent: #052522;
    --bad: #fb923c;
    --bad-soft: #3a1d0e;
    --add: #4ade80;
    --add-soft: #0f2a1a;
    --del-soft: #3a1416;
    --del: #f87171;
    --hero-from: #0e1a2a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-strong); }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.logo svg { color: var(--accent); }
.site-header nav { display: flex; gap: 20px; align-items: center; font-size: .95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
.site-header nav .lang { border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; color: var(--text); }
@media (max-width: 640px) {
  .site-header nav a:not(.lang) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Hero */
.hero { padding: 56px 0 72px; background: linear-gradient(180deg, var(--hero-from), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent-strong); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Waitlist form */
.waitlist { margin-top: 24px; max-width: 520px; }
.waitlist-row { display: flex; gap: 8px; }
.waitlist input[type=email], .waitlist select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0;
}
.waitlist input[type=email] { flex: 1; }
.waitlist-extra { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.waitlist select { padding: 6px 10px; font-size: .9rem; }
.form-note { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.form-status { font-size: .9rem; margin: 6px 0 0; min-height: 1.4em; }
.form-status.is-error { color: var(--bad); }
.waitlist-success {
  margin-top: 24px; max-width: 520px; padding: 18px 20px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--radius);
}
.waitlist-success p:last-child { margin-bottom: 0; }
.success-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
@media (max-width: 480px) {
  .waitlist-row { flex-direction: column; }
}

/* Product mock */
.mock {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; font-size: .92rem;
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-bar p { margin: 0 0 0 8px; font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-versions { padding: 8px; }
.v { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.v + .v { margin-top: 2px; }
.v-bad { background: var(--bad-soft); }
.v-good { outline: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -1px; }
.badge { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-bad { color: var(--bad); border: 1px solid currentColor; }
.badge-restore { background: var(--accent); color: var(--on-accent); }
.mock-diff { margin: 4px 16px 0; padding: 12px; border-radius: 10px; background: var(--bg-alt); overflow-x: auto; }
.mock-diff p { margin: 0 0 6px; font-size: .82rem; }
.mock-diff code { display: block; font-family: var(--mono); font-size: .8rem; padding: 2px 6px; border-radius: 4px; white-space: pre; }
.mock-diff .del { background: var(--del-soft); color: var(--del); }
.mock-diff .add { background: var(--add-soft); color: var(--add); margin: 2px 0; }
.mock-alert { margin: 12px 16px 16px; font-size: .82rem; color: var(--muted); }
.mock-alert::before { content: "● "; color: var(--bad); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); font-size: 1.08rem; max-width: 46em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* Comparison table */
.table-wrap { overflow-x: auto; margin-top: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.gap { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .95rem; }
.gap th, .gap td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.gap tbody tr:last-child th, .gap tbody tr:last-child td { border-bottom: 0; }
.gap thead th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.gap tbody th { font-weight: 600; }
.gap td { color: var(--muted); }
.gap .us { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.gap thead .us { color: var(--accent-strong); }
.footnote { font-size: .82rem; color: var(--muted); margin-top: 12px; }
/* Móvil: cada fila pasa a ser una tarjeta para que la columna de Undoflow siempre se vea */
@media (max-width: 640px) {
  .table-wrap { border: 0; background: none; overflow: visible; }
  .gap { min-width: 0; }
  .gap thead { display: none; }
  .gap, .gap tbody, .gap tr, .gap th, .gap td { display: block; }
  .gap tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
  .gap tbody th { padding: 12px 16px 6px; border: 0; }
  .gap td { display: flex; justify-content: space-between; gap: 16px; padding: 8px 16px; border-bottom: 0; border-top: 1px solid var(--border); }
  .gap td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
  .gap td { text-align: right; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; counter-reset: s; }
.step-n {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; margin-bottom: 12px;
}
.step p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.plan-highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-price { margin: 4px 0; color: var(--muted); }
.plan-price span { font-size: 1.9rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.plan-for { color: var(--muted); font-size: .92rem; }
.plan ul li { padding: 6px 0 6px 24px; position: relative; border-top: 1px solid var(--border); font-size: .95rem; }
.plan ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent-strong); font-weight: 700; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

.founder {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 24px;
  padding: 24px; border-radius: var(--radius); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  scroll-margin-top: 80px;
}
.founder h3 { font-size: 1.35rem; }
.founder p:not(.eyebrow) { margin-bottom: 4px; max-width: 44em; }
.founder .eyebrow { margin-bottom: 6px; }
@media (max-width: 720px) { .founder { flex-direction: column; align-items: stretch; } }

/* FAQ */
.faq { margin-top: 20px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* Final CTA */
.section-cta { background: linear-gradient(180deg, var(--bg), var(--hero-from)); }
.section-cta .waitlist, .section-cta .waitlist-success { margin-top: 20px; }

/* Footer */
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--border); font-size: .88rem; }
.site-footer p { margin: 0 0 6px; }

.notfound { padding: 96px 16px; text-align: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
