/* ============================================================
   ÓPTIMO PLUS — Home (servicios + marketplace de microapps)
   Usa los tokens de styles.css
   ============================================================ */

:root {
  --ink-panel: #141413;
  --ink-line: rgba(255,255,255,0.08);
  --ink-text: rgba(255,255,255,0.62);
  --ok: #3FB27F;
}

/* Nav: más enlaces, mismo espacio */
@media (max-width: 1240px) {
  .nav-links { gap: 18px; font-size: 13px; }
}
@media (max-width: 1100px) {
  .nav-agenda-btn { display: none; }
}

.hx-accent { color: var(--orange); }

/* ---------- Hero ---------- */
.hx {
  position: relative;
  overflow: hidden;
  padding: 150px 0 110px;
  min-height: 100vh;
  display: flex; align-items: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, var(--bg-soft) 100%);
}
.hx-orb {
  position: absolute; z-index: 0; pointer-events: none;
  width: 900px; height: 900px; right: -260px; top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,0.20) 0%, rgba(255,107,53,0) 62%);
  filter: blur(30px);
}
.hx-grid {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
}
.hx-title {
  font-size: clamp(44px, 5.6vw, 88px);
  line-height: 0.98;
  margin: 6px 0 28px;
  text-wrap: balance;
}
.hx-lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--gray-1);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 36px;
}
.hx-paths { display: flex; gap: 12px; flex-wrap: wrap; }
.hx-note { margin-top: 22px; font-size: 13.5px; color: var(--gray-2); max-width: 460px; }

/* Consola */
.hx-console {
  background: var(--ink-panel);
  color: white;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 40px 80px -30px rgba(20,16,10,0.45), 0 0 0 1px rgba(0,0,0,0.04);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  min-width: 0;
}
.hx-con-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hx-con-title { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-text); }
.hx-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(63,178,127,0.6); animation: hxPing 2s infinite; }
@keyframes hxPing { 0% { box-shadow: 0 0 0 0 rgba(63,178,127,0.55); } 70% { box-shadow: 0 0 0 9px rgba(63,178,127,0); } 100% { box-shadow: 0 0 0 0 rgba(63,178,127,0); } }

.hx-toggle {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--ink-line);
}
.hx-toggle button {
  font-family: "Manrope", sans-serif; font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; color: var(--ink-text);
  transition: background .25s var(--ease-out), color .25s;
}
.hx-toggle button.on { background: white; color: var(--ink); }
.hx-toggle button:not(.on):hover { color: white; }

.hx-feed { list-style: none; display: flex; flex-direction: column; gap: 6px; min-height: 348px; }
.hx-feed li {
  display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--ink-line);
  font-size: 12.5px; line-height: 1.45;
}
.hx-feed li.new { animation: hxIn .55s var(--ease-out); border-color: rgba(255,107,53,0.35); }
@keyframes hxIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hx-t { color: rgba(255,255,255,0.35); grid-row: span 2; padding-top: 1px; }
.hx-body { color: rgba(255,255,255,0.78); font-family: "Manrope", sans-serif; font-size: 13.5px; }
.hx-body strong { color: white; font-weight: 700; }
.hx-res { color: var(--orange-soft); font-size: 12px; }
.hx-res::before { content: "→ "; color: rgba(255,255,255,0.3); }

.hx-con-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ink-line);
}
.hx-hours { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 40px; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hx-hours-lbl { font-family: "Manrope", sans-serif; font-size: 13px; color: var(--ink-text); margin-top: 6px; max-width: 260px; }
.hx-sim { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.35); white-space: nowrap; }

/* ---------- Servicios ---------- */
.svc-list { border-top: 1px solid var(--line-strong); }
.svc-row { border-bottom: 1px solid var(--line-strong); }
.svc-head {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: minmax(240px, 0.9fr) 1.4fr 44px; gap: 32px; align-items: center;
  padding: 30px 4px;
}
.svc-title { font-size: clamp(26px, 2.7vw, 40px); line-height: 1.05; transition: color .25s; }
.svc-line { color: var(--gray-1); font-size: 15.5px; line-height: 1.6; }
.svc-plus {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-size: 22px; font-weight: 300; color: var(--ink);
  transition: transform .35s var(--ease-out), background .25s, color .25s, border-color .25s;
}
.svc-head:hover .svc-title { color: var(--orange); }
.svc-head:hover .svc-plus { border-color: var(--orange); color: var(--orange); }
.svc-row.open .svc-plus { transform: rotate(45deg); background: var(--orange); border-color: var(--orange); color: white; }
.svc-row.open .svc-title { color: var(--orange); }

.svc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.svc-row.open .svc-body { grid-template-rows: 1fr; }
.svc-inner {
  overflow: hidden; min-height: 0;
  display: grid; grid-template-columns: minmax(240px, 0.9fr) 1.4fr; gap: 32px;
  padding: 0 4px;
}
.svc-row.open .svc-inner { padding-bottom: 36px; }
.svc-inner > div:first-child { grid-column: 2; grid-row: 1; }
.svc-side { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.svc-lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray-2); margin-bottom: 12px; }
.svc-side .svc-lbl { margin-bottom: -4px; }
.svc-gets { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc-gets li {
  padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
  position: relative; padding-left: 40px;
}
.svc-gets li::before {
  content: ""; position: absolute; left: 18px; top: 23px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
}
.svc-example { font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); max-width: 340px; }
.svc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-tags span { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--orange-tint); color: var(--orange-deep); }

/* ---------- Calculadora ---------- */
.calc { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.calc-copy { position: sticky; top: 120px; }
.calc-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; padding: 40px;
  box-shadow: var(--shadow-lg);
}
.calc-field { margin-bottom: 28px; }
.calc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.calc-row label { font-size: 14.5px; color: var(--gray-1); font-weight: 500; }
.calc-row output { font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.calc-field input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--orange) var(--p, 50%), var(--gray-5) var(--p, 50%));
  outline: none; cursor: pointer;
}
.calc-field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: white; border: 2px solid var(--orange);
  box-shadow: 0 4px 12px rgba(255,107,53,0.35);
  transition: transform .15s;
}
.calc-field input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: white; border: 2px solid var(--orange);
  box-shadow: 0 4px 12px rgba(255,107,53,0.35);
}
.calc-field input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.calc-field input[type=range]:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; }

.calc-out {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  margin: 8px 0 14px;
}
.calc-out > div { background: var(--surface-alt); padding: 22px 20px; }
.calc-big { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc-big.accent { color: var(--orange); }
.calc-lbl { font-size: 13px; color: var(--gray-2); margin-top: 6px; line-height: 1.4; }
.calc-foot { font-size: 12.5px; color: var(--gray-3); margin-bottom: 24px; }

/* ---------- Meta + bot ---------- */
.funnel { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: center; }
.funnel-steps { list-style: none; counter-reset: f; margin: 36px 0; border-top: 1px solid var(--line-strong); }
.funnel-steps li {
  counter-increment: f;
  display: grid; grid-template-columns: 40px 160px 1fr; gap: 12px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line-strong); font-size: 15px;
}
.funnel-steps li::before { content: counter(f, decimal-leading-zero); font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--orange); }
.funnel-steps strong { font-weight: 700; }
.funnel-steps span { color: var(--gray-1); }

.funnel-phone {
  width: 100%; max-width: 380px; justify-self: center;
  background: #EFE9DF; border-radius: 40px;
  border: 10px solid var(--ink-panel);
  box-shadow: var(--shadow-lg), 0 50px 100px -40px rgba(255,107,53,0.35);
  overflow: hidden;
}
.ph-top { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; background: var(--ink-panel); color: white; }
.ph-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ph-name { font-weight: 700; font-size: 14.5px; }
.ph-status { font-size: 12px; color: var(--ok); }
.ph-chat { height: 470px; padding: 16px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.ph-msg {
  max-width: 82%; padding: 10px 13px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.45;
  animation: hxIn .4s var(--ease-out);
}
.ph-msg.user { align-self: flex-end; background: #DCF5C9; border-bottom-right-radius: 4px; }
.ph-msg.bot { align-self: flex-start; background: white; border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.ph-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.ph-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-3); animation: phDot 1.2s infinite; }
.ph-typing i:nth-child(2) { animation-delay: .15s; }
.ph-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes phDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.ph-ad { align-self: flex-start; width: 82%; background: white; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); animation: hxIn .4s var(--ease-out); }
.ph-ad-img { height: 96px; background: linear-gradient(135deg, var(--orange), #C94A1F); display: grid; place-items: center; }
.ph-ad-img span { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 40px; color: white; letter-spacing: -0.04em; }
.ph-ad-txt { padding: 10px 13px; font-size: 13px; line-height: 1.4; }
.ph-ad-txt strong { display: block; font-size: 11px; color: var(--gray-2); font-weight: 600; margin-bottom: 2px; }
.ph-done {
  align-self: center; margin-top: 6px;
  font-size: 12px; font-weight: 700; color: #1E7A52;
  background: rgba(63,178,127,0.14); padding: 8px 14px; border-radius: 999px;
  animation: hxIn .4s var(--ease-out); text-align: center;
}

/* ---------- Marketplace de microapps ---------- */
.mk {
  position: relative; overflow: hidden;
  background: var(--ink-panel); color: white;
  padding: 150px 0;
}
.mk-glow {
  position: absolute; pointer-events: none;
  width: 1000px; height: 700px; left: 50%; top: -320px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255,107,53,0.22), transparent 62%);
  filter: blur(20px);
}
.mk .wrap { position: relative; z-index: 1; }
.mk-head { max-width: 860px; margin-bottom: 64px; }
.mk-head h2 { font-size: clamp(38px, 5.2vw, 76px); color: white; margin-bottom: 22px; text-wrap: balance; }
.mk-head p { color: var(--ink-text); font-size: 17px; line-height: 1.7; max-width: 640px; }

.mk-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: stretch; }
.mk-shelf, .mk-sim {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--ink-line);
  border-radius: 28px; padding: 28px;
}
.mk-shelf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mk-shelf-head > span, .mk-sim-lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.mk-sim-lbl { margin-bottom: 26px; }

.mk-apps { display: flex; flex-direction: column; }
.mk-app {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  padding: 14px 10px; border-top: 1px solid var(--ink-line);
  border-radius: 14px; transition: background .2s;
}
.mk-app:hover { background: rgba(255,255,255,0.04); }
.mk-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 19px; color: white; }
.mk-app-txt { min-width: 0; }
.mk-app-name { font-weight: 700; font-size: 15px; }
.mk-app-name em { font-style: normal; font-weight: 500; font-size: 11.5px; color: rgba(255,255,255,0.45); margin-left: 6px; }
.mk-app-desc { font-size: 13.5px; color: var(--ink-text); margin-top: 2px; }
.mk-price { text-align: right; font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-price small { display: block; font-family: "Manrope", sans-serif; font-weight: 500; font-size: 11.5px; color: rgba(255,255,255,0.45); }

.calc-field.dark .calc-row label { color: var(--ink-text); }
.calc-field.dark .calc-row output { color: white; }
.calc-field.dark input[type=range] { background: linear-gradient(90deg, var(--orange) var(--p, 50%), rgba(255,255,255,0.12) var(--p, 50%)); }
.calc-field.dark input[type=range]::-webkit-slider-thumb { background: var(--ink-panel); }
.calc-field.dark input[type=range]::-moz-range-thumb { background: var(--ink-panel); }

.mk-net { padding: 22px 0 26px; border-top: 1px solid var(--ink-line); }
.mk-net-val { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: clamp(44px, 4.6vw, 64px); letter-spacing: -0.035em; line-height: 1; color: var(--orange); font-variant-numeric: tabular-nums; }
.mk-net-lbl { font-size: 13.5px; color: var(--ink-text); margin-top: 10px; line-height: 1.5; }
.mk-ctas { display: flex; flex-direction: column; gap: 10px; }
.mk-ctas .btn { justify-content: center; }
.mk-ghost { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.18); }
.mk-ghost:hover { border-color: white; transform: translateY(-2px); }

.mk-steps {
  list-style: none; counter-reset: s;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 20px;
}
.mk-steps li {
  counter-increment: s;
  padding: 24px 26px; border-radius: 22px; border: 1px solid var(--ink-line);
  display: flex; flex-direction: column; gap: 6px;
}
.mk-steps li::before { content: "Paso " counter(s); font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 6px; }
.mk-steps strong { font-size: 17px; }
.mk-steps span { font-size: 14px; color: var(--ink-text); line-height: 1.55; }

/* ---------- CTA final ---------- */
.cta-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cta-side {
  border-radius: 32px; padding: 56px 48px;
  background:
    radial-gradient(ellipse at 0% 0%, var(--orange-glow), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: flex-start;
}
.cta-side h3 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.02; margin-bottom: 14px; }
.cta-side p { color: var(--gray-1); font-size: 16px; margin-bottom: 30px; max-width: 420px; }
.cta-side .btn { margin-top: auto; }
.cta-side.dark { background: radial-gradient(ellipse at 100% 0%, rgba(255,107,53,0.25), transparent 55%), var(--ink-panel); color: white; border-color: transparent; }
.cta-side.dark p { color: var(--ink-text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hx-grid, .funnel, .calc, .mk-grid { grid-template-columns: 1fr; gap: 48px; }
  .calc-copy { position: static; }
  .hx { padding-top: 120px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hx { min-height: 0; padding: 110px 0 72px; }
  .hx-console { padding: 16px; border-radius: 20px; }
  .hx-feed { min-height: 0; }
  .hx-feed li { grid-template-columns: 1fr; }
  .hx-t { grid-row: auto; }
  .hx-con-foot { flex-direction: column; align-items: flex-start; }
  .svc-head { grid-template-columns: 1fr 40px; gap: 10px 16px; padding: 24px 0; }
  .svc-line { grid-column: 1; grid-row: 2; font-size: 14.5px; }
  .svc-plus { grid-column: 2; grid-row: 1; width: 40px; height: 40px; }
  .svc-inner { grid-template-columns: 1fr; gap: 24px; padding: 0; }
  .svc-inner > div:first-child, .svc-side { grid-column: 1; grid-row: auto; }
  .svc-gets { grid-template-columns: 1fr; }
  .calc-card { padding: 24px 18px; border-radius: 22px; }
  .calc-out { grid-template-columns: 1fr; }
  .funnel-steps li { grid-template-columns: 32px 1fr; }
  .funnel-steps span { grid-column: 2; }
  .mk { padding: 100px 0; }
  .mk-shelf, .mk-sim { padding: 18px; border-radius: 22px; }
  .mk-app { grid-template-columns: 40px 1fr; padding: 14px 4px; }
  .mk-price { grid-column: 2; text-align: left; }
  .mk-price small { display: inline; margin-left: 6px; }
  .mk-steps, .cta-split { grid-template-columns: 1fr; }
  .cta-side { padding: 40px 24px; }
  .ph-chat { height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-live, .ph-typing i { animation: none; }
  .hx-feed li.new, .ph-msg, .ph-ad, .ph-done { animation: none; }
  .svc-body { transition: none; }
}

/* ---------- Ajustes tras revisión visual ---------- */
.calc-copy h2, .funnel-copy h2 { font-size: clamp(38px, 4.4vw, 64px); text-wrap: balance; margin-bottom: 22px; }
.funnel-copy .right, .calc-copy .right { color: var(--gray-1); font-size: 16px; line-height: 1.7; max-width: 560px; }
.ph-ad-img { height: 72px; }
.ph-ad-img span { font-size: 32px; }
.ph-chat { height: 500px; }
.fondo-sec h2 { font-size: clamp(32px, 3.8vw, 56px); }
.fondo-sec .plat-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .fondo-sec .plat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .fondo-sec .plat-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .ia-prompt { min-width: 0; }
  .ia-prompt input { min-width: 0; flex: 1 1 auto; width: 100%; }
  .ia-prompt button { flex: 0 0 auto; }
}

/* ---------- Hero v2: dolor → solución ---------- */
.hx-title { font-size: clamp(36px, 4.3vw, 68px); line-height: 1.02; display: flex; flex-direction: column; gap: 0.18em; }
.hx-l { display: block; opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.hx-l.in { opacity: 1; transform: none; }
.hx-l.l2 { color: var(--gray-2); }
.hx-l.l3 { color: var(--orange); }
.hx-strike { position: relative; white-space: nowrap; }
.hx-strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%;
  height: 0.09em; background: var(--orange); border-radius: 99px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease-out) 2.3s;
}
.hx-l.l1.in .hx-strike::after { transform: scaleX(1); }

.hx-loss {
  margin-top: 34px; max-width: 540px;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.hx-loss-clock {
  font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 26px;
  color: #C2410C; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap;
}
.hx-loss-txt { font-size: 13.5px; line-height: 1.5; color: var(--gray-1); }
.hx-loss-txt strong { color: var(--ink); }
.hx-loss-txt small { display: block; color: var(--gray-3); font-size: 12px; margin-top: 2px; }

.hx-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.hx-kpi { padding: 12px 14px; border-radius: 12px; background: rgba(255,107,53,0.08); border: 1px solid rgba(255,107,53,0.18); min-width: 0; }
.hx-kpi-lbl { font-family: "Manrope", sans-serif; font-size: 11.5px; color: var(--ink-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-kpi-val { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; animation: kpiFlash .6s var(--ease-out); }
@keyframes kpiFlash { from { color: var(--orange-soft); } to { color: white; } }
.hx-feed { min-height: 290px; }

@media (max-width: 760px) {
  .hx-loss { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hx-kpis { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-l { opacity: 1; transform: none; transition: none; }
  .hx-strike::after { transition: none; }
  .hx-kpi-val { animation: none; }
}
.hx-title { font-size: clamp(34px, 3.9vw, 62px); }
.hx { padding-top: 128px; }
.hx-strike::after { transition: none; transform: scaleX(0); }
.hx-l.l1.in .hx-strike::after { animation: hxStrike .8s var(--ease-out) 2.4s both; }
@keyframes hxStrike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .hx-l.l1.in .hx-strike::after { animation: none; transform: scaleX(1); } }
.hx-l.l1.in .hx-strike::after { animation: none; transform: scaleX(0); transition: transform .8s var(--ease-out); }
.hx-l.l1.in .hx-strike.on::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .hx-strike::after, .hx-l.l1.in .hx-strike::after { transform: scaleX(1); transition: none; } }

/* ---------- Íconos ---------- */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-badge { border-radius: 50%; display: grid; place-items: center; background: var(--orange-tint); color: var(--orange); border: 1.5px solid rgba(255,107,53,0.35); }
.nav-agenda-btn { display: inline-flex; align-items: center; gap: 8px; }
.svc-title { display: inline-flex; align-items: center; gap: 16px; }
.svc-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); transition: background .25s, color .25s, border-color .25s; flex-shrink: 0; }
.svc-head:hover .svc-ico, .svc-row.open .svc-ico { background: var(--orange); border-color: var(--orange); color: white; }
.plat-card .ico svg, .pipe-step .icon-wrap svg { display: block; }
.marquee-track span::after { content: "+"; font-weight: 700; font-size: 16px; }

/* ---------- Video de agentes ---------- */
.av { padding: 110px 0 90px; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); }
.av-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: end; margin-bottom: 40px; }
.av-head h2 { font-size: clamp(32px, 3.6vw, 54px); line-height: 1.02; text-wrap: balance; }
.av-points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.av-points li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--gray-1); }
.av-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.av-frame {
  position: relative; border-radius: 28px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 50px 100px -40px rgba(28,24,16,0.35), 0 0 0 8px rgba(255,255,255,0.6);
}
.av-bar { display: flex; align-items: center; gap: 7px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.av-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--gray-5); }
.av-bar i:first-child { background: #FF8657; }
.av-bar span { margin-left: 12px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--gray-3); }
.av-video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; background: var(--bg); }
.av-toggle {
  position: absolute; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(20,20,19,0.78); color: white;
  backdrop-filter: blur(6px); transition: background .2s, transform .2s;
}
.av-toggle:hover { background: var(--orange); transform: scale(1.05); }
.av-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 22px; }
.av-foot p { font-size: 13.5px; color: var(--gray-2); }
@media (max-width: 960px) { .av-head { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 640px) {
  .av { padding: 72px 0 60px; }
  .av-frame { border-radius: 18px; box-shadow: var(--shadow-lg); }
  .av-bar { padding: 9px 12px; }
  .av-bar span { display: none; }
  .svc-ico { width: 38px; height: 38px; border-radius: 11px; }
  .svc-title { gap: 12px; }
}

/* ---------- Navegación fluida entre páginas ---------- */
/* Transición suave nativa entre páginas (Chrome, Edge, Safari 18+). La barra superior se queda quieta. */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
::view-transition-old(root) { animation: vt-out .22s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
/* El fondo crema se pinta antes que el contenido: nunca hay destello blanco */
html { background: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
/* Elementos visibles al llegar: sin animación de entrada */
.reveal.instant { transition: none; }

/* El botón de agenda del menú se oculta en pantallas angostas (va después de la regla de íconos) */
@media (max-width: 1100px) { .nav-agenda-btn { display: none; } }
