/* Tizabar — landing. Móvil primero, sin dependencias. */

:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #14171a;
  --ink-2: #5a6068;
  --rule: #dfe1e4;
  --accent: #1d3fbf;
  --accent-dark: #17329a;
  --in: #f0f2f6;
  --out: #dbe3fb;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  overflow-wrap: break-word;
}

h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }

h1 { font-size: clamp(2rem, 8.4vw, 3.25rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: 1.375rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; }
h3, dt { font-size: 1rem; font-weight: 650; line-height: 1.4; }
p, dd { text-wrap: pretty; }

.wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 20px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Cabecera */
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.top-note { font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }
a.top-note { text-underline-offset: 3px; }

/* Portada */
.hero { display: grid; gap: 40px; padding-block: 32px 56px; }
.lead { margin-top: 20px; max-width: 33em; font-size: 1.125rem; color: var(--ink-2); }
.aside { margin-top: 16px; font-size: 0.9375rem; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; margin-top: 28px; padding: 12px 24px;
  background: var(--ink); color: #fff; border-radius: 8px;
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; text-align: center;
}
.btn { background: var(--accent); }
.btn:hover { background: var(--accent-dark); }
.btn:focus-visible, .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pending { margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); }

/* Conversación de ejemplo: burbujas genéricas */
.thread { width: 100%; max-width: 400px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.thread-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: 0.875rem;
}
.thread-head span:first-child { font-weight: 650; }
.thread-head span:last-child { color: var(--ink-2); }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.msg { max-width: 90%; padding: 8px 11px 6px; border-radius: 10px; font-size: 0.9375rem; line-height: 1.42; }
.msg p + p { margin-top: 8px; }
.msg.in { align-self: flex-start; background: var(--in); }
.msg.out { align-self: flex-end; background: var(--out); }
.msg time { display: block; margin-top: 2px; text-align: right; font-size: 0.6875rem; color: var(--ink-2); }
.msg.photo { padding: 6px 6px 4px; }
.paper { display: grid; gap: 7px; width: 132px; padding: 14px 13px 16px; background: #fff; border-radius: 5px; }
.paper b, .paper i, .paper u { display: block; height: 4px; background: #d5d8d6; }
.paper b { width: 50%; height: 7px; margin-bottom: 5px; background: #a9aeab; }
.paper u { width: 32%; margin-top: 5px; margin-left: auto; background: #a9aeab; }
.thread figcaption { padding: 9px 14px 10px; border-top: 1px solid var(--rule); font-size: 0.75rem; line-height: 1.4; color: var(--ink-2); }

/* Demo guiada (clase que pone demo.js) */
/* Altura fija: al cambiar los botones se encoge la conversación, no salta la página */
.demo { display: flex; flex-direction: column; height: 560px; }
.demo .chat { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.demo .chat > * { flex: none; }
.demo .msg { padding-bottom: 8px; white-space: pre-line; }
.demo .msg.photo { padding-bottom: 6px; }
.demo .typing { color: var(--ink-2); }
.empty { margin: auto; max-width: 16em; text-align: center; font-size: 0.9375rem; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--rule); }
.chip {
  min-height: 44px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px;
  background: #fff; color: var(--accent-dark); font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer;
}
.chip:hover { background: #eef2fd; }
.chip.primary { flex: 1 1 100%; background: var(--accent); color: #fff; }
.chip.primary:hover { background: var(--accent-dark); }
.chip.plain { border-color: transparent; color: var(--ink-2); font-weight: 500; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Secciones */
.row { display: grid; gap: 20px; padding-block: 44px; border-top: 1px solid var(--rule); }
.intro { margin-top: 10px; max-width: 30em; color: var(--ink-2); }

.steps { counter-reset: paso; }
.steps li, .facts > div { padding-block: 16px; border-top: 1px solid var(--rule); }
.steps li:first-child, .facts > div:first-child { padding-top: 0; border-top: 0; }
.steps li:last-child, .facts > div:last-child { padding-bottom: 0; }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 2rem 1fr; }
.steps li::before { content: counter(paso); grid-row: span 2; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--accent); }
.steps p, .facts dd { margin-top: 2px; color: var(--ink-2); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px 32px; font-size: 0.875rem; color: var(--ink-2); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: inherit; }

/* Precio */
.amount { font-size: clamp(2.5rem, 10vw, 3.25rem); font-weight: 700; line-height: 1; letter-spacing: -0.025em; }
.amount span { font-size: 1.125rem; font-weight: 500; letter-spacing: 0; }
.terms { margin-top: 14px; max-width: 34em; }
.includes { margin: 20px 0 0; padding: 0; list-style: none; }
.includes li { padding-block: 10px; border-top: 1px solid rgb(255 255 255 / 0.28); }
.includes li:last-child { border-bottom: 1px solid rgb(255 255 255 / 0.28); }
.after { margin-top: 24px; max-width: 34em; }
.legal { margin-top: 12px; font-size: 0.875rem; }
.legal a { color: inherit; }

/* Página de gracias */
.thanks { padding-block: 40px 72px; }
.thanks h1 { font-size: clamp(1.875rem, 7vw, 2.75rem); }
.thanks .lead { max-width: 30em; }
.thanks .steps { margin-top: 28px; max-width: 34em; }
.band .steps li { border-color: rgb(255 255 255 / 0.28); }
.band .steps li::before { color: #fff; }

/* Textos legales */
.doc { max-width: 720px; padding-block: 40px 64px; }
.doc h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
.doc h2 { margin-top: 36px; font-size: 1.1875rem; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--accent-dark); }
.draft { margin-top: 20px; padding: 14px 16px; border: 1px solid #d9a400; border-radius: 8px; background: #fff6d6; font-weight: 600; }
.todo { background: #fff0b3; padding: 0 3px; }

/* Bandas de color: cabecera, portada y cierre */
.band { background: var(--accent); color: #fff; }
header.band { position: relative; box-shadow: 0 1px 0 var(--accent); } /* tapa la junta con la portada */
.band .brand { color: #fff; }
.band .top-note, .band .lead, .band .aside, .band .pending, .band .terms, .band .after, .band .legal, .band .steps p { color: rgb(255 255 255 / 0.84); }
.band .btn { background: #fff; color: var(--accent-dark); }
.band .btn:hover { background: #e9edfb; }
.band .btn:focus-visible, .band .brand:focus-visible { outline-color: #fff; }
.band .thread { background: #fff; color: var(--ink); border: 0; }
.row.first { border-top: 0; }

@media (min-width: 620px) {
  .btn { width: auto; }
  .facts > div { display: grid; grid-template-columns: 11rem 1fr; gap: 24px; }
  .facts dd { margin-top: 0; }
}

@media (min-width: 880px) {
  body { font-size: 18px; }
  .wrap { padding-inline: 32px; }
  .top { padding-block: 28px; }
  .hero { grid-template-columns: 1fr 400px; align-items: center; gap: 72px; padding-block: 64px 96px; }
  .row { grid-template-columns: 4fr 8fr; gap: 48px; padding-block: 64px; }
  .thread.narrow { max-width: 440px; }
}
