/* ==========================================================================
   Renvao · Sistema B, Luz y tinta · web pública (R4a)
   Página clara cortada por tramos de tinta (#0e1c1c). En la tinta, el
   producto brilla con luz de marca: filo crema y luz de salvia. Una familia,
   Geist (SIL OFL 1.1, licencia en fonts/), con tracking óptico por tamaño y
   cifras tabulares en todos los importes. Tokens y reglas: DESIGN.md en la
   raíz. Portado del espécimen handbook/design/r3/ (R3); una sola hoja para
   todas las páginas: base, cabecera, pie, portada, 404 y, desde R4b, las
   páginas interiores.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Claro */
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #f9f9f7;
  --well: #f2f1ed;
  --cream: #f4eee2;
  --ink: #0e1c1c;
  --ink-2: #48524f;
  --ink-3: #5c6663;
  --line: rgba(14, 28, 28, 0.08);
  --line-2: rgba(14, 28, 28, 0.14);
  --control: #7a8481;
  --ink-hover: #20312f;
  --cream-ink: #4f574f;

  /* Tinta */
  --deep: #0e1c1c;
  --deep-2: #132322;
  --deep-3: #1c2928;
  --band: #071111;
  --on-deep: #f4eee2;
  --on-deep-2: #a8b2ae;
  --on-deep-line: rgba(244, 238, 226, 0.12);

  /* Marca y estados */
  --sage: #6c9180;
  --sage-light: #8fb3a3;
  --sage-ink: #33594a;
  --sage-wash: #e4ece6;
  --sage-tint: #eff4f0;
  --amber-ink: #6b4800;
  --amber-wash: #f5e8c8;
  --brick-ink: #8d2f23;

  /* Profundidad: anillo de 1 px en lugar de borde, sombras con spread negativo */
  --sh-1: 0 0 0 1px var(--line), 0 1px 2px rgba(14, 28, 28, 0.05);
  --sh-2: 0 0 0 1px var(--line), 0 1px 2px rgba(14, 28, 28, 0.04),
    0 10px 20px -10px rgba(14, 28, 28, 0.14), 0 30px 50px -30px rgba(14, 28, 28, 0.22);
  --sh-3: 0 0 0 1px var(--line), 0 2px 4px rgba(14, 28, 28, 0.05),
    0 24px 48px -16px rgba(14, 28, 28, 0.2), 0 64px 96px -48px rgba(14, 28, 28, 0.28);
  --sh-glow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(244, 238, 226, 0.16),
    0 2px 4px rgba(0, 0, 0, 0.2), 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 90px 140px -70px rgba(0, 0, 0, 0.7);
  --sh-phone: 0 1px 1px rgba(14, 28, 28, 0.2), 0 6px 12px -4px rgba(14, 28, 28, 0.22),
    0 30px 60px -24px rgba(14, 28, 28, 0.45), 0 80px 120px -60px rgba(31, 58, 47, 0.55);
  --sh-phone-deep: 0 0 0 1px rgba(244, 238, 226, 0.16), 0 2px 4px rgba(0, 0, 0, 0.3),
    0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 90px 140px -70px rgba(0, 0, 0, 0.75);
  --sh-float-deep: 0 0 0 1px rgba(244, 238, 226, 0.18), 0 2px 6px rgba(0, 0, 0, 0.25),
    0 30px 60px -20px rgba(0, 0, 0, 0.6);
  --sh-btn: 0 1px 1px rgba(14, 28, 28, 0.2), 0 4px 10px -4px rgba(14, 28, 28, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-tile: 28px;
  --r-phone: 46px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-ui: cubic-bezier(0.4, 0, 0.6, 1);
  --t-press: 90ms;
  --t-release: 160ms;
  --t-color: 200ms;

  --gutter: 24px;
  --section: 144px;
  --header-h: 60px;
  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base y superficies del navegador ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: #8e9894 transparent;
  interpolate-size: allow-keywords;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--sage-ink);
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: var(--sage-wash); color: var(--ink); }
.ink ::selection { background: var(--sage); color: var(--deep); }

a { color: var(--sage-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.ink a:not(.btn) { color: var(--on-deep); }

:focus-visible { outline: 2px solid var(--sage-ink); outline-offset: 3px; border-radius: var(--r-xs); }
.ink :focus-visible,
.site-header :focus-visible,
.task--visitas :focus-visible { outline-color: var(--on-deep); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; white-space: nowrap; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 12px 16px; background: var(--on-deep); color: var(--deep);
  border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip:focus-visible { top: 12px; }

.wrap { width: 100%; max-width: 1248px; margin-inline: auto; padding-inline: var(--gutter); }
.ink { background: var(--deep); color: var(--on-deep); }

/* ---------- Tipografía: tracking óptico por tamaño ---------- */

.display {
  font-size: clamp(2.5rem, 1.3rem + 3.1vw, 3.875rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 620;
  text-wrap: balance;
}
.display-2 {
  font-size: clamp(2.25rem, 1.2rem + 2.8vw, 3.875rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 620;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(2rem, 1.25rem + 2.1vw, 3.375rem);
  line-height: 1.06;
  letter-spacing: -0.036em;
  font-weight: 620;
  text-wrap: balance;
  max-width: 19em;
}
.h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem);
  line-height: 1.18;
  letter-spacing: -0.026em;
  font-weight: 620;
  text-wrap: balance;
}
.tone-2 { color: var(--ink-3); }
/* El titular del hero de la portada va en dos tonos y cada frase en su
   línea: el corte cae siempre en el punto, también en el móvil. Los dos
   tonos son solo del hero y de la llamada final de la portada (DESIGN.md,
   enmienda del 2026-10-09). */
.display .tone-2 { display: block; }
.ink .tone-2 { color: var(--on-deep-2); }

.lede {
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
  letter-spacing: -0.014em;
  color: var(--on-deep-2);
  text-wrap: pretty;
}

/* ---------- Piezas pequeñas ---------- */

.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  color: var(--ink-2); font-size: 0.75rem; font-weight: 560; letter-spacing: 0.01em; white-space: nowrap;
}
.chip--deep { background: transparent; color: var(--on-deep); box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.28); }
.chip--example { background: rgba(244, 238, 226, 0.1); color: var(--on-deep); box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.24); }

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.badge--sage { background: var(--sage-wash); color: var(--sage-ink); }
.badge--wait { background: var(--well); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.badge--ok { background: var(--sage-ink); color: #ffffff; }

.badge--amber { background: var(--amber-wash); color: var(--amber-ink); }
.badge--ink { background: var(--ink); color: var(--on-deep); }
.badge--line { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Botones: la pulsación responde en 90 ms ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font-family: inherit; font-size: 0.9375rem; font-weight: 580; letter-spacing: -0.01em; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--t-release) var(--ease-out),
    background-color var(--t-color) var(--ease-ui),
    box-shadow var(--t-color) var(--ease-ui),
    color var(--t-color) var(--ease-ui),
    border-color var(--t-color) var(--ease-ui);
}
.btn:active { transform: scale(0.97); transition-duration: var(--t-press), var(--t-color), var(--t-color), var(--t-color), var(--t-color); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--ink); color: var(--on-deep); box-shadow: var(--sh-btn); }
.btn--secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn--light { background: var(--on-deep); color: var(--deep); box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0, 0, 0, 0.3); }
.btn--ghost { background: rgba(244, 238, 226, 0.06); color: var(--on-deep); box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.3); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--ink-hover); }
  .btn--secondary:hover { border-color: var(--control); }
  .btn--light:hover { background: #ffffff; box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px -8px rgba(244, 238, 226, 0.35); }
  .btn--ghost:hover { background: rgba(244, 238, 226, 0.12); box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.5); }
}

.link-quiet {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px;
  color: var(--on-deep-2); font-size: 0.875rem; font-weight: 520; text-decoration: none;
  border-radius: var(--r-sm); transition: color var(--t-color) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .link-quiet:hover { color: var(--on-deep); } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--sage-ink); font-weight: 580; text-decoration: none;
}
.link-arrow svg,
.task-more svg { width: 14px; height: 14px; transition: transform 240ms var(--ease-out); }
.link-arrow path,
.task-more path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover { text-decoration: underline; }
  .link-arrow:hover svg { transform: translateX(3px); }
}

/* ---------- Cabecera de cristal oscuro ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 28, 28, 0.86);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  backdrop-filter: saturate(1.5) blur(20px);
  color: var(--on-deep);
}
.site-header::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--on-deep-line);
}
@supports (animation-timeline: scroll()) {
  .site-header::after {
    opacity: 0;
    animation: hairline-in linear both;
    animation-timeline: scroll();
    animation-range: 0 120px;
  }
}
@keyframes hairline-in { to { opacity: 1; } }

.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; }
.brand-mark { width: 24px; height: 24px; overflow: visible; }
.r-leg2 { fill: var(--sage); transition: fill var(--t-color) var(--ease-ui); }
@media (hover: hover) and (pointer: fine) { .brand:hover .r-leg2 { fill: var(--sage-light); } }
.brand-word { font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.035em; }

/* La R se dibuja una vez al llegar: el lomo se descubre de izquierda a
   derecha y las dos patas entran por su diagonal. Solo en la primera visita
   de la sesión (boot.js) y nunca con movimiento reducido. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.intro-seen) .brand-mark .r-bowl { animation: r-wipe 640ms var(--ease-out) 120ms both; }
  .js:not(.intro-seen) .brand-mark .r-leg { animation: r-leg 560ms var(--ease-out) 320ms both; }
  .js:not(.intro-seen) .brand-mark .r-leg2 { animation: r-leg 560ms var(--ease-out) 420ms both; }
}
@keyframes r-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes r-leg { from { opacity: 0; transform: translate(-110px, -160px); } }

.site-nav { margin-left: 16px; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  color: var(--on-deep-2); font-size: 0.875rem; font-weight: 500; text-decoration: none;
  border-radius: 999px; transition: color var(--t-color) var(--ease-ui), background-color var(--t-color) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: var(--on-deep); background: rgba(244, 238, 226, 0.07); } }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Menú móvil: <details> nativo, funciona sin JavaScript. La hoja cuelga de
   la cabecera, ocupa el ancho y se desplaza por dentro si no cabe: nunca
   recorta su contenido (AUDIT-R1 §3.1). */
.menu { display: none; }
.menu summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; color: var(--on-deep); font-size: 0.9375rem; font-weight: 560;
  list-style: none; cursor: pointer; background: var(--deep-3); box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.3);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-color) var(--ease-ui), transform var(--t-release) var(--ease-out);
}
.menu summary:active { transform: scale(0.97); transition-duration: var(--t-color), var(--t-press); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before {
  content: ""; width: 14px; height: 9px;
  border-block: 1.6px solid currentColor;
  transition: transform 200ms var(--ease-out);
}
.menu[open] summary { background: rgba(244, 238, 226, 0.14); }
@media (hover: hover) and (pointer: fine) { .menu summary:hover { background: rgba(244, 238, 226, 0.1); } }
.menu[open] summary::before { transform: scaleY(0.4); }
.menu:not([open]) .menu-sheet { display: none; }
.menu-sheet {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--gutter) 24px;
  background: var(--deep-2);
  box-shadow: 0 1px 0 var(--on-deep-line), 0 24px 40px -20px rgba(0, 0, 0, 0.6);
}
@media (prefers-reduced-motion: no-preference) { .menu[open] .menu-sheet { animation: sheet-in 220ms var(--ease-out); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-8px); } }
.menu-sheet ul { margin-bottom: 16px; }
.menu-sheet li + li { box-shadow: 0 -1px 0 var(--on-deep-line); }
.menu-sheet nav a {
  display: flex; align-items: center; min-height: 54px;
  color: var(--on-deep); font-size: 1.125rem; font-weight: 560; letter-spacing: -0.02em; text-decoration: none;
}
.menu-sheet nav a:active { color: var(--on-deep-2); }
.menu-sheet nav .soon { margin-left: auto; padding-left: 12px; color: var(--on-deep-2); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; }

/* ---------- Hero en tinta ---------- */

.hero { position: relative; padding: 52px 0 80px; overflow: clip; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute; z-index: -1; left: 50%; bottom: -18%;
  width: 1600px; height: 900px; transform: translateX(-50%);
  background:
    radial-gradient(50% 42% at 50% 62%, rgba(108, 145, 128, 0.36) 0%, rgba(108, 145, 128, 0.1) 46%, rgba(108, 145, 128, 0) 72%),
    radial-gradient(34% 30% at 50% 52%, rgba(244, 238, 226, 0.12) 0%, rgba(244, 238, 226, 0) 70%);
  pointer-events: none;
}

/* Titular a lo ancho en dos líneas; debajo, la entradilla a la izquierda y
   las acciones con la línea del piloto a la derecha. */
.hero-head { display: grid; gap: 28px; }
.hero-head .display { max-width: 20em; }
.hero-side {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "lede actions" "lede price";
  gap: 18px 64px;
  align-items: end;
}
.hero-side .lede { grid-area: lede; max-width: 36rem; align-self: start; }
.hero-actions { grid-area: actions; }
.price { grid-area: price; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { min-height: 48px; padding: 0 22px; }
.price { font-size: 0.875rem; color: var(--on-deep-2); padding-top: 16px; border-top: 1px solid var(--on-deep-line); }
@media (prefers-reduced-motion: no-preference) { .hero-side { animation: rise 800ms var(--ease-out) 100ms both; } }

/* ---------- Demo: piezas comunes ---------- */

.demo { position: relative; margin-top: 44px; }
.demo-stage { position: relative; }
@media (prefers-reduced-motion: no-preference) { .demo-stage { animation: stage-in 1000ms var(--ease-out) 80ms both; } }
@keyframes stage-in { from { opacity: 0; transform: translateY(24px) scale(0.985); } }

/* Luz de marca detrás del producto: se enciende del todo cuando Ane aprueba */
.demo-glow {
  position: absolute; z-index: 0; inset: -30% -6% -14% -10%;
  background:
    radial-gradient(52% 56% at 48% 50%, rgba(108, 145, 128, 0.74) 0%, rgba(108, 145, 128, 0.32) 44%, rgba(108, 145, 128, 0) 78%),
    radial-gradient(28% 24% at 84% 64%, rgba(244, 238, 226, 0.16) 0%, rgba(244, 238, 226, 0) 70%);
  pointer-events: none;
}

.win {
  position: relative; z-index: 1;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-xl); box-shadow: var(--sh-glow);
  overflow: hidden;
}
.win-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 11px 16px 11px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, var(--surface-2));
}
.win-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.8125rem; font-weight: 620; white-space: nowrap; }
.win-brand svg { flex: none; width: 16px; height: 16px; }
.win-nav { position: relative; display: flex; gap: 2px; font-size: 0.75rem; font-weight: 540; color: var(--ink-3); }
.win-nav span { padding: 4px 10px; border-radius: 999px; }
.win-nav .is-on { background: var(--well); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

.win-body { padding: 0 22px 22px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.view-title { font-size: 0.9375rem; font-weight: 660; letter-spacing: -0.02em; }

/* Pestañas de la vista: el indicador pasa de Por decidir a Aprobados */
.seg {
  position: relative; display: grid; grid-template-columns: repeat(3, 104px);
  padding: 3px; border-radius: 999px; background: rgba(14, 28, 28, 0.05);
  font-size: 0.75rem; font-weight: 560; color: var(--ink-3);
}
.seg-ind {
  position: absolute; left: 3px; top: 3px; bottom: 3px; width: 104px;
  border-radius: 999px; background: var(--ink);
  box-shadow: 0 1px 2px rgba(14, 28, 28, 0.25);
  transform: translateX(100%);
}
.seg-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; white-space: nowrap; }
.seg-tab--2 { color: var(--on-deep); }
.seg-n { display: inline-grid; font-variant-numeric: tabular-nums; font-weight: 680; opacity: 0.9; }
.seg-n > * { grid-area: 1 / 1; }
.n-was { visibility: hidden; opacity: 0; }

.pcard { position: relative; background: var(--surface); border-radius: var(--r-lg); }
.pcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px var(--sage); pointer-events: none;
}
.pcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pcard-title { font-size: 1.0625rem; line-height: 1.3; font-weight: 640; letter-spacing: -0.025em; }
.badges { display: inline-flex; gap: 6px; flex: none; }
.badge-swap { display: grid; }
.badge-swap > * { grid-area: 1 / 1; justify-self: end; }
.d-was-state { visibility: hidden; opacity: 0; }
.pcard-meta { margin-top: 2px; font-size: 0.8125rem; color: var(--ink-3); }

.inv { margin-top: 14px; border-top: 1px solid var(--line); }
.inv-row {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px;
  padding: 7px 0 8px; border-bottom: 1px solid var(--line);
  font-size: 0.8125rem; line-height: 1.35;
}
.inv-id { font-weight: 580; }
.inv-age { grid-column: 1; grid-row: 2; color: var(--ink-3); font-size: 0.75rem; }
.inv-amt { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 580; }
.inv-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 10px; font-size: 0.875rem; font-weight: 640;
}
.inv-total .num { font-size: 1.25rem; letter-spacing: -0.03em; }

/* El total sube hasta 3.420,00 € sin mover nada: el importe final reserva
   el ancho y el contador se pinta encima, alineado a la derecha. */
.count { display: inline-grid; justify-items: end; }
.count > * { grid-area: 1 / 1; }
.count-live { justify-self: stretch; text-align: right; }
.count.is-counting .count-final { color: transparent; }

.msg { padding: 14px 16px; background: var(--well); border-radius: var(--r-lg); }
.msg-label { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; }
.msg-text { margin-top: 6px; white-space: pre-line; font-size: 0.8125rem; line-height: 1.5; letter-spacing: -0.006em; }

.decide-swap { display: grid; margin-top: 16px; }
.decide-swap > * { grid-area: 1 / 1; }
.decide { display: grid; gap: 8px; visibility: hidden; opacity: 0; }
.decide--on { visibility: visible; opacity: 1; }
.decide-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.fake { cursor: default; min-height: 40px; font-size: 0.8125rem; padding: 0 12px; overflow: visible; }

.cursor {
  position: absolute; left: 60%; top: 55%; width: 22px; height: 22px;
  opacity: 0; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(14, 28, 28, 0.35));
}
.cursor path { fill: var(--ink); stroke: #ffffff; stroke-width: 1.6; stroke-linejoin: round; }
.tap {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: rgba(244, 238, 226, 0.55); box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.7);
  opacity: 0; pointer-events: none;
}

.resolved { display: flex; align-items: flex-start; gap: 10px; align-self: center; padding: 6px 0; font-size: 0.875rem; line-height: 1.45; }
.resolved strong { font-weight: 640; }
.resolved-icon { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--sage-ink); }
.resolved-icon path { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.resolved-meta { display: block; color: var(--ink-3); font-size: 0.8125rem; margin-top: 2px; }

/* Bandeja de correo: un plano más cerca de la luz */
.mail {
  position: relative; z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-glow);
  overflow: hidden;
}
.mail-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 13px 16px 10px; border-bottom: 1px solid var(--line); }
.mail-title { font-size: 0.875rem; font-weight: 660; letter-spacing: -0.02em; }
.mail-who { font-size: 0.6875rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-list { overflow: hidden; }
.mail-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px;
  padding: 10px 16px 10px 26px; border-bottom: 1px solid var(--line);
  font-size: 0.75rem; line-height: 1.4; background: var(--surface);
}
.mail-row:last-child { border-bottom: 0; }
.mail-row.is-new { background: var(--sage-tint); }
.mail-dot { position: absolute; left: 11px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.mail-from { font-weight: 660; }
.mail-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mail-subj, .mail-prev { grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-subj { font-weight: 540; }
.mail-prev { color: var(--ink-3); }

/* ---------- Teléfono (préstamo de C) ---------- */

.phone {
  position: relative;
  width: 264px;
  padding: 8px;
  border-radius: var(--r-phone);
  background: linear-gradient(145deg, #2b3b39 0%, #0e1c1c 42%, #0a1414 100%);
  box-shadow: var(--sh-phone), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 0 0 3px #0a1414;
}
.ink .phone { box-shadow: var(--sh-phone-deep), inset 0 0 0 1.5px rgba(255, 255, 255, 0.16), inset 0 0 0 3px #0a1414; }
.phone-screen {
  position: relative; height: 504px; overflow: hidden;
  border-radius: calc(var(--r-phone) - 8px);
  background: var(--bg); color: var(--ink);
  font-size: 12px;
}
.status {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; padding: 0 20px 0 24px; font-size: 0.8125rem; font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.island { position: absolute; left: 50%; top: 10px; width: 76px; height: 22px; margin-left: -38px; border-radius: 999px; background: var(--band); }
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons svg { height: 10px; width: auto; }
.status-icons path { fill: var(--ink); }
.status-icons svg:last-child rect:first-child { fill: none; stroke: rgba(14, 28, 28, 0.4); }
.status-icons svg:last-child path { fill: none; stroke: rgba(14, 28, 28, 0.4); stroke-width: 1.4; stroke-linecap: round; }
.status-icons .batt { fill: var(--ink); }

.app { padding: 4px 10px 10px; }
.app-title { padding: 0 4px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; }
.app-sub { display: grid; padding: 0 4px; margin: 2px 0 10px; font-size: 0.75rem; color: var(--ink-3); }
.app-sub > * { grid-area: 1 / 1; }
.m-was-sub { visibility: hidden; opacity: 0; }

.mcard {
  position: relative; padding: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
}
.mcard + .mcard { margin-top: 8px; }
.mcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mcard-title { font-size: 0.875rem; font-weight: 660; letter-spacing: -0.02em; line-height: 1.25; }
.mcard .badge { height: 20px; padding: 0 7px; font-size: 0.6875rem; }
.mcard-amt { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.mcard-amt .num { font-size: 1.25rem; font-weight: 640; letter-spacing: -0.03em; }
.mcard-n { font-size: 0.6875rem; color: var(--ink-3); }
.mcard-msg {
  margin-top: 8px; padding: 8px 10px; border-radius: var(--r-md); background: var(--well);
  font-size: 0.6875rem; line-height: 1.45;
}
/* En el móvil la tarjeta enseña el principio del mensaje, como una vista
   previa: tres líneas y puntos suspensivos. El recorte va en el texto, no en
   la caja, para que el relleno de abajo no deje asomar la cuarta línea. */
.mcard-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.mcard .decide-swap { margin-top: 10px; }
.mcard .decide { gap: 6px; }
.mcard .decide-pair { gap: 6px; }
.mcard .btn.fake { min-height: 34px; font-size: 0.75rem; padding: 0 8px; }
.resolved--sm { gap: 8px; padding: 4px 0; font-size: 0.75rem; line-height: 1.4; }
.resolved--sm .resolved-icon { width: 20px; height: 20px; }
.mcard--next { opacity: 0.94; }

/* ---------- Demo: composición por tamaños ----------
   Desde 1200 px: ventana del panel detrás, teléfono delante a la izquierda y
   bandeja a la derecha; la aprobación ocurre en el teléfono.
   Por debajo: la tarjeta sola de B (el dispositivo ya es el móvil). */

.phone--hero { display: none; }

@media (min-width: 1200px) {
  .demo-stage { height: 588px; }
  .demo-glow { inset: -22% -4% -10% -4%; }
  .win { position: absolute; left: 176px; right: 260px; top: 0; }
  .win-body { padding: 0 64px 24px 112px; }
  .win .pcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 22px; }
  .phone--hero { display: block; position: absolute; z-index: 3; left: 0; top: 48px; }
  .mail { position: absolute; right: 0; top: 118px; width: 300px; }
}

/* Escritorios bajos (1280×800): el momento de aprobar, con sus tres botones,
   cabe entero en el primer pantallazo (medido en R4a). */
@media (min-width: 1200px) and (max-height: 860px) {
  .hero { padding-top: 28px; }
  .hero-head { gap: 16px; }
  .demo { margin-top: 24px; }
}

@media (max-width: 1199px) {
  .demo-stage { display: grid; }
  .demo-glow { inset: -10% -8% 0 -8%; }
  .win .pcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 22px; padding: 4px 0 0; }
  .mail { justify-self: end; width: min(100%, 380px); margin: -40px 24px 0 0; }
}

.win .pcard::after { inset: -10px; border-radius: var(--r-xl); }

.demo-cap {
  position: relative; z-index: 4;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 28px; font-size: 0.8125rem; color: var(--on-deep-2);
}
/* Horizonte: una línea de luz donde se apoya el producto, encima del pie */
.demo-cap::before {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 1px;
  background: linear-gradient(90deg, rgba(244, 238, 226, 0), rgba(244, 238, 226, 0.26), rgba(244, 238, 226, 0));
}
.demo-cap-text { flex: 1 1 16rem; }
/* El control de la demo existe solo si la demo se reproduce: con JavaScript
   (boot.js marca .js antes de pintar) y sin movimiento reducido. Lo decide el
   CSS desde el primer pintado; si lo destapara home.js después, el pie de la
   demo crecería y movería la escena (CLS). */
.demo-ctl {
  display: none; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 11px;
  border: 0; border-radius: 999px; background: rgba(244, 238, 226, 0.08);
  box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.26); color: var(--on-deep);
  font-size: 0.8125rem; font-weight: 560; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-release) var(--ease-out), background-color var(--t-color) var(--ease-ui);
}
@media (prefers-reduced-motion: no-preference) { .js .demo-ctl { display: inline-flex; } }
.demo-ctl:active { transform: scale(0.97); transition-duration: var(--t-press), var(--t-color); }
@media (hover: hover) and (pointer: fine) { .demo-ctl:hover { background: rgba(244, 238, 226, 0.14); } }
.demo-ctl svg { width: 14px; height: 14px; display: none; }
.demo-ctl path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.demo-ctl .ctl-play path { fill: currentColor; stroke: none; }
.demo[data-state="playing"] .ctl-pause,
.demo[data-state="armed"] .ctl-pause,
.demo[data-state="paused"] .ctl-play,
.demo[data-state="done"] .ctl-replay { display: block; }

/* ---------- Coreografía de la demo ----------
   Cada pieza tiene su animación y su retraso bajo .demo.is-playing; el HTML
   pinta el estado final. Sin JavaScript o con movimiento reducido no hay
   .is-playing y se ve el final. Solo se animan transform, opacity y, en las
   pestañas, el color del texto. */

.demo {
  --t-head: 200ms; --t-inv1: 520ms; --t-inv2: 640ms; --t-total: 780ms; --t-count: 860ms;
  --t-msgbox: 900ms; --t-msg: 1040ms; --t-word: 22ms;
  --t-decide: 2900ms; --t-cursor: 3250ms; --t-click: 4200ms; --t-resolve: 4500ms; --t-seg: 4700ms;
  --t-mail: 5200ms; --t-row: 5800ms; --t-dot: 6300ms;
  --t-phone: 2500ms; --t-mtap: 3600ms;
}
@media (min-width: 1200px) {
  .demo {
    --t-decide: 2500ms; --t-phone: 2500ms; --t-mtap: 3600ms; --t-resolve: 4000ms; --t-seg: 4220ms;
    --t-mail: 4900ms; --t-row: 5500ms; --t-dot: 6000ms;
  }
}
.demo.is-paused,
.demo.is-paused *,
.demo.is-paused *::before,
.demo.is-paused *::after { animation-play-state: paused !important; }

.is-playing .d-in { animation: rise 520ms var(--ease-out) both; }
.is-playing .d-head { animation-delay: var(--t-head); }
.is-playing .d-inv1 { animation-delay: var(--t-inv1); }
.is-playing .d-inv2 { animation-delay: var(--t-inv2); }
.is-playing .d-total { animation-delay: var(--t-total); }
.is-playing .d-msgbox { animation-delay: var(--t-msgbox); }
.is-playing .count-live { animation: count 900ms var(--ease-out) var(--t-count) both; }
.is-playing .w { animation: word 300ms var(--ease-out) both; animation-delay: calc(var(--t-msg) + var(--i) * var(--t-word)); }
.is-playing .d-was-state { animation: show 360ms var(--ease-out) var(--t-head) both, hide 220ms var(--ease-ui) var(--t-resolve) forwards; }
.is-playing .d-now-state { animation: pop-in 420ms var(--ease-out) calc(var(--t-resolve) + 80ms) both; }
.is-playing .d-was-decide { animation: show-rise 480ms var(--ease-out) var(--t-decide) both, hide-up 240ms var(--ease-ui) var(--t-resolve) forwards; }
.is-playing .d-now-resolved { animation: show-rise 560ms var(--ease-out) calc(var(--t-resolve) + 120ms) both; }
.is-playing .pcard::after { animation: fade 600ms var(--ease-out) calc(var(--t-resolve) + 120ms) both; }
.is-playing .demo-glow { animation: glow-up 1600ms var(--ease-out) calc(var(--t-resolve) + 80ms) both; }
.is-playing .seg-ind { animation: seg-move 520ms var(--ease-in-out) var(--t-seg) both; }
.is-playing .seg-tab--1 { animation: seg-off 320ms var(--ease-ui) calc(var(--t-seg) + 120ms) both; }
.is-playing .seg-tab--2 { animation: seg-on 320ms var(--ease-ui) calc(var(--t-seg) + 160ms) both; }
.is-playing .n-was { animation: show 10ms linear both, num-out 260ms var(--ease-out) calc(var(--t-seg) + 260ms) forwards; }
.is-playing .n-now { animation: num-in 360ms var(--ease-out) calc(var(--t-seg) + 300ms) both; }
.is-playing .d-mail { animation: float-in 900ms var(--ease-out) var(--t-mail) both; }
.is-playing .d-row-new { animation: drop-in 620ms var(--ease-out) var(--t-row) both; }
.is-playing .d-row-old { animation: push-down 620ms var(--ease-out) var(--t-row) both; }
.is-playing .mail-dot { animation: dot-end 520ms var(--ease-out) var(--t-dot) both; }

/* Tarjeta sola (por debajo de 1200 px): el cursor o el toque pulsan Aprobar en la propia tarjeta */
@media (max-width: 1199px) {
  .is-playing .d-press { animation: press 260ms var(--ease-ui) var(--t-click) both; }
}
@media (max-width: 1199px) and (hover: hover) and (pointer: fine) {
  .is-playing .win .cursor { animation: cursor-move 900ms var(--ease-in-out) var(--t-cursor) both, cursor-press 240ms var(--ease-ui) var(--t-click), fade-out 260ms var(--ease-ui) calc(var(--t-resolve) + 60ms) forwards; }
}
@media (max-width: 1199px) and (hover: none), (max-width: 1199px) and (pointer: coarse) {
  .is-playing .win .tap { animation: tap 620ms var(--ease-out) calc(var(--t-click) - 60ms); }
}

/* Composición (desde 1200 px): Ane coge el móvil y aprueba allí */
@media (min-width: 1200px) {
  .is-playing .phone--hero { animation: phone-in 820ms var(--ease-out) var(--t-phone) both; }
  .is-playing .m-press { animation: press 300ms var(--ease-ui) calc(var(--t-mtap) + 60ms) both; }
  .is-playing .phone--hero .tap { animation: tap 620ms var(--ease-out) var(--t-mtap); }
  .is-playing .m-was-decide { animation: show 10ms linear both, hide-up 240ms var(--ease-ui) calc(var(--t-mtap) + 300ms) forwards; }
  .is-playing .m-now-resolved { animation: show-rise 520ms var(--ease-out) calc(var(--t-mtap) + 400ms) both; }
  .is-playing .m-was-sub { animation: show 10ms linear both, hide 200ms var(--ease-ui) calc(var(--t-mtap) + 400ms) forwards; }
  .is-playing .m-now-sub { animation: fade-in 320ms var(--ease-out) calc(var(--t-mtap) + 520ms) both; }
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-in { from { visibility: hidden; opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes word { from { opacity: 0; } }
@keyframes count { from { opacity: 1; } to { opacity: 1; } }
@keyframes show { from { visibility: hidden; opacity: 0; } to { visibility: visible; opacity: 1; } }
@keyframes show-rise { from { visibility: hidden; opacity: 0; transform: translateY(8px); } to { visibility: visible; opacity: 1; transform: none; } }
@keyframes hide { from { visibility: visible; opacity: 1; } to { visibility: hidden; opacity: 0; } }
@keyframes hide-up { from { visibility: visible; opacity: 1; } to { visibility: hidden; opacity: 0; transform: translateY(-6px); } }
@keyframes pop-in { from { visibility: hidden; opacity: 0; transform: scale(0.9); } }
@keyframes cursor-move { from { opacity: 0; transform: translate(160px, 110px); } 20% { opacity: 1; } to { opacity: 1; transform: translate(0, 0); } }
@keyframes cursor-press { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: 1; transform: scale(0.86); } }
@keyframes press { 0%, 100% { transform: scale(1); } 45% { transform: scale(0.965); } }
@keyframes tap { from { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; } to { opacity: 0; transform: scale(1.6); } }
@keyframes glow-up { from { opacity: 0.4; transform: scale(0.94); } }
@keyframes seg-move { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes seg-off { from { color: var(--on-deep); } to { color: var(--ink-3); } }
@keyframes seg-on { from { color: var(--ink-3); } to { color: var(--on-deep); } }
@keyframes num-out { to { visibility: hidden; opacity: 0; transform: translateY(-70%); } }
@keyframes num-in { from { visibility: hidden; opacity: 0; transform: translateY(70%); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(56px) rotate(-1.5deg); } }
@keyframes float-in { from { opacity: 0; transform: translateY(32px) scale(0.96); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-100%); } }
@keyframes push-down { from { transform: translateY(-100%); } }
@keyframes dot-end { from { opacity: 0; transform: scale(0.3); } 60% { opacity: 1; transform: scale(1.35); } to { opacity: 1; transform: scale(1); } }

/* ---------- Secciones ---------- */

.section { padding: var(--section) 0; overflow-x: clip; }
.fig-note { margin-top: 24px; font-size: 0.8125rem; color: var(--ink-3); }

/* ---------- Cómo funciona ----------
   Sin JavaScript, con movimiento reducido o en pantallas pequeñas: tres
   pasos apilados, cada uno con su figura. Con JavaScript en pantallas
   grandes (home.js añade .is-pinned): la ventana del panel queda fija a la
   derecha y su estado cambia con cada paso. */

.how { background: var(--bg); }
.how-steps { display: grid; gap: 104px; margin-top: 72px; }
.how-step {
  display: grid;
  grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr);
  gap: 32px 72px;
  align-items: center;
}
.how-copy { max-width: 28rem; }
.how-copy p { margin-top: 14px; color: var(--ink-2); text-wrap: pretty; }
.how-n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 18px;
  border-radius: 50%; background: var(--ink); color: var(--on-deep);
  font-size: 0.8125rem; font-weight: 680; font-variant-numeric: tabular-nums;
  transition: background-color 300ms var(--ease-ui), color 300ms var(--ease-ui), box-shadow 300ms var(--ease-ui);
}

.how-fig { padding: 6px 22px 22px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.view-head--sm { min-height: 54px; }
.view-count { font-size: 0.8125rem; color: var(--ink-3); }

.file { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 580; }
.file svg { width: 16px; height: 16px; flex: none; }
.file path { fill: none; stroke: var(--ink-2); stroke-width: 1.3; stroke-linejoin: round; }
.file-ok { margin-left: 4px; color: var(--sage-ink); font-weight: 600; }

.sheet-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.sheet-table th { padding: 10px 12px; text-align: left; color: var(--ink-3); font-weight: 560; border-block: 1px solid var(--line); }
.sheet-table td { padding: 12px; border-bottom: 1px solid var(--line); }
.sheet-table th:first-child,
.sheet-table td:first-child { padding-left: 0; }
.sheet-table th:last-child,
.sheet-table td:last-child { padding-right: 0; }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-table .r { text-align: right; }
.due { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--well); color: var(--ink-2); font-size: 0.75rem; font-weight: 560; white-space: nowrap; }
.due--late { background: var(--amber-wash); color: var(--amber-ink); }

.props { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (min-width: 900px) { .props { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.prop { padding: 14px 16px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.prop + .prop { background: var(--surface-2); border-color: var(--line); }
.prop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prop-title { font-weight: 640; letter-spacing: -0.02em; font-size: 0.9375rem; }
.prop-amt { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.prop-amt .num { font-size: 1.5rem; font-weight: 620; letter-spacing: -0.04em; }
.prop-amt span:last-child { font-size: 0.8125rem; color: var(--ink-3); }
.how-fig--2 { display: flex; flex-direction: column; }
.props-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; font-size: 0.8125rem; color: var(--ink-3); }
.props-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.prop-msg { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--well); font-size: 0.8125rem; line-height: 1.5; color: var(--ink); }

.how-fig--3 {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 0; background: none; box-shadow: none;
}
.trail { padding: 6px 22px 18px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.trail-list li {
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 11px 0;
  border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.45;
}
.trail-list time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.trail-list li.trail-swap { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; }
.trail-swap > * { grid-area: 1 / 1; }
.trail-was { align-self: center; }
.trail-row { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 11px 0; }
.trail-now .trail-row + .trail-row { border-top: 1px solid var(--line); }
.trail-now { display: none; }
.trail-now-dot { justify-self: start; align-self: center; width: 8px; height: 8px; margin-left: 2px; border-radius: 50%; background: var(--amber-ink); box-shadow: 0 0 0 4px var(--amber-wash); }
.s-now-resolved { visibility: hidden; opacity: 0; }
.trail-list strong { font-weight: 640; }
.phone--step { width: 236px; }
.phone--step .phone-screen { height: 452px; }

/* Modo fijo */
.how.is-pinned .how-body {
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  gap: 72px;
  margin-top: 24px;
  padding-bottom: 72px;
}
.how.is-pinned .how-steps { gap: 0; margin: 0; }
.how.is-pinned .how-step { display: flex; align-items: center; min-height: 74vh; }
.how.is-pinned .how-copy h3,
.how.is-pinned .how-copy p { transition: color 360ms var(--ease-ui); }
.how.is-pinned .how-step:not(.is-active) .how-copy h3,
.how.is-pinned .how-step:not(.is-active) .how-copy p { color: var(--ink-3); }
.how.is-pinned .how-step:not(.is-active) .how-n { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line-2); }

.how-stage { position: relative; }
.how-sticky { position: sticky; top: max(calc(var(--header-h) + 28px), calc(50vh - 250px)); }
.how-win {
  position: relative;
  border-radius: var(--r-xl); box-shadow: var(--sh-3);
}
.how-win .win-bar { border-radius: var(--r-xl) var(--r-xl) 0 0; }
.win-nav--how { display: grid; grid-template-columns: repeat(3, 76px); padding: 3px; gap: 0; border-radius: 999px; background: rgba(14, 28, 28, 0.05); }
.win-nav--how span:not(.win-nav-ind) { position: relative; display: grid; place-items: center; height: 24px; padding: 0; transition: color 300ms var(--ease-ui); }
.win-nav-ind {
  position: absolute; left: 3px; top: 3px; bottom: 3px; width: 76px; padding: 0;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(14, 28, 28, 0.12);
  transition: transform 520ms var(--ease-in-out);
}
.how[data-active="1"] .win-nav--how span:nth-child(2),
.how[data-active="2"] .win-nav--how span:nth-child(3),
.how[data-active="3"] .win-nav--how span:nth-child(4) { color: var(--ink); }
.how[data-active="2"] .win-nav-ind { transform: translateX(100%); }
.how[data-active="3"] .win-nav-ind { transform: translateX(200%); }

.how-screen { display: grid; min-height: 404px; padding: 0 24px 24px; background: var(--surface); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.how-screen > .how-fig {
  grid-area: 1 / 1;
  padding: 0; background: none; box-shadow: none; border-radius: 0;
  opacity: 0; visibility: hidden;
  transform: translateY(14px); filter: blur(6px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), filter 200ms var(--ease-out), visibility 0s linear 200ms;
}
.how-screen > .how-fig.is-active {
  opacity: 1; visibility: visible; transform: none; filter: none;
  transition: opacity 480ms var(--ease-out) 90ms, transform 620ms var(--ease-out) 90ms, filter 480ms var(--ease-out) 90ms, visibility 0s;
}
.how-screen .props .prop { transition: transform 620ms var(--ease-out); }
.how-screen .how-fig:not(.is-active) .prop + .prop { transform: translateY(18px); }
.how-screen > .how-fig--3 { display: block; position: relative; }
.how-screen .trail { padding: 0; background: none; box-shadow: none; border-radius: 0; max-width: 62%; }
.how-screen .phone--step {
  position: absolute; right: -28px; bottom: -96px;
  transform: translateY(64px) rotate(2deg); opacity: 0;
  transition: transform 700ms var(--ease-out) 140ms, opacity 400ms var(--ease-out) 140ms;
}
.how-screen .how-fig--3.is-active .phone--step { transform: none; opacity: 1; }
.how-screen .trail-now { display: block; visibility: hidden; opacity: 0; }
.how-screen .how-fig--3.is-active .s-press .tap { animation: tap 620ms var(--ease-out) 1000ms; }
.how-screen .how-fig--3.is-active .s-press { animation: press 300ms var(--ease-ui) 1060ms both; }
.how-screen .how-fig--3.is-active .s-was-decide { animation: hide-up 240ms var(--ease-ui) 1360ms both; }
.how-screen .how-fig--3.is-active .s-now-resolved { animation: show-rise 520ms var(--ease-out) 1460ms both; }
.how-screen .how-fig--3.is-active .trail-was { animation: hide 240ms var(--ease-ui) 1560ms both; }
.how-screen .how-fig--3.is-active .trail-now { animation: show-rise 560ms var(--ease-out) 1680ms both; }

/* ---------- Límites: segundo tramo de tinta ---------- */

.limits { position: relative; isolation: isolate; overflow: clip; }
.limits::before {
  content: "";
  position: absolute; z-index: -1; right: -20%; top: -30%; width: 70%; height: 120%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(108, 145, 128, 0.2), rgba(108, 145, 128, 0) 70%);
  pointer-events: none;
}
.never { margin-top: 72px; border-bottom: 1px solid var(--on-deep-line); }
.never-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr);
  gap: 16px 72px;
  padding: 44px 0;
  border-top: 1px solid var(--on-deep-line);
}
/* La luz de cada límite: un filo que se enciende de izquierda a derecha y
   un resplandor de salvia detrás de la frase. Una sola vez, al entrar. */
.never-row::before {
  content: "";
  position: absolute; z-index: -1; left: -16%; top: -60%; width: 64%; height: 180%;
  background: radial-gradient(closest-side, rgba(108, 145, 128, 0.18), rgba(108, 145, 128, 0));
  pointer-events: none;
}
.never-row::after {
  content: "";
  position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(244, 238, 226, 0.7), rgba(168, 178, 174, 0.45) 55%, rgba(108, 145, 128, 0));
  transform-origin: left center;
}
.never dt {
  font-size: clamp(1.625rem, 1.1rem + 1.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.034em;
  font-weight: 600;
  text-wrap: balance;
  color: var(--on-deep);
  transition: color 900ms var(--ease-ui);
}
.never dd { align-self: end; color: var(--on-deep-2); font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty; }

@media (prefers-reduced-motion: no-preference) {
  .js .never-row[data-lite]:not(.is-lit) dt { color: var(--on-deep-2); }
  .js .never-row[data-lite]:not(.is-lit)::after { transform: scaleX(0); opacity: 0; }
  .js .never-row[data-lite]:not(.is-lit)::before { opacity: 0; }
  .never-row.is-lit::after { animation: light-line 1300ms var(--ease-out) both; }
  .never-row.is-lit::before { animation: fade 1400ms var(--ease-out) 200ms both; }
}
@keyframes light-line { from { transform: scaleX(0); opacity: 1; } }

/* ---------- Las tres tareas ---------- */

.tasks { background: var(--bg); }
.tasks-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr);
  gap: 24px 72px; align-items: end;
}
.tasks-note { color: var(--ink-2); max-width: 26rem; padding-bottom: 6px; }
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}
.task {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 300px; padding: 32px 32px 0;
  border-radius: var(--r-tile); overflow: hidden;
  isolation: isolate;
}
.task--cobros {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 56px;
  min-height: 0; padding: 40px 40px 0;
  background: var(--surface); border: 1px solid var(--line);
}
.task--cobros .task-text { align-self: start; padding-bottom: 40px; }
.task--presupuestos { grid-column: 1 / span 6; background: var(--cream); }
.task--visitas { grid-column: 7 / span 6; background: var(--deep); color: var(--on-deep); }
.task-text { max-width: 30rem; }
.task-text p { margin-top: 10px; color: var(--ink-2); text-wrap: pretty; }
.task--presupuestos .task-text p { color: var(--cream-ink); }
.task--visitas .task-text p { color: var(--on-deep-2); }
.task-link { color: inherit; text-decoration: none; }
.task-link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.task-link:focus-visible { outline: none; }
.task-link:focus-visible::after { box-shadow: inset 0 0 0 2px var(--sage-ink), inset 0 0 0 4px var(--surface); }
.task--visitas .task-link:focus-visible::after { box-shadow: inset 0 0 0 2px var(--on-deep), inset 0 0 0 4px var(--deep); }
.task-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 0.875rem; font-weight: 600; color: var(--sage-ink); }
.task--presupuestos .task-more { color: var(--ink); }
.task--visitas .task-more { color: var(--on-deep); }

.task-preview { margin-top: auto; padding-top: 32px; }
.task--cobros .task-preview { align-self: end; margin: 0; padding: 0; }
.tcard {
  position: relative; padding: 18px 20px 22px;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 0 0 1px rgba(14, 28, 28, 0.06), 0 -12px 40px -20px rgba(14, 28, 28, 0.3);
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}
.task--visitas .tcard { box-shadow: inset 0 1px 0 #ffffff, 0 0 0 1px rgba(244, 238, 226, 0.16), 0 -16px 48px -20px rgba(0, 0, 0, 0.7); }
.task--visitas::before {
  content: ""; position: absolute; z-index: -1; left: 10%; right: -10%; bottom: -40%; height: 90%;
  background: radial-gradient(closest-side, rgba(108, 145, 128, 0.5), rgba(108, 145, 128, 0));
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .task:hover .tcard { transform: translateY(-6px); }
  .task:hover .task-more svg { transform: translateX(3px); }
  .task--cobros:hover { border-color: var(--line-2); }
}
.task { transition: border-color 320ms var(--ease-out); }
.task:active .tcard { transform: translateY(-3px); transition-duration: 120ms; }

.tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tcard-kind { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; }
.tcard-title { margin-top: 8px; font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.025em; line-height: 1.3; }
.tcard-rows { margin-top: 10px; border-top: 1px solid var(--line); }
.tcard-rows p { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.8125rem; }
.tcard-late { color: var(--ink-3); }
.tcard-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; font-weight: 640; font-size: 0.875rem; }
.tcard-total .num { font-size: 1.375rem; letter-spacing: -0.035em; }
.tcard-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 0.8125rem; font-weight: 560; }
.tcard-line .num { font-weight: 640; }
.tcard-quiet { margin-top: 4px; font-size: 0.8125rem; color: var(--ink-3); }
.tcard-msg { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--well); font-size: 0.8125rem; line-height: 1.5; }
.tcard--visit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.tcard-date {
  display: grid; align-self: start; justify-items: center; width: 52px; padding: 8px 0 10px;
  border-radius: var(--r-md); background: var(--sage-wash); color: var(--sage-ink);
}
.tcard-day { font-size: 1.5rem; font-weight: 680; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tcard-month { font-size: 0.75rem; font-weight: 600; }
.tcard--visit .tcard-title { margin-top: 6px; }
.tcard--wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; }
.tcard--wide .tcard-msg { margin-top: 0; }
.tcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tcard-actions .btn:first-child { grid-column: 1 / -1; }
.tcard-actions .btn.fake { min-height: 36px; }

/* ---------- Piloto y precio ---------- */

.pilot { background: var(--surface); }
.pilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 5.6fr) minmax(0, 6.4fr);
  gap: 48px 64px;
  align-items: start;
}
.pilot-body { margin-top: 24px; max-width: 30rem; color: var(--ink-2); text-wrap: pretty; }
.pilot-lead .btn { margin-top: 32px; }
.pilot-sheet {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg); border-radius: var(--r-tile);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pilot-col { padding: 32px 32px 24px; }
.pilot-col + .pilot-col { box-shadow: inset 1px 0 0 var(--line-2); }
.pilot-h { font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.02em; margin-bottom: 12px; }
.ticks li {
  position: relative; padding: 12px 0 12px 30px;
  border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2);
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--sage-wash);
}
.ticks li::after {
  content: ""; position: absolute; left: 7px; top: 16px; width: 4px; height: 8px;
  border-right: 1.7px solid var(--sage-ink); border-bottom: 1.7px solid var(--sage-ink);
  transform: rotate(45deg);
}
.ticks--ask li::before { left: 2px; top: 22px; width: 14px; height: 1.5px; border-radius: 0; background: var(--ink-3); }
.ticks--ask li::after { content: none; }

/* ---------- Preguntas frecuentes ---------- */

.faq { background: var(--bg); }
/* Una sola columna de lectura, centrada en la página */
.faq-wrap { max-width: calc(52rem + 2 * var(--gutter)); }
.faq-list { margin-top: 48px; }
.faq-item:last-child { border-bottom: 1px solid var(--line-2); }
.faq-more { margin-top: 28px; color: var(--ink-2); }
.faq-more a { color: var(--ink); font-weight: 580; }
.faq-item { border-top: 1px solid var(--line-2); }
.faq-item summary {
  position: relative;
  display: flex; align-items: center; min-height: 68px; padding: 14px 52px 14px 0;
  font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.022em; line-height: 1.3;
  list-style: none; cursor: pointer; border-radius: var(--r-sm);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: color var(--t-color) var(--ease-ui);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: ""; position: absolute; right: 4px; top: 50%; width: 32px; height: 32px; margin-top: -16px;
  border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color var(--t-color) var(--ease-ui), box-shadow var(--t-color) var(--ease-ui);
}
.faq-item summary::after {
  content: ""; position: absolute; right: 17px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform 240ms var(--ease-out);
}
.faq-item[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq-item[open] summary::before { background: var(--surface); box-shadow: inset 0 0 0 1px var(--control); }
@media (hover: hover) and (pointer: fine) {
  .faq-item summary:hover { color: var(--sage-ink); }
  .faq-item summary:hover::before { background: var(--surface); }
}
.faq-a { padding: 0 52px 26px 0; }
.faq-a p { max-width: 40rem; color: var(--ink-2); text-wrap: pretty; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item::details-content {
    block-size: 0; overflow: clip;
    transition: block-size 280ms var(--ease-out), content-visibility 280ms allow-discrete;
  }
  .faq-item[open]::details-content { block-size: auto; }
}

/* ---------- Una persona detrás ---------- */

.person { position: relative; background: var(--surface); }
.person-grid {
  display: grid;
  grid-template-columns: minmax(0, 4.2fr) minmax(0, 7fr);
  gap: 48px 88px;
  align-items: center;
}
/* Hueco de la foto: vacío se lee como un retrato de marca (tinta con luz de
   salvia y las iniciales); con la foto real, la imagen lo tapa entero. */
.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; isolation: isolate;
  display: grid; place-items: end start; padding: 28px;
  border-radius: var(--r-tile);
  background:
    radial-gradient(70% 55% at 30% 105%, rgba(108, 145, 128, 0.7), rgba(108, 145, 128, 0) 70%),
    radial-gradient(50% 40% at 85% 0%, rgba(244, 238, 226, 0.14), rgba(244, 238, 226, 0) 70%),
    var(--deep);
  box-shadow: inset 0 1px 0 rgba(244, 238, 226, 0.14), var(--sh-2);
}
.portrait-frame img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.portrait-mono { font-size: clamp(4.5rem, 3rem + 4vw, 7rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.9; color: var(--on-deep); }
.portrait figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--ink-3); }
.person-body { margin-top: 24px; max-width: 34rem; color: var(--ink-2); text-wrap: pretty; }
.contact { margin-top: 32px; max-width: 34rem; border-bottom: 1px solid var(--line); }
.contact-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 16px; align-items: center; min-height: 60px; border-top: 1px solid var(--line); }
.contact dt { font-size: 0.875rem; color: var(--ink-3); }
.contact dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 1.0625rem; font-weight: 560; }
.contact dd a { color: var(--ink); text-decoration-color: var(--line-2); }
@media (hover: hover) and (pointer: fine) { .contact dd a:hover { text-decoration-color: currentColor; } }
.copy {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 10px;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line-2); font-size: 0.8125rem; font-weight: 560; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-release) var(--ease-out), box-shadow var(--t-color) var(--ease-ui), color var(--t-color) var(--ease-ui);
}
.copy:active { transform: scale(0.96); transition-duration: var(--t-press), var(--t-color), var(--t-color); }
.copy svg { width: 14px; height: 14px; }
.copy path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .copy:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--control); } }
.person .link-arrow { margin-top: 20px; }

/* Aviso breve (copiar el correo): entra desde abajo y sale por el mismo camino */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100% - 32px); padding: 12px 18px;
  border-radius: 999px; background: var(--deep); color: var(--on-deep);
  box-shadow: var(--sh-float-deep);
  font-size: 0.9375rem; font-weight: 540;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); transition-duration: 260ms; }
.toast:empty { padding: 0; }

/* ---------- Llamada final ---------- */

.cta { position: relative; padding: 136px 0 144px; overflow: clip; isolation: isolate; text-align: center; }
.cta::before {
  content: "";
  position: absolute; z-index: -1; left: 50%; bottom: -60%;
  width: 1400px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(108, 145, 128, 0.42), rgba(108, 145, 128, 0) 70%);
  pointer-events: none;
}
.cta-inner { display: grid; justify-items: center; }
.cta .display-2 { max-width: 16em; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }

/* ---------- Pie claro, con la R plana ---------- */

.site-footer { background: var(--bg); color: var(--ink); padding: 88px 0 32px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.4fr)); gap: 40px 48px; }
.footer-r { width: 88px; height: 88px; color: var(--ink); }
.footer-name { margin-top: 18px; font-size: 1.25rem; font-weight: 660; letter-spacing: -0.035em; }
.footer-line { margin-top: 8px; color: var(--ink-2); max-width: 24rem; }
.footer-h { font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.footer-col ul { display: grid; }
.footer-col a,
.footer-legal a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-2); text-decoration: none; transition: color var(--t-color) var(--ease-ui); }
.footer-contact p:not(.footer-h) { display: flex; align-items: center; min-height: 36px; color: var(--ink-2); }
.footer-contact a { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .footer-col a:hover,
  .footer-legal a:hover { color: var(--ink); text-decoration: underline; }
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  position: relative; margin-top: 72px; padding-top: 18px;
  color: var(--ink-2); font-size: 0.8125rem;
}
.footer-bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line-2); }
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-legal a { font-size: 0.8125rem; }

/* ---------- Estado de cada tarea ----------
   Solo Cobros está en el piloto; Presupuestos y Visitas, en preparación.
   La chapa va junto al título y nunca encima (sin etiquetas sobre titulares). */

.task-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.task-h .badge,
.task-h .chip { flex: none; }
/* La marca va junto al nombre y nunca se parte; en el pie del móvil, de
   columnas estrechas, baja entera a su propia línea (ver 640 px). */
.footer-col a { flex-wrap: wrap; align-items: baseline; align-content: center; }
.footer-col .soon { margin-left: 8px; font-size: 0.75rem; line-height: 1.3; color: var(--ink-3); white-space: nowrap; }

/* ---------- 404: un tramo de tinta con tres salidas de verdad ---------- */

.lost { padding: 96px 0 120px; }
.lost .display { max-width: 16em; }
.lost .lede { margin-top: 24px; max-width: 34rem; }
.lost-links { margin-top: 56px; max-width: 56rem; border-bottom: 1px solid var(--on-deep-line); }
.lost-links li { border-top: 1px solid var(--on-deep-line); }
.ink .lost-link {
  display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto; align-items: center; gap: 4px 32px;
  min-height: 84px; padding: 18px 0; color: var(--on-deep); text-decoration: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lost-name { font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem); font-weight: 620; letter-spacing: -0.026em; line-height: 1.18; }
.lost-desc { color: var(--on-deep-2); text-wrap: pretty; transition: color var(--t-color) var(--ease-ui); }
.lost-link svg { width: 18px; height: 18px; transition: transform 240ms var(--ease-out); }
.lost-link path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .lost-link:hover .lost-desc { color: var(--on-deep); }
  .lost-link:hover svg { transform: translateX(3px); }
}

/* ==========================================================================
   Páginas interiores (R4b)
   Las mismas piezas que la portada, con una regla para abrir cada página:
   las de producto (tareas, cómo funciona, seguridad) empiezan con un tramo
   de tinta; las de personas y papeles (nosotros, contacto, gracias, legal),
   en claro. Titulares de un solo tono: los dos tonos son solo del hero y de
   la llamada final de la portada (DESIGN.md, enmienda del 2026-10-09).
   ========================================================================== */

.bg-page { background: var(--bg); }
.bg-surface { background: var(--surface); }

/* La página en la que estás, en la navegación */
.site-nav a[aria-current="page"] { color: var(--on-deep); background: rgba(244, 238, 226, 0.1); }
.menu-sheet nav a[aria-current="page"] { font-weight: 660; }
.menu-sheet nav a[aria-current="page"]::after {
  content: ""; order: 1; width: 7px; height: 7px; margin-left: 10px; border-radius: 50%; background: var(--sage);
}
.menu-sheet nav a[aria-current="page"] .soon { order: 2; }
.footer-col a[aria-current="page"] { color: var(--ink); }

/* ---------- Cabecera de página ---------- */

.page-hero { position: relative; padding: 80px 0 104px; overflow: clip; isolation: isolate; }
.page-hero--light { background: var(--surface); color: var(--ink); padding-bottom: 96px; }
.page-title {
  font-size: clamp(2.25rem, 1.3rem + 2.5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 620;
  text-wrap: balance;
  max-width: 16em;
}
.page-hero .lede { margin-top: 24px; max-width: 38rem; }
.page-hero--light .lede { color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 36px; }
.page-actions .btn { min-height: 48px; padding: 0 22px; }
.page-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  max-width: 38rem; margin-top: 36px; padding-top: 16px;
  border-top: 1px solid var(--on-deep-line);
  font-size: 0.875rem; color: var(--on-deep-2);
}

/* Cobros: texto a la izquierda y la tarjeta real a la derecha */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px 72px;
  align-items: center;
}
.hero-split .page-title { font-size: clamp(2.25rem, 1.4rem + 2vw, 3.25rem); }
.hero-split .lede { max-width: 30rem; }

/* La tarjeta sola, a tamaño de panel. Misma coreografía que la portada
   (demo.js y las animaciones de .demo): sin teléfono, el cursor o el toque
   pulsan Aprobar en la propia tarjeta a cualquier anchura, y la demo acaba
   cuando la luz termina de encenderse (data-demo-end="glow-up"). */
.demo.demo--card { margin-top: 0; --t-decide: 2900ms; --t-resolve: 4500ms; --t-seg: 4700ms; }
.demo--card .demo-stage { display: grid; }
.demo--card .demo-glow { inset: -26% -24% -22% -16%; }
.demo--card .win .pcard { grid-template-columns: minmax(0, 1fr); gap: 0; }
.demo--card .pcard-data { display: contents; }
.demo--card .win .msg { order: 2; margin-top: 16px; }
.demo--card .win .decide-swap { order: 3; }
@media (min-width: 1200px) {
  .demo--card .demo-stage { height: auto; }
  .demo--card .win { position: relative; left: auto; right: auto; top: auto; }
  .demo--card .win-body { padding: 0 24px 24px; }
  .demo--card.is-playing .d-press { animation: press 260ms var(--ease-ui) var(--t-click) both; }
}
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .demo--card.is-playing .win .cursor { animation: cursor-move 900ms var(--ease-in-out) var(--t-cursor) both, cursor-press 240ms var(--ease-ui) var(--t-click), fade-out 260ms var(--ease-ui) calc(var(--t-resolve) + 60ms) forwards; }
}
@media (min-width: 1200px) and (hover: none), (min-width: 1200px) and (pointer: coarse) {
  .demo--card.is-playing .win .tap { animation: tap 620ms var(--ease-out) calc(var(--t-click) - 60ms); }
}

/* ---------- Cabeceras de sección y repartos ---------- */

.sec-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr);
  gap: 24px 72px; align-items: end;
}
.sec-intro { max-width: 28rem; padding-bottom: 6px; color: var(--ink-2); text-wrap: pretty; }
.ink .sec-intro { color: var(--on-deep-2); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 80px;
  align-items: center;
}
.split--fig-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--fig-left .split-fig { order: -1; }
.split-text > p { margin-top: 18px; max-width: 34rem; color: var(--ink-2); text-wrap: pretty; }
.split-text > .h2 + p { margin-top: 24px; }
.split-text .ticks { margin-top: 28px; max-width: 34rem; }
.split-text .link-arrow { margin-top: 16px; }
.ink .split-text > p { color: var(--on-deep-2); }
.fig-cap { margin-top: 16px; font-size: 0.8125rem; color: var(--ink-3); }
.fig-cap .chip { margin-right: 8px; }

/* ---------- Cobros: la escala del tono ----------
   Tres tramos de la misma regla de días, de ancho proporcional (15, 15 y
   el resto, que no tiene final). El tono lo marca la factura más antigua. */

.tones { margin-top: 64px; }
.tone-scale { display: grid; grid-template-columns: 1fr 1fr 2fr; }
.tone { position: relative; padding: 30px 28px 0 0; }
.tone::before {
  content: ""; position: absolute; left: 0; right: 4px; top: 0; height: 10px; border-radius: 999px;
}
.tone--1::before { background: var(--sage-wash); box-shadow: inset 0 0 0 1px rgba(51, 89, 74, 0.2); }
.tone--2::before { background: var(--amber-wash); box-shadow: inset 0 0 0 1px rgba(107, 72, 0, 0.18); }
.tone--3::before { right: 0; background: linear-gradient(90deg, var(--ink) 55%, rgba(14, 28, 28, 0.18)); }
.tone-range { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 0.9375rem; color: var(--ink-2); }
.tone-range .num { font-size: 1.5rem; font-weight: 640; letter-spacing: -0.035em; color: var(--ink); }
.tone .badge { margin-top: 12px; }
.tone-line {
  margin-top: 16px; max-width: 26rem; padding: 14px 16px;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1);
  font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty;
}

/* ---------- Cobros: la hoja de facturas ---------- */

.data-grid {
  display: grid; grid-template-columns: minmax(0, 7.2fr) minmax(0, 4.8fr);
  gap: 48px 64px; align-items: start; margin-top: 64px;
}
.sheet { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); overflow: hidden; }
.sheet-bar {
  display: flex; align-items: center; min-height: 52px; padding: 0 20px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, var(--surface-2));
}
/* Si la tabla no cabe (móvil estrecho), se desplaza ella, nunca la página */
.sheet-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.sheet-scroll:focus-visible { outline-offset: -2px; border-radius: 0; }
.sheet-grid { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.35; }
.sheet-grid th,
.sheet-grid td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.sheet-grid th { background: var(--surface-2); color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.sheet-grid th:last-child,
.sheet-grid td:last-child { border-right: 0; }
.sheet-grid tbody tr:last-child td { border-bottom: 0; }
.sheet-grid .r { text-align: right; }
.sheet-grid td.num { white-space: nowrap; }
.sheet-off { color: var(--ink-3); background: var(--well); }
.sheet-off-note { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 500; color: var(--ink-3); }
.sheet-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-3); }

.specs { border-top: 1px solid var(--line-2); }
.specs div {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 20px;
  padding: 18px 0; border-bottom: 1px solid var(--line-2);
}
.specs dt { padding-top: 2px; font-size: 0.875rem; color: var(--ink-3); }
.specs dd { line-height: 1.5; text-wrap: pretty; }

/* ---------- Cobros: el mensaje aprobado, abierto en tu correo ---------- */

.mailview { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); overflow: hidden; }
.mailview-top { padding: 20px 24px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, var(--surface-2)); }
.mailview-subj { font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.02em; line-height: 1.35; text-wrap: pretty; }
.mailview-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin-top: 12px; font-size: 0.8125rem; }
.mailview-meta dt { color: var(--ink-3); }
.mailview-meta dd { font-variant-numeric: tabular-nums; }
.mailview-body { padding: 20px 24px 26px; font-size: 0.875rem; line-height: 1.55; }
.mailview-sum { white-space: pre-line; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mailview-sep { margin: 10px 0; color: var(--ink-3); letter-spacing: 0.1em; }
.mailview-msg { white-space: pre-line; }
.mailview-sum,
.mailview-msg { max-width: 34rem; }

/* ---------- Llamada final de las páginas interiores ----------
   Un tramo de tinta con el titular a la izquierda y la acción a la derecha;
   la luz de sección se apaga dentro de su caja (closest-side). */

.closing { position: relative; padding: 120px 0 112px; overflow: clip; isolation: isolate; }
.closing::before {
  content: "";
  position: absolute; z-index: -1; right: -12%; bottom: -70%; width: 70%; height: 150%;
  background: radial-gradient(closest-side, rgba(108, 145, 128, 0.24), rgba(108, 145, 128, 0));
  pointer-events: none;
}
.closing-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 72px; align-items: end;
}
.closing .h2 { max-width: 15em; }
.closing-grid p { margin-top: 20px; max-width: 32rem; color: var(--on-deep-2); text-wrap: pretty; }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.closing-actions .btn { min-height: 48px; padding: 0 22px; }
.closing-more {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px;
  margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--on-deep-line);
  font-size: 0.9375rem; color: var(--on-deep-2);
}
.ink .closing-more a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--on-deep); font-weight: 560; text-decoration: none;
}
.closing-more .chip--deep { color: var(--on-deep-2); }
@media (hover: hover) and (pointer: fine) { .ink .closing-more a:hover { text-decoration: underline; } }
.closing-mail { color: var(--on-deep-2); }

/* Llamada en claro (Seguridad), después de un tramo de tinta */
.help { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 72px; align-items: end; }
.help p { margin-top: 20px; max-width: 32rem; color: var(--ink-2); }
.help .closing-actions { align-items: center; }

/* ---------- Filas en claro (límites, qué hará) ---------- */

.rows { margin-top: 64px; border-bottom: 1px solid var(--line-2); }
.row {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 12px 72px; padding: 36px 0; border-top: 1px solid var(--line-2);
}
.row dt {
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem); line-height: 1.3;
  letter-spacing: -0.026em; font-weight: 620; text-wrap: balance;
}
.row dd { align-self: end; color: var(--ink-2); text-wrap: pretty; }
.limits .never { margin-top: 64px; }

/* Lo que hará una tarea en preparación: lista breve con su vista previa */
.plan { margin-top: 28px; border-bottom: 1px solid var(--line-2); counter-reset: plan; }
.plan li {
  position: relative; padding: 16px 0 16px 44px; border-top: 1px solid var(--line-2);
  counter-increment: plan; text-wrap: pretty;
}
.plan li::before {
  content: counter(plan);
  position: absolute; left: 0; top: 15px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 0.8125rem; font-weight: 660; font-variant-numeric: tabular-nums;
}
.plan-note { margin-top: 24px; max-width: 34rem; color: var(--ink-2); text-wrap: pretty; }

.preview { position: relative; padding: 32px 40px 0; border-radius: var(--r-tile); overflow: hidden; isolation: isolate; }
.preview--cream { background: var(--cream); }
.preview--deep { background: var(--deep); }
.preview--deep::before {
  content: ""; position: absolute; z-index: -1; left: 10%; right: -10%; bottom: -40%; height: 90%;
  background: radial-gradient(closest-side, rgba(108, 145, 128, 0.5), rgba(108, 145, 128, 0));
  pointer-events: none;
}
.preview--deep .tcard { box-shadow: inset 0 1px 0 #ffffff, 0 0 0 1px rgba(244, 238, 226, 0.16), 0 -16px 48px -20px rgba(0, 0, 0, 0.7); }
.preview-cap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 28px; font-size: 0.8125rem; color: var(--cream-ink); }
.preview--deep .preview-cap { color: var(--on-deep-2); }
.preview .tcard { max-width: 30rem; margin-inline: auto; transition: none; }

/* ---------- Cómo funciona: los pasos como su propio historial ---------- */

.steps { margin-top: 72px; }
.step {
  position: relative;
  display: grid; grid-template-columns: 40px minmax(0, 6fr) minmax(0, 4.4fr);
  gap: 16px 40px; padding-bottom: 72px;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 19px; top: 52px; bottom: 12px; width: 2px;
  border-radius: 2px; background: var(--line-2);
}
.step:last-child::before { content: none; }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--on-deep);
  font-size: 0.9375rem; font-weight: 680; font-variant-numeric: tabular-nums;
}
.step-body { padding-top: 4px; }
.step-body p { margin-top: 14px; max-width: 36rem; color: var(--ink-2); text-wrap: pretty; }
.step-log {
  align-self: start; margin-top: 4px; padding: 14px 16px;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1);
  font-size: 0.875rem; line-height: 1.45;
}
.step-log-k { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-3); }
.step-log-t { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; margin-top: 6px; }
.step-log time { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* El historial, como en el panel */
.log { padding: 4px 24px 10px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.log-list li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px 14px;
  padding: 14px 0; border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.45;
}
.log-list time { grid-row: 1 / span 2; padding-top: 2px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log-list .badge { justify-self: start; }
.log-quote { display: block; margin-top: 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--well); }

/* Decidir desde el móvil: texto, teléfono y las tres decisiones */
.decide-sec { position: relative; isolation: isolate; overflow: clip; }
.trip {
  display: grid; grid-template-columns: minmax(0, 4.2fr) auto minmax(0, 3.8fr);
  gap: 48px 72px; align-items: center;
}
.trip-text > p { margin-top: 24px; color: var(--on-deep-2); text-wrap: pretty; }
.trip-phone { position: relative; }
.trip-phone::before {
  content: ""; position: absolute; z-index: -1; inset: -16% -46%;
  background: radial-gradient(closest-side, rgba(108, 145, 128, 0.46), rgba(108, 145, 128, 0.14) 56%, rgba(108, 145, 128, 0));
  pointer-events: none;
}
.trip-phone .mcard-msg,
.trip-phone .mcard-n,
.trip-phone .mcard .badge,
.mail--light .mail-who { font-size: 0.75rem; }
.trip-list { border-bottom: 1px solid var(--on-deep-line); }
.trip-list div { padding: 20px 0; border-top: 1px solid var(--on-deep-line); }
.trip-list dt { font-size: 1.1875rem; font-weight: 620; letter-spacing: -0.022em; color: var(--on-deep); }
.trip-list dd { margin-top: 6px; color: var(--on-deep-2); text-wrap: pretty; }

/* Rechazar con un motivo, y dónde se guarda */
.teach {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: center; margin-top: 64px;
}
.teach-card { padding: 22px 24px 24px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.teach-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.teach-title { font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.025em; line-height: 1.3; }
.teach-meta { margin-top: 2px; font-size: 0.8125rem; color: var(--ink-3); }
.teach-label { margin-top: 18px; font-size: 0.875rem; font-weight: 600; }
.teach-field {
  margin-top: 8px; min-height: 88px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--well); border-bottom: 1.5px solid var(--control);
  font-size: 0.9375rem; line-height: 1.5;
}
.teach-card .btn.fake { margin-top: 12px; }
.teach .fig-cap { grid-column: 1 / -1; margin-top: 20px; }
.teach-arrow { justify-self: center; width: 28px; height: 28px; color: var(--ink-3); }
.teach-arrow path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.memory-list { margin-top: 14px; }
.memory-list li { padding: 14px 0; border-top: 1px solid var(--line); line-height: 1.45; }
.memory-list li.is-new { position: relative; padding-left: 18px; }
.memory-list li.is-new::before { content: ""; position: absolute; left: 0; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.memory-list .meta { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--ink-3); }

/* La bandeja en claro, como figura de sección: fuera de la composición del
   hero de la portada (que la coloca en absoluto desde 1200 px). */
.mail--light .is-new .mail-subj { white-space: normal; }
.mail.mail--light {
  position: relative; z-index: auto; top: auto; right: auto; width: auto; margin: 0; justify-self: stretch;
  background: var(--surface); box-shadow: var(--sh-3); -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* ---------- Seguridad ---------- */

/* Por decidir, y las tres salidas posibles */
.flow { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0 40px; align-items: center; }
.flow-start { padding: 20px 22px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.flow-start p,
.flow-out p { margin-top: 10px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.flow-out { position: relative; display: grid; gap: 14px; }
.flow-out::before {
  content: ""; position: absolute; left: -22px; top: 30px; bottom: 30px; width: 1.5px; background: var(--line-2);
}
.flow-out li { position: relative; padding: 16px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.flow-out li::before { content: ""; position: absolute; left: -22px; top: 50%; width: 22px; height: 1.5px; background: var(--line-2); }
.flow-out li:first-child::after {
  content: ""; position: absolute; left: -62px; top: 50%; width: 40px; height: 1.5px; background: var(--line-2);
}

.ledger-wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.ledger-wrap .h2 + p { margin-top: 24px; color: var(--ink-2); text-wrap: pretty; }
.ledger-wrap .ticks { margin-top: 32px; }
.ledger-wrap .ticks li { font-size: 1.0625rem; color: var(--ink); }
.ledger-wrap .ticks + p { margin-top: 24px; color: var(--ink-2); text-wrap: pretty; }

/* Quién trata tus datos */
.who { margin-top: 56px; border-bottom: 1px solid var(--line-2); }
.who-row {
  display: grid; grid-template-columns: minmax(0, 3.4fr) minmax(0, 8fr);
  gap: 12px 64px; padding: 32px 0; border-top: 1px solid var(--line-2);
}
.who-name { font-size: 1.25rem; font-weight: 640; letter-spacing: -0.025em; line-height: 1.25; }
.who-where { margin-top: 4px; font-size: 0.875rem; color: var(--ink-3); }
.who-role { max-width: 38rem; color: var(--ink-2); text-wrap: pretty; }
.who-role p + p { margin-top: 10px; }
.who-role strong { color: var(--ink); font-weight: 620; }
.who-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 48px; margin-top: 48px; }
.who-notes p { padding-top: 16px; border-top: 2px solid var(--ink); font-size: 0.9375rem; color: var(--ink-2); text-wrap: pretty; }
.who-notes strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 620; }
.who-more { margin-top: 40px; color: var(--ink-2); }

/* Al terminar el piloto: una línea de tiempo en tinta */
.after { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 40px; margin-top: 72px; }
.after::before {
  content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 1px;
  background: linear-gradient(90deg, rgba(244, 238, 226, 0.55), rgba(244, 238, 226, 0.12));
}
.after-step { position: relative; padding-top: 40px; }
.after-step::before {
  content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--on-deep); box-shadow: 0 0 0 5px var(--deep), 0 0 0 6px rgba(244, 238, 226, 0.18);
}
.after-step--keep::before { background: var(--deep); box-shadow: inset 0 0 0 1.5px var(--on-deep-2), 0 0 0 5px var(--deep); }
.after-when { font-size: 1.375rem; font-weight: 640; letter-spacing: -0.03em; color: var(--on-deep); font-variant-numeric: tabular-nums; }
.after-step p { margin-top: 10px; color: var(--on-deep-2); text-wrap: pretty; }

/* ---------- Nosotros ---------- */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr);
  gap: 48px 88px; align-items: center;
}
.about-grid .link-arrow { min-height: 48px; }
.reading { max-width: calc(40rem + 2 * var(--gutter)); }
.reading .h2 + p { margin-top: 32px; }
.reading p { margin-top: 20px; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.reading p strong { color: var(--ink); font-weight: 600; }

.terms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 64px; margin-top: 56px; }
.terms div {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 24px;
  padding: 22px 0; border-top: 1px solid var(--line-2);
}
.terms dt { font-weight: 620; letter-spacing: -0.015em; }
.terms dd { color: var(--ink-2); text-wrap: pretty; }

/* ---------- Contacto y gracias ---------- */

.contact-sec { padding: 72px 0 var(--section); }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 80px; align-items: start;
}
.contact-grid .lede { margin-top: 24px; color: var(--ink-2); max-width: 30rem; }
.next-h { margin-top: 48px; font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.02em; }
.next { margin-top: 14px; max-width: 30rem; border-bottom: 1px solid var(--line-2); counter-reset: next; }
.next li {
  position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--line-2);
  counter-increment: next; color: var(--ink-2); text-wrap: pretty;
}
.next li::before {
  content: counter(next);
  position: absolute; left: 0; top: 13px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink); font-size: 0.8125rem; font-weight: 660; font-variant-numeric: tabular-nums;
}
.alt { margin-top: 32px; max-width: 30rem; color: var(--ink-2); }

/* Enlaces a los PDF del piloto (R5): discretos, dentro del texto, con el
   tipo y el peso del archivo en el propio enlace. Se abren en la misma
   pestaña. En /contacto/ (paso 3), /seguridad/ y la sección del piloto. */
.doc-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.doc-links a {
  display: block; padding-block: 12px; line-height: 1.4;
  color: var(--sage-ink); font-size: 0.9375rem; font-weight: 560;
  text-decoration-color: rgba(51, 89, 74, 0.35);
}
.doc-meta { color: var(--ink-3); font-weight: 450; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .doc-links a:hover { text-decoration-color: currentColor; } }
.next .doc-links { margin-top: 2px; }
.who-more + .doc-links { margin-top: 8px; }
.pilot-lead .doc-links { margin-top: 20px; }
.alt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.alt-row a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.0625rem; font-weight: 580; color: var(--ink); text-decoration-color: var(--line-2); }
@media (hover: hover) and (pointer: fine) { .alt-row a:hover { text-decoration-color: currentColor; } }

.form-tile { padding: 40px; background: var(--surface); border-radius: var(--r-tile); box-shadow: var(--sh-2); }
.form { display: grid; gap: 24px; }
.form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 16px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.field-hint { margin-top: -2px; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-3); text-wrap: pretty; }
.field input,
.field textarea {
  width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
  border: 0; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4; letter-spacing: -0.011em;
  box-shadow: inset 0 0 0 1px var(--control);
  -webkit-appearance: none; appearance: none;
  transition: box-shadow var(--t-color) var(--ease-ui);
}
.field textarea { min-height: 152px; line-height: 1.5; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--control), inset 0 0 0 60px var(--sage-tint);
}
@media (hover: hover) and (pointer: fine) {
  .field input:hover,
  .field textarea:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
}
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--sage-ink); outline-offset: 2px; box-shadow: inset 0 0 0 1px var(--sage-ink); }
.field [aria-invalid="true"],
.field [aria-invalid="true"]:hover { box-shadow: inset 0 0 0 1.5px var(--brick-ink); }
.field-error { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; font-weight: 560; line-height: 1.4; color: var(--brick-ink); }
.field-error:empty { display: none; }
.field-error svg,
.form-notice svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.field-error circle,
.form-notice circle { fill: none; stroke: currentColor; stroke-width: 1.5; }
.field-error path,
.form-notice path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.form-notice {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px;
  border-radius: var(--r-lg); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 0.9375rem; line-height: 1.45; color: var(--ink);
}
.form-notice svg { margin-top: 2px; color: var(--brick-ink); }
.form-notice a { color: var(--ink); font-weight: 600; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-top: 4px; }
.form-foot .btn { min-height: 48px; padding: 0 28px; }
.form-legal { flex: 1 1 14rem; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-3); }
.form-legal a { color: var(--ink-2); }
/* El campo trampa: fuera de la vista y del orden de tabulación; solo un
   programa que rellena todo lo encuentra (src/web/views/contact.py). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn-spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] .btn-spin { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .btn[aria-busy="true"] .btn-spin { animation: spin 700ms linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

.thanks { padding: 88px 0 var(--section); }
.thanks-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.6fr); gap: 48px 88px; align-items: start; }
.thanks .lede { margin-top: 24px; max-width: 34rem; color: var(--ink-2); }
.thanks .page-actions { margin-top: 40px; }
.thanks-side { padding: 28px 28px 24px; background: var(--bg); border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--line); }
.thanks-side .next-h { margin-top: 0; }
.thanks-side .next { border-bottom: 0; }
.thanks-note { margin-top: 20px; font-size: 0.9375rem; color: var(--ink-2); text-wrap: pretty; }
.thanks-note a { color: var(--ink); font-weight: 580; }

/* ---------- Aviso legal y privacidad ---------- */

.legal-sec { padding: 72px 0 var(--section); }
.page-hero--legal { padding-bottom: 8px; }
.page-hero--legal + .legal-sec { padding-top: 48px; }
.legal-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 40px 80px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 32px); }
.legal-toc-h { margin-bottom: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.legal-toc ul { border-left: 1px solid var(--line-2); }
.legal-toc a {
  display: flex; align-items: center; min-height: 44px; padding: 6px 0 6px 16px;
  color: var(--ink-2); font-size: 0.9375rem; line-height: 1.35; text-decoration: none;
  transition: color var(--t-color) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .legal-toc a:hover { color: var(--ink); text-decoration: underline; } }
.legal { max-width: 38rem; }
.legal h2 {
  margin-top: 56px; scroll-margin-top: calc(var(--header-h) + 24px);
  font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem); line-height: 1.25; letter-spacing: -0.024em; font-weight: 620;
  text-wrap: balance;
}
.legal > :first-child { margin-top: 0; }
.legal p,
.legal li { color: var(--ink-2); text-wrap: pretty; }
.legal p { margin-top: 14px; }
.legal ul { margin-top: 14px; }
.legal li { position: relative; margin-top: 10px; padding-left: 22px; }
.legal li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.legal a { color: var(--sage-ink); overflow-wrap: anywhere; }
.legal-date { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 0.875rem; color: var(--ink-3); }

/* ---------- Interiores: adaptación ---------- */

@media (max-width: 1100px) {
  .hero-split,
  .about-grid,
  .contact-grid,
  .thanks-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-split .lede { max-width: 38rem; }
  .sec-head,
  .closing-grid,
  .help { grid-template-columns: minmax(0, 1fr); }
  .closing-actions { justify-content: flex-start; }
  .split,
  .split--fig-left,
  .data-grid { grid-template-columns: minmax(0, 1fr); }
  .split--fig-left .split-fig { order: 0; }
  .trip { grid-template-columns: minmax(0, 1fr) auto; }
  .trip-text { grid-column: 1 / -1; max-width: 40rem; }
  .who-row { grid-template-columns: minmax(0, 1fr); }
  .who-notes { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .terms { grid-template-columns: minmax(0, 1fr); }
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; }
  .about-grid .portrait { max-width: 24rem; }
}

@media (max-width: 860px) {
  .tone-scale { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .tone { padding-right: 0; }
  .tone::before { right: 0; }
  .tone--1::before { right: 75%; }
  .tone--2::before { left: 25%; right: 50%; }
  .tone--3::before { left: 50%; }
  .step { grid-template-columns: 40px minmax(0, 1fr); }
  .step-log { grid-column: 2; }
  .teach { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .teach-arrow { transform: rotate(90deg); }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 36px 0; }
  .flow-out { margin-left: 28px; }
  .flow-out li:first-child::after { left: -22px; top: -36px; width: 1.5px; height: 36px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .after { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 48px; }
  .after::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; background: linear-gradient(180deg, rgba(244, 238, 226, 0.55), rgba(244, 238, 226, 0.12)); }
  .after-step { padding: 0 0 0 40px; }
  .trip { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .trip-text,
  .trip-list { justify-self: stretch; }
}

@media (max-width: 640px) {
  .page-hero { padding: 48px 0 72px; }
  .page-hero--light { padding-bottom: 64px; }
  .page-actions .btn,
  .closing-actions .btn { flex: 1 1 auto; }
  .tones,
  .rows,
  .steps,
  .teach,
  .data-grid { margin-top: 40px; }
  .tone-line { max-width: none; }
  .sheet-off { display: none; }
  .sheet-grid { font-size: 0.8125rem; }
  .sheet-grid th { white-space: normal; }
  .sheet-grid th,
  .sheet-grid td { padding: 10px 8px; }
  .sheet-bar,
  .sheet-foot { padding-inline: 14px; }
  .specs div { grid-template-columns: minmax(0, 1fr); }
  .mailview-top,
  .mailview-body { padding-inline: 16px; }
  .closing { padding: 88px 0 80px; }
  .closing-more { margin-top: 48px; }
  .step { gap: 12px 16px; padding-bottom: 48px; }
  .step-body .h3 { padding-top: 4px; }
  .log { padding: 2px 16px 8px; }
  .teach-card { padding: 18px 16px 20px; }
  .who { margin-top: 40px; }
  .who-row { padding: 24px 0; }
  .terms { margin-top: 40px; }
  .terms div { grid-template-columns: minmax(0, 1fr); }
  .contact-sec { padding-top: 48px; }
  .form-tile { padding: 24px 16px; margin-inline: calc(var(--gutter) * -0.5); border-radius: 22px; }
  .form-pair { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { flex: 1 1 100%; }
  .thanks { padding-top: 56px; }
  .thanks-side { padding: 22px 18px 18px; border-radius: 22px; }
  .legal-sec { padding-top: 48px; }
  .preview { padding: 24px 16px 0; border-radius: 22px; }
  .help .closing-actions .btn { flex: 1 1 auto; }
}

/* ---------- Adaptación ---------- */

@media (max-width: 1100px) {
  .hero-side { grid-template-columns: 1fr; grid-template-areas: "lede" "actions" "price"; gap: 22px; max-width: 36rem; }
  .how-step { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .how-copy { max-width: 36rem; }
  .never-row { grid-template-columns: 1fr; }
  .tasks-head { grid-template-columns: 1fr; }
  .pilot-grid { grid-template-columns: minmax(0, 1fr); }
  .person-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 48px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .site-nav, .link-quiet { display: none; }
  .menu { display: block; }
  .tasks-grid { grid-template-columns: 1fr 1fr; }
  .task--cobros { grid-column: 1 / -1; grid-template-columns: 1fr; padding: 32px 32px 0; }
  .task--cobros .task-text { padding-bottom: 0; }
  .task--cobros .task-preview { padding-top: 32px; }
  .task--presupuestos,
  .task--visitas { grid-column: auto; }
}

@media (max-width: 860px) {
  .win .pcard { grid-template-columns: 1fr; gap: 0; }
  .win .msg { order: 2; margin-top: 16px; }
  .win .decide-swap { order: 3; }
  .pcard-data { display: contents; }
  .person-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 24rem; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --section: 96px; }
  .header-inner { gap: 10px; }
  .header-actions .btn--sm { min-height: 44px; }
  .hero { padding: 40px 0 64px; }
  .hero-actions .btn { flex: 1 1 auto; min-height: 48px; }
  .demo { margin-top: 40px; }
  .win { border-radius: var(--r-lg); }
  .win-bar { padding: 11px 12px; }
  .win-brand { font-size: 0.75rem; }
  .win-nav span:not(.is-on) { display: none; }
  .win-body { padding: 0 14px 14px; }
  .view-head { flex-wrap: wrap; padding: 12px 0; gap: 8px; }
  .seg { grid-template-columns: repeat(2, 96px); }
  .seg-ind { width: 96px; }
  .seg-tab--3 { display: none; }
  .win-body { padding: 0 10px 10px; }
  .win .pcard { padding: 14px 12px 12px; }
  .win .pcard::after { inset: 0; border-radius: var(--r-lg); }
  .mail { margin: -32px 10px 0 28px; width: auto; justify-self: stretch; }
  .demo-cap { margin-top: 20px; }
  .demo-ctl { min-height: 44px; }
  .how-steps { gap: 72px; margin-top: 48px; }
  .how-fig { padding: 4px 14px 14px; }
  .sheet-table .col-inv { display: none; }
  .sheet-table td, .sheet-table th { padding-inline: 8px; }
  .how-fig--3 { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .how-fig--3 .phone { order: -1; }
  .how-fig--3 .trail { justify-self: stretch; }
  .never { margin-top: 48px; }
  .never-row { padding: 28px 0; }
  .tasks-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 40px; }
  .task { padding: 24px 20px 0; min-height: 0; border-radius: 22px; }
  .task--cobros { padding: 24px 20px 0; }
  .tcard--wide { grid-template-columns: 1fr; }
  .tcard--wide .tcard-msg { margin-top: 12px; }
  .tcard { padding: 16px 16px 18px; }
  .pilot-sheet { grid-template-columns: 1fr; border-radius: 22px; }
  .pilot-col { padding: 24px 20px 16px; }
  .pilot-col + .pilot-col { box-shadow: inset 0 1px 0 var(--line-2); }
  .faq-item summary { font-size: 1.0625rem; min-height: 64px; }
  .contact-row { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .copy { min-height: 44px; }
  .cta { padding: 96px 0 104px; text-align: left; }
  .cta-inner { justify-items: start; }
  .cta-actions { justify-content: flex-start; }
  .cta-actions .btn { flex: 1 1 auto; min-height: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .footer-col a, .footer-legal a, .footer-contact p:not(.footer-h) { min-height: 44px; }
  .footer-col .soon { flex-basis: 100%; margin-left: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .lost { padding: 64px 0 80px; }
  .lost-links { margin-top: 40px; }
  .ink .lost-link { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .lost-desc { grid-column: 1; }
  .lost-link svg { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 380px) {
  .header-actions .btn--sm { padding: 0 12px; font-size: 0.8125rem; }
  .brand-word { font-size: 1rem; }
  .menu summary { padding: 0 12px; }
}

/* Preferencias del sistema */
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--deep); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mail { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .tone-2 { color: var(--ink-2); }
  .ink .tone-2, .lede { color: var(--on-deep); }
  .btn--ghost { box-shadow: inset 0 0 0 1.5px var(--on-deep); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .demo-ctl, .copy, .menu summary { transition-property: background-color, box-shadow, color; }
  .btn:active, .demo-ctl:active, .copy:active, .menu summary:active { transform: none; }
  .tcard { transition: none; }
  .toast { transform: translate(-50%, 0); }
}
