/* EZKLA: página de presentación pública. Misma tipografía y colores que la app (app.css);
   los fragmentos marcados con data-ui reproducen la interfaz real del chat y de "Mis documentos". */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/css/fonts/ibm-plex-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/css/fonts/ibm-plex-sans-latin-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/css/fonts/ibm-plex-sans-latin-600.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ground: #f9fbfc;
  --surface: #ffffff;
  --field: #eef1f3;
  --field-2: #e3e8eb;
  --ink: #131416;
  --muted: #5d5f60;
  --night: #131416;
  --night-2: #1f2224;
  --on-night: #f4f6f8;
  --on-night-muted: #b4b8bb;
  --accent: #1b6c80;
  --accent-tint: #dcecf0;
  --accent-deep: #0f4a59;
  --ui-border: #e8eaec;
  --ui-control: #7d8083; /* 3,5:1 sobre --field: borde visible de radios y campos (WCAG 1.4.11) */
  --ui-raised: #f4f6f8;
  --ui-active: #ebedee;

  /* Cinco tamaños: display, título de sección, frase, texto, nota. */
  --t-display: clamp(44px, 5.4vw, 92px);
  --t-h2: clamp(30px, 3.2vw, 52px);
  --t-lead: clamp(22px, 2vw, 30px);
  --t-body: 18px;
  --t-small: 14px;

  --m: clamp(16px, 2.6vw, 40px);
  --gap-section: clamp(120px, 14vw, 200px);
  --radius: 6px;
  --bar-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
body { margin: 0; min-width: 300px; background: var(--ground); overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Sobre fondo oscuro el acento no llega a 3:1: anillo claro. */
.hero :focus-visible, .site-bar:not(.is-past) :focus-visible, .business :focus-visible, .term-section :focus-visible { outline-color: #6fb6c8; }
::selection { background: var(--accent-tint); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

h2 { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }

/* Botones: un solo radio y un solo relleno plano por variante. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: var(--radius); font-size: var(--t-body); font-weight: 500; line-height: 1.2; text-decoration: none; transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.btn:active { transform: scale(0.97); }
.btn-light { background: var(--on-night); color: var(--night); }
.btn-light:hover { background: #ffffff; transform: translateY(-2px); }
.btn-dark { background: var(--night); color: var(--on-night); }
.btn-dark:hover { background: #33373a; transform: translateY(-2px); }
.btn-quiet { background: var(--surface); color: var(--ink); }
.btn-quiet:hover { background: var(--field-2); transform: translateY(-2px); }
.btn-large { min-height: 56px; padding: 16px 28px; }

/* ---------- Portada ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: max(680px, 100svh); background: var(--night); color: var(--on-night); }
.hero-copy { display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--bar-h) + 36px) var(--m) 56px; }

/* Barra fija. Sin JavaScript es oscura y opaca; con él, transparente sobre la portada y clara después.
   Se usa (scripting: enabled) y no una clase puesta por script, para cargar landing.js con defer. */
.site-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--bar-h); padding: 0 var(--m); background: var(--night); color: var(--on-night); transition: background-color 250ms ease, color 250ms ease, box-shadow 250ms ease; }
@media (scripting: enabled) {
  .site-bar { background: transparent; }
  .site-bar.is-past { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 rgba(19, 20, 22, 0.06), 0 8px 24px rgba(19, 20, 22, 0.06); } /* taste-skill-ignore: barra fija que flota sobre el contenido */
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-body); font-weight: 600; letter-spacing: 0.01em; text-decoration: none; }
.wordmark-mark { width: 26px; height: 26px; color: #6fb6c8; transition: color 250ms ease; }
.site-bar.is-past .wordmark-mark { color: var(--accent); }
.bar-nav { display: flex; align-items: center; gap: 4px; }
.bar-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius); font-size: var(--t-body); font-weight: 500; text-decoration: none; transition: background-color 160ms ease; }
.bar-link:hover { background: rgba(244, 246, 248, 0.12); }
.site-bar.is-past .bar-link:hover { background: var(--field); }
.bar-link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.bar-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius); font-size: var(--t-body); font-weight: 500; text-decoration: none; transition: background-color 160ms ease; }
.bar-login:hover { background: rgba(244, 246, 248, 0.12); }
.site-bar.is-past .bar-login { background: var(--night); color: var(--on-night); }
.site-bar.is-past .bar-login:hover { background: #33373a; }
.hero-text { max-width: 640px; }
.lines { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.035em; font-weight: 600; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }
.hero-lede { max-width: 44ch; margin-top: 36px; color: var(--on-night-muted); font-size: var(--t-body); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; }
.hero-note { color: var(--on-night-muted); font-size: var(--t-small); max-width: 30ch; }
.hero-stage { position: relative; display: grid; place-items: center; padding: calc(var(--bar-h) + 16px) var(--m) 48px; background: var(--night-2); overflow: clip; }

/* Pila de documentos en 3D: hojas planas con canto y sombra proyectada (flotan sobre el escenario). */
.stack { width: min(560px, 100%); aspect-ratio: 1 / 1; perspective: 1500px; }
.stack-scene { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rx, 10deg)) rotateY(var(--ry, -20deg)) rotateZ(2deg); transition: transform 700ms var(--ease-out); }
.paper { position: absolute; padding: 18px; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 11px; line-height: 1.45; box-shadow: 1px 1px 0 #dfe3e6, 2px 2px 0 #d3d8dc, 3px 3px 0 #c8ced2, 4px 4px 0 #bec5ca, 24px 40px 60px rgba(0, 0, 0, 0.45); } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.paper-contract { left: 24%; top: 17%; width: 58%; height: 78%; padding: 26px 24px; transform: translateZ(40px); }
.paper-contract p + p { margin-top: 8px; }
.paper-contract b { font-weight: 600; }
.contract-title { margin-bottom: 12px; font-size: 13px; line-height: 1.3; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: 0.02em; }
.contract-signs { position: absolute; left: 24px; right: 24px; bottom: 24px; display: flex; gap: 20px; }
.contract-signs span { flex: 1; padding-top: 6px; border-top: 1px solid var(--ink); font-size: 10px; font-weight: 600; text-align: center; } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.paper-deed { left: 0; top: 58%; width: 40%; padding: 16px; background: #e6efe8; transform: translateZ(-50px) rotateZ(-9deg); }
.paper-kicker { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #3b4a40; }
.paper-plate { display: inline-block; margin: 8px 0 10px; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 3px; background: #f2c230; font-size: 16px; font-weight: 600; letter-spacing: 0.06em; }
.paper-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.paper-fields dt { font-size: 9px; color: #4f5c53; }
.paper-fields dd { font-size: 12px; font-weight: 500; }
.paper-id { left: 63%; top: 0; width: 37%; padding: 14px; background: #e7edf5; transform: translateZ(100px) rotateZ(7deg); }
.paper-id .paper-kicker { color: #34415a; }
.id-body { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.id-photo { flex: none; width: 38px; height: 46px; border-radius: 3px; background: #b9c4d4; }
.id-name { font-size: 11px; font-weight: 600; line-height: 1.25; }
.id-number { margin-top: 4px; font-size: 12px; letter-spacing: 0.03em; }
.float-bubble { position: absolute; left: 0; top: 2%; width: 46%; padding: 12px 14px; border-radius: 12px 12px 4px 12px; background: var(--ui-active); color: var(--ink); font-size: 13px; line-height: 1.45; transform: translateZ(150px); box-shadow: 16px 28px 40px rgba(0, 0, 0, 0.4); } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.float-file { position: absolute; right: -2%; bottom: 7%; display: flex; align-items: center; gap: 10px; max-width: 70%; padding: 10px 14px 10px 10px; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; transform: translateZ(130px); box-shadow: 16px 28px 40px rgba(0, 0, 0, 0.4); overflow-wrap: anywhere; } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.file-badge { flex: none; padding: 3px 6px; border-radius: 4px; background: var(--accent); color: #ffffff; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }

/* ---------- Secciones ---------- */
main > section { padding: var(--gap-section) var(--m) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px; align-items: end; max-width: 1360px; margin: 0 auto 48px; }
.section-head p { max-width: 40ch; font-size: var(--t-lead); line-height: 1.35; }

/* Demostración: marco tintado, hoja blanca con el chat y columna de controles. */
.demo { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); max-width: 1360px; min-height: 540px; margin: 0 auto; border-radius: 12px; background: var(--field); overflow: clip; }
.demo-view { display: grid; padding: 24px; }
.demo-case { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 4vw, 56px); border-radius: 8px; background: var(--surface); }
.demo-controls { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 32px 24px 28px 8px; border: 0; }
.demo-controls legend { float: left; width: 100%; margin-bottom: 12px; padding: 0 16px; color: var(--muted); font-size: var(--t-small); font-weight: 500; }
.demo-option { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; border-radius: var(--radius); font-size: 17px; font-weight: 500; cursor: pointer; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.demo-option:hover { background: var(--field-2); }
.demo-option:active { transform: scale(0.99); }
.demo-option input { flex: none; appearance: none; width: 20px; height: 20px; margin: 0; border: 2px solid var(--ui-control); border-radius: 50%; background: var(--surface); transition: border-color 160ms ease, border-width 160ms ease; }
.demo-option input:checked { border: 6px solid var(--accent); }
.demo-option input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Sobre fondo oscuro el acento no llega a 3:1: anillo claro. */
.hero :focus-visible, .site-bar:not(.is-past) :focus-visible, .business :focus-visible, .term-section :focus-visible { outline-color: #6fb6c8; }
.demo-option:has(input:checked) { background: var(--surface); }
.demo-count { margin-left: auto; color: var(--muted); font-size: var(--t-small); font-weight: 400; white-space: nowrap; }
.demo-link { margin: auto 16px 0; padding-top: 24px; font-weight: 500; }
@supports selector(:has(*)) {
  .demo-case { display: none; }
  .demo:has(#case-vehiculo:checked) [data-case="vehiculo"],
  .demo:has(#case-promesa:checked) [data-case="promesa"],
  .demo:has(#case-mejoras:checked) [data-case="mejoras"],
  .demo:has(#case-vivienda:checked) [data-case="vivienda"],
  .demo:has(#case-comercial:checked) [data-case="comercial"] { display: flex; animation: case-in 420ms var(--ease-out); }
}
@keyframes case-in { from { opacity: 0; transform: translateY(12px); } }

/* Fragmentos de la interfaz (mismos tamaños y radios que el chat real). */
.ui-chat { display: flex; flex-direction: column; gap: 14px; }
.ui-msg { max-width: 86%; padding: 10px 14px; border-radius: 12px; font-size: 15px; line-height: 1.5; }
.ui-msg-user { align-self: flex-end; background: var(--ui-active); }
.ui-msg-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--ui-border); } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.ui-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ui-files li { padding: 4px 10px; border: 1px solid var(--ui-control); border-radius: 999px; background: var(--surface); font-size: 13px; } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.ui-download { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-raised); } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.ui-download-name { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.ui-download-action { margin-left: auto; padding: 6px 12px; border-radius: var(--radius); background: var(--night); color: var(--on-night); font-size: 13px; font-weight: 500; }

/* Así funciona: frases a la izquierda, fragmento fijo sobre un campo del acento a la derecha. */
.steps-section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; max-width: calc(1360px + 2 * var(--m)); margin: 0 auto; }
.steps-title { grid-column: 1 / span 5; grid-row: 1; }
.steps-text { grid-column: 1 / span 5; grid-row: 2; }
.step { display: flex; flex-direction: column; justify-content: center; min-height: 80vh; }
.step-lead { max-width: 18ch; font-size: var(--t-lead); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; color: var(--muted); transition: color 300ms ease; }
.step-lead + p { max-width: 38ch; margin-top: 16px; }
.step.is-active .step-lead, .no-steps .step-lead { color: var(--ink); }
.steps-stage { grid-column: 7 / span 6; grid-row: 1 / span 2; position: sticky; top: 12vh; align-self: start; display: grid; place-items: center; height: 76vh; margin-top: 12vh; padding: clamp(20px, 4vw, 56px); border-radius: 12px; background: var(--accent); }
.step-shot { display: none; }
.composer { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; width: min(520px, 100%); min-height: 420px; padding: 20px; border-radius: 12px; background: var(--surface); }
.composer-empty { margin: auto 0; color: var(--muted); font-size: 17px; font-weight: 500; text-align: center; }
.composer[data-state="3"] .composer-empty { display: none; }
.composer-thread { display: flex; flex-direction: column; gap: 12px; }
.composer-box { padding: 12px; border: 1px solid var(--ui-control); border-radius: 8px; } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.composer-input { min-height: 66px; font-size: 15px; line-height: 1.5; }
.composer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ui-btn { padding: 6px 14px; border: 1px solid var(--ui-control); border-radius: var(--radius); font-size: 14px; font-weight: 500; } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.ui-btn-primary { border-color: var(--night); background: var(--night); color: var(--on-night); }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: text-bottom; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* Estados: 1 escribe, 2 adjunta, 3 recibe (el estado 3 es el de partida sin JavaScript). */
.composer > * { transition: opacity 300ms ease, transform 400ms var(--ease-out); }
.composer[data-state="1"] .composer-thread, .composer[data-state="2"] .composer-thread,
.composer[data-state="1"] .composer-files, .composer[data-state="3"] .composer-files { display: none; }
.composer[data-state="3"] .composer-input { color: var(--muted); }
.composer[data-state="3"] .composer-input .typed, .composer[data-state="3"] .caret { display: none; }
.composer[data-state="3"] .composer-input::before { content: "Escribe tu mensaje…"; }
.composer[data-state="2"] .ui-btn:first-child { border-color: var(--accent); color: var(--accent); }
.composer[data-state="2"] .composer-files, .composer[data-state="3"] .composer-thread { animation: case-in 420ms var(--ease-out); }

/* Contratos: damero de seis celdas, texto y foto acoplada al borde contrario. */
.docs-section { max-width: calc(1360px + 2 * var(--m)); margin: 0 auto; }
.docs-title { margin-bottom: 56px; max-width: 16ch; }
.docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.doc-cell { display: flex; flex-direction: column; height: 460px; border-radius: 12px; background: var(--field); overflow: clip; }
.doc-cell-flip { flex-direction: column-reverse; }
.doc-text { padding: 28px 28px 24px; }
.doc-text h3 { font-size: var(--t-lead); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.doc-text p { margin-top: 10px; font-size: var(--t-body); line-height: 1.5; }
.doc-text .doc-needs { color: var(--muted); }
.doc-media { flex: 1; min-height: 0; overflow: clip; }
.doc-media picture { display: block; width: 100%; height: 100%; }
.doc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.doc-cell:hover .doc-media img { transform: scale(1.04); }
.doc-media-ui { display: flex; align-items: flex-end; padding: 0 0 0 28px; }
.doc-cell-flip .doc-media-ui { align-items: flex-start; padding: 28px 0 0 28px; }
.ui-panel { width: 100%; padding: 20px 24px 24px; border-radius: 8px 0 0 8px; background: var(--surface); }
.ui-panel-title { font-size: 16px; font-weight: 600; }
.ui-quota { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; }
.ui-quota span { color: var(--muted); }
.ui-meter { display: block; height: 8px; margin: 8px 0 16px; border-radius: 999px; background: var(--ui-active); overflow: hidden; }
.ui-meter span { display: block; width: 33%; height: 100%; border-radius: inherit; background: #b45309; }
.ui-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ui-border); font-size: 13px; } /* taste-skill-ignore: dentro de un fragmento data-ui (hoja 3D o interfaz real) */
.ui-rows li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-rows li span:last-child { flex: none; color: var(--muted); }

/* Precio: tabla de tipos grandes; filas alternas por tono, columna destacada en el tono del acento. */
.plans-section { max-width: calc(1360px + 2 * var(--m)); margin: 0 auto; }
.plans { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; }
.plans th, .plans td { padding: 20px 24px; vertical-align: top; font-size: var(--t-body); line-height: 1.35; }
.plans thead th:first-child { width: 34%; vertical-align: bottom; }
.plans thead th { padding-top: 32px; padding-bottom: 32px; }
.plans tbody th { font-weight: 400; color: var(--muted); }
.plans td { font-weight: 500; }
.plans tbody tr:nth-child(odd) > * { background: var(--field); }
.plans tbody tr:nth-child(odd) > .plan-featured { background: #cbe2e8; }
.plans .plan-featured { background: var(--accent-tint); }
.plans thead .plan-featured { border-radius: 12px 12px 0 0; }
.plans tfoot .plan-featured { border-radius: 0 0 12px 12px; }
.plans tfoot td { padding-top: 28px; padding-bottom: 28px; }
.plan-name, .plan-price { display: block; font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.02em; }
.plan-name { font-weight: 600; }
.plan-price { font-weight: 400; }
.plan-period { display: block; margin-top: 8px; color: var(--muted); font-size: var(--t-small); font-weight: 400; }
.plans-section h2 { font-size: var(--t-h2); }

/* Preguntas: índice a la izquierda, respuesta grande a la derecha. */
.faq-section { max-width: calc(1360px + 2 * var(--m)); margin: 0 auto; }
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; }
.faq-list { grid-column: 1 / span 5; }
.faq-title { margin-bottom: 28px; font-size: var(--t-h2); }
.faq details { border-radius: var(--radius); }
.faq summary { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 12px; margin: 0 -12px; border-radius: var(--radius); color: var(--muted); font-size: var(--t-body); font-weight: 500; list-style: none; cursor: pointer; transition: color 150ms ease, background-color 150ms ease; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: background-color 150ms ease, transform 200ms var(--ease-out); }
.faq summary:hover { color: var(--ink); background: var(--field); }
.faq details[open] > summary, .faq summary[aria-current="true"] { color: var(--ink); }
.faq details[open] > summary::before, .faq summary[aria-current="true"]::before { background: var(--accent); transform: scale(1.4); }
.faq-answer { padding: 4px 0 16px 22px; font-size: var(--t-body); line-height: 1.5; }
.faq-pane { display: none; }
/* Con JavaScript en escritorio, la respuesta vive en el panel fijo. */
.faq.is-indexed .faq-answer { display: none; }
.faq.is-indexed .faq-pane { display: block; grid-column: 7 / span 6; position: sticky; top: 120px; align-self: start; min-height: 320px; padding: 48px; border-radius: 12px; background: var(--field); }
.faq-pane p { max-width: 30ch; font-size: var(--t-lead); line-height: 1.3; }
.faq-pane.is-swapping p { animation: case-in 260ms var(--ease-out); }

/* Cierre */
.close-section { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 48px; align-items: end; max-width: calc(1360px + 2 * var(--m)); margin: 0 auto; padding-bottom: var(--gap-section); }
.close-title { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.035em; }
.close-action { justify-self: end; }
.close-action p { max-width: 32ch; margin-bottom: 24px; font-size: var(--t-lead); line-height: 1.35; }

/* ---------- Pie de tablero ---------- */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding: 0 var(--m) var(--m); }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; min-height: 220px; padding: 24px; border-radius: 12px; background: var(--field); }
.tile-statement { grid-column: span 4; }
.tile-lead { max-width: 24ch; font-size: var(--t-lead); line-height: 1.3; font-weight: 500; }
.tile-legal { color: var(--muted); font-size: var(--t-small); overflow-wrap: anywhere; }
.tile-nav { grid-column: span 3; justify-content: flex-start; }
.tile-nav ul { display: grid; gap: 6px; }
.tile-nav a { font-size: var(--t-body); text-decoration: none; }
.tile-nav a:hover { text-decoration: underline; }
.tile-time { grid-column: span 2; }
.tile-time p:first-child { color: var(--muted); }
.tile-clock { font-size: var(--t-lead); font-weight: 500; font-variant-numeric: tabular-nums; }
.tile-login { grid-column: span 3; }
.tile-login p { color: var(--muted); }
.tile-login a { font-size: var(--t-lead); font-weight: 500; }
.tile-wordmark { grid-column: span 8; justify-content: center; align-items: center; min-height: 320px; background: var(--night); color: var(--on-night); font-size: clamp(64px, 11vw, 180px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.tile-cta { grid-column: span 4; min-height: 320px; background: var(--accent); color: #ffffff; font-size: var(--t-lead); font-weight: 500; line-height: 1.15; text-decoration: none; transition: background-color 200ms ease; }
.tile-cta svg { align-self: flex-end; width: 56px; height: 56px; transition: transform 300ms var(--ease-out); }
.tile-cta:hover { background: var(--accent-deep); }
.tile-cta:hover svg { transform: translate(6px, -6px); }
.credits { grid-column: 1 / -1; max-width: 75ch; padding: 16px 4px 0; color: var(--muted); font-size: var(--t-small); line-height: 1.6; }

/* ---------- Páginas legales (términos, datos personales) ---------- */
/* Sin portada oscura: la barra es clara desde el principio. */
.page-plain .site-bar { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 rgba(19, 20, 22, 0.06); } /* taste-skill-ignore: barra fija sobre página clara */
.page-plain .site-bar .wordmark-mark { color: var(--accent); }
.page-plain .bar-login { background: var(--night); color: var(--on-night); }
.legal { max-width: calc(760px + 2 * var(--m)); margin: 0 auto; padding: calc(var(--bar-h) + 64px) var(--m) var(--gap-section); }
.legal h1 { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.025em; }
.legal h2 { margin-top: 48px; font-size: var(--t-lead); line-height: 1.2; letter-spacing: -0.01em; }
.legal p, .legal li { max-width: 68ch; line-height: 1.6; }
.legal p { margin-top: 14px; }
.legal ul { margin-top: 14px; padding-left: 1.2em; list-style: disc; }
.legal li + li { margin-top: 8px; }
.legal a { overflow-wrap: anywhere; }
.legal-updated { color: var(--muted); font-size: var(--t-small); }

/* ---------- Tableta ---------- */
@media (max-width: 1100px) {
  .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-cell:nth-child(n) { flex-direction: column; }
  .doc-cell:nth-child(4n + 2), .doc-cell:nth-child(4n + 3) { flex-direction: column-reverse; }
  .tile-statement { grid-column: span 6; }
  .tile-nav { grid-column: span 6; }
  .tile-time { grid-column: span 6; }
  .tile-login { grid-column: span 6; }
  .tile-wordmark { grid-column: span 12; }
  .tile-cta { grid-column: span 12; min-height: 200px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  :root { --bar-h: 60px; }
  /* En el teléfono va primero el titular con su botón; la ilustración, debajo. */
  .hero { min-height: auto; }
  .hero-stage { min-height: 46svh; padding: 8px var(--m) 32px; }
  .hero-copy { padding-top: calc(var(--bar-h) + 32px); padding-bottom: 24px; }
  .stack { width: min(82vw, 460px); }
  .section-head { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .demo-view { padding: 12px 12px 0; }
  .demo-case { min-height: 0; padding: 24px 16px; }
  .demo-controls { order: -1; padding: 20px 12px 12px; }
  .demo-option { min-height: 52px; }
  .demo-link { margin-top: 12px; padding-top: 8px; }
  :root { --t-display: clamp(44px, 8vw, 72px); }
  .steps-section { display: flex; flex-direction: column; }
  /* Sin escenario fijo: cada paso lleva su instantánea debajo del texto. */
  .steps-stage { display: none; }
  .steps-title { margin-bottom: 32px; }
  .step { min-height: 0; padding-bottom: 56px; }
  .step:last-child { padding-bottom: 0; }
  .step-lead, .step.is-active .step-lead { max-width: none; color: var(--ink); }
  .step-lead + p { max-width: none; margin-top: 8px; }
  .step-shot { display: block; margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--accent); }
  .step-shot .composer { width: 100%; min-height: 0; }
  .faq { display: block; }
  .close-section { grid-template-columns: 1fr; }
  .close-action { justify-self: start; }
}

/* ---------- Teléfono ---------- */
@media (max-width: 640px) {
  :root { --t-display: clamp(40px, 10.4vw, 56px); --t-h2: clamp(30px, 8vw, 40px); --t-lead: 20px; }
  .hero-lede { margin-top: 24px; }
  .hero-actions { margin-top: 28px; }
  .hero-actions .btn { width: 100%; }
  .paper { font-size: 8.5px; padding: 12px; }
  .paper-contract { padding: 16px 14px; }
  .contract-title { font-size: 10px; }
  .contract-signs { left: 14px; right: 14px; bottom: 14px; }
  .float-bubble { width: 50%; font-size: 11px; padding: 9px 11px; }
  .stack-scene { transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -12deg)) rotateZ(1deg); }
  .paper-fields { display: none; }
  .float-file { font-size: 11px; }
  .demo-count { display: none; }
  .ui-msg { max-width: 94%; }
  .docs-grid { grid-template-columns: 1fr; gap: 6px; }
  .doc-cell:nth-child(n) { flex-direction: column; height: auto; }
  .doc-cell .doc-media { height: 240px; flex: none; }
  .doc-cell:nth-child(even) .doc-media { margin-left: 28px; border-radius: 8px 0 0 0; }
  .doc-cell:nth-child(odd) .doc-media { margin-right: 28px; border-radius: 0 8px 0 0; }
  .doc-cell .doc-media-ui { height: auto; padding: 0; }
  .plans th, .plans td { padding: 14px 10px; font-size: 16px; }
  .plans thead th:first-child { width: 30%; }
  .plans thead th { padding-top: 20px; padding-bottom: 20px; }
  .plan-name, .plan-price { font-size: 20px; }
  .plans-section h2 { font-size: 26px; }
  .plans .btn { width: 100%; min-height: 44px; padding: 10px 8px; font-size: 15px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tile { min-height: 160px; padding: 20px; }
  .tile-wordmark { grid-column: 1 / -1; order: -2; min-height: 160px; font-size: 22vw; }
  .tile-cta { grid-column: 1 / -1; order: -1; min-height: 160px; }
  .tile-nav, .tile-login { grid-column: span 1; }
  .tile-time, .tile-statement { grid-column: span 1; }
  .tile-statement { grid-column: 1 / -1; }
  .tile-time { grid-column: 1 / -1; min-height: 120px; }
}

/* ---------- Movimiento (solo transform y opacidad; nada oculto sin JavaScript) ---------- */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  /* El titular y su botón solo se animan en pantallas grandes: en el teléfono se ven de inmediato. */
  @media (min-width: 901px) {
    .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; }
    .lines .line:nth-child(2) [data-line] { animation-delay: 110ms; }
    .hero-lede, .hero-actions { opacity: 0; animation: fade-up 700ms var(--ease-out) 520ms forwards; }
  }
  .stack-scene > * { opacity: 0; animation: paper-in 900ms var(--ease-out) forwards; }
  .stack-scene > :nth-child(1) { animation-delay: 200ms; }
  .stack-scene > :nth-child(2) { animation-delay: 320ms; }
  .stack-scene > :nth-child(3) { animation-delay: 440ms; }
  .stack-scene > :nth-child(4) { animation-delay: 700ms; }
  .stack-scene > :nth-child(5) { animation-delay: 900ms; }
  .stack-scene > * { animation-fill-mode: both; }
  .stack-scene.is-floating > * { opacity: 1; animation: float 7s ease-in-out infinite; }
  .stack-scene.is-floating > :nth-child(2) { animation-delay: -1.5s; }
  .stack-scene.is-floating > :nth-child(3) { animation-delay: -3s; }
  .stack-scene.is-floating > :nth-child(4) { animation-delay: -4.5s; animation-duration: 6s; }
  .stack-scene.is-floating > :nth-child(5) { animation-delay: -2s; animation-duration: 8s; }

  .rv { opacity: 0; translate: 0 24px; transition: opacity 700ms ease, translate 800ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .rv.is-in { opacity: 1; translate: 0 0; }

  @supports (animation-timeline: view()) {
    /* Solo en pantallas grandes: en el teléfono ahorra trabajo de pintado al hacer scroll. */
    @media (min-width: 641px) { .doc-media img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; } }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@keyframes paper-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes drift { from { scale: 1.12; translate: 0 -3%; } to { scale: 1.02; translate: 0 3%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stack-scene, .doc-media img, .btn, .tile-cta svg, .site-bar, .wordmark-mark { transition: none; }
  .caret { animation: none; }
  .demo-case, .composer-files, .composer-thread, .faq-pane p { animation: none !important; }
}
