/* Landing de ArmaBot. Solo usa los tokens de tokens.css.
   Sin neón, brillos ni degradados: la profundidad sale de capas de superficie y bordes. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background-color: var(--bg);
  /* Textura: grilla de puntos (24 px) en el color de borde */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23243040' fill-opacity='.55'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font-texto);
  font-size: 17px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-titulos); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }

.skip-link { position: absolute; left: -9999px; top: var(--s2); }
.skip-link:focus { left: var(--s4); z-index: 20; background: var(--surface); padding: var(--s2) var(--s4); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

.small { font-size: 14px; font-weight: 500; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-specs); font-size: 14px; }

/* ---------- Íconos ---------- */
.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.i.ok { color: var(--success-text); }
.i.warn { color: var(--warning); }
.i.bad { color: var(--danger); }
.icon-tile {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: rgb(61 220 132 / 0.12); color: var(--primary);
}
.thumb {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.thumb .i { width: 20px; height: 20px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: var(--control-h); padding: 0 var(--s6);
  border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font-titulos); font-weight: 500; font-size: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--duration), border-color var(--duration), transform 150ms;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: #5AE397; }
.btn-secondary { background: var(--bg); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn-sm { height: 40px; padding: 0 var(--s4); font-size: 15px; }
.btn-lg { height: 52px; padding: 0 var(--s8); font-size: 17px; }

.fake-btn {
  display: inline-flex; align-items: center; gap: var(--s2); height: 36px; padding: 0 var(--s4);
  border-radius: var(--radius); border: 1px solid var(--border);
  font-family: var(--font-titulos); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--duration), color var(--duration), border-color var(--duration);
}
.fake-btn.is-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ---------- Superficies con capas ----------
   .frame = marco exterior (surface) + pantalla interior (bg). */
.card, .frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card { padding: var(--s6); }
.frame { padding: var(--s2); }
.frame > [class$="-screen"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
}

.input {
  width: 100%; height: var(--control-h); padding: 0 var(--s4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; font-size: 16px;
  transition: border-color var(--duration);
}
.input:hover { border-color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--primary); }
.input::placeholder { color: var(--text-muted); }

.tag {
  display: inline-flex; align-items: center; gap: var(--s1);
  padding: 2px var(--s2); border-radius: var(--radius-sm); border: 0;
  font-family: var(--font-texto); font-size: 14px; font-weight: 500; line-height: 1.5;
  white-space: nowrap;
}
.tag .i { width: 16px; height: 16px; }
.tag-ok { color: var(--success-text); background: rgb(61 220 132 / 0.12); }
.tag-warn { color: var(--warning); background: rgb(245 184 61 / 0.12); }
.tag-bad { color: var(--danger); background: rgb(248 113 113 / 0.12); }
.tag-neutral { color: var(--text-muted); background: var(--surface-2); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(11 16 21 / 0.8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: var(--s8); height: 64px; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: var(--s1); margin-left: auto; }
.nav a {
  position: relative; padding: var(--s2) var(--s3); border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color var(--duration), background-color var(--duration);
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: -13px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.menu-btn {
  display: none; width: var(--control-h); height: var(--control-h); margin-left: var(--s2);
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
}
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
.mobile-menu {
  display: grid; gap: var(--s1);
  padding: var(--s3) var(--gutter) var(--s6);
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) {
  padding: var(--s3) 0; text-decoration: none; font-family: var(--font-titulos); font-size: 20px; font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: var(--s4); }

/* ---------- Secciones ---------- */
.section { padding-top: var(--section-gap); }
.section-head { margin-bottom: var(--s12); max-width: 720px; }
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head-center .section-lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  font-family: var(--font-specs); font-size: 14px; color: var(--success-text);
  margin-bottom: var(--s3); letter-spacing: .02em;
}
.eyebrow-muted { color: var(--text-muted); }
.section-title { font-size: 36px; letter-spacing: -0.01em; }
.section-lead { color: var(--text-muted); max-width: 620px; margin-top: var(--s4); }
.section-lead a { color: var(--success-text); }

/* ---------- 1. Portada ---------- */
.hero { padding-top: var(--s16); }
.hero-copy { max-width: 820px; margin: 0 auto; text-align: center; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s3) var(--s1) var(--s2); margin-bottom: var(--s6);
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
}
.eyebrow-pill .i { color: var(--primary); width: 18px; height: 18px; }
.hero h1 { font-size: 56px; letter-spacing: -0.02em; }
.hl { color: var(--primary); }
.lead { font-size: 20px; color: var(--text-muted); margin: var(--s6) auto 0; max-width: 600px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s8); }
.micro { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s6); margin-top: var(--s6); font-size: 14px; color: var(--text-muted); }
.micro li { display: inline-flex; align-items: center; gap: var(--s1); }
.micro .i { width: 16px; height: 16px; }

.hero-stage { position: relative; margin-top: var(--s16); }
/* Fondo de portada: macro de placa, a todo el ancho, con los bordes desvanecidos */
.hero-stage::before {
  content: ""; position: absolute; left: 50%; width: 100vw; transform: translateX(-50%);
  top: -96px; bottom: -64px; pointer-events: none;
  background: url("../assets/img/fondo-portada.webp") center / cover no-repeat;
  opacity: .75;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.traces path { fill: none; stroke: var(--border); stroke-width: 2; vector-effect: non-scaling-stroke; }
.traces circle { fill: var(--bg); stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hero { overflow-x: clip; }

/* Brillo verde detrás de la ventana: le da profundidad sin sumar efectos */
.hero-stage::after {
  content: ""; position: absolute; left: 50%; top: 8%; width: min(900px, 90%); height: 70%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgb(61 220 132 / 0.22), transparent);
  filter: blur(40px);
}
.window {
  position: relative; z-index: 1; max-width: 1040px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--s2);
  box-shadow: 0 0 0 1px rgb(61 220 132 / 0.08), 0 40px 100px -30px rgb(61 220 132 / 0.30), 0 24px 48px -12px rgb(0 0 0 / 0.6);
}
.window-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3) var(--s3); }
.window-bar img { width: 20px; height: 20px; }
.window-title { font-family: var(--font-titulos); font-weight: 500; font-size: 15px; }
.timer {
  margin-left: auto; display: inline-flex; align-items: center; gap: var(--s1);
  font-family: var(--font-specs); font-size: 14px; color: var(--success-text);
  background: rgb(61 220 132 / 0.12); padding: 2px var(--s2); border-radius: var(--radius-sm);
}
.timer .i { width: 16px; height: 16px; }
.window-body {
  display: grid; grid-template-columns: 340px 1fr;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  min-height: 520px; overflow: hidden;
}

.hw-chat { border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--border); }
.chat-head strong { display: block; font-size: 15px; font-weight: 500; }
.chat-head span:not(.avatar) { display: block; font-size: 13px; color: var(--text-muted); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-muted);
}
.avatar .i { width: 18px; height: 18px; }
.msgs { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); }

.msg {
  position: relative; max-width: 88%; padding: var(--s2) var(--s3) var(--s4);
  border-radius: var(--radius); font-size: 15px; line-height: 1.45;
}
.msg-in { align-self: flex-start; background: var(--surface-2); border-top-left-radius: 2px; }
.msg-out { align-self: flex-end; background: rgb(61 220 132 / 0.12); border: 1px solid rgb(61 220 132 / 0.24); border-top-right-radius: 2px; }
.msg-plain { background: var(--surface); border: 1px solid var(--border); }
.msg-time { position: absolute; right: var(--s2); bottom: 2px; font-size: 11px; color: var(--text-muted); font-family: var(--font-specs); }
.msg-typing { display: inline-flex; gap: 4px; padding: var(--s3); }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--success-text); animation: blink 1s infinite; }
.msg-typing span:nth-child(2) { animation-delay: .15s; }
.msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.link-card {
  display: flex; gap: var(--s2); align-items: center; margin-top: var(--s2); padding: var(--s2);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.link-card > .i { color: var(--success-text); }
.link-card strong { display: block; font-size: 14px; font-weight: 500; }
.link-card span span { display: block; font-size: 13px; color: var(--text-muted); }

.hw-quote { display: flex; flex-direction: column; padding: var(--s4) var(--s6); }
.hw-quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.hw-quote-head strong { display: block; font-family: var(--font-titulos); font-weight: 500; font-size: 18px; }
.hw-rows { display: grid; }
.hw-rows li {
  display: grid; grid-template-columns: 36px 1fr auto 20px; gap: var(--s3); align-items: center;
  padding: var(--s2) 0; border-bottom: 1px solid var(--border);
}
.row-name { font-family: var(--font-specs); font-size: 14px; }
.row-name span { display: block; font-size: 12px; color: var(--text-muted); }
.row-price { font-family: var(--font-specs); font-size: 14px; text-align: right; }
.hw-summary { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: var(--s4); padding: var(--s4) 0; }
.hw-summary > div { display: grid; gap: 2px; }
.hw-summary strong { font-size: 15px; font-weight: 400; }
.hw-total { text-align: right; }
.hw-total strong { font-family: var(--font-titulos); font-weight: 600; font-size: 28px; }
.hw-approve {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-top: auto;
  padding: var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.hw-approve .small { display: inline-flex; align-items: center; gap: var(--s2); }
.hw-approve .i { width: 18px; height: 18px; }

/* Estados de la animación (solo con JS) */
.js .window [data-hw], .js .window [data-hw-row] { transition: opacity var(--duration), transform var(--duration); }
.window .is-hidden { opacity: 0; transform: translateY(6px); }
.window .is-gone { display: none; }
.window [data-hw-row] .row-ok { transition: opacity var(--duration); }
.window [data-hw-row].is-pending .row-ok { opacity: 0; }

/* ---------- 2. Problema + antes/después ---------- */
.problems { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.problem { display: flex; gap: var(--s4); align-items: center; padding: var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.problem p { font-family: var(--font-titulos); font-weight: 500; font-size: 20px; line-height: 1.3; }
.problem .icon-tile { background: rgb(248 113 113 / 0.12); color: var(--danger); }

.compare {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--s8);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.compare-col { padding: var(--s6); }
.compare-before { border-right: 1px solid var(--border); }
.compare-after { background: var(--bg); }
.compare-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s6); }
.compare-head h3 { font-size: 22px; font-weight: 500; }
.compare-head .eyebrow { margin-bottom: var(--s1); }
.clock {
  display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3);
  border-radius: var(--radius); font-family: var(--font-specs); font-size: 20px; white-space: nowrap;
}
.clock-bad { color: var(--danger); background: rgb(248 113 113 / 0.12); }
.clock-ok { color: var(--success-text); background: rgb(61 220 132 / 0.12); }
.compare-chat { display: flex; flex-direction: column; gap: var(--s3); min-height: 300px; }
.compare-chat .result { align-self: center; margin-top: var(--s2); }
.js .compare [data-at] { transition: opacity var(--duration), transform var(--duration); }
.compare [data-at].is-hidden { opacity: 0; transform: translateY(6px); }
.replay {
  position: absolute; left: 50%; bottom: var(--s4); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: var(--s2); height: 36px; padding: 0 var(--s4);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: color var(--duration), border-color var(--duration);
}
.replay:hover { color: var(--text); border-color: var(--text-muted); }
.replay .i { width: 16px; height: 16px; }
.compare-col { padding-bottom: var(--s16); }

/* ---------- 3. Demo ---------- */
.demo-screen { padding: var(--s8) !important; }
.demo-form { display: grid; gap: var(--s2); }
.demo-row { display: flex; gap: var(--s3); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.chip {
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: var(--s1) var(--s3); font-size: 14px; cursor: pointer;
  transition: color var(--duration), border-color var(--duration);
}
.chip:hover { color: var(--text); border-color: var(--text-muted); }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.demo-note { color: var(--text-muted); font-size: 14px; padding: var(--s3) var(--s4) var(--s1); }
.demo-result { margin-top: var(--s8); }
.demo-result:empty { display: none; }

.convo { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s6); }
.convo .msg { max-width: 640px; font-size: 16px; padding-bottom: var(--s3); }
.bot-line { display: flex; gap: var(--s3); align-items: flex-start; }
.bot-avatar { width: 32px; height: 32px; flex: none; }
.bot-line .msg { align-self: auto; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--success-text); vertical-align: -2px; margin-left: 2px; animation: blink 1s infinite; }
.demo-msg { display: flex; gap: var(--s2); align-items: flex-start; color: var(--text-muted); }

.break-hint {
  display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap;
  padding: var(--s3) var(--s4); margin-bottom: var(--s4);
  border: 1px dashed var(--border); border-radius: var(--radius); font-size: 14px; color: var(--text-muted);
}
.break-hint strong { color: var(--text); font-weight: 500; }
.break-hint .i { color: var(--warning); }

.tabs { display: flex; gap: var(--s2); margin-bottom: var(--s4); flex-wrap: wrap; }
.tab {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  height: 40px; padding: 0 var(--s4); font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color var(--duration), color var(--duration), border-color var(--duration);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); border-color: var(--text-muted); }

.demo-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s6); align-items: start; }
.parts { border-top: 1px solid var(--border); }
.part {
  display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s3); align-items: center;
  padding: var(--s3) 0; border-bottom: 1px solid var(--border);
  transition: background-color var(--duration);
}
.part.is-new { opacity: 0; transform: translateY(4px); }
.part.is-in { opacity: 1; transform: none; transition: opacity var(--duration), transform var(--duration); }
.part.is-bad .thumb { border-color: var(--danger); color: var(--danger); }
.part.is-warn .thumb { border-color: var(--warning); color: var(--warning); }
.part-main { min-width: 0; }
.part-cat { display: flex; align-items: center; gap: var(--s1); font-size: 13px; color: var(--text-muted); }
.part-cat .i { width: 16px; height: 16px; }
.swap {
  width: 100%; max-width: 100%; margin-top: 2px; padding: 4px 28px 4px var(--s2);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B98A5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-specs); font-size: 14px; cursor: pointer; appearance: none; -webkit-appearance: none;
  text-overflow: ellipsis;
  transition: border-color var(--duration);
}
.swap:hover { border-color: var(--text-muted); }
.swap:focus { outline: none; border-color: var(--primary); }
.part-price { font-family: var(--font-specs); font-size: 14px; text-align: right; white-space: nowrap; }
.quote-foot { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s4); }
.quote-foot .total-label { font-family: var(--font-titulos); font-weight: 500; font-size: 18px; }
.quote-foot .total { font-family: var(--font-titulos); font-weight: 600; font-size: 32px; }

.verdict {
  display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s4);
  padding: var(--s3) var(--s4); border-radius: var(--radius); font-size: 14px;
}
.verdict strong { display: block; font-weight: 500; }
.verdict-ok { background: rgb(61 220 132 / 0.12); color: var(--success-text); }
.verdict-warn { background: rgb(245 184 61 / 0.12); color: var(--warning); }
.verdict-bad { background: rgb(248 113 113 / 0.12); color: var(--danger); }
.verdict span { color: var(--text); }

.side-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); }
.side-block + .side-block { margin-top: var(--s4); }
.side-block h3 { font-family: var(--font-texto); font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: var(--s3); display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.check-list { display: grid; gap: var(--s3); }
.check-list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s2); font-size: 14px; line-height: 1.45; }
.check-list .i { width: 18px; height: 18px; margin-top: 1px; }
.check-list strong { font-weight: 500; display: block; }
.check-list span { color: var(--text-muted); }
.check-list li.is-bad span { color: var(--danger); }
.check-list li.is-warn span { color: var(--warning); }
.fps-list { display: grid; gap: var(--s2); }
.fps-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s3); font-size: 14px; }

/* ---------- 4. Cómo funciona ---------- */
.steps { display: grid; gap: var(--s16); counter-reset: step; }
.step { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s12); align-items: center; }
.step:nth-child(even) .step-text { order: 2; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius);
  border: 1px solid var(--primary); color: var(--success-text);
  font-family: var(--font-specs); font-size: 16px; margin-bottom: var(--s4);
}
.step h3 { font-size: 28px; margin-bottom: var(--s3); }
.step p { color: var(--text-muted); max-width: 440px; }

.shot-screen { display: grid; gap: var(--s4); }
.shot-head { display: flex; align-items: center; gap: var(--s2); font-size: 14px; padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.shot-head .i { color: var(--text-muted); }
.shot-count { margin-left: auto; }
.shot-rows { display: grid; gap: var(--s3); }
.shot-rows li { display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s3); align-items: center; }
.score { display: flex; align-items: baseline; gap: var(--s3); }
.score-num { font-family: var(--font-titulos); font-weight: 600; font-size: 44px; }
.bar { display: block; height: 8px; border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-sm); }
[data-bar] > span { width: 96%; }
.js [data-bar] > span { width: 0; transition: width 250ms ease-out; }
.js .is-visible [data-bar] > span, .js [data-bar].is-visible > span { width: 96%; }
.shot-note { display: flex; gap: var(--s2); align-items: center; font-size: 14px; color: var(--text-muted); }
.shot-total { display: flex; justify-content: space-between; align-items: baseline; }
.shot-total strong { font-family: var(--font-titulos); font-weight: 600; font-size: 36px; }
.shot-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
/* Marco de ventana del panel en cada paso */
.shot { box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.5); }
.shot-bar { padding-top: var(--s1); }
.shot-bar .crumb { font-size: 14px; color: var(--text-muted); }
.shot-bar .dots { margin-left: auto; display: inline-flex; gap: 6px; }
.shot-bar .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.shot-progress { display: grid; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border); }
.shot-parts { display: grid; gap: var(--s2); font-size: 14px; }
.shot-parts li { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--s3); align-items: center; }
.shot-parts .thumb { width: 32px; height: 32px; }

/* ---------- 5. Control ---------- */
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s12); align-items: center; }
.control-points { display: grid; gap: var(--s6); margin-top: var(--s8); }
.control-points li { display: flex; gap: var(--s4); }
.control-points h3 { font-size: 18px; font-weight: 500; margin-bottom: var(--s1); }
.control-points p { color: var(--text-muted); font-size: 16px; }
.modes-screen { display: grid; gap: var(--s4); }
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s1); padding: var(--s1);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.segmented button {
  min-height: 36px; padding: var(--s1) var(--s2); border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background-color var(--duration), color var(--duration);
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.mode-rows { display: grid; }
.mode-rows li {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding: var(--s3) 0; border-bottom: 1px solid var(--border); font-size: 15px;
}
.mode-rows .tag { transition: background-color var(--duration), color var(--duration); }
.mode-note { min-height: 44px; }

/* ---------- 6. Mosaico de funcionalidades ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s4); }
.tile {
  display: flex; flex-direction: column; gap: var(--s6); justify-content: space-between;
  padding: var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color var(--duration);
}
.tile:hover { border-color: var(--text-muted); }
.tile-text .i { width: 24px; height: 24px; margin-bottom: var(--s3); }
.tile h3 { font-size: 20px; font-weight: 500; margin-bottom: var(--s1); }
.tile p { color: var(--text-muted); font-size: 15px; }
.tile-compat, .tile-money { grid-column: span 3; }
.tile-fps, .tile-link, .tile-metrics { grid-column: span 2; }

.tile-checks { display: grid; gap: var(--s2); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); }
.tile-checks li { display: grid; grid-template-columns: 20px auto 1fr; gap: var(--s3); align-items: center; font-size: 14px; }
.tile-checks .muted { text-align: right; font-size: 13px; }

.money-table { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); display: grid; gap: var(--s3); }
.segmented-sm { justify-self: start; }
.segmented-sm button { min-height: 28px; padding: 0 var(--s3); font-family: var(--font-specs); }
.money-table ul { display: grid; gap: var(--s2); }
.money-table li { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: center; }
.money-table li > .mono:last-child { min-width: 128px; text-align: right; }

.gauge { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4) var(--s4) var(--s3); text-align: center; }
.gauge svg { width: 100%; max-width: 200px; height: auto; display: block; margin: 0 auto; }
.gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge-track { stroke: var(--surface-2); }
.gauge-fill { stroke: var(--primary); stroke-dasharray: 100; stroke-dashoffset: 25; }
.js .gauge-fill { stroke-dashoffset: 100; transition: stroke-dashoffset 250ms ease-out; }
.js .is-visible .gauge-fill { stroke-dashoffset: 25; }
.gauge-value { margin-top: calc(-1 * var(--s6)); display: grid; }
.gauge-value strong { font-size: 22px; font-weight: 400; }
.gauge-value span { font-size: 13px; }

.phone { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); display: grid; gap: var(--s2); }
.phone-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.phone strong { font-family: var(--font-titulos); font-weight: 500; }
.phone .fake-btn { justify-content: center; }

.bars { display: grid; gap: var(--s3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); }
.bars li { display: grid; grid-template-columns: 72px 1fr; gap: var(--s3); align-items: center; font-size: 13px; color: var(--text-muted); }
.bars .bar > span { width: var(--w); }
.js .bars .bar > span { width: 0; transition: width 250ms ease-out; }
.js .is-visible .bars .bar > span, .js .bars.is-visible .bar > span { width: var(--w); }

/* ---------- 7. Precios ---------- */
.founders {
  display: flex; align-items: center; gap: var(--s3);
  max-width: 640px; margin: 0 auto var(--s12); padding: var(--s3) var(--s4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.founders strong { font-weight: 600; color: var(--success-text); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s8) var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.plan h3 { font-size: 22px; font-weight: 500; }
.plan-featured { background: var(--bg); border: 2px solid var(--primary); padding-top: var(--s12); margin-top: calc(-1 * var(--s4)); }
.plan-band {
  position: absolute; top: 0; left: 0; right: 0; padding: var(--s1) 0;
  background: var(--primary); color: var(--on-primary); text-align: center;
  font-size: 14px; font-weight: 500; border-radius: 13px 13px 0 0;
}
.price { display: flex; align-items: baseline; gap: var(--s1); margin: var(--s3) 0 var(--s4); }
.price-num { font-family: var(--font-titulos); font-weight: 600; font-size: 44px; letter-spacing: -0.02em; }
.plan .btn { width: 100%; }
.plan-list { display: grid; gap: var(--s3); margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--border); }
.plan-list li { display: flex; gap: var(--s2); align-items: flex-start; font-size: 16px; }
.plan-list .i { margin-top: 3px; width: 18px; height: 18px; }
.plans-note { margin-top: var(--s6); text-align: center; color: var(--text-muted); font-size: 14px; }

/* ---------- 8. Preguntas ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--s12); align-items: start; }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding: var(--s6) 0; cursor: pointer; list-style: none;
  font-family: var(--font-titulos); font-weight: 500; font-size: 20px;
  transition: color var(--duration);
}
.faq summary:hover { color: var(--success-text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--text-muted); transition: transform var(--duration); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { color: var(--text-muted); padding-bottom: var(--s6); }
.faq a { color: var(--success-text); }

/* ---------- 9. Cierre ---------- */
.closing {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s24) var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.closing::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../assets/img/fondo-cierre.webp") center / cover no-repeat;
  opacity: .55;
}
.closing > * { position: relative; }
.closing-icon { width: 80px; height: 80px; margin-bottom: var(--s8); }
.draw-check { stroke-dasharray: 100; stroke-dashoffset: 0; }
.js .draw-check { stroke-dashoffset: 100; transition: stroke-dashoffset 250ms ease-out 150ms; }
.js .closing.is-visible .draw-check { stroke-dashoffset: 0; }
.closing .section-lead { margin-bottom: var(--s8); }
.lead-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); width: 100%; max-width: 640px; text-align: left;
}
.lead-form .field { display: grid; gap: var(--s2); }
.lead-form select.input {
  appearance: none; cursor: pointer; padding-right: var(--s8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B98A5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.lead-form .btn { grid-column: 1 / -1; justify-self: center; margin-top: var(--s2); }
.lead-status { grid-column: 1 / -1; text-align: center; min-height: 1.5em; }

/* ---------- 10. Pie ---------- */
.site-footer { margin-top: var(--section-gap); border-top: 1px solid var(--border); padding: var(--s16) 0 var(--s12); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: var(--s8); }
.footer-brand img { height: 20px; width: auto; margin-bottom: var(--s4); }
.footer-brand p { color: var(--text-muted); font-size: 15px; max-width: 300px; }
.footer-origin { margin-top: var(--s4); font-size: 14px !important; }
.footer-title { font-family: var(--font-texto); font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: var(--s4); }
.footer-list { display: grid; gap: var(--s3); font-size: 15px; }
.footer-list a { text-decoration: none; transition: color var(--duration); }
.footer-list a:hover { color: var(--success-text); }

/* ---------- Páginas internas ---------- */
.page { padding: var(--s16) 0 0; min-height: 50vh; }
.page .container { max-width: calc(760px + 2 * var(--gutter)); }

/* ---------- Aparición al bajar (200 ms) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity var(--duration) ease-out var(--d, 0ms), transform var(--duration) ease-out var(--d, 0ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Tableta ---------- */
@media (max-width: 1024px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .window-body { grid-template-columns: 1fr; min-height: 0; }
  .hw-chat { border-right: 0; border-bottom: 1px solid var(--border); }
  .msgs { min-height: 250px; }
  .problems { grid-template-columns: 1fr; gap: var(--s3); }
  .compare { grid-template-columns: 1fr; }
  .compare-before { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: var(--s6); }
  .demo-cols { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: var(--s6); }
  .step:nth-child(even) .step-text { order: 0; }
  .control-grid, .faq-grid { grid-template-columns: 1fr; gap: var(--s8); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-compat, .tile-money { grid-column: span 2; }
  .tile-fps, .tile-link { grid-column: span 1; }
  .tile-metrics { grid-column: span 2; }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .plan-featured { margin-top: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .traces { display: none; }
}

/* ---------- Móvil ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: var(--s12); }
  .hero h1 { font-size: 36px; }
  .lead { font-size: 18px; }
  .section-title { font-size: 28px; }
  .section-head { margin-bottom: var(--s8); }
  .actions .btn { flex: 1 1 100%; }
  .hero-stage { margin-top: var(--s12); }
  .brand img { height: 28px; }
  .hw-quote { padding: var(--s4); }
  .hw-rows li { grid-template-columns: 32px 1fr auto 18px; gap: var(--s2); }
  .thumb { width: 32px; height: 32px; }
  .hw-summary { grid-template-columns: 1fr 1fr; }
  .hw-total { grid-column: 1 / -1; text-align: left; }
  .problem p { font-size: 18px; }
  .compare-col { padding: var(--s4); }
  .compare-head h3 { font-size: 18px; }
  .clock { font-size: 16px; }
  .compare-after { padding-bottom: var(--s16); }
  .demo-screen { padding: var(--s4) !important; }
  .demo-row { flex-direction: column; }
  .part { grid-template-columns: 32px 1fr; }
  .part-price { grid-column: 2; text-align: left; }
  .quote-foot .total { font-size: 28px; }
  .step h3 { font-size: 22px; }
  .frame > [class$="-screen"] { padding: var(--s4); }
  .segmented { grid-auto-flow: row; }
  .mode-rows li { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .bento { grid-template-columns: 1fr; }
  .tile-compat, .tile-money, .tile-fps, .tile-link, .tile-metrics { grid-column: auto; }
  .tile-checks li { grid-template-columns: 20px 1fr; }
  .tile-checks .muted { grid-column: 2; text-align: left; }
  .money-table li > .mono:last-child { min-width: 0; }
  .price-num { font-size: 36px; }
  .faq summary { font-size: 18px; }
  .closing { padding: var(--s16) var(--s4); }
  .lead-form { grid-template-columns: 1fr; }
  .lead-form .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

/* Demo: línea de especificación bajo cada componente */
.part .spec-sub { display: block; margin-top: 2px; font-size: 12px; overflow-wrap: anywhere; }

/* Páginas internas: estado vacío */
.empty-state { display: flex; gap: var(--s4); align-items: flex-start; margin: var(--s8) 0; }
.empty-state h2 { font-size: 20px; font-weight: 500; margin-bottom: var(--s2); }
.empty-state a { color: var(--success-text); }

.break-chips { display: inline-flex; flex-wrap: wrap; gap: var(--s2); }
