/* ==========================================================================
   CobroOne — estilos (versión conciliación bancaria)
   Mobile-first. Base de marca compartida con la versión anterior del sitio.
   ========================================================================== */

/* ---------- Fuentes autoalojadas ---------- */
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("assets/fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("assets/fonts/barlow-semi-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --ink: #161830;          /* azul tinta del logotipo */
  --ink-2: #1F2244;        /* superficie sobre fondo tinta */
  --ink-3: #2C3058;        /* bordes sobre fondo tinta */
  --orange: #E94E1B;       /* naranja del logotipo: gráficos y acentos */
  --orange-ui: #C9400F;    /* naranja para fondos de botón con texto blanco (AA) */
  --orange-ui-hover: #AE360B;
  --orange-soft: #FF8A5C;  /* naranja legible sobre fondo tinta */
  --cyan: #1FB5D3;         /* acento del material comercial */
  --paper: #F3F5FA;
  --white: #FFFFFF;
  --line: #DCE0EB;
  --text: #161830;
  --muted: #5A6078;
  --on-ink: #FFFFFF;
  --on-ink-muted: #B9BED6;

  --paid: #12805C;  --paid-bg: #DDF3EA;  --paid-bar: #1E9E6A;
  --due: #7A5600;   --due-bg: #FDF0C4;   --due-bar: #F2B518;
  --late: #C2283A;  --late-bg: #FBE1E4;  --late-bar: #E0364B;

  --font-display: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Escala tipográfica (razón ~1.25, fluida en los tamaños grandes) */
  --fs-sm: .875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(2.75rem, 1.6rem + 5.4vw, 5.5rem);

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 6vw, 8rem);
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow-float: 0 1px 2px rgba(22, 24, 48, .08), 0 24px 48px -16px rgba(22, 24, 48, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--white); color: var(--ink); padding: .75rem 1rem; border-radius: var(--radius-s); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange-ui); color: var(--white); }
.btn--primary:hover { background: var(--orange-ui-hover); }
.btn--ghost { border-color: rgba(255, 255, 255, .45); color: var(--on-ink); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); }
.btn--sm { min-height: 42px; padding: .5rem 1.1rem; font-size: .9375rem; }
.btn--small {
  min-height: 40px; padding: .4rem .9rem; border-radius: var(--radius-s);
  background: var(--paper); border-color: var(--line); color: var(--ink); font-size: .875rem;
}
.btn--small:hover { border-color: var(--ink); }
.btn--block { width: 100%; }

.text-link { font-weight: 600; color: var(--orange-ui); text-underline-offset: 3px; }
.text-link:hover { color: var(--orange-ui-hover); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 24, 48, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--ink-3); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { width: 128px; height: auto; }
.brand { border-radius: 4px; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 44px; padding: .5rem .9rem;
  background: transparent; border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--on-ink); font-weight: 600; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Menú móvil: panel bajo la cabecera */
.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ink); border-bottom: 1px solid var(--ink-3);
  padding: .5rem var(--gutter) 1.5rem;
  display: none;
}
.site-nav.is-open { display: block; animation: drop .25s var(--ease); }
.site-nav ul { display: grid; margin-bottom: 1rem; }
.site-nav li a {
  display: block; padding: .9rem 0; color: var(--on-ink); text-decoration: none; font-weight: 500; font-size: 1.125rem;
  border-bottom: 1px solid var(--ink-3);
}
.site-nav li a:hover { color: var(--orange-soft); }
.site-nav .btn { width: 100%; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
  .brand img { width: 138px; }
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; align-items: center; gap: 1.75rem; background: none; border: 0; padding: 0; }
  .site-nav ul { display: flex; gap: 1.5rem; margin: 0; }
  .site-nav li a { padding: .5rem 0; border: 0; font-size: .9688rem; color: var(--on-ink-muted); }
  .site-nav li a:hover { color: var(--on-ink); }
  .site-nav .btn { width: auto; }
}

/* ---------- Secciones genéricas ---------- */
.section { padding-block: var(--section); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head p { margin-top: 1rem; font-size: clamp(1.0625rem, 1rem + .25vw, 1.2rem); color: var(--muted); max-width: 60ch; }
.section-head--light p { color: var(--on-ink-muted); }

/* ---------- SAP Business One ---------- */
.sap { background: var(--paper); }
.sync { display: grid; gap: 1rem; align-items: center; }
.sync__node {
  display: grid; justify-items: center; gap: .3rem; padding: 1.5rem; border-radius: var(--radius-l); text-align: center;
}
.sync__node--sap { background: var(--white); border: 2px solid var(--ink); }
.sync__logo { width: 180px; max-width: 100%; height: auto; margin-bottom: .35rem; }
.sync__sub { font-size: var(--fs-sm); color: var(--muted); }
.sync__node--c1 { background: var(--ink); }
.sync__node--c1 img { width: 150px; height: auto; }
.sync__node--c1 .sync__sub { color: var(--on-ink-muted); }
.sync__lanes { display: grid; gap: .5rem; }
.lane {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: .7rem 1rem; border-radius: 999px; font-weight: 500; font-size: .9375rem; text-align: center;
  background: var(--white); border: 1px solid var(--line); overflow: hidden;
}
.lane span { position: relative; z-index: 1; }
.lane--in::before, .lane--out::before { content: ""; flex: none; width: 0; height: 0; border: 6px solid transparent; margin-right: .6rem; position: relative; z-index: 1; }
/* En móvil el flujo es vertical: SAP arriba, CobroOne abajo */
.lane--in::before { border-top-color: var(--orange); margin-top: 6px; }
.lane--out { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.lane--out::before { border-bottom-color: var(--orange-soft); margin-bottom: 6px; }
/* Pulso que recorre cada carril */
.lane::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(233, 78, 27, .14), transparent);
  transform: translateX(-100%); will-change: transform;
  animation: travel 3.2s linear infinite;
}
.lane--out::after { animation-direction: reverse; background: linear-gradient(90deg, transparent, rgba(255, 138, 92, .22), transparent); }
.lane:nth-child(2)::after { animation-delay: .5s; }
.lane:nth-child(3)::after { animation-delay: 1s; }
.lane:nth-child(4)::after { animation-delay: 1.5s; }
/* Solo transform: no fuerza recálculo de diseño en cada fotograma */
@keyframes travel { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (min-width: 900px) {
  .sync { grid-template-columns: 1fr 2fr 1fr; }
  .sync__node { min-height: 260px; align-content: center; }
  /* En escritorio: SAP a la izquierda; las flechas apuntan hacia el destino */
  .lane--in::before { order: 1; border-top-color: transparent; border-left-color: var(--orange); margin: 0 -6px 0 .6rem; }
  .lane--out::before { border-bottom-color: transparent; border-right-color: var(--orange-soft); margin: 0 .6rem 0 0; }
}
.sap__cols { display: grid; gap: 2rem; margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.sap__cols h3 { font-size: 1.5rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .sap__cols { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.ticks { display: grid; gap: .8rem; }
.ticks li { position: relative; padding-left: 2rem; color: #34384F; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--paid-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312805C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-8.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.sap__legal { margin-top: 2.5rem; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { background: var(--white); }
.faq__grid { display: grid; gap: 2.5rem; }
.faq__intro p { margin-top: 1rem; color: var(--muted); font-size: 1.125rem; }
.faq__intro a { color: var(--orange-ui); font-weight: 600; text-underline-offset: 3px; }
@media (min-width: 1024px) {
  .faq__grid { grid-template-columns: .8fr 1.6fr; gap: 4rem; align-items: start; }
  .faq__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary h3 { font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); font-weight: 600; }
.accordion summary .ico {
  width: 2rem; height: 2rem; padding: .4rem; border-radius: 50%; background: var(--paper); color: var(--ink);
  transition: transform .3s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.accordion summary:hover .ico { background: var(--ink); color: var(--white); }
.accordion details[open] summary .ico { transform: rotate(45deg); background: var(--orange-ui); color: var(--white); }
.accordion__body { overflow: hidden; }
.accordion__body p { padding-bottom: 1.4rem; color: var(--muted); max-width: 66ch; }
.accordion__body a { color: var(--orange-ui); font-weight: 600; }

/* ---------- CTA final ---------- */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--orange-ui); color: var(--white);
  padding-block: var(--section);
}
/* Bloques diagonales en tinta: eco del "1" del logotipo */
.cta::before {
  content: ""; position: absolute; z-index: -1; inset: auto -10% -45% auto; width: 75%; height: 120%;
  background: var(--ink); transform: rotate(-12deg); border-radius: 40px; opacity: .14;
}
.cta__grid { display: grid; gap: 2.5rem; align-items: start; }
.cta__copy h2 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem); line-height: .98; letter-spacing: -.02em; max-width: 14ch; text-wrap: balance; }
.cta__copy p { margin-top: 1.25rem; font-size: 1.1875rem; max-width: 44ch; }
.cta__contact { display: grid; gap: .6rem; margin-top: 2rem; }
.cta__contact li { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.cta__contact a { text-underline-offset: 3px; }
@media (min-width: 960px) { .cta__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.form {
  display: grid; gap: 1rem; color: var(--ink);
  background: var(--white); border-radius: var(--radius-l); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  box-shadow: 0 40px 80px -40px rgba(22, 24, 48, .7);
}
.form__title { font-size: 1.625rem; font-weight: 700; }
@media (min-width: 560px) {
  .form { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .form__title, .field--full, .form .btn, .form__status, .form__note { grid-column: 1 / -1; }
}
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .9375rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  border: 1.5px solid #C4C9D9; border-radius: var(--radius-s); background: var(--white);
  font-size: 1rem; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: #9AA1B8; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 181, 211, .45); }
.field input::placeholder, .field textarea::placeholder { color: #8A90A6; }
.field.has-error input { border-color: var(--late); }
.field__error { min-height: 0; font-size: .875rem; color: var(--late); font-weight: 500; }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: .9375rem; font-weight: 500; }
.form__status:empty { display: none; }
.form__status.is-ok { color: var(--paid); }
.form__status.is-error { color: var(--late); }
.form__status a { color: inherit; }
.form__note { font-size: .8125rem; color: var(--muted); }
.form .btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-ink-muted); padding: 4rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .9688rem; }
.footer__grid { display: grid; gap: 2.5rem; }
.footer__brand img { width: 150px; height: auto; margin-bottom: 1rem; }
.footer__brand p { max-width: 38ch; }
.footer__h { font-family: var(--font-body); font-size: .9375rem; font-weight: 600; color: var(--on-ink); margin-bottom: .9rem; letter-spacing: 0; }
.footer ul { display: grid; gap: .55rem; }
.footer a { color: var(--on-ink-muted); text-decoration: none; }
.footer a:hover { color: var(--on-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__legal { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 3rem; padding-top: 1.5rem; font-size: .875rem; }
.footer__legal::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--ink-3); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }


/* ---------- Rendimiento ----------
   El navegador omite el diseño y pintado de las secciones fuera de pantalla hasta que se acercan.
   contain-intrinsic-size reserva un alto aproximado para que la barra de desplazamiento no salte. */
main > section:not(.hero) { content-visibility: auto; contain-intrinsic-size: auto 900px; }
main > .demo { contain-intrinsic-size: auto 1800px; }

/* ---------- Utilidades ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lead-muted { margin-top: 1rem; color: var(--muted); font-size: clamp(1.0625rem, 1rem + .25vw, 1.2rem); max-width: 54ch; }
.btn--dark { background: var(--ink); color: var(--white); border-radius: var(--radius-s); min-height: 44px; padding: .55rem 1rem; font-size: .9375rem; }
.btn--dark:hover { background: #2A2E5A; }
.btn .ico { width: 1.1em; height: 1.1em; }
.pill { display: inline-block; padding: .15rem .5rem; border-radius: 999px; background: var(--white); color: var(--ink); font-size: .75rem; font-weight: 600; }

/* Estados de conciliación: mismos colores que el prototipo, siempre acompañados de texto */
:root {
  --ready: #7A5600; --ready-bg: #FDF0C4; --ready-row: #FFF8E1; --ready-bar: #F2B518;
  --done: #12805C;  --done-bg: #DDF3EA;  --done-row: #EEF9F3; --done-bar: #1E9E6A;
  --none: #4A5068;  --none-bg: #ECEEF4;
  --sel: #1F5FD1;   --sel-row: #EAF1FF;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--on-ink);
  padding: clamp(2.5rem, 2rem + 4vw, 5rem) 0 clamp(4rem, 3rem + 5vw, 7rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  right: -18vw; top: -12vw; background: radial-gradient(circle, rgba(233, 78, 27, .35), rgba(233, 78, 27, 0) 65%);
}
.hero__grid { display: grid; gap: clamp(3rem, 6vw, 4rem); align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem;
  padding: .3rem .85rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--ink-3);
  color: var(--on-ink-muted); font-weight: 500; font-size: .9375rem;
}
.hero__badge span { padding: .2rem .6rem; border-radius: 999px; background: var(--orange-ui); color: var(--white); font-weight: 600; font-size: .8125rem; }
.hero__title { font-size: clamp(2.5rem, 1.5rem + 4.6vw, 5rem); font-weight: 700; line-height: .98; letter-spacing: -.02em; max-width: 14ch; text-wrap: balance; }
.hero__lead { margin-top: 1.5rem; font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem); color: var(--on-ink); max-width: 44ch; font-weight: 500; }
.hero__def { margin-top: 1rem; color: var(--on-ink-muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero__by { margin-top: 1.75rem; font-size: var(--fs-sm); color: var(--on-ink-muted); }
@media (max-width: 479px) { .hero__actions .btn { width: 100%; } }

.hero__visual { position: relative; margin: 0; padding-top: 1rem; }
.match {
  background: var(--white); color: var(--ink); border-radius: var(--radius-l); overflow: hidden;
  box-shadow: var(--shadow-float), 0 0 0 1px rgba(255, 255, 255, .06); font-size: .8125rem;
}
.match__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.match__title { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.match__title .ico { color: var(--orange); }
.match__run {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: var(--radius-s);
  background: var(--ink); color: var(--white); font-weight: 600; font-size: .75rem;
  animation: press .4s var(--ease) .9s both;
}
.match__cols { display: grid; grid-template-columns: 1fr 34px 1fr; padding: .9rem .9rem .6rem; gap: 0 .2rem; }
.match__col { display: grid; gap: .4rem; align-content: start; }
.match__label { font-weight: 600; color: var(--muted); font-size: .75rem; margin-bottom: .1rem; height: 1.1rem; }
.mrow {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .45rem;
  padding: .45rem .55rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--white);
  height: 44px; align-content: center;
  animation: toReady .5s var(--ease) both, toDone .5s var(--ease) both;
}
.mrow--tall { height: calc(88px + .4rem); }
.mrow b { font-size: .75rem; font-variant-numeric: tabular-nums; }
.mrow span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .75rem; }
.mrow em { grid-column: 1 / -1; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .75rem; }
.mrow--1 { animation-delay: 1.5s, 3.6s; }
.mrow--2 { animation-delay: 1.8s, 3.7s; }
.mrow--3 { animation-delay: 2.1s, 3.8s; }
.match__links { width: 34px; height: 100%; margin-top: 1.5rem; overflow: visible; }
.link { fill: none; stroke: var(--ready-bar); stroke-width: 2.5; stroke-dasharray: 80; stroke-dashoffset: 80; vector-effect: non-scaling-stroke; animation: draw .5s var(--ease) forwards, linkDone .4s var(--ease) forwards; }
.link--1 { animation-delay: 1.4s, 3.6s; }
.link--2 { animation-delay: 1.7s, 3.7s; }
.link--3 { animation-delay: 2s, 3.8s; }
.match__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  margin: .3rem .9rem .9rem; padding: .7rem .85rem; border-radius: var(--radius-s); background: var(--ink); color: var(--white);
  animation: rise .5s var(--ease) 2.5s both;
}
.match__foot small { display: block; color: var(--on-ink-muted); font-size: .7rem; }
.match__foot strong { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.match__diff { color: #7EE2B8; font-weight: 600; font-variant-numeric: tabular-nums; }
.toast {
  position: absolute; z-index: 2; right: .5rem; bottom: 1.4rem;
  display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; border-radius: var(--radius-m);
  background: var(--white); color: var(--ink); box-shadow: var(--shadow-float); font-size: .8125rem; line-height: 1.3;
  animation: pop .5s var(--ease) 4s both;
}
.toast strong { display: block; font-weight: 600; }
.toast .ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--done-bg); color: var(--done); }
.hero__caption { margin-top: 3rem; line-height: 1.2rem; font-size: .8125rem; color: var(--on-ink-muted); }

@keyframes press { 50% { transform: scale(.94); background: var(--orange-ui); } }
@keyframes toReady { to { background: var(--ready-row); border-color: var(--ready-bar); } }
@keyframes toDone { from { background: var(--ready-row); border-color: var(--ready-bar); } to { background: var(--done-row); border-color: var(--done-bar); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes linkDone { to { stroke: var(--done-bar); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
/* La animación de estado necesita las dos claves encadenadas; en la segunda, partir del estado "listo" */
.mrow { animation-fill-mode: forwards, forwards; }

@media (min-width: 560px) {
  .match { font-size: .875rem; }
  .match__cols { grid-template-columns: 1fr 52px 1fr; padding: 1rem; }
  .match__links { width: 52px; }
  .mrow span, .mrow b, .mrow em { font-size: .8125rem; }
  .toast { right: -.75rem; }
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr 1.02fr; align-items: start; }
  .hero__visual { margin-top: 2.5rem; transform: perspective(1800px) rotateY(-5deg) rotateX(1.5deg); transform-origin: left center; }
  .toast { right: -1.75rem; }
}

/* ---------- Problema ---------- */
.problem { background: var(--white); }
.manual { display: grid; gap: 1rem; counter-reset: none; }
.manual li {
  position: relative; display: grid; gap: .4rem; padding: 1.4rem 1.25rem 1.25rem; border-radius: var(--radius-m);
  border: 1px solid var(--line); background: var(--paper);
}
.manual__n { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; line-height: 1; color: var(--orange); }
.manual .ico { position: absolute; top: 1.4rem; right: 1.25rem; width: 1.6rem; height: 1.6rem; color: var(--muted); }
.manual h3 { font-size: 1.375rem; }
.manual p { color: var(--muted); }
@media (min-width: 640px) { .manual { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .manual { grid-template-columns: repeat(4, 1fr); }
  /* Flecha discreta entre pasos manuales */
  .manual li:not(:last-child)::after {
    content: ""; position: absolute; right: -.85rem; top: 50%; width: .7rem; height: .7rem; margin-top: -.35rem;
    border-top: 2px solid var(--line); border-right: 2px solid var(--line); transform: rotate(45deg);
  }
}
.cost { margin-top: 1rem; padding: 1.5rem 1.5rem 1.6rem; border-radius: var(--radius-m); background: var(--ink); color: var(--on-ink-muted); }
.cost__title { font-family: var(--font-body); font-size: .9375rem; font-weight: 600; color: var(--orange-soft); margin-bottom: 1rem; letter-spacing: 0; }
.cost ul { display: grid; gap: .9rem; }
.cost strong { color: var(--white); font-weight: 600; }
@media (min-width: 640px) { .cost ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cost ul { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Propuesta ---------- */
.statement { background: var(--orange-ui); color: var(--white); padding-block: clamp(4rem, 3rem + 5vw, 7rem); position: relative; overflow: hidden; isolation: isolate; }
.statement::before { content: ""; position: absolute; z-index: -1; right: -8%; top: -30%; width: 45%; height: 160%; background: var(--ink); opacity: .12; transform: rotate(-12deg); border-radius: 40px; }
.statement__title { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.75rem); line-height: 1.02; max-width: 22ch; letter-spacing: -.02em; text-wrap: balance; }
.statement__chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.statement__chips li { padding: .55rem 1.1rem; border-radius: 999px; background: var(--ink); font-weight: 600; font-family: var(--font-display); font-size: 1.125rem; }
.statement__chips li:not(:last-child)::after { content: "→"; margin-left: .7rem; color: var(--orange-soft); }
@media (min-width: 1024px) {
  .statement__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 4rem; align-items: center; }
  .statement__title { max-width: none; }
  .statement__chips { margin-top: 0; display: grid; gap: .6rem; counter-reset: verbo; }
  .statement__chips li { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.2rem; border-radius: var(--radius-m); font-size: 1.375rem; counter-increment: verbo; }
  .statement__chips li::before { content: counter(verbo); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--orange-ui); font-size: 1rem; }
  .statement__chips li:not(:last-child)::after { content: none; }
  .statement__chips li:last-child { background: var(--white); color: var(--ink); }
  .statement__chips li:last-child::before { color: var(--white); }
}
.statement__note { margin-top: 1.75rem; max-width: 58ch; font-size: 1.125rem; }

/* ---------- Cómo funciona ---------- */
.flow { background: var(--paper); }
.steps { display: grid; gap: 1rem; }
.step {
  position: relative; display: grid; gap: .6rem; align-content: start;
  padding: 1.5rem; border-radius: var(--radius-m); background: var(--white); border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.step:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgba(22, 24, 48, .35); }
.step__n { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--paper); color: var(--orange); }
.step__n .ico { width: 1.5rem; height: 1.5rem; }
.step h3 { font-size: 1.375rem; }
.step p { color: var(--muted); }
.step:last-child { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.step:last-child p { color: var(--on-ink-muted); }
.step:last-child .step__n { background: var(--orange-ui); color: var(--white); }
/* Conectores animados entre pasos */
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 2.25rem; bottom: -1rem; width: 2px; height: 1rem; background: var(--orange);
  transform: scaleY(0); transform-origin: top; transition: transform .4s var(--ease);
}
.steps.is-visible .step::after { transform: none; }
.steps.is-visible .step:nth-child(2)::after { transition-delay: .15s; }
.steps.is-visible .step:nth-child(3)::after { transition-delay: .3s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } .step::after { display: none; } }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .step:not(:last-child)::after {
    display: block; left: auto; right: -1.5rem; top: 2.95rem; bottom: auto; width: 1.5rem; height: 2px;
    transform: scaleX(0); transform-origin: left;
  }
}

/* ---------- Demo / conciliador ---------- */
.demo { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.demo::before {
  content: ""; position: absolute; left: -20vw; bottom: -25vw; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(31, 181, 211, .16), transparent 65%); pointer-events: none;
}
.legend-cards { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.lc { display: grid; gap: .2rem; padding: .9rem 1rem; border-radius: var(--radius-m); border-left: 5px solid; font-size: .9375rem; }
.lc strong { font-weight: 600; }
.lc--ready { background: var(--ready-bg); color: #4D3700; border-color: var(--ready-bar); }
.lc--done { background: var(--done-bg); color: #0B5A40; border-color: var(--done-bar); }
.lc--none { background: var(--none-bg); color: #383D52; border-color: #9AA1B8; }
@media (min-width: 768px) { .legend-cards { grid-template-columns: repeat(3, 1fr); } }

.recon {
  position: relative; background: var(--paper); color: var(--ink);
  border-radius: var(--radius-l); padding: clamp(.9rem, .6rem + 1.4vw, 1.5rem);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.recon__notice { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 1rem; }
.recon__notice .ico { color: var(--orange); margin-top: .1rem; }
.dash__fallback { color: var(--muted); }
.recon__top { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.recon__meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-size: .9375rem; font-weight: 500; }
.recon__meta small { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; }
.recon__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn--small {
  min-height: 44px; padding: .45rem .9rem; border-radius: var(--radius-s);
  background: var(--white); border-color: var(--line); color: var(--ink); font-size: .875rem;
}
.btn--small:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.recon__body { display: grid; gap: 1rem; }
/* Contenedor más ancho para que ambas tablas quepan lado a lado */
.demo .wrap { max-width: calc(1360px + var(--gutter) * 2); }

.rules { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1rem; align-self: start; }
.rules h3 { font-size: 1.125rem; }
.rules__hint { font-size: .8125rem; color: var(--muted); margin: .3rem 0 .8rem; }
.rules ul { display: grid; gap: .5rem; }
@media (min-width: 640px) { .rules ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rules { display: grid; grid-template-columns: 180px 1fr; gap: 0 1.25rem; align-items: center; } .rules ul { grid-template-columns: repeat(4, 1fr); grid-column: 2; grid-row: 1 / span 2; } .rules__hint { margin-bottom: 0; } }
.rule { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; padding: .55rem .6rem; border-radius: var(--radius-s); background: var(--paper); cursor: pointer; }
.rule input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rule__switch { position: relative; width: 34px; height: 20px; margin-top: .1rem; border-radius: 999px; background: #C4C9D9; transition: background-color .2s var(--ease); }
.rule__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); transition: transform .2s var(--ease); }
.rule input:checked + .rule__switch { background: var(--done-bar); }
.rule input:checked + .rule__switch::after { transform: translateX(14px); }
.rule input:focus-visible + .rule__switch { outline: 3px solid var(--cyan); outline-offset: 2px; }
.rule__text { font-size: .8125rem; line-height: 1.35; }
.rule__text b { display: block; font-size: .875rem; }

.recon__main { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: .9rem; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: .75rem .85rem; border-radius: var(--radius-m); background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--k); }
.kpi--ready { --k: var(--ready-bar); }
.kpi--done { --k: var(--done-bar); }
.kpi--none { --k: #9AA1B8; }
.kpi__value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi__label { display: block; font-size: .8125rem; color: var(--muted); font-weight: 500; }
.kpi__amount { display: block; font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: .15rem; }

.recon__filter { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: .75rem; font-size: .875rem; font-weight: 600; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.seg button {
  min-height: 36px; padding: .3rem .8rem; border: 0; border-radius: 999px; background: transparent;
  font-weight: 600; font-size: .875rem; color: var(--muted); cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

.tables { display: grid; gap: .9rem; }
@media (min-width: 1180px) { .tables { grid-template-columns: 1.12fr 1fr; } .tables .rt { min-width: 0; } .tables .rt .glosa { min-width: 8rem; } }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .9rem; min-width: 0; }
.panel__title { font-size: 1.0625rem; margin-bottom: .6rem; }
.table-scroll { overflow-x: auto; max-height: 430px; overflow-y: auto; margin-inline: -.9rem; padding-inline: .9rem; }
.rt { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: .8438rem; min-width: 540px; }
.rt th {
  position: sticky; top: 0; z-index: 1; background: var(--ink); color: var(--white);
  text-align: left; font-weight: 600; font-size: .75rem; padding: .5rem .5rem; white-space: nowrap;
}
.rt th:first-child { border-radius: 6px 0 0 6px; }
.rt th:last-child { border-radius: 0 6px 6px 0; }
.rt td { padding: .45rem .5rem; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rt td:first-child { border-left: 4px solid transparent; border-radius: 6px 0 0 6px; }
.rt td:last-child { border-right: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.rt .num { text-align: right; }
.rt .client { white-space: normal; min-width: 8.5rem; line-height: 1.25; }
.rt .client small { display: block; color: var(--muted); font-size: .75rem; }
.rt .glosa { white-space: normal; min-width: 10rem; line-height: 1.25; font-size: .8125rem; }
.rt tr.st-ready td { background: var(--ready-row); border-color: #F3DF9E; }
.rt tr.st-ready td:first-child { border-left-color: var(--ready-bar); }
.rt tr.st-done td { background: var(--done-row); border-color: #BFE6D2; }
.rt tr.st-done td:first-child { border-left-color: var(--done-bar); }
.rt tr.st-none td:first-child { border-left-color: #C4C9D9; }
.rt tr.is-picked td { background: var(--sel-row); border-color: #B9CEF5; }
.rt tr.is-picked td:first-child { border-left-color: var(--sel); }
.rt tr.is-flash td { animation: flash 1s var(--ease); }
@keyframes flash { 0%, 40% { background: #FFE7A3; } }
.rt input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--sel); cursor: pointer; vertical-align: middle; }
.rt input[type="checkbox"]:disabled { cursor: default; opacity: .4; }
.rt .pick { width: 2.25rem; }
.rt .pick label { display: inline-grid; place-items: center; width: 32px; height: 32px; cursor: pointer; }

.tag { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; font-size: .7188rem; padding: .2rem .45rem; border-radius: 5px; white-space: nowrap; }
.tag--grp { background: #B7860B; color: var(--white); }
.tag--con { background: var(--done-bar); color: var(--white); }
.tag--rule { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-style: normal; font-weight: 600; font-size: .75rem; line-height: 1; padding: .35rem .55rem; border-radius: 999px; white-space: nowrap; }
.chip .ico { width: .9rem; height: .9rem; stroke-width: 2.4; }
.chip--ready { background: var(--ready-bg); color: var(--ready); }
.chip--done { background: var(--done-bg); color: var(--done); }
.chip--none { background: var(--none-bg); color: var(--none); }
.dim { color: var(--muted); }
.empty-row td { text-align: center; color: var(--muted); padding: 1.5rem .5rem; white-space: normal; }

/* Barra inferior */
.bar {
  position: sticky; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); z-index: 3;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem;
  margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-m);
  background: var(--ink); color: var(--white); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
}
.bar--manual { background: #102B63; }
.bar__info small { display: block; color: var(--on-ink-muted); font-size: .75rem; }
.bar__info strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar__diff { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar__diff.is-zero { color: #7EE2B8; }
.bar__diff.is-off { color: #FFC7A8; }
.bar__btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.bar .btn--small { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.bar .btn--small:hover { border-color: var(--white); }
.bar__opts { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .875rem; width: 100%; }
.bar__opts label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; min-height: 32px; }
.bar__opts input { accent-color: var(--orange); width: 16px; height: 16px; }
.recon__status { margin-top: .6rem; font-size: .9375rem; font-weight: 500; color: var(--ink); min-height: 1.4em; }

.history { margin-top: 1.25rem; }
.history h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.rt--history { min-width: 680px; }
.rt--history tr.is-reverted td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(90, 96, 120, .5); }
.rt--history tr.is-reverted td:last-child, .rt--history tr.is-reverted td:nth-last-child(2) { text-decoration: none; }
.link-btn { min-height: 32px; padding: .2rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--white); font-size: .8125rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.link-btn:hover { border-color: var(--ink); }

/* Diálogo de confirmación */
.confirm { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: var(--radius-l); color: var(--ink); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5); }
.confirm::backdrop { background: rgba(14, 16, 36, .65); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.confirm__inner { display: grid; gap: .8rem; padding: clamp(1.1rem, .8rem + 1.5vw, 1.75rem); }
.confirm h3 { font-size: 1.5rem; }
.confirm__sub { color: var(--muted); font-size: .9375rem; }
.confirm .table-scroll { max-height: 50vh; margin-inline: 0; padding-inline: 0; }
.confirm__total { font-weight: 600; font-variant-numeric: tabular-nums; }
.confirm__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }

.demo__cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--ink-3);
}
.demo__cta p { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; max-width: 30ch; line-height: 1.2; }

/* ---------- Reglas ---------- */
.rules-sec { background: var(--white); }
.rules-sec__grid { display: grid; gap: 2.5rem; }
.rules-sec h2 { max-width: 16ch; }
.rules-sec .ticks { margin-top: 1.75rem; }
@media (min-width: 1024px) { .rules-sec__grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; } }
.rule-cards { display: grid; gap: .75rem; }
.rule-card {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center;
  padding: 1rem 1.15rem; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--paper);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.rule-card:hover { transform: translateX(4px); border-color: #B8BED2; }
.rule-card__id { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--ink); color: var(--white); font-family: var(--font-display); font-weight: 700; }
.rule-card:nth-child(1) .rule-card__id { background: var(--orange-ui); }
.rule-cards__note { font-size: .9375rem; color: var(--muted); margin-top: .25rem; }

/* ---------- Control de principio a fin ---------- */
.control { background: var(--paper); }
.control__grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .control__grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.ctl { display: grid; align-content: start; gap: .75rem; padding: 1.25rem; border-radius: var(--radius-m); background: var(--white); border: 1px solid var(--line); }
.ctl h3 { font-size: 1.375rem; }
.ctl p { color: var(--muted); }
.ctl__art { padding: 1rem; border-radius: var(--radius-s); background: var(--ink); margin-bottom: .25rem; min-height: 132px; display: grid; align-items: center; }
.mini { display: grid; gap: .45rem; font-size: .875rem; color: var(--on-ink-muted); font-variant-numeric: tabular-nums; }
.mini b { color: var(--white); float: right; font-weight: 600; }
.mini span { display: block; }
.mini__hl { padding: .4rem .55rem; border-radius: 6px; background: rgba(255, 138, 92, .18); color: #FFC7A8; }
.mini__hl b { color: #FFC7A8; }
.mini--sum { grid-template-columns: repeat(3, 1fr); text-align: center; }
.mini--sum b { float: none; display: block; font-family: var(--font-display); font-size: 1.75rem; line-height: 1; }
.mini__total { grid-column: 1 / -1; padding: .45rem; border-radius: 6px; background: var(--orange-ui); color: var(--white); font-weight: 600; }
.mini__id { color: var(--white); font-weight: 600; }
.mini__who { color: #7EE2B8; }

/* ---------- Beneficios ---------- */
.benefits { background: var(--ink); color: var(--on-ink); }
.ben { display: grid; gap: 1rem; }
.ben li { display: grid; gap: .5rem; align-content: start; padding: 1.5rem; border-radius: var(--radius-m); background: var(--ink-2); border: 1px solid var(--ink-3); }
.ben .ico { width: 2rem; height: 2rem; color: var(--orange-soft); margin-bottom: .5rem; }
.ben h3 { font-size: 1.625rem; font-weight: 700; }
.ben p { color: var(--on-ink-muted); }
.ben--key { background: var(--orange-ui) !important; border-color: var(--orange-ui) !important; }
.ben--key .ico { color: var(--white); }
.ben--key p { color: var(--white); }
@media (min-width: 640px) { .ben { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ben { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Plataforma de cobranza ---------- */
.platform { background: var(--white); }
.platform__grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .platform__grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; } }
.plat { display: grid; gap: .75rem; }
.plat li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--line); }
.plat .ico { width: 1.5rem; height: 1.5rem; color: var(--orange); margin-top: .1rem; }
.plat span { color: var(--muted); }
.plat strong { color: var(--ink); font-weight: 600; }

/* ---------- SAP: cadena de tres nodos ---------- */
.sync__node--bank { background: var(--white); border: 2px dashed #9AA1B8; }
.sync__name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
@media (min-width: 900px) {
  .sync { grid-template-columns: 1fr 1.2fr 1fr 1fr .85fr; }
  .sync__node { min-height: 200px; }
}

/* ---------- Implementación ---------- */
.impl { background: var(--white); }
.stages { display: grid; gap: 1rem; }
.stages li { display: grid; gap: .4rem; align-content: start; padding: 1.4rem; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--paper); }
.stages__n { font-size: .8125rem; font-weight: 600; color: var(--orange-ui); }
.stages h3 { font-size: 1.375rem; }
.stages p { color: var(--muted); }
.stages--last { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--white); }
.stages--last p { color: var(--on-ink-muted); }
.stages--last .stages__n { color: var(--orange-soft); }
@media (min-width: 640px) { .stages { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stages { grid-template-columns: repeat(4, 1fr); } }
.needs { margin-top: 2rem; }
.needs h3 { font-family: var(--font-body); font-size: .9375rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: .75rem; }
.needs ul { display: flex; flex-wrap: wrap; gap: .6rem; }
.needs li { padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 500; }

.faq { background: var(--paper); }

/* ---------- Revelado al desplazarse (solo con JS activo) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .lane::after { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__visual { transform: none !important; }
  .link { stroke-dashoffset: 0; }
}
