/* ============================================================
   BACKTEAM — Sistema de diseño
   Editorial b/n premium + cortes diagonales · acento esmeralda
   ============================================================ */

/* Fuentes auto-hospedadas: sin cadena render-blocking hacia fonts.googleapis.com.
   space-grotesk-var y hanken-grotesk-var son variables (fvar); Plex Mono es estática. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/space-grotesk-var.woff2) format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/hanken-grotesk-var.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500.woff2) format('woff2');
}

:root {
  color-scheme: light;
  /* neutral grays on a pure white base */
  --paper:      #ffffff;
  --paper-2:    #f4f4f6;
  --card:       #ffffff;
  --ink:        #101114;
  --ink-soft:   #2a2d33;
  --muted:      #5b5f66;
  --muted-2:    #6c7077; /* valor de lp9: el #8a8e95 anterior no pasaba AA sobre blanco */
  --line:       #e9e9ec;
  --line-2:     #d7d7dc;

  /* brand amarillo */
  --accent:     #f4d300;
  --accent-deep:#7a6500;
  --accent-ink: #4d4000;
  --accent-wash:#fdf6c9; /* valor de lp9 */

  /* inverted (intentionally-dark bands) */
  --dark:       #131619;
  --dark-2:     #1c2025;
  --dark-line:  #2c3137;
  --dark-paper: #e9eae6;
  --dark-muted: #9aa0a6;
  --dark-em:    #f4d300;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);

  --head: 'Space Grotesk', system-ui, sans-serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- DARK MODE ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper:      #0d0e10;
  --paper-2:    #151619;
  --card:       #15171a;
  --ink:        #f2f3f4;
  --ink-soft:   #c9cbcf;
  --muted:      #9b9ea4;
  --muted-2:    #8a8e95; /* valor de lp9 en dark */
  --line:       #25272b;
  --line-2:     #34373c;

  --accent:     #f4d300;
  --accent-deep:#f4d300;
  --accent-ink: #f4d300;
  --accent-wash: color-mix(in srgb, var(--accent) 12%, var(--paper-2)); /* fórmula de lp9 */

  /* dark bands become slightly-elevated surfaces above the page
     (mismas superficies que lp9; dark-paper/dark-muted caen a los del :root,
     igual que en la landing) */
  --dark:       #1e2126;
  --dark-2:     #262b31;
  --dark-line:  #3a3f46;
}

html { transition: none; }
body { transition: background-color .4s var(--ease), color .4s var(--ease); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* selección y foco de teclado con la identidad de la casa (paridad lp9) */
::selection { background: var(--accent); color: #101114; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--accent); }

/* R5 · saltar al contenido: primer tabulado de la página; oculto hasta foco
   (WCAG 2.4.1 — evita recorrer nav y overlay con teclado/lector) */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 1100;
  transform: translateY(-160%);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 13px; letter-spacing: .03em;
  padding: 11px 18px; border-radius: 8px; text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; outline: none; box-shadow: 0 0 0 3px var(--accent), 0 10px 30px -10px rgba(0, 0, 0, .45); }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
/* main recibe foco por fragmento (#contenido) para mover el cursor de teclado
   tras «saltar»; sin anillo porque no es interacción de teclado directa */
#contenido:focus { outline: none; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- type ---------- */
.overline {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.overline::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.overline--plain { color: var(--muted); }
.overline--plain::before { background: var(--line-2); }
.overline--center { justify-content: center; }

.secnum {
  font-family: var(--mono);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 400;
  line-height: 1;
  color: var(--line-2);
  letter-spacing: -.02em;
}

h1, h2, h3 { font-family: var(--head); font-weight: 500; letter-spacing: -.025em; margin: 0; }

.display {
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -.035em;
}
.h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; }
.h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.18; letter-spacing: -.02em; }
.h4 { font-family: var(--sans); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }

.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--muted); }
.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

em, .ital { font-style: italic; }
/* modern grotesque has no true italic — emphasize headings with accent color instead */
h1 em, h2 em, h3 em, .display em, .cta__title em { font-style: normal; color: var(--accent-deep); }
.story__quote em { font-style: normal; color: var(--dark-em); }
.accent-text { color: var(--accent-deep); }

/* small ornament divider (à la MINIMAL) */
.tilde { color: var(--line-2); font-size: 22px; line-height: 1; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px; /* mismas medidas que el .btn de lp9 */
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-deep); }

.btn--accent { background: var(--accent); color: #161307; }
.btn--accent:hover { background: #e3c400; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; }

/* scroll-into-view: buttons "arrive" a touch after their surrounding content.
   El keyframe final NO declara transform: con fill "both" quedaría clavado
   para siempre y anularía el botón magnético (vida, al final del archivo) */
@keyframes btnArrive {
  0%   { opacity: 0; transform: translateY(13px); }
  60%  { opacity: 1; transform: translateY(-3px); }
  100% { opacity: 1; }
}
.btn-arrive { opacity: 0; }
.btn-arrive.btn-now { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .btn-arrive.btn-seen { animation: btnArrive .6s var(--ease) .18s both; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-arrive { opacity: 1 !important; }
}
.btn--outline-light { background: transparent; color: var(--dark-paper); border-color: var(--dark-line); }
.btn--outline-light:hover { border-color: var(--dark-paper); }

/* text link with underline reveal */
.tlink {
  font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  transition: gap .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.tlink:hover { gap: 13px; color: var(--accent-deep); border-color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-color: var(--line); }
/* nav inteligente (R6): al bajar se retira para dar aire de lectura, al subir
   reaparece. El transform vive SOLO en no-preference → con reduced-motion el
   header queda siempre fijo, sin salto. Nunca se oculta con un menú abierto */
@media (prefers-reduced-motion: no-preference) {
  .nav { transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease); }
  .nav.nav--hidden { transform: translateY(-100%); }
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--head); font-size: 22px; letter-spacing: -.02em; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 500;
}
.brand b { font-weight: 500; }
.brand .tld { color: var(--accent-deep); }
/* real logo (theme-aware) */
.brand__logo { height: 22px; width: auto; display: block; }
.brand__logo--dark { display: none; }
html[data-theme="dark"] .brand__logo--light { display: none; }
html[data-theme="dark"] .brand__logo--dark { display: block; }
.foot .brand__logo { height: 24px; }
.nav__links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 14.5px; color: var(--muted); transition: color .2s; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%;
  background: var(--accent);
  /* direccional: el origin cambia por estado (no interpola) → entra por la
     izquierda y sale por la derecha, en vez de rebobinar */
  transform: scaleX(0); transform-origin: right;
  transition: transform .25s var(--ease);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: flex; align-items: center; gap: 16px; }

/* language toggle — segmented ES | EN */
.lang-toggle {
  position: relative; display: inline-flex; align-items: center;
  padding: 3px; gap: 0; line-height: 1;
  background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: 100px; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em;
  transition: border-color .2s var(--ease);
}
.lang-toggle:hover { border-color: var(--muted-2); }
.lang-toggle__opt {
  position: relative; z-index: 2; padding: 5px 9px; border-radius: 100px;
  color: var(--muted); transition: color .25s var(--ease);
}
.lang-toggle__opt.is-active { color: #161307; }
.lang-toggle__thumb {
  position: absolute; z-index: 1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--accent); border-radius: 100px;
  transition: transform .28s var(--ease);
}
.lang-toggle[data-lang="en"] .lang-toggle__thumb { transform: translateX(100%); }
.nav__toggle { display: none; }

/* theme toggle (sliding moon→sun) */
.theme-toggle {
  width: 46px; height: 26px; border-radius: 100px; flex: none;
  border: 1px solid var(--line-2); background: var(--paper-2);
  position: relative; cursor: pointer; padding: 0;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.theme-toggle:hover { border-color: var(--muted-2); }
.theme-toggle__knob {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -3px 0 0 var(--paper-2);
  transition: left .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
html[data-theme="dark"] .theme-toggle { background: var(--accent); border-color: var(--accent); }
html[data-theme="dark"] .theme-toggle__knob { left: 25px; background: #fff; box-shadow: none; }

/* ---------- Servicios mega-menu ---------- */
.nav__links a.has-caret { display: inline-flex; align-items: center; }
.nav__links a .caret {
  width: 0; height: 0; margin-left: 7px; display: inline-block;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor; opacity: .6;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav.mega-open .nav__links a[aria-expanded="true"] .caret { transform: rotate(180deg); opacity: 1; }

.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 34px 50px -34px rgba(0,0,0,.32);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s;
  pointer-events: none;
}
.nav.mega-open .mega { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.mega__inner { padding-block: 34px 38px; }
.mega__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.mega__head .tlink { white-space: nowrap; flex: none; }
.mega__cols { display: grid; grid-template-columns: 1fr 320px; gap: 26px; }
.mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mega__item { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 6px; transition: background .2s var(--ease); }
.mega__item:hover { background: var(--paper-2); }
.mega__mark { width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); margin-bottom: 5px; }
.mega__t { font-weight: 600; font-size: 16px; letter-spacing: -.01em; transition: color .2s; }
.mega__d { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.mega__item:hover .mega__t { color: var(--accent-deep); }
.mega__promo { background: var(--dark); color: var(--dark-paper); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 9px; justify-content: center; transition: transform .25s var(--ease); }
.mega__promo:hover { transform: translateY(-2px); }
.mega__promo-k { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dark-em); }
.mega__promo-t { font-family: var(--head); font-weight: 500; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; }
.mega__promo-d { font-size: 13.5px; color: var(--dark-muted); line-height: 1.5; }
.mega__promo-go { font-weight: 600; font-size: 14px; color: #fff; margin-top: 8px; display: inline-flex; align-items: center; gap: 7px; }
.mega__promo:hover .mega__promo-go { gap: 11px; }
@media (max-width: 1040px) { .mega__cols { grid-template-columns: 1fr; } .mega__promo { flex-direction: row; align-items: center; gap: 20px; } .mega__promo-go { margin-top: 0; margin-left: auto; } }

/* ---------- chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 7px 14px 7px 12px;
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- placeholder media ---------- */
.ph {
  position: relative; overflow: hidden;
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(128,128,128,.07) 11px 12px);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  border-radius: 3px;
}
.ph__tag {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); background: color-mix(in srgb, var(--paper) 75%, transparent);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 2px;
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.show-now { opacity: 1; transform: none; transition: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- footer ---------- */
.foot { background: var(--dark); color: var(--dark-paper); overflow: hidden; overflow: clip; }
.foot a { color: var(--dark-muted); transition: color .2s; }
.foot a:hover { color: var(--dark-paper); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(40px, 6vw, 80px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 84px); align-items: center; }
.hero__copy .chip { margin-bottom: 28px; }
.hero .display { margin-bottom: 26px; max-width: 16ch; font-size: clamp(38px, 5vw, 62px); }

/* coreografía del H1 por líneas: cada .l enmascara y su .li sube desde abajo
   (transform puro → el LCP pinta el mismo texto; paridad con la landing) */
.display .l { display: block; clip-path: inset(-0.08em -0.25em); }
.display .li { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .display .li { animation: lineUp .55s var(--ease) both; }
  .display .l:nth-child(2) .li { animation-delay: .06s; }
  .display .l:nth-child(3) .li { animation-delay: .12s; }
  .display .l:nth-child(4) .li { animation-delay: .18s; }
  .display .l:nth-child(5) .li { animation-delay: .24s; }
}
@keyframes lineUp { from { transform: translateY(110%); } to { transform: translateY(0); } }
/* el cambio de idioma no repite la llegada (el view transition ya cruza) */
html.lang-switched .display .li { animation: none; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__meta { display: flex; gap: 44px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.hero__meta-item { display: flex; flex-direction: column; gap: 4px; }
.hero__meta-item .num { font-family: var(--head); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.hero__meta-item .lbl { font-size: 13.5px; color: var(--muted); max-width: 22ch; }

/* platform panel (CSS mock) */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -38px rgba(21,23,26,.4);
}
.panel__bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.panel__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.panel__title { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); margin-left: 10px; }
.panel__body { padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.panel__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric { border: 1px solid var(--line); border-radius: 4px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.metric__k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.metric__v { font-family: var(--head); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric__v span { font-size: 18px; color: var(--muted-2); }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.panel__chart { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px 16px; }
.panel__k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 78px; margin-top: 14px; }
.cols span { flex: 1; background: var(--line); border-radius: 3px 3px 0 0; }
.cols span.hi { background: var(--accent); }
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.tasks li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; }
.tk { width: 16px; height: 16px; border-radius: 50%; flex: none; position: relative; }
.tk--ok { background: var(--accent-wash); border: 1px solid var(--accent); }
.tk--ok::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; color: var(--accent-deep); }
.tk--wait { background: #fbf3e3; border: 1px solid #d9b25e; }
.tk__tag { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-deep); background: #fbf3e3; border-radius: 3px; padding: 3px 8px; }

/* R4 · revelado de medios: el panel se dibuja de arriba a abajo (clip-path),
   como si la plataforma se renderizara. Transform/opacity intactos → el
   count-up de las métricas sigue disparando por IntersectionObserver */
@media (prefers-reduced-motion: no-preference) {
  .hero__visual { animation: panelWipe .8s var(--ease) .12s both; }
}
@keyframes panelWipe {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ============================================================
   SECTION HEADER (numbered)
   ============================================================ */
.shead { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(44px, 6vw, 72px); }
.shead--center { align-items: center; text-align: center; }
.shead__top { display: flex; align-items: baseline; gap: 18px; }
.shead .secnum { margin-bottom: -6px; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot__inner { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: clamp(40px, 7vw, 110px); padding-block: clamp(64px, 8vw, 96px); }
.foot__tag { color: var(--dark-muted); max-width: 38ch; margin: 22px 0 30px; line-height: 1.6; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.foot__col { display: flex; flex-direction: column; gap: 13px; }
.foot__h { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dark-muted); margin-bottom: 6px; }
.foot__col a { font-size: 15px; }
.foot__base { display: flex; align-items: center; justify-content: space-between; padding-block: 26px; border-top: 1px solid var(--dark-line); font-size: 13.5px; color: var(--dark-muted); }

/* footer contact strip */
.foot__contact { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 56px; padding-block: 30px; border-top: 1px solid var(--dark-line); }
.fc__item { display: flex; flex-direction: column; gap: 5px; }
.fc__k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dark-muted); }
.fc__item a { font-size: 15.5px; color: var(--dark-paper) !important; transition: color .2s; }
.fc__item a:hover { color: var(--accent) !important; }
@media (max-width: 720px) { .foot__contact { grid-template-columns: 1fr 1fr; gap: 20px 28px; } }
.foot__social { display: flex; gap: 24px; }

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .foot__inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero__meta { flex-direction: column; gap: 22px; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__base { flex-direction: column; gap: 14px; align-items: flex-start; }
}

/* ============================================================
   CREDIBILIDAD BAND
   ============================================================ */
.band { background: var(--ink); color: var(--dark-paper); }
.band__inner { padding-block: clamp(56px, 7vw, 92px); display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.band__lead { font-family: var(--head); font-size: clamp(22px, 2.6vw, 31px); line-height: 1.35; }
.band__lead .accent-text { color: var(--dark-em); }
.band__stats { display: flex; flex-direction: column; gap: 22px; border-left: 1px solid var(--dark-line); padding-left: clamp(28px, 4vw, 48px); }
.band__stat { display: flex; align-items: baseline; gap: 16px; }
.band__stat .k { font-family: var(--head); font-size: 40px; line-height: 1; color: #fff; min-width: 84px; font-variant-numeric: tabular-nums; }
.band__stat .l { font-size: 14.5px; color: var(--dark-muted); }
/* realce de superficie al puntero (R8): un foco de acento sigue al cursor sobre
   las tarjetas (shift/metric/stat). El glow es un hijo aria-hidden inset:0 → no
   toca el layout ni el texto; solo con puntero fino */
@media (hover: hover) and (pointer: fine) {
  .spot { position: relative; }
  .spot__glow {
    position: absolute; inset: 0; border-radius: inherit; overflow: clip;
    pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
    background: radial-gradient(220px circle at var(--sx, 50%) var(--sy, 50%), rgba(244, 211, 0, .16), transparent 62%);
  }
  .spot.is-lit .spot__glow { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .spot__glow { transition: none; } }

/* ============================================================
   SHIFT (Antes / Después / Resultado)
   ============================================================ */
.shift { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 22px; align-items: stretch; }
.shift__arrow { align-self: center; font-size: 26px; color: var(--line-2); }
.shift__card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; }
.shift__card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.shift__card .h3 { margin: 0; }
.shift__card--res { background: var(--dark); color: var(--dark-paper); border-color: var(--dark); }
.shift__card--res p { color: var(--dark-muted); }
.shift__tag { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.shift__card--res .shift__tag { color: var(--dark-muted); }
.shift__tag--accent { color: var(--dark-em); }

/* ============================================================
   LAYERS (arquitectura)
   ============================================================ */
.section--alt { background: var(--paper-2); }
.layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line-2); }
.layer { padding: 34px 26px 30px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; position: relative; transition: background .3s var(--ease); }
.layer:last-child { border-right: 0; }
.layer:hover { background: var(--card); }
.layer__idx { font-family: var(--mono); font-size: 13px; color: var(--accent-deep); letter-spacing: .1em; }
.layer__line { height: 2px; background: var(--line-2); position: relative; }
.layer__line::after { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 28px; background: var(--accent); }
.layer h3 { margin: 4px 0 0; }
.layer p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.layer__role { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.layer__role--accent { color: var(--accent-deep); }
.layer--premium { background: var(--dark); color: var(--dark-paper); }
.layer--premium p { color: var(--dark-muted); }
.layer--premium:hover { background: var(--dark); }
.layer--premium .layer__line { background: var(--dark-line); }
.layer--premium .layer__role--accent { color: var(--dark-em); }
.layer--premium .layer__idx { color: var(--dark-em); }

/* ============================================================
   COMBO (dark diagonal)
   ============================================================ */
.combo { background: var(--dark); color: var(--dark-paper); text-align: center; padding-block: clamp(96px, 13vw, 170px); clip-path: polygon(0 0, 100% 4vw, 100% 100%, 0 calc(100% - 4vw)); margin-block: -2px; }
.combo__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.combo__title { font-family: var(--head); font-size: clamp(34px, 5.4vw, 66px); line-height: 1.08; max-width: 18ch; }
.combo__em { color: var(--dark-em); font-style: normal; }
.combo__sub { color: var(--dark-muted); max-width: 60ch; font-size: clamp(16px, 1.7vw, 19px); }

/* ============================================================
   TOOLS
   ============================================================ */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 32px 30px; display: flex; flex-direction: column; gap: 14px; transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); position: relative; }
.tool:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 26px 50px -34px rgba(21,23,26,.4); }
.tool__idx { position: absolute; top: 28px; right: 30px; font-family: var(--head); font-size: 26px; color: var(--line-2); }
.tool h3 { margin: 0; max-width: 18ch; }
.tool p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.tool__out { font-family: var(--head); font-style: italic; font-size: 16px; color: var(--accent-ink); border-left: 2px solid var(--accent); padding-left: 14px; }
.tool__go { font-weight: 600; font-size: 14.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.tool:hover .tool__go { color: var(--accent-deep); }
.tool:hover .arr { transform: translateX(4px); }

/* ============================================================
   POR QUÉ
   ============================================================ */
.porque { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.porque__head { position: sticky; top: 110px; }
.porque__head h2 { margin: 18px 0 16px; }
.combine { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.combine__chip { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; background: var(--card); border: 1px solid var(--line-2); border-radius: 100px; padding: 9px 16px; }
.combine__plus { color: var(--accent-deep); font-weight: 700; }
.porque__list { display: flex; flex-direction: column; }
.why { display: flex; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.why:last-child { border-bottom: 1px solid var(--line); }
.why__mark { width: 12px; height: 12px; flex: none; margin-top: 6px; background: var(--accent); transform: rotate(45deg); }
.why h3 { margin: 0 0 6px; }
.why p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ============================================================
   STORY
   ============================================================ */
.story { background: var(--ink); color: var(--dark-paper); padding-block: clamp(80px, 11vw, 150px); }
.story__inner { max-width: 880px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.story__inner .overline { justify-content: center; }
.story__quote { font-family: var(--head); font-size: clamp(26px, 3.6vw, 42px); line-height: 1.28; margin: 0; font-weight: 500; position: relative; }
/* glifo de cita del libro (landing, ronda 14): apilado en angosto,
   colgado al margen de la columna en pantallas anchas */
.story__quote::before {
  content: "“";
  display: block;
  font-family: var(--head);
  font-size: clamp(60px, 6.5vw, 92px);
  line-height: .55;
  color: var(--accent);
  margin-bottom: 20px;
}
@media (min-width: 1100px) {
  .story__quote::before { position: absolute; left: -.62em; top: -.02em; margin-bottom: 0; }
}
.story__quote em { color: var(--dark-em); }
.story__body { color: var(--dark-muted); max-width: 64ch; font-size: 16.5px; margin: 0; }
.story__body .accent-text { color: var(--dark-em); }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.faq__head { position: sticky; top: 110px; }
.faq__head h2 { margin: 18px 0 16px; }
.faq__head .tlink { margin-top: 26px; }
.faq__list { border-top: 1px solid var(--line); counter-reset: qa; }
.qa { border-bottom: 1px solid var(--line); }
/* libro mayor: sin space-between — con el nº de partida son 3 items y
   repartiría mal; el ic se ancla a la derecha con margin-left:auto */
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 24px; padding: 24px 0; font-family: var(--head); font-weight: 500; font-size: clamp(18px, 2vw, 22px); line-height: 1.3; transition: color .2s; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--accent-deep); }
/* numeración de partida del FAQ (portada de la landing, ronda 14) */
.qa summary::before {
  counter-increment: qa;
  content: counter(qa, decimal-leading-zero);
  content: counter(qa, decimal-leading-zero) / "";
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: var(--muted-2); flex: none;
  transition: color .15s var(--ease);
}
.qa summary:hover::before, .qa[open] summary::before { color: var(--accent-deep); }
/* la doble raya del total cierra la lista numerada */
.faq__list::after {
  content: ""; display: block; height: 7px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
/* apertura animada de details (paridad lp9: mejora progresiva, cero JS).
   qa--snap = cierre seco del hermano cuando otro abre; lo pone el JS */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .qa::details-content {
      block-size: 0; overflow: clip;
      opacity: 0; translate: 0 -6px;
      transition: block-size .3s var(--ease), content-visibility .3s allow-discrete,
        opacity .3s var(--ease), translate .3s var(--ease);
    }
    .qa[open]::details-content { block-size: auto; opacity: 1; translate: 0 0; }
    .qa--snap::details-content { transition: none; }
  }
}
.qa__ic { position: relative; width: 18px; height: 18px; flex: none; margin-left: auto; }
.qa__ic::before, .qa__ic::after { content: ""; position: absolute; background: var(--ink); transition: transform .3s var(--ease); }
.qa__ic::before { left: 0; top: 8px; width: 18px; height: 2px; }
.qa__ic::after { left: 8px; top: 0; width: 2px; height: 18px; }
.qa[open] .qa__ic::after { transform: scaleY(0); }
.qa__a { overflow: hidden; }
.qa__a p { margin: 0 0 26px; color: var(--muted); max-width: 60ch; }

/* ============================================================
   CTA
   ============================================================ */
.cta { background: var(--dark); color: var(--dark-paper); }
.cta__inner { padding-block: clamp(72px, 9vw, 120px); display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.cta__title { font-family: var(--head); font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; margin: 18px 0 18px; max-width: 16ch; }
.cta__sub { color: var(--dark-muted); max-width: 50ch; font-size: 17px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.cta__form { background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: 6px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.cta__form-h { font-family: var(--head); font-size: 22px; color: #fff; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); }
.field input { background: var(--dark); border: 1px solid var(--dark-line); border-radius: 3px; padding: 13px 14px; color: var(--dark-paper); font-family: var(--sans); font-size: 15px; transition: border-color .2s; }
.field input::placeholder { color: #6a7077; }
.field input:focus { outline: none; border-color: var(--accent); }
/* shared lead-form (used on landing + home contact) */
.lp-leadform { border-top: 3px solid var(--accent); }
.lp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-form-grid .field--full { grid-column: 1 / -1; }
.field select, .field textarea {
  background: var(--dark); border: 1px solid var(--dark-line); border-radius: 3px;
  padding: 13px 14px; color: var(--dark-paper); font-family: var(--sans); font-size: 15px;
  transition: border-color .2s var(--ease); width: 100%;
}
.field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%239b9ea4' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field select option { color: #161616; }
.lp-emailbtn { margin-top: 2px; }
@media (max-width: 520px) { .lp-form-grid { grid-template-columns: 1fr; } }
.cta__form-note { font-size: 12.5px; color: var(--dark-muted); margin: 2px 0 0; text-align: center; }

@media (max-width: 980px) {
  .band__inner, .porque, .faq, .cta__inner { grid-template-columns: 1fr; }
  .porque__head, .faq__head { position: static; }
  .layers { grid-template-columns: 1fr 1fr; }
  .layer:nth-child(2) { border-right: 0; }
  .layer { border-bottom: 1px solid var(--line); }
  .shift { grid-template-columns: 1fr; }
  .shift__arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 620px) {
  .tools { grid-template-columns: 1fr; }
  .layers { grid-template-columns: 1fr; }
  .layer { border-right: 0; }
  .band__stats { padding-left: 0; border-left: 0; border-top: 1px solid var(--dark-line); padding-top: 26px; }
}

/* ============================================================
   HERRAMIENTAS PAGE
   ============================================================ */
.thero { padding-top: clamp(48px, 7vw, 90px); }
.thero__inner .chip { margin-bottom: 26px; }
.thero .display { max-width: 18ch; font-size: clamp(38px, 5.4vw, 70px); margin-bottom: 24px; }
.thero .lede { margin-bottom: 0; }
.thero__roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.trole { display: flex; flex-direction: column; gap: 8px; }
.trole__n { font-family: var(--mono); font-size: 13px; color: var(--accent-deep); letter-spacing: .1em; }
.trole h3 { margin: 2px 0 2px; }
.trole p { margin: 0; color: var(--muted); font-size: 15px; }

/* diagnóstico widget */
.diag { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.diag__form { display: flex; flex-direction: column; gap: 8px; }
.diag__q { padding: 24px 0; border-bottom: 1px solid var(--line); }
.diag__q:first-child { padding-top: 0; }
.diag__qk { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.diag__qt { font-family: var(--head); font-size: clamp(18px, 2vw, 22px); margin: 8px 0 16px; line-height: 1.25; }
.diag__opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { font-family: var(--sans); font-size: 14.5px; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 100px; padding: 10px 18px; cursor: pointer; transition: all .2s var(--ease); }
.opt:hover { border-color: var(--ink); }
.opt.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.diag__result { position: sticky; top: 100px; }
.diag__panel { background: var(--dark); color: var(--dark-paper); border-radius: 6px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px -38px rgba(21,23,26,.5); }
.diag__rk { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dark-muted); }
.diag__score { font-family: var(--head); font-size: 76px; line-height: .95; color: #fff; display: flex; align-items: baseline; gap: 2px; }
.diag__score i { font-style: normal; font-size: 28px; color: var(--dark-em); }
.diag__gauge { height: 6px; background: var(--dark-line); border-radius: 6px; overflow: hidden; }
.diag__gauge i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .6s var(--ease); }
.diag__level { font-size: 15px; color: var(--dark-muted); margin: 4px 0; line-height: 1.5; }
.diag__level strong { color: var(--dark-paper); font-weight: 600; }
.diag__gaps { display: flex; flex-wrap: wrap; gap: 8px; }
.diag__gk { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); width: 100%; }
.diag__gap { font-size: 13px; background: rgba(244,211,0,.14); color: var(--dark-em); border: 1px solid rgba(244,211,0,.34); border-radius: 100px; padding: 6px 13px; }
.diag__note { font-size: 12px; color: var(--dark-muted); margin: 4px 0 0; line-height: 1.5; }

.tools--3 { grid-template-columns: repeat(3, 1fr); }
.tool__rev { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.cta__inner--solo { grid-template-columns: 1fr; }

@media (max-width: 980px) {
  .diag { grid-template-columns: 1fr; }
  .diag__result { position: static; }
  .tools--3 { grid-template-columns: 1fr; }
  .thero__roles { grid-template-columns: 1fr; gap: 22px; }
}

/* ============================================================
   SERVICIOS PAGE
   ============================================================ */
.stack-map { display: flex; flex-direction: column; gap: 6px; margin-top: 52px; max-width: 560px; }
.sm { font-family: var(--mono); font-size: 14px; letter-spacing: .02em; padding: 16px 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); display: flex; align-items: center; gap: 16px; transition: transform .3s var(--ease); }
.sm span { color: var(--accent-deep); }
.sm-1 { margin-left: 0; }
.sm-2 { margin-left: 28px; }
.sm-3 { margin-left: 56px; }
.sm-4 { margin-left: 84px; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sm-4 span { color: var(--dark-em); }

.capa__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.capa__grid--rev .capa__copy { order: 2; }
.capa__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 12px; }
.capa__role { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.capa__role--accent { color: var(--accent-deep); }
.capa h2 { margin-bottom: 18px; }
.capa__lead { color: var(--muted); font-size: 17px; max-width: 46ch; margin: 0 0 24px; }
.capa__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-width: 46ch; counter-reset: pli; }
.capa__list li { padding: 13px 0 13px 26px; border-top: 1px solid var(--line); position: relative; font-size: 15.5px; counter-increment: pli; }
.capa__list li:last-child { border-bottom: 1px solid var(--line); }
/* sub-asientos a. b. c. (numeración de partida de la landing) en vez del
   rombo — este ::before estaba ocupado por el rombo: se reescribe aquí,
   no se apila otra regla del mismo selector más abajo */
.capa__list li::before {
  content: counter(pli, lower-alpha) ".";
  content: counter(pli, lower-alpha) "." / "";
  position: absolute; left: 0; top: 15px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: var(--muted-2);
}

.flow { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.flow__node { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 13px 16px; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.flow__node span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-wash); padding: 3px 8px; border-radius: 3px; }
.flow__node--ok { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.flow__arrow { text-align: center; color: var(--line-2); font-size: 15px; line-height: 1; }

/* comparativa */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare__col { border-radius: 6px; padding: 36px 34px; }
.compare__col ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.compare__col li { padding: 15px 0 15px 30px; position: relative; font-size: 16px; }
.compare__h { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.compare__col--old { background: var(--paper-2); border: 1px solid var(--line); }
.compare__col--old .compare__h { color: var(--muted); }
.compare__col--old li { border-top: 1px solid var(--line); color: var(--muted); }
.compare__col--old li::before { content: "—"; position: absolute; left: 0; top: 15px; color: var(--muted-2); }
.compare__col--new { background: var(--dark); color: var(--dark-paper); }
.compare__col--new .compare__h { color: var(--dark-em); }
.compare__col--new li { border-top: 1px solid var(--dark-line); }
.compare__col--new li::before { content: "✓"; position: absolute; left: 0; top: 15px; color: var(--dark-em); font-size: 14px; }

@media (max-width: 980px) {
  .capa__grid { grid-template-columns: 1fr; }
  .capa__grid--rev .capa__copy { order: 0; }
  .capa__visual { order: -1; }
  .compare { grid-template-columns: 1fr; }
  .stack-map .sm { margin-left: 0 !important; }
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.wa-float {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  display: flex; align-items: center; gap: 0;
}
/* mismo botón que lp9 (tinta + ícono accent, invertido en dark); el verde
   de marca WhatsApp con pulso quedó fuera: era la pieza más divergente
   entre los dos sitios. La etiqueta de hover se conserva (es propia del www). */
.wa-float__btn {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--paper), 0 12px 28px -8px rgba(0, 0, 0, .35);
  transition: transform .15s var(--ease);
}
.wa-float__btn:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 5px var(--accent), 0 12px 28px -8px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .wa-float__btn { background: var(--accent); color: #101114; }
.wa-float__btn:hover { transform: scale(1.06); }
.wa-float__btn:active { transform: scale(.96); }
.wa-float__btn svg { width: 28px; height: 28px; display: block; }

.wa-float__label {
  position: absolute; right: 68px; white-space: nowrap;
  background: var(--ink); color: var(--paper);
  font-size: 13.5px; font-weight: 600;
  padding: 9px 14px; border-radius: 100px;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.4);
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.wa-float__label::after {
  content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 10px; height: 10px; background: var(--ink);
}
.wa-float:hover .wa-float__label { opacity: 1; transform: translateX(0); }
@media (max-width: 620px) { .wa-float__label { display: none; } .wa-float__btn { width: 48px; height: 48px; } }

/* ---------- índice de sección vivo (scroll-spy rail) ---------- */
.secrail {
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: none; flex-direction: column; align-items: flex-start;
  gap: 6px; margin: 0; padding: 4px 0;
}
/* el tick sólo ocupa la marca en el margen: la etiqueta va absoluta y sin
   pointer-events para no interceptar clicks del contenido (índices de sección,
   columnas sticky) que quedan a su derecha */
.secrail__tick {
  position: relative; display: flex; align-items: center;
  width: max-content; padding: 5px 0; color: var(--muted-2);
}
.secrail__line {
  width: 16px; height: 1.5px; background: currentColor; flex: none;
  transition: width .25s var(--ease), background-color .25s var(--ease);
}
.secrail__label {
  position: absolute; left: calc(100% + 12px); top: 50%; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap; opacity: 0; transform: translateY(-50%) translateX(-4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.secrail__tick:hover, .secrail__tick:focus-visible { color: var(--ink); outline: none; }
.secrail__tick:hover .secrail__line, .secrail__tick:focus-visible .secrail__line { width: 26px; }
.secrail__tick:hover .secrail__label, .secrail__tick:focus-visible .secrail__label { opacity: 1; transform: translateY(-50%); }
.secrail__tick.is-active { color: var(--ink); }
.secrail__tick.is-active .secrail__line { width: 30px; background: var(--accent); }
/* progreso de lectura (R7): guía a la izquierda de los ticks que se llena con el
   avance del scroll. Refleja el punto de lectura de forma continua, junto a la
   sección activa (discreta). Sin transición → sigue al scroll con exactitud */
.secrail__prog {
  position: absolute; left: -14px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line-2); border-radius: 2px; overflow: hidden;
}
.secrail__prog i {
  position: absolute; inset: 0; transform-origin: top;
  transform: scaleY(var(--railp, 0)); background: var(--accent);
}
@media (min-width: 1180px) { .secrail { display: flex; } }
@media (prefers-reduced-motion: reduce) { .secrail__line, .secrail__label { transition: none; } }

/* ============================================================
   RECURSOS + BLOG PAGES
   ============================================================ */
/* featured app block */
.appshow__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.appshow__copy .overline { margin-bottom: 18px; }
.appshow__copy h2 { margin-bottom: 18px; max-width: 16ch; }
.appshow__list { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; max-width: 44ch; }
.appshow__list li { padding: 12px 0 12px 26px; border-top: 1px solid var(--line); position: relative; font-size: 15.5px; }
.appshow__list li:last-child { border-bottom: 1px solid var(--line); }
.appshow__list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.appshow__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.appshow__visual { display: flex; justify-content: center; }
.appshow__grid--rev .appshow__copy { order: 2; }

/* EEFF card visual */
.eeff-card { width: 340px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 70px -40px rgba(0,0,0,.4), 0 0 0 1px var(--line); }
.eeff-card__bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.eeff-card__k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eeff-card__time { font-family: var(--mono); font-size: 11.5px; color: var(--accent-deep); font-weight: 500; }
.eeff-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.eeff-card__title { font-family: var(--head); font-weight: 500; font-size: 18px; letter-spacing: -.02em; }
.eeff-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.eeff-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.eeff-rows li b { color: var(--ink); font-weight: 600; }
.eeff-rows__total { border-top: 1.5px solid var(--ink) !important; margin-top: 2px; }
.eeff-rows__total span { color: var(--ink); font-weight: 600; }
.eeff-rows__total b { font-size: 16px; }
.eeff-card__chart { border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px 15px; }
.eeff-card__chart .cols { height: 60px; margin-top: 12px; }
.eeff-card__done { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink); }
.eeff-card__done .phone__check { width: 22px; height: 22px; font-size: 11px; }

.phone { width: 284px; background: var(--dark); border-radius: 42px; padding: 9px; box-shadow: 0 44px 72px -36px rgba(0,0,0,.55), 0 0 0 1px var(--dark-line); position: relative; }
.phone__notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 96px; height: 7px; border-radius: 10px; background: rgba(255,255,255,.16); z-index: 3; }
.phone__screen { background: var(--card); border-radius: 34px; overflow: hidden; }
.phone__bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 10px; font-family: var(--mono); font-size: 11px; color: var(--ink); }
.phone__app { color: var(--muted-2); }
.phone__body { padding: 8px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.phone__k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.phone__doc { height: 116px; border-radius: 9px; }
.phone__verdict { display: flex; align-items: center; gap: 11px; background: var(--accent-wash); border: 1px solid var(--accent); border-radius: 11px; padding: 12px 14px; }
.phone__check { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #161307; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.phone__vt { display: block; font-weight: 600; font-size: 14px; color: var(--ink); letter-spacing: -.01em; }
.phone__vd { display: block; font-size: 12px; color: var(--muted); }
.phone__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.phone__rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }
.phone__rows li b { color: var(--ink); font-weight: 600; }
.phone__cta { margin-top: 4px; background: var(--ink); color: var(--paper); text-align: center; padding: 13px; border-radius: 11px; font-weight: 600; font-size: 14px; }

@media (max-width: 980px) {
  .appshow__grid { grid-template-columns: 1fr; }
  .appshow__visual { order: -1; }
}

.rbadge { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 100px; align-self: flex-start; }
.rbadge--soon { color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); }
.rbadge--live { color: #161307; background: var(--accent); }
.tool .rbadge { position: absolute; top: 26px; right: 28px; }

/* blog posts */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.post:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 26px 50px -34px rgba(0,0,0,.4); }
.post__img { aspect-ratio: 16/10; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.post__body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post__cat { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.post__title { font-family: var(--head); font-weight: 500; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.post__meta { margin-top: auto; font-size: 13px; color: var(--muted-2); font-family: var(--mono); letter-spacing: .03em; }
.post--feature { grid-column: span 3; display: grid; grid-template-columns: 1.15fr .85fr; }
.post--feature .post__img { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); height: 100%; min-height: 320px; }
.post--feature .post__body { padding: clamp(28px, 4vw, 48px); justify-content: center; gap: 16px; }
.post--feature .post__title { font-size: clamp(26px, 3vw, 38px); }

/* category filter row */
.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.cat { font-family: var(--sans); font-size: 14px; color: var(--muted); background: var(--card); border: 1px solid var(--line-2); border-radius: 100px; padding: 9px 18px; cursor: pointer; transition: all .2s var(--ease); }
.cat:hover { border-color: var(--ink); color: var(--ink); }
.cat.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

@media (max-width: 860px) {
  .posts { grid-template-columns: 1fr 1fr; }
  .post--feature { grid-column: span 2; grid-template-columns: 1fr; }
  .post--feature .post__img { border-right: 0; border-bottom: 1px solid var(--line); min-height: 220px; }
}
@media (max-width: 620px) {
  .posts { grid-template-columns: 1fr; }
  .post--feature { grid-column: span 1; }
}

/* ---------- responsive base ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* mobile dropdown menu */
body.menu-open .nav__links {
  display: flex; position: absolute; top: 74px; left: 0; right: 0;
  flex-direction: column; gap: 0; background: var(--paper);
  border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px;
}
body.menu-open .nav__links a { padding: 13px 0; font-size: 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
body.menu-open .nav__links a::after { display: none; }

/* ============================================================
   BRAND YELLOW REFRESH — remove olive/gold, use #F4D300 legibly
   (light-mode scoped; dark mode already shows legible yellow)
   ============================================================ */
/* prominent inline emphasis → yellow highlight, dark text */
html:not([data-theme="dark"]) .accent-text,
html:not([data-theme="dark"]) h1 em,
html:not([data-theme="dark"]) h2 em,
html:not([data-theme="dark"]) h3 em,
html:not([data-theme="dark"]) .display em {
  background: var(--accent); color: #161307;
  padding: .02em .22em; border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* …but inside intentionally-dark sections keep plain yellow text (no block) */
.band__lead .accent-text, .story__body .accent-text, .story__quote em,
.cta__title em, .combo__em, .layer--premium .accent-text {
  background: transparent !important; color: var(--dark-em) !important; padding: 0 !important;
}

/* small labels that were gold → legible neutral on light (yellow stays in marks/bars/ticks) */
html:not([data-theme="dark"]) .overline,
html:not([data-theme="dark"]) .layer:not(.layer--premium) .layer__idx,
html:not([data-theme="dark"]) .layer:not(.layer--premium) .layer__role--accent,
html:not([data-theme="dark"]) .trole__n,
html:not([data-theme="dark"]) .capa__role--accent,
html:not([data-theme="dark"]) .post__cat,
html:not([data-theme="dark"]) .eeff-card__time,
html:not([data-theme="dark"]) .flow__node span,
html:not([data-theme="dark"]) .sm:not(.sm-4) span { color: var(--ink-soft); }

/* hovers that went gold → ink on light */
html:not([data-theme="dark"]) .tlink:hover,
html:not([data-theme="dark"]) .tool:hover .tool__go,
html:not([data-theme="dark"]) .mega__item:hover .mega__t,
html:not([data-theme="dark"]) .qa summary:hover { color: var(--ink); }

html:not([data-theme="dark"]) .tool__out { color: var(--ink-soft); }
html:not([data-theme="dark"]) .combine__plus { color: var(--ink); }
html:not([data-theme="dark"]) .tk--ok::after { color: #161307; }

/* dark button hover → brand yellow with dark text (both themes) */
.btn--solid:hover { background: var(--accent); color: #161307; }
.btn--solid:hover .arr { color: #161307; }

/* keep premium-card labels yellow on their dark surface */
.layer--premium .layer__idx, .layer--premium .layer__role--accent { color: var(--dark-em) !important; }

/* ============================================================
   LIBRO MAYOR · elementos gráficos portados de la landing
   (rondas 9–15 de landing.backteam.co)
   ============================================================ */

/* suma y sigue: marcas de continuidad entre secciones numeradas */
.sec__carry {
  display: flex; align-items: center; gap: 12px;
  margin: clamp(32px, 5vw, 56px) 0 0;
  font: 500 11px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.sec__carry::before { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* firma tipográfica a todo el ancho, cortada por el borde inferior */
.foot__mark {
  font-family: var(--head); font-weight: 500;
  font-size: clamp(4.5rem, 1rem + 15.5vw, 14.5rem);
  line-height: .78; letter-spacing: -.04em;
  color: var(--dark-paper);
  --mark-y: .18em; transform: translateY(var(--mark-y));
  white-space: nowrap;
  margin-top: clamp(24px, 4vw, 48px);
  pointer-events: none; user-select: none;
}
.foot__mark span { color: var(--accent); }
/* la firma se "imprime" al entrar en el viewport; fallback: estática */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .foot__mark {
      animation: markPrint linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
    @keyframes markPrint {
      from { transform: translateY(calc(var(--mark-y) + .45em)); opacity: 0; }
    }
  }
}
.foot__colofon { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

/* numeración de partida en el formulario del CTA (todos son requeridos)
   + tick de auditoría al validar. El form vive en tarjeta oscura fija en
   ambos temas → número y tick usan tintas de la banda oscura, no
   accent-deep (en claro #7a6500 no contrasta sobre --dark-2) */
.cta__form { counter-reset: lf; }
.cta__form .field:has(:is(input, select, textarea):required) > span:first-child::before {
  counter-increment: lf;
  content: counter(lf, decimal-leading-zero) "  ";
  content: counter(lf, decimal-leading-zero) "  " / "";
  color: var(--dark-paper);
}
.cta__form .field > span:first-child::after {
  content: " ✓"; content: " ✓" / "";
  font-family: var(--mono); color: transparent;
  display: inline-block; transform: translateY(2px) scale(.5);
  transition: transform .25s cubic-bezier(.2, 1.6, .3, 1), color .2s;
}
.cta__form .field:has(:is(input, select, textarea)[required]:user-valid) > span:first-child::after {
  color: var(--dark-em); transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .cta__form .field > span:first-child::after { transition: color .2s; }
}

/* ───────────── vida: microinteracciones (ronda 11/12 de la landing) ───────────── */

/* marcador de lectura: el avance del libro, en el borde del nav. Va 1:1 con el
   scroll del lector (no es movimiento autónomo, por eso no se apaga con
   reduced-motion); sin soporte de scroll-driven animations no hay barra. */
@supports (animation-timeline: scroll()) {
  .nav::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--accent); transform-origin: 0 0; transform: scaleX(0);
    pointer-events: none;
    animation: navLeido linear both;
    animation-timeline: scroll(root);
  }
  @keyframes navLeido { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* botón magnético: site4.js escribe --bx/--by mientras el cursor recorre el botón.
   Esta regla reemplaza a propósito el "transition: all" base del .btn por una
   lista enumerada, para que el transform siga al cursor a .18s */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn {
    transform: translate(var(--bx, 0px), var(--by, 0px));
    transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .18s var(--ease);
  }
  .btn:active:not(:disabled) { transform: translate(var(--bx, 0px), calc(var(--by, 0px) + 1px)); }
}

/* el campo activo: la etiqueta desliza y el número de la partida se enciende,
   como la línea activa del libro. OJO: los dos pseudo-elementos de la etiqueta
   están OCUPADOS (::before = numeración, ::after = tick) — aquí solo se
   recolorea el ::before, sin tocar content/position/transform. La tarjeta es
   oscura fija en ambos temas → tintas de banda oscura. */
.cta__form .field:focus-within > span:first-child { transform: translateX(15px); color: var(--dark-paper); }
/* misma estructura que la regla de numeración + :focus-within para ganarle el color */
.cta__form .field:has(:is(input, select, textarea):required):focus-within > span:first-child::before {
  color: var(--dark-em);
}
@media (prefers-reduced-motion: no-preference) {
  .cta__form .field > span:first-child { transition: transform .2s var(--ease), color .15s var(--ease); }
  .cta__form .field > span:first-child::before { transition: color .15s var(--ease); }
}

/* ───────────── detalle (ronda 12 de la landing) ───────────── */

/* campo con dato inválido tras interactuar (:user-invalid, no :invalid: solo
   después de tocarlo). La tarjeta es oscura fija → rojo de banda oscura
   (#ff8d85, el mismo del toolcard de la landing en dark), no #b3261e */
.cta__form .field:has(:is(input, select, textarea):user-invalid) > span:first-child { color: #ff8d85; }
.cta__form .field :is(input, select, textarea):user-invalid {
  border-color: #ff8d85;
  box-shadow: 0 0 0 3px rgba(255, 141, 133, .08);
}
/* selects sin valor se leen como placeholder, igual que los inputs */
.cta__form .field select:required:invalid,
.cta__form .field select:has(option[value='']:checked) { color: #6a7077; }

/* costura entre páginas + revelado circular del tema (paridad lp9 C6/C7).
   view-transition-name SOLO en la marca del nav: el footer repite .brand y
   dos nombres iguales en la misma página anulan la transición completa. */
@view-transition { navigation: auto; }
.nav .brand { view-transition-name: bt-brand; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

html.vt-theme::view-transition-old(root) { animation: none; }
html.vt-theme::view-transition-new(root) { animation: vt-circle .45s var(--ease); }
/* durante el revelado el tema debe aplicarse en seco: el fade de .4s del body
   dejaría el círculo descubriendo un color a medio camino; sin VT, el fade
   sigue siendo el fallback */
html.vt-theme body { transition: none; }
@keyframes vt-circle {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0%)); }
  to { clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 0%)); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* impresión: sin cromo, paleta clara forzada, todo visible (el reveal por
   scroll no aplica en papel; transition none para no imprimir un fotograma
   a medias) */
@media print {
  .nav, .wa-float, .globe-welcome, .mega, .secrail, .skip-link { display: none !important; }
  html[data-theme="dark"] {
    color-scheme: light;
    --paper: #ffffff; --paper-2: #f4f4f6; --card: #ffffff;
    --ink: #101114; --ink-soft: #2a2d33; --muted: #5b5f66; --muted-2: #6c7077;
    --line: #e9e9ec; --line-2: #d7d7dc;
    --accent-deep: #7a6500; --accent-ink: #4d4000; --accent-wash: #fdf6c9;
    --dark: #131619; --dark-2: #1c2025; --dark-line: #2c3137;
    --dark-paper: #e9eae6; --dark-muted: #9aa0a6;
  }
  * { box-shadow: none !important; text-shadow: none !important; }
  body { background: #fff; color: #101114; }
  a { color: inherit; }
  .qa { break-inside: avoid; }
  .reveal, .btn-arrive, .foot__mark {
    opacity: 1 !important; transform: none !important;
    animation: none !important; transition: none !important;
  }
}
