/* ==========================================================================
   Apex Consulting · página de servicios
   Se apoya en tokens.css, site.css (navegación, capítulos .ch, cumbre, pie)
   y apps.css (pantallas de ejemplo). Mismas convenciones que el inicio:
   · el CSS describe el ESTADO FINAL de cada escena (sin JS todo se lee);
     servicios.js pone el "antes" y lo conduce con el scroll.
   · escritorio coreografiado = (min-width: 64rem) and (min-height: 37.5rem).
   ========================================================================== */

/* la página vive en la noche que amanece, igual que el inicio */
.sv { background: transparent; }

/* ==========================================================================
   HERO · el Ávila de partículas se forma detrás del titular (misma
   composición que el hero del inicio: texto arriba, la montaña debajo)
   ========================================================================== */
.sv-hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + var(--sp-6)) var(--gutter) max(34svh, 13rem);
}
.sv-hero__copy { position: relative; max-width: 64rem; }
.sv-hero__title {
  max-width: 15ch;
  font-size: clamp(2.3rem, 0.3rem + 4.5vw, 5.4rem); font-weight: 850; font-stretch: 125%;
  line-height: 0.98; letter-spacing: -0.035em; text-wrap: balance;
}
.sv-hero__title .dim { display: block; }
.sv-hero__lede {
  margin-top: var(--sp-5); max-width: 35rem;
  font-size: var(--fs-lg); line-height: 1.55; color: var(--ink-2);
}

/* ==========================================================================
   EL MAPA · los seis servicios (la montaña ya es polvo)
   ========================================================================== */
.sv-map { position: relative; padding: var(--sp-9) var(--gutter) var(--sp-8); }
.sv-map__label { margin-bottom: var(--sp-5); }
/* índice: seis entradas con su regla que se traza */
.sv-index {
  display: grid; grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(1.5rem, 3vw, 3rem);
}
.sv-index__item {
  --rule: 1;
  position: relative;
  display: grid; gap: 0.35rem; align-content: start;
  padding: var(--sp-5) 0 var(--sp-6) 1.5rem;
}
.sv-index__item::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line-strong);
  transform: scaleX(var(--rule)); transform-origin: 0 50%;
}
.sv-index__item::after {
  content: ""; position: absolute; left: 0; top: calc(var(--sp-5) + 0.72em);
  width: 0.6rem; height: 0.52rem;
  background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: scale(0.35); opacity: 0;
  transition: transform 0.45s var(--ease-snap), opacity 0.3s;
}
.sv-index__name {
  font-size: var(--fs-h3); font-weight: 800; font-stretch: 116%;
  line-height: 1.1; letter-spacing: -0.02em;
  transition: transform 0.5s var(--ease-out), color 0.3s;
}
.sv-index__desc { font-size: var(--fs-md); color: var(--ink-3); transition: color 0.3s; }
.sv-index__item:hover::after, .sv-index__item:focus-visible::after { transform: scale(1); opacity: 1; }
.sv-index__item:hover .sv-index__name { transform: translateX(0.3rem); }
.sv-index__item:hover .sv-index__desc { color: var(--ink-2); }
@media (min-width: 40rem) {
  .sv-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .sv-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   CAPÍTULOS — texto a la izquierda, escena a la derecha (usa .ch de site.css)
   ========================================================================== */
.sv-ch .ch__title { font-size: clamp(2rem, 0.9rem + 2.5vw, 3.6rem); }
.sv-ch .ch__text { margin-top: var(--sp-4); }
.sv-inc { list-style: none; margin-top: var(--sp-5); max-width: 31rem; }
.sv-inc li {
  --rule: 1;
  position: relative;
  display: flex; align-items: baseline; gap: 0.7rem;
  padding: 0.55rem 0;
  font-size: var(--fs-sm); color: var(--ink-2);
}
.sv-inc li::before {
  content: ""; flex: none; width: 0.5rem; height: 0.43rem;
  background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: translateY(-0.05rem);
}
.sv-inc li::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line);
  transform: scaleX(var(--rule)); transform-origin: 0 50%;
}
.ch__stage { --ui: clamp(9.5px, min(1.3vh, 0.84vw), 12.5px); }

@media (min-width: 64rem) and (min-height: 37.5rem) {
  .sv-ch--apps  { --len: 300vh; }
  .sv-ch--web   { --len: 330vh; }
  .sv-ch--forge { --len: 310vh; }
  .sv-ch--erp   { --len: 290vh; }
  .sv-ch--hub   { --len: 330vh; }
  .sv-ch--flow  { --len: 310vh; }
  .sv-ch .ch__sticky { grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr); }
  .sv-ch .ch__stage { align-self: stretch; align-content: center; }
  .golive, .flow { display: grid; }
}
@media (min-width: 64rem) and (max-height: 50rem) {
  .sv-ch .ch__title { font-size: clamp(1.8rem, 0.7rem + 2.2vw, 3rem); }
  .sv-ch .ch__text { font-size: var(--fs-sm); }
  .sv-inc { margin-top: var(--sp-4); }
  .sv-inc li { padding: 0.38rem 0; }
}

/* ==========================================================================
   APPS · la misma app de cobranza en iPhone (apps.css) y en Android
   ========================================================================== */
.phones {
  --pw: min(15rem, 30vh, 38vw);
  display: flex; justify-content: center; align-items: center;
  gap: clamp(1rem, 3vw, 3.2rem);
}
.phones .iph, .phones .adr { --w: var(--pw); }
/* posiciones de reposo con propiedades sueltas: GSAP anima solo transform */
.phones__ios { rotate: -3deg; margin-top: -5%; }
.phones__and { rotate: 3deg; margin-top: 7%; }

.cob {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  font-family: var(--app-font); color: #111;
  font-size: calc(var(--w) * 0.047); line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
/* iOS */
.cob--ios { background: var(--ios-bg); }
.cob__client { display: flex; align-items: center; gap: 0.65em; margin: 0.45em 0.9em 0; padding: 0.62em 0.75em; border-radius: 0.8em; background: #fff; }
.cob__who { display: grid; min-width: 0; }
.cob__who b { font-weight: 600; font-size: 0.92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob__who small { color: #8a8a8e; font-size: 0.74em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob__cap { margin: 0.9em 1.75em 0.32em; font-size: 0.74em; color: #6c6c70; }
.cob__list { margin: 0 0.9em; border-radius: 0.8em; background: #fff; overflow: hidden; }
.cob__row { display: flex; justify-content: space-between; align-items: center; gap: 0.6em; padding: 0.6em 0.8em; font-size: 0.86em; border-bottom: 1px solid var(--ios-sep); }
.cob__row:last-child { border-bottom: 0; }
.cob__row span { color: #3a3a3c; white-space: nowrap; }
.cob__row b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cob__row .cob__att { display: inline-flex; align-items: center; gap: 0.3em; color: var(--ios-blue); font-weight: 500; }
.cob__att svg { width: 1.1em; height: 1.1em; }
.cob__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0.9em 0.55em; padding: 0.15em; border-radius: 0.6em; background: #e3e3e8; font-size: 0.7em; font-weight: 600; text-align: center; }
.cob__seg span { padding: 0.45em 0.1em; border-radius: 0.5em; color: #3a3a3c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob__seg .is-on { background: #fff; color: #111; box-shadow: 0 1px 3px oklch(0% 0 0 / 0.14); }
.cob__save { margin: auto 0.9em 2.1em; padding: 0.78em; border-radius: 0.85em; background: var(--ios-blue); color: #fff; font-weight: 600; font-size: 0.92em; text-align: center; }
.cob__toast {
  position: absolute; left: 0.75em; right: 0.75em; top: 3.3em; z-index: 5;
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.7em 0.8em; border-radius: 1.1em;
  background: oklch(99% 0.003 250 / 0.97); font-size: 0.78em;
  box-shadow: 0 0.7em 1.8em -0.5em oklch(0% 0 0 / 0.35);
}
.cob__toast svg { width: 1.9em; height: 1.9em; padding: 0.38em; flex: none; border-radius: 50%; background: var(--ios-green); color: #fff; }
.cob__toast span { display: grid; line-height: 1.25; color: #3a3a3c; }
.cob__toast b { font-weight: 600; color: #111; }

/* Android: marco propio, cámara perforada y Material 3 */
.adr { --w: 16rem; position: relative; width: var(--w); aspect-ratio: 9 / 19.5; flex: none; }
.adr__frame {
  position: absolute; inset: 0;
  padding: calc(var(--w) * 0.026);
  border-radius: calc(var(--w) * 0.12);
  background: linear-gradient(150deg, #474a52, #1c1d21 35%, #0f1012 64%, #34363c);
  box-shadow:
    inset 0 0 0 1px oklch(100% 0 0 / 0.16),
    0 3rem 5rem -1.5rem oklch(0% 0 0 / 0.75),
    0 0 5rem -1rem oklch(75% 0.08 250 / 0.3);
}
.adr::after {
  content: ""; position: absolute; right: -2px; top: 24%; width: 3px; height: 10%;
  border-radius: 2px; background: linear-gradient(90deg, #4a4d55, #111);
}
.adr__screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--w) * 0.096); background: #fdf8fd; }
.adr__cam {
  position: absolute; left: 50%; top: 1.7%; z-index: 10;
  width: 3.8%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: #050506; box-shadow: 0 0 0 1.5px #1d1d20;
}
.cob--and { background: #fdf8fd; color: #1c1b1f; font-family: Roboto, "Segoe UI", system-ui, sans-serif; }
.adr__status { display: flex; justify-content: space-between; align-items: center; height: 2.7em; padding: 0.55em 1.5em 0; font-size: 0.8em; }
.adr__status b { font-weight: 500; font-variant-numeric: tabular-nums; }
.adr__icons { display: inline-flex; align-items: center; gap: 0.35em; }
.adr__icons svg { width: 1.05em; height: 1.05em; }
.adr__sig { width: 0.85em; height: 0.85em; background: currentColor; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.adr__bat { width: 0.5em; height: 0.95em; border-radius: 0.12em; background: currentColor; }
.adr__bar { display: flex; align-items: center; gap: 1.1em; padding: 0.75em 1.15em 0.65em; font-size: 1.12em; }
.adr__bar svg { width: 1.15em; height: 1.15em; flex: none; }
.adr__bar span { white-space: nowrap; }
.adr__card { display: flex; align-items: center; gap: 0.65em; margin: 0.15em 0.9em 0.35em; padding: 0.65em 0.75em; border-radius: 0.8em; background: #f2ecf4; }
.adr__field {
  position: relative; display: grid;
  margin: 0.62em 0.9em 0; padding: 0.85em 0.85em 0.55em;
  border: 1px solid #79747e; border-radius: 0.3em; font-size: 0.86em;
}
.adr__field span { position: absolute; left: 0.6em; top: -0.65em; padding: 0 0.3em; background: #fdf8fd; color: #49454f; font-size: 0.76em; white-space: nowrap; }
.adr__field b { font-weight: 400; font-variant-numeric: tabular-nums; }
.adr__chips { display: flex; gap: 0.35em; margin: 0.75em 0.9em 0.05em; font-size: 0.7em; overflow: hidden; }
.adr__chips span { display: inline-flex; align-items: center; gap: 0.25em; padding: 0.45em 0.65em; border: 1px solid #79747e; border-radius: 0.55em; white-space: nowrap; color: #49454f; }
.adr__chips .is-on { background: #d1e4ff; border-color: transparent; color: #001d36; font-weight: 500; }
.adr__chips svg { width: 1.1em; height: 1.1em; }
.adr__attach { display: flex; align-items: center; gap: 0.5em; margin: 0.7em 0.9em 0; padding: 0.6em 0.8em; border-radius: 0.6em; background: #e9f1fa; color: #2b5d8c; font-size: 0.8em; font-weight: 500; }
.adr__attach svg { width: 1.2em; height: 1.2em; }
.adr__save { margin: auto 0.9em 1.9em; padding: 0.8em; border-radius: 999px; background: #36618e; color: #fff; font-weight: 500; font-size: 0.9em; text-align: center; }
.adr__snack {
  position: absolute; left: 0.8em; right: 0.8em; bottom: 1.5em; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85em 1em; border-radius: 0.35em;
  background: #322f35; color: #f5eff7; font-size: 0.78em;
  box-shadow: 0 0.5em 1.2em -0.3em oklch(0% 0 0 / 0.5);
}
.adr__snack b { color: #9ecaff; font-weight: 600; }

/* boceto: servicios.js dibuja un rectángulo por bloque (.bk) encima de la pantalla */
.wire { position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wire rect, .wire line { fill: none; stroke: oklch(62% 0.05 255); stroke-width: 1.2; stroke-linecap: round; }

/* ==========================================================================
   WEB · la tienda en una ventana que se achica
   La tienda se maqueta a un ancho "virtual" (1280 → 820 → 390 px) y se
   escala dentro de la ventana; las container queries usan ese ancho, así
   que el diseño se reacomoda en los mismos cortes que en un navegador real.
   servicios.js conduce --bw (ancho de la ventana) y --k0 (escala fija).
   ========================================================================== */
.webs { --bw: 1; display: grid; justify-items: center; align-content: center; gap: 0.75rem; }
.webs__ruler, .bwin { width: calc(var(--bw) * 100%); }
.webs__ruler {
  position: relative;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0 0.15rem 0.6rem;
  font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.webs__ruler::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.4rem;
  border: 1px solid var(--ink-4); border-top: 0; border-radius: 0 0 3px 3px;
}
.webs__dev { color: var(--ink-2); }
.webs__w b { color: var(--ink); font-weight: 650; }
.bwin {
  overflow: hidden; border-radius: 10px; background: #fff;
  box-shadow: var(--screen-shadow), 0 0 6rem -1.5rem oklch(75% 0.08 250 / 0.25);
  font-family: var(--app-font); -webkit-font-smoothing: antialiased;
}
.bwin__bar { display: flex; align-items: center; gap: 0.7em; padding: 0.55em 0.8em; background: #eceef2; border-bottom: 1px solid #dcdfe4; font-size: var(--ui); }
.bwin__dots { display: flex; gap: 0.38em; flex: none; }
.bwin__dots i { width: 0.68em; height: 0.68em; border-radius: 50%; background: #c9cdd4; }
.bwin__url {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.45em;
  padding: 0.32em 0.8em; border-radius: 999px; background: #fff;
  color: #555; font-size: 0.9em; white-space: nowrap; overflow: hidden;
}
.bwin__url svg { width: 1em; height: 1em; flex: none; color: #3a8f47; }
.bwin__view { --k0: 0.56; height: clamp(17rem, 50vh, 29rem); overflow: hidden; background: #fff; }
.site-c {
  container-type: inline-size;
  width: calc(100% / var(--k0)); height: calc(100% / var(--k0));
  transform: scale(var(--k0)); transform-origin: 0 0;
}
.site { font-size: 17px; line-height: 1.35; color: #1a1a1a; translate: 0 var(--sy, 0px); }
.site__head { display: flex; align-items: center; gap: 22px; padding: 18px 32px; border-bottom: 1px solid #eee; }
.site__logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -0.01em; white-space: nowrap; }
.site__logo svg { width: 44px; height: auto; overflow: visible; }
.site__logo path { fill: none; stroke: var(--shop); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.site__nav { display: flex; gap: 22px; color: #444; font-size: 16px; white-space: nowrap; }
.site__search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid #ddd; border-radius: 999px;
  color: #999; font-size: 15px; white-space: nowrap; overflow: hidden;
}
.site__search svg { width: 17px; height: 17px; flex: none; }
.site__cart { position: relative; flex: none; }
.site__cart svg { width: 27px; height: 27px; display: block; }
.site__cart i {
  position: absolute; right: -8px; top: -6px; min-width: 20px; height: 20px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--shop); color: #fff; font-size: 12px; font-style: normal; font-weight: 700;
}
.site__menu { display: none; flex-direction: column; gap: 5px; flex: none; }
.site__menu i { width: 24px; height: 2.5px; border-radius: 2px; background: #1a1a1a; }
.site__hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: center; gap: 24px;
  margin: 24px 32px 0; padding: 40px 48px; border-radius: 16px; background: #f5f1ea;
}
.site__h { font-size: 48px; font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; }
.site__p { margin-top: 12px; color: #555; font-size: 18px; }
.site__cta { display: inline-block; margin-top: 20px; padding: 12px 22px; border-radius: 8px; background: var(--shop); color: #fff; font-weight: 700; font-size: 16px; }
.site__art { display: grid; place-items: center; }
.site__art .pack { width: min(180px, 90%); }
.site__cats { display: flex; gap: 10px; margin: 24px 32px 0; overflow: hidden; }
.site__cats span { padding: 7px 18px; border: 1px solid #e3e3e3; border-radius: 999px; color: #444; font-size: 15px; white-space: nowrap; }
.site__cats .is-on { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }
.site__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 32px 32px; }
.prod { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid #eee; border-radius: 10px; }
.prod__img { display: grid; place-items: center; aspect-ratio: 1.3; border-radius: 8px; background: #f6f4f0; }
.prod__img svg { width: 52%; height: auto; }
.prod b { font-weight: 600; font-size: 16px; line-height: 1.25; }
.prod__price { color: var(--shop); font-weight: 700; font-size: 17px; }
.prod__price small { display: block; color: #888; font-weight: 400; font-size: 13px; }
.prod__add { margin-top: 4px; padding: 8px; border: 1px solid var(--shop); border-radius: 7px; color: var(--shop); font-weight: 600; font-size: 15px; text-align: center; }
/* tableta */
@container (max-width: 1000px) {
  .site__nav { display: none; }
  .site__h { font-size: 42px; }
  .site__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* teléfono */
@container (max-width: 560px) {
  .site__head { gap: 14px; padding: 14px 18px; }
  .site__logo { font-size: 19px; }
  .site__search { display: none; }
  .site__cart { margin-left: auto; }
  .site__menu { display: flex; }
  .site__hero { grid-template-columns: minmax(0, 1fr); margin: 14px 18px 0; padding: 26px 24px; }
  .site__art { display: none; }
  .site__h { font-size: 33px; }
  .site__p { font-size: 16px; }
  .site__cats { margin: 18px 18px 0; }
  .site__grid { gap: 12px; margin: 16px 18px 24px; }
  .prod { padding: 10px; }
  .prod b { font-size: 15px; }
}

/* ==========================================================================
   A LA MEDIDA · el editor (oscuro) y la pantalla que resulta (clara)
   ========================================================================== */
.forge { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.ide { grid-column: 1 / 10; grid-row: 1; position: relative; z-index: 1; }
.fapp { grid-column: 5 / 13; grid-row: 1; position: relative; z-index: 2; margin-top: 19em; font-size: var(--ui); }
.ide {
  font-size: var(--ui); color: #d4d4d4;
  background: #1e1f24; border: 1px solid oklch(100% 0 0 / 0.08); border-radius: 10px; overflow: hidden;
  box-shadow: var(--screen-shadow);
}
.ide__bar { display: flex; background: #17181c; border-bottom: 1px solid #2a2b31; font-family: var(--app-font); font-size: 0.92em; }
.ide__tab { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.62em 1em; border-right: 1px solid #2a2b31; color: #8b8d96; white-space: nowrap; }
.ide__tab svg { width: 1.1em; height: 1.1em; color: #e3b341; }
.ide__tab.is-on { background: #1e1f24; color: #e8e8e8; box-shadow: inset 0 2px 0 #569cd6; }
/* el <pre> no conserva los saltos entre líneas: cada .ln ya es un bloque */
.ide__code { margin: 0; padding: 0.9em 0 1.1em; font-family: var(--app-mono); font-size: 0.95em; line-height: 1.75; white-space: normal; overflow: hidden; }
.ln { display: block; min-height: 1.75em; padding-right: 1em; white-space: pre; }
.ln i { display: inline-block; width: 3.1em; padding-right: 1.2em; font-style: normal; text-align: right; color: #5a5d68; }
.ln b { font-weight: 400; }
.ide .k { color: #c586c0; }
.ide .t { color: #4ec9b0; }
.ide .s { color: #ce9178; }
.ide .c { color: #6a9955; }
.ln.is-typing::after { content: ""; display: inline-block; width: 0.55em; height: 1.15em; margin-left: 1px; vertical-align: -0.2em; background: #aeafad; animation: fp-blink 0.8s steps(2) infinite; }

.fapp {
  font-family: var(--app-font); color: var(--a-text);
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: var(--screen-shadow), 0 0 6rem -1.5rem oklch(75% 0.08 250 / 0.22);
  -webkit-font-smoothing: antialiased;
}
.fapp__top { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 0.65em 1.1em; background: #f6f7f9; border-bottom: 1px solid var(--a-line); color: var(--a-text-2); font-size: 0.92em; }
.fapp__crumb { display: inline-flex; align-items: center; gap: 0.35em; white-space: nowrap; min-width: 0; overflow: hidden; }
.fapp__crumb svg { width: 0.85em; height: 0.85em; flex: none; transform: scaleX(-1); color: var(--a-text-3); }
.fapp__crumb b { color: var(--a-text); font-weight: 600; }
.fapp__user { display: grid; place-items: center; flex: none; width: 2.1em; height: 2.1em; border-radius: 50%; background: #3a6fb0; color: #fff; font-size: 0.82em; font-weight: 600; }
.fapp__head { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 0.95em 1.2em 0.55em; }
.fapp__title { font-size: 1.45em; font-weight: 600; white-space: nowrap; }
.fapp__st { padding: 0.25em 0.75em; border-radius: 999px; background: var(--a-warn-bg); color: var(--a-warn); font-size: 0.85em; font-weight: 600; white-space: nowrap; }
.fapp__f {
  display: grid; grid-template-columns: 8.6em minmax(0, 1fr); gap: 1em; align-items: center;
  margin: 0 0.8em; padding: 0.6em 0.4em;
  border-bottom: 1px solid var(--a-line-2); border-radius: 4px;
  background: color-mix(in srgb, #fff3c4 calc(var(--flash, 0) * 100%), transparent);
}
.fapp__f span { color: var(--a-text-2); font-weight: 600; font-size: 0.92em; }
.fapp__f b { min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fapp__f small { margin-left: 0.5em; color: var(--a-text-3); font-weight: 400; }
.fapp__f .fapp__file { display: inline-flex; align-items: center; gap: 0.4em; color: #3a6fb0; }
.fapp__file svg { width: 1.1em; height: 1.1em; flex: none; }
.fapp__flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6em; margin: 0.8em 1.2em 1.15em; padding-top: 0.85em; border-top: 1px solid var(--a-line); }
.fapp__step { display: flex; align-items: center; gap: 0.5em; min-width: 0; }
.fapp__step i { display: grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--a-ok-bg); color: var(--a-ok); }
.fapp__step i svg { width: 1.1em; height: 1.1em; }
.fapp__step span { display: grid; min-width: 0; line-height: 1.25; }
.fapp__step b { font-weight: 600; font-size: 0.92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fapp__step small { color: var(--a-text-3); font-size: 0.8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fapp__step--wait i { background: var(--a-warn-bg); color: var(--a-warn); }

/* ==========================================================================
   ERP · el arranque: aplicaciones que se instalan y el plan que se completa
   ========================================================================== */
.gl {
  font-size: var(--ui); font-family: var(--app-font); color: var(--a-text);
  background: var(--a-bg); border-radius: 10px; overflow: hidden;
  box-shadow: var(--screen-shadow), 0 0 7rem -1.5rem oklch(78% 0.08 290 / 0.28);
  -webkit-font-smoothing: antialiased;
}
.gl__nav { display: flex; align-items: center; gap: 1em; height: 3.2em; padding: 0 1.1em; background: #fff; border-bottom: 1px solid var(--a-line); white-space: nowrap; }
.gl__nav b { font-weight: 600; font-size: 1.05em; }
.gl__co { margin-left: auto; color: var(--a-text-2); overflow: hidden; text-overflow: ellipsis; }
.gl__banner {
  display: flex; align-items: center; gap: 0.7em;
  margin: 0.9em 1em 0; padding: 0.65em 0.9em; border-radius: 6px;
  background: var(--a-ok-bg); color: #14532d; font-size: 0.95em;
}
.gl__banner svg { width: 1.55em; height: 1.55em; flex: none; padding: 0.25em; border-radius: 50%; background: var(--a-ok); color: #fff; }
.gl__banner b { font-weight: 600; }
.gl__body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0.9em; padding: 0.9em 1em 1em; }
.gl__apps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2em 0.5em; align-content: start;
  padding: 1.3em 0.7em; border-radius: 8px; background: #fff; border: 1px solid var(--a-line);
}
.gl__app { --on: 1; display: grid; justify-items: center; gap: 0.5em; text-align: center; }
.gl__ico {
  display: grid; place-items: center; width: 3.5em; height: 3.5em; border-radius: 0.9em;
  background: color-mix(in srgb, var(--c) calc(var(--on) * 100%), #fff);
  color: color-mix(in srgb, #fff calc(var(--on) * 100%), #9aa3b5);
  outline: 1.5px dashed color-mix(in srgb, #b3bac7 calc((1 - var(--on)) * 100%), transparent); outline-offset: -1.5px;
  box-shadow: 0 0.4em 0.9em -0.35em color-mix(in srgb, var(--c) calc(var(--on) * 70%), transparent);
}
.gl__ico svg { width: 1.65em; height: 1.65em; }
.gl__app b { font-weight: 500; font-size: 0.88em; line-height: 1.2; color: color-mix(in srgb, var(--a-text) calc(var(--on) * 100%), #a0a7b4); }
.gl__plan { padding: 0.95em 1.1em; border-radius: 8px; background: #fff; border: 1px solid var(--a-line); }
.gl__plan-t { margin-bottom: 0.4em; font-weight: 600; }
.gl__tasks { list-style: none; }
.gl__task { --done: 1; display: flex; align-items: flex-start; gap: 0.65em; padding: 0.5em 0; border-bottom: 1px solid var(--a-line-2); }
.gl__task:last-child { border-bottom: 0; }
.gl__tick {
  display: grid; place-items: center; flex: none; width: 1.55em; height: 1.55em; margin-top: 0.05em; border-radius: 50%;
  background: color-mix(in srgb, var(--a-ok) calc(var(--done) * 100%), #fff);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #c3c9d3 calc((1 - var(--done)) * 100%), transparent);
  color: #fff;
}
.gl__tick svg { width: 1em; height: 1em; opacity: var(--done); }
.gl__task span { display: grid; min-width: 0; line-height: 1.3; }
.gl__task b { font-weight: 600; font-size: 0.95em; }
.gl__task small { color: var(--a-text-3); font-size: 0.84em; }

/* ==========================================================================
   INTEGRACIONES · el mapa de conexiones y la llamada a la API
   ========================================================================== */
.hub { display: grid; gap: 1rem; align-content: center; }
.hub__map { position: relative; aspect-ratio: 1000 / 620; font-size: var(--ui); }
.hub__wires, .hub__glow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hub__wire {
  fill: none; stroke: oklch(82% 0.05 262 / 0.42); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 1 1.05; stroke-dashoffset: 0;
}
.hub__core, .hub__node {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--app-font); color: var(--a-text); background: #fff;
  -webkit-font-smoothing: antialiased;
}
.hub__core {
  left: 50%; top: 50%;
  display: grid; justify-items: center; gap: 0.25em;
  padding: 1em 1.4em; border-radius: 14px; text-align: center;
  box-shadow: var(--screen-shadow), 0 0 0 calc(var(--pulse, 0) * 12px) oklch(82% 0.1 262 / calc(var(--pulse, 0) * 0.3));
}
.hub__core-ico { display: grid; place-items: center; width: 2.6em; height: 2.6em; margin-bottom: 0.2em; border-radius: 0.7em; background: var(--odoo); color: #fff; }
.hub__core-ico svg { width: 1.4em; height: 1.4em; }
.hub__core b { font-size: 1.35em; font-weight: 700; line-height: 1.1; }
.hub__core small { color: var(--a-text-3); font-size: 0.85em; white-space: nowrap; }
.hub__node {
  left: var(--x); top: var(--y);
  display: flex; align-items: center; gap: 0.6em;
  width: 15.2em; padding: 0.62em 0.75em; border-radius: 10px;
  box-shadow: 0 1.2rem 2.4rem -1rem oklch(0% 0 0 / 0.6), 0 0 0 calc(var(--hit, 0) * 5px) oklch(84% 0.13 168 / calc(var(--hit, 0) * 0.5));
}
.hub__ico { display: grid; place-items: center; flex: none; width: 2.2em; height: 2.2em; border-radius: 0.55em; background: #eef1f6; color: #3a4a66; }
.hub__ico svg { width: 1.25em; height: 1.25em; }
.hub__txt { display: grid; min-width: 0; line-height: 1.25; }
.hub__txt b { font-weight: 600; font-size: 0.95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub__txt em { font-style: normal; font-size: 0.82em; font-weight: 500; color: var(--a-ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub__txt em::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.35em; border-radius: 50%; background: currentColor; vertical-align: 0.05em; }

.req {
  font-size: var(--ui); color: #d4d4d4;
  background: #1e1f24; border: 1px solid oklch(100% 0 0 / 0.08); border-radius: 10px; overflow: hidden;
  box-shadow: var(--screen-shadow);
}
.req__bar { display: flex; align-items: center; gap: 0.7em; padding: 0.55em 0.9em; background: #17181c; border-bottom: 1px solid #2a2b31; font-family: var(--app-mono); font-size: 0.92em; white-space: nowrap; }
.req__m { color: #4ec9b0; font-weight: 600; }
.req__s { margin-left: auto; padding: 0.12em 0.6em; border-radius: 4px; background: oklch(84% 0.13 168 / 0.14); color: oklch(84% 0.13 168); font-weight: 600; }
.req__body { margin: 0; padding: 0.65em 0.9em; font-family: var(--app-mono); font-size: 0.9em; line-height: 1.6; white-space: normal; overflow: hidden; }
.jl { display: block; min-height: 1.6em; white-space: pre; }
.jl b { font-weight: 400; }
.req .jk { color: #9cdcfe; }
.req .js { color: #ce9178; }
.req .jn { color: #b5cea8; }
.jl.is-typing::after { content: ""; display: inline-block; width: 0.55em; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: #aeafad; animation: fp-blink 0.8s steps(2) infinite; }
.req__res { padding: 0.55em 0.9em 0.7em; border-top: 1px solid #2a2b31; font-family: var(--app-mono); font-size: 0.9em; color: #9aa0ab; }
.req__res b { color: oklch(84% 0.13 168); font-weight: 600; }

/* ==========================================================================
   AUTOMATIZACIÓN · el flujo que corre solo y su registro
   ========================================================================== */
.fl {
  font-size: var(--ui); font-family: var(--app-font); color: var(--a-text);
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: var(--screen-shadow), 0 0 7rem -1.5rem oklch(78% 0.1 330 / 0.25);
  -webkit-font-smoothing: antialiased;
}
.fl__bar { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 0.75em 1.1em; border-bottom: 1px solid var(--a-line); white-space: nowrap; }
.fl__crumb { display: inline-flex; align-items: center; gap: 0.4em; min-width: 0; overflow: hidden; color: var(--a-text-2); }
.fl__crumb svg { width: 0.85em; height: 0.85em; flex: none; transform: scaleX(-1); color: var(--a-text-3); }
.fl__crumb b { overflow: hidden; text-overflow: ellipsis; color: var(--a-text); font-weight: 600; }
.fl__on { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.25em 0.7em; border-radius: 999px; background: var(--a-ok-bg); color: var(--a-ok); font-size: 0.88em; font-weight: 600; }
.fl__on i { width: 0.55em; height: 0.55em; border-radius: 50%; background: currentColor; }
.fl__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.fl__steps {
  position: relative; display: grid; justify-items: start; align-content: start;
  padding: 1.25em 1.2em;
  background-color: #f7f8fa;
  background-image: radial-gradient(#d6dae1 1px, transparent 1.3px); background-size: 1.1em 1.1em;
}
.fl__node {
  --lit: 1;
  position: relative; z-index: 1; width: 100%;
  display: flex; align-items: center; gap: 0.7em;
  padding: 0.78em 0.85em; border-radius: 8px;
  background: #fff; border: 1px solid color-mix(in srgb, #9fd3b2 calc(var(--lit) * 100%), var(--a-line));
  box-shadow: 0 0.2em 0.6em -0.3em oklch(0% 0 0 / 0.18);
}
.fl__ico { display: grid; place-items: center; flex: none; width: 2.1em; height: 2.1em; border-radius: 0.5em; background: #eef1f6; color: #3a4a66; }
.fl__ico svg { width: 1.2em; height: 1.2em; }
.fl__node:first-child .fl__ico { background: #f1eaf0; color: var(--odoo); }
.fl__txt { display: grid; min-width: 0; line-height: 1.25; }
.fl__txt b { font-weight: 600; font-size: 0.95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl__txt small { color: var(--a-text-3); font-size: 0.82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl__t { margin-left: auto; padding-left: 0.6em; flex: none; font-style: normal; font-size: 0.82em; font-weight: 600; color: var(--a-ok); font-variant-numeric: tabular-nums; opacity: var(--lit); }
.fl__t::before { content: "✓ "; }
.fl__wire { display: block; width: 2px; height: 1.7em; margin-left: calc(1.9em - 1px); background: #c3c9d3; transform: scaleY(var(--draw, 1)); transform-origin: 50% 0; }
.fl__token {
  position: absolute; left: 3.1em; top: 0; z-index: 2;
  width: 0.8em; height: 0.8em; margin: -0.4em 0 0 -0.4em; border-radius: 50%;
  background: #3a6fb0; box-shadow: 0 0 0 0.3em oklch(60% 0.12 250 / 0.25);
  opacity: 0; pointer-events: none;
}
.fl__log { padding: 1.1em 1.2em; border-left: 1px solid var(--a-line); }
.fl__log-t { display: grid; margin-bottom: 0.55em; font-weight: 600; }
.fl__log-t small { color: var(--a-text-3); font-weight: 400; font-size: 0.85em; }
.fl__row { display: flex; justify-content: space-between; align-items: center; gap: 0.8em; padding: 0.7em 0; border-bottom: 1px solid var(--a-line-2); font-size: 0.92em; }
.fl__row b { min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl__row span { flex: none; padding: 0.15em 0.6em; border-radius: 999px; font-size: 0.85em; font-weight: 600; white-space: nowrap; }
.fl__row .is-ok { background: var(--a-ok-bg); color: var(--a-ok); }
.fl__row .is-warn { background: var(--a-warn-bg); color: var(--a-warn); }
.fl__sum { margin-top: 0.7em; color: var(--a-text-2); font-size: 0.9em; font-weight: 500; }

/* ==========================================================================
   Y ADEMÁS
   ========================================================================== */
.more { position: relative; padding: var(--sp-9) var(--gutter) var(--sp-8); }
.more__head { max-width: 52rem; }
.more__title, .route__title {
  font-size: var(--fs-h2); font-weight: 800; font-stretch: 116%;
  line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance;
}
.more__title .dim, .route__title .dim { display: block; }
.more__grid { margin-top: var(--sp-7); display: grid; grid-template-columns: minmax(0, 1fr); column-gap: clamp(1.5rem, 3vw, 3.5rem); }
.more__item { --rule: 1; position: relative; padding: var(--sp-5) 0 var(--sp-6); }
.more__item::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line-strong); transform: scaleX(var(--rule)); transform-origin: 0 50%;
}
.more__item h3 { font-size: var(--fs-h3); font-weight: 750; font-stretch: 110%; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.more__item p { margin-top: var(--sp-3); max-width: 28rem; color: var(--ink-2); }
@media (min-width: 40rem) { .more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .more__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   CÓMO TRABAJAMOS · la ruta sobre la cresta
   ========================================================================== */
.route { position: relative; padding: var(--sp-9) var(--gutter) var(--sp-8); }
.route__map { margin-top: var(--sp-6); }
.route__map svg { display: block; width: 100%; height: auto; overflow: visible; }
.route__base { fill: none; stroke: oklch(100% 0 0 / 0.22); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.route__done { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1.05; stroke-dashoffset: 0; }
.route__stop { fill: oklch(14% 0.04 300); stroke: var(--ink); stroke-width: 1.4; }
.route__apex { fill: var(--red); }
.route__climber { fill: var(--red-hi); }
.route__steps { list-style: none; margin-top: var(--sp-6); display: grid; gap: var(--sp-5); }
.route__step h3 { font-size: var(--fs-xl); font-weight: 780; font-stretch: 112%; line-height: 1.15; letter-spacing: -0.02em; }
.route__step p { margin-top: var(--sp-2); max-width: 30rem; color: var(--ink-2); }

/* ==========================================================================
   LA CUMBRE · dos acciones
   ========================================================================== */
.sv .foot__line { max-width: 14ch; }

/* ==========================================================================
   ESCRITORIO COREOGRAFIADO
   ========================================================================== */
.st-measure .route__sticky { position: relative !important; top: auto !important; }
@media (min-width: 64rem) and (min-height: 37.5rem) {
  .route { height: 330vh; padding: 0; }
  .route__sticky {
    position: sticky; top: 0; height: 100vh;
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-items: center;
    padding: calc(var(--nav-h) + 3vh) var(--gutter) 7vh;
  }
  .route__map { margin-top: 0; }
  .route__map svg { max-height: 44vh; }
  .route__steps { margin-top: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1rem, 2.2vw, 2.4rem); align-items: start; }
  .route__step { position: relative; padding-top: var(--sp-4); border-top: 1px solid var(--line); transition: opacity 0.5s var(--ease-out); }
  .route__step p { font-size: var(--fs-sm); }
  .js:not(.reduce) .route__step { opacity: 0.32; }
  .js:not(.reduce) .route__step.is-past { opacity: 0.62; }
  .js:not(.reduce) .route__step.is-active { opacity: 1; }
  .route__step.is-active::before {
    content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
    background: var(--red); transform-origin: 0 50%;
    animation: route-rule 0.7s var(--ease-out);
  }
  @keyframes route-rule { from { transform: scaleX(0); } }
}

/* ==========================================================================
   MÓVIL / TABLETA
   ========================================================================== */
@media (max-width: 63.99rem), (max-height: 37.49rem) {
  .ch__stage { --ui: clamp(8.5px, 2.45vw, 11.5px); }
  .phones { --pw: min(11.8rem, 41vw); padding-block: 1rem 2.5rem; }
  .forge { grid-template-columns: minmax(0, 1fr); }
  .ide, .fapp { grid-column: 1; grid-row: auto; }
  .fapp { margin: -1.6rem 0 0 6%; }
  .gl__body { grid-template-columns: minmax(0, 1fr); }
  .hub__map { aspect-ratio: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
  .hub__wires, .hub__glow { display: none; }
  .hub__core, .hub__node { position: relative; left: auto; top: auto; transform: none; width: auto; }
  .hub__core { grid-column: 1 / -1; }
  .hub__node { padding: 0.55em 0.6em; }
  .fl__body { grid-template-columns: minmax(0, 1fr); }
  .fl__log { border-left: 0; border-top: 1px solid var(--a-line); }
  .route__base, .route__done { stroke-width: 2.4; }
  .route__stop { stroke-width: 2; }
}
@media (max-width: 40rem) {
  .sv-hero__title { max-width: none; }
  .sv-hero__lede { font-size: var(--fs-md); }
  .gl__apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em 0.3em; padding: 1em 0.4em; }
  .gl__app b { font-size: 0.8em; }
  .webs__ruler { font-size: 0.7rem; }
}

/* ==========================================================================
   MOVIMIENTO REDUCIDO — estado final, sin escenarios sticky
   ========================================================================== */
.reduce .route { height: auto; }
.reduce .route__sticky { position: relative; height: auto; }

/* ==========================================================================
   ESTADOS QUE CONDUCE servicios.js (sin JS nunca se aplican)
   ========================================================================== */
@property --flash { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes sv-flash { from { --flash: 1; } to { --flash: 0; } }
.fapp__f, .fapp__flow, .fapp__step, .fl__row, .fl__sum, .req__res, .req__s, .hub__txt em {
  transition: opacity 0.45s var(--ease-out), transform 0.55s var(--ease-out);
}
.fapp__f.is-off, .fapp__flow.is-off, .fl__row.is-off, .fl__sum.is-off, .req__res.is-off, .hub__txt em.is-off {
  opacity: 0; transform: translateY(0.5em);
}
.req__s.is-off { opacity: 0; transform: scale(0.85); }
.fapp__step.is-off { opacity: 0.28; }
.fapp__step.is-off i { background: #eef0f3; color: #b6bcc7; }
.fapp__f.is-flash { animation: sv-flash 1.1s var(--ease-out); }
.fl__row.is-off { transform: translateX(-0.6em); }

.route__stop { transition: fill 0.35s; }
.route__stop.is-on { fill: var(--ink); }
.route__apex { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.6s var(--ease-snap); }
.js:not(.reduce) .route__apex:not(.is-on) { transform: scale(0); }

/* la página actual, marcada en la navegación */
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
