/* InventarioFX — landing V2 (WMS Light, tema claro) · Lleva inteligencia a tu almacén */

@font-face {
  font-family: "Raleway";
  src: url("/brand/fonts/Raleway-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("/brand/fonts/Raleway-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f5f7fa;
  --bg-3: #eef2f6;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --line: rgba(14, 26, 43, 0.10);
  --line-strong: rgba(14, 26, 43, 0.20);
  --text: #0e1a2b;
  --muted: #55657a;
  --dim: #7d8a9c;
  --teal: #0b7f88;
  --teal-bright: #1a9ea9;
  --teal-ink: #ffffff;
  --amber: #c9760a;
  --amber-bright: #f5a524;
  --amber-soft: rgba(245, 165, 36, 0.16);
  --teal-soft: rgba(26, 158, 169, 0.12);
  --danger-soft: rgba(224, 86, 58, 0.12);
  --danger: #b23a20;
  --navy: #0e1a2b;
  --navy-2: #132742;
  --red: #d23f31;
  --red-soft: rgba(210, 63, 49, 0.12);
  --yellow: #d99a06;
  --yellow-soft: rgba(217, 154, 6, 0.14);
  --green: #1f9d55;
  --green-soft: rgba(31, 157, 85, 0.12);
  --ai: #4f47c8;
  --ai-soft: rgba(79, 71, 200, 0.10);
  --radius: 14px;
  --radius-lg: 22px;
  --shell: 1200px;
  --gutter: 24px;
  --font: "Raleway", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  background-image:
    radial-gradient(1100px 520px at 85% -10%, rgba(26, 158, 169, 0.10), transparent 60%),
    radial-gradient(800px 420px at -10% 30%, rgba(245, 165, 36, 0.08), transparent 60%);
  background-repeat: no-repeat;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.shell {
  width: min(var(--shell), 100% - var(--gutter) * 2);
  margin-inline: auto;
  min-width: 0;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--teal);
  color: var(--teal-ink);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--amber-bright);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #ffffff;
  border-radius: 6px;
}

/* ---------- Idioma / Language (CSS only) ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lang-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.en { display: none; }
html:has(#lang-en:checked) .en { display: inline; }
html:has(#lang-en:checked) .es { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.lang-switch label {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.lang-switch label:hover { color: var(--text); }
html:has(#lang-es:checked) .lang-switch label[for="lang-es"],
html:has(#lang-en:checked) .lang-switch label[for="lang-en"] {
  background: var(--text);
  color: #ffffff;
}
html:has(#lang-es:focus-visible) .lang-switch label[for="lang-es"],
html:has(#lang-en:focus-visible) .lang-switch label[for="lang-en"] {
  outline: 3px solid var(--amber-bright);
  outline-offset: 2px;
}

/* ---------- Iconos (sprite <use>) ---------- */
.ico, .step-ico, .arch-ico, .signal-ico, .steps-ico, .s-ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Type ---------- */
.eyebrow {
  margin-bottom: 16px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  font-size: clamp(38px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
h1 em, h2 em {
  font-style: normal;
  color: var(--teal);
}
h2 {
  font-size: clamp(30px, 3.8vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}
h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lead {
  margin-top: 24px;
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
}
.section-text {
  margin-top: 18px;
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
}
.section-heading { margin-bottom: 56px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  background: var(--teal);
  color: var(--teal-ink);
  box-shadow: 0 10px 30px -12px rgba(11, 127, 136, 0.55);
}
.button-primary:hover { background: #096d75; }
.button-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--panel);
}
.button-ghost:hover { border-color: var(--teal); background: var(--teal-soft); }
.button-small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.button-large { min-height: 60px; padding: 0 30px; font-size: 16px; white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-icon { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 12px; }
.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--amber); }

.site-nav {
  display: flex;
  gap: 6px;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}
.site-nav a:hover { color: var(--text); background: rgba(14, 26, 43, 0.05); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 110px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.hero-signals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 22px;
}
.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.signal-pill .icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.signal-pill-ai { border-color: rgba(79, 71, 200, 0.4); background: linear-gradient(180deg, var(--ai-soft), var(--panel)); }
.signal-pill-ai .icon { stroke: var(--ai); }
.signal-sep { color: var(--dim); font-weight: 700; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.differentiators {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.differentiators li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.differentiators .icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 8px;
  background: var(--teal-soft);
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero visual: phone + trace card */
.hero-visual {
  position: relative;
  display: grid;
  justify-items: end;
  padding: 20px 2% 20px 0;
  min-width: 0;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(26, 158, 169, 0.20), transparent 75%);
  filter: blur(10px);
  pointer-events: none;
}

.phone {
  position: relative;
  width: min(300px, 82vw);
  aspect-ratio: 9 / 18.5;
  padding: 12px;
  border-radius: 40px;
  background: linear-gradient(160deg, #2a3547, #141c29);
  border: 1px solid rgba(14, 26, 43, 0.35);
  box-shadow:
    0 40px 80px -30px rgba(14, 26, 43, 0.55),
    inset 0 0 0 2px #0b111b;
}
.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  border-radius: 12px;
  background: #0b111b;
  z-index: 2;
}
.phone-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 44px 14px 16px;
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6f9 100%);
  overflow: hidden;
}
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-bar-title { font-size: 12px; font-weight: 700; color: var(--text); }
.chip {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip-teal { background: var(--teal-soft); color: var(--teal); }

.scanner {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px) 0 0 / 100% 16px,
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px) 0 0 / 16px 100%,
    #101826;
  border: 1px solid rgba(14, 26, 43, 0.4);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.qr-pattern {
  width: 46%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  opacity: 0.9;
}
.qr-pattern i { background: rgba(255, 255, 255, 0.08); border-radius: 1px; }
/* finder patterns (3 corners) */
.qr-pattern i:nth-child(1), .qr-pattern i:nth-child(2), .qr-pattern i:nth-child(3),
.qr-pattern i:nth-child(8), .qr-pattern i:nth-child(10),
.qr-pattern i:nth-child(15), .qr-pattern i:nth-child(16), .qr-pattern i:nth-child(17),
.qr-pattern i:nth-child(5), .qr-pattern i:nth-child(6), .qr-pattern i:nth-child(7),
.qr-pattern i:nth-child(12), .qr-pattern i:nth-child(14),
.qr-pattern i:nth-child(19), .qr-pattern i:nth-child(20), .qr-pattern i:nth-child(21),
.qr-pattern i:nth-child(29), .qr-pattern i:nth-child(30), .qr-pattern i:nth-child(31),
.qr-pattern i:nth-child(36), .qr-pattern i:nth-child(38),
.qr-pattern i:nth-child(43), .qr-pattern i:nth-child(44), .qr-pattern i:nth-child(45),
/* data modules */
.qr-pattern i:nth-child(4), .qr-pattern i:nth-child(22), .qr-pattern i:nth-child(25),
.qr-pattern i:nth-child(27), .qr-pattern i:nth-child(33), .qr-pattern i:nth-child(34),
.qr-pattern i:nth-child(40), .qr-pattern i:nth-child(47), .qr-pattern i:nth-child(49) {
  background: #ffffff;
}
.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--teal-bright);
}
.c1 { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.c2 { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.c3 { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.c4 { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan-line {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber-bright), transparent);
  box-shadow: 0 0 14px 2px rgba(245, 165, 36, 0.55);
  animation: scan 2.8s ease-in-out infinite alternate;
}
@keyframes scan {
  from { top: 14px; }
  to { top: calc(100% - 16px); }
}

.result {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.result-ok {
  justify-content: flex-start;
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  color: var(--teal);
  font-weight: 700;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 0 4px var(--teal-soft);
}
.result .value { color: var(--text); font-weight: 700; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.fake-button {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.fake-button.primary { background: var(--teal-bright); color: #ffffff; border-color: transparent; }

.trace-card {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 16%;
  width: min(230px, 46%);
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -30px rgba(14, 26, 43, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.trace-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.trace-card li {
  padding: 5px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.trace-card li:first-child { border-top: 0; }
.trace-card b { display: block; color: var(--text); font-size: 11px; }

/* ---------- Flujos ---------- */
.flows {
  padding: clamp(64px, 8vw, 110px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.flow-list { display: grid; gap: 18px; }
.flow {
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -32px rgba(14, 26, 43, 0.3);
}
.flow-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.doc-badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.doc-oc { background: var(--teal-soft); color: var(--teal); }
.doc-ov { background: var(--amber-soft); color: var(--amber); }
.doc-ot { background: rgba(99, 91, 255, 0.12); color: #4f47c8; }

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 0;
}
.step {
  position: relative;
  flex: 1 1 150px;
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px 16px;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease, background 200ms ease;
  margin-right: 34px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -34px;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--teal-bright));
}
.step::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--teal-bright);
  border-top: 2px solid var(--teal-bright);
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
}
.step:last-child { margin-right: 0; }
.step-ico {
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  color: var(--teal-bright);
}
.step:hover { transform: translateY(-2px); border-color: var(--teal-bright); }
.step-scan .step-ico, .chain .step-scan .step-ico { color: var(--amber-bright); }
.step-ai .step-ico { color: var(--ai); }
.step:last-child::after, .step:last-child::before { display: none; }
.step-type {
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.step-name { font-size: 15px; font-weight: 700; color: var(--text); }
.step-doc { border-color: rgba(26, 158, 169, 0.45); }
.step-scan .step-type { color: var(--amber); }
.step-scan { background: linear-gradient(180deg, rgba(245, 165, 36, 0.10), var(--bg-2)); }
.step-inv, .step-detail { border-color: rgba(26, 158, 169, 0.35); }
.step-detail .step-name { color: var(--teal); }


/* ---------- Escena animada: OC → QR → estante ---------- */
.flow-anim { position: relative; }
.anim-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.anim-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms ease, color 160ms ease;
}
.anim-toggle:hover { border-color: var(--teal-bright); color: var(--text); }
.anim-toggle .ico { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.flow-anim:has(.anim-input:focus-visible) .anim-toggle { outline: 3px solid var(--amber-bright); outline-offset: 2px; }
.flow-anim .ico-play, .flow-anim .t-play { display: none; }
.flow-anim:has(.anim-input:checked) .ico-play, .flow-anim:has(.anim-input:checked) .t-play { display: inline-flex; }
.flow-anim:has(.anim-input:checked) .ico-pause, .flow-anim:has(.anim-input:checked) .t-pause { display: none; }
.flow-anim:has(.anim-input:checked) .scene *,
.flow-anim:has(.anim-input:checked) .flow-steps-sync .step { animation-play-state: paused; }

.scene {
  --sc-y: 60%;
  position: relative;
  height: 210px;
  margin: 4px 0 22px;
  border-radius: 14px;
  background:
    linear-gradient(rgba(14, 26, 43, 0.035) 1px, transparent 1px) 0 0 / 100% 22px,
    linear-gradient(90deg, rgba(14, 26, 43, 0.035) 1px, transparent 1px) 0 0 / 22px 100%,
    linear-gradient(180deg, var(--bg-2), #ffffff);
  border: 1px solid var(--line);
  overflow: hidden;
}
.s-ico { width: 18px; height: 18px; }
.s-track {
  position: absolute;
  left: 8%;
  right: 24%;
  top: var(--sc-y);
  height: 0;
  border-top: 2px dashed rgba(14, 26, 43, 0.16);
}
.s-doc {
  position: absolute;
  left: 8%;
  top: var(--sc-y);
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 58px;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 12px 24px -16px rgba(14, 26, 43, 0.4);
}
.s-doc .s-ico { width: 22px; height: 22px; }
.s-scanner {
  position: absolute;
  left: 44%;
  top: var(--sc-y);
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: rgba(16, 24, 38, 0.05);
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}
.s-corner { position: absolute; width: 20px; height: 20px; border: 3px solid var(--teal-bright); animation: s-corner 10s linear infinite; }
.s-c1 { top: 6px; left: 6px; border-right: 0; border-bottom: 0; border-radius: 5px 0 0 0; }
.s-c2 { top: 6px; right: 6px; border-left: 0; border-bottom: 0; border-radius: 0 5px 0 0; }
.s-c3 { bottom: 6px; left: 6px; border-right: 0; border-top: 0; border-radius: 0 0 0 5px; }
.s-c4 { bottom: 6px; right: 6px; border-left: 0; border-top: 0; border-radius: 0 0 5px 0; }
.s-beam {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--amber-bright), transparent);
  box-shadow: 0 0 14px 3px rgba(245, 165, 36, 0.5);
  opacity: 0;
  animation: s-beam 10s linear infinite;
}
.s-box {
  position: absolute;
  left: 8%;
  top: var(--sc-y);
  width: 64px;
  height: 52px;
  transform: translate(-50%, -50%);
  border-radius: 6px;
  background: linear-gradient(180deg, #f7b04a, #e8891d);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12), 0 14px 26px -16px rgba(14, 26, 43, 0.6);
  opacity: 0;
  animation: s-box 10s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: 2;
}
.s-box-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.22);
  border-bottom: 2px solid rgba(120, 60, 0, 0.35);
}
.s-qr {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 22px;
  height: 22px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: 3px;
  background: #ffffff;
}
.s-qr i { background: #0e1a2b; }
.s-qr i:nth-child(5) { background: transparent; }
.s-shelf {
  position: absolute;
  right: 5%;
  top: 12%;
  width: 24%;
  height: 76%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr auto;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 30px -20px rgba(14, 26, 43, 0.45);
}
.s-slot {
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.s-slot-target { animation: s-slot 10s linear infinite; }
.s-shelf-label {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 14px 28px -18px rgba(14, 26, 43, 0.5);
  opacity: 0;
  z-index: 3;
}
.s-tag .s-ico { width: 16px; height: 16px; }
.s-tag-valid { left: 44%; top: 12%; transform: translate(-50%, 0); color: var(--teal); animation: s-tag-valid 10s ease infinite; }
.s-tag-valid .s-ico { color: var(--green); }
.s-tag-done { right: 31%; bottom: 9%; color: var(--text); animation: s-tag-done 10s ease infinite; }
.s-tag-done .s-ico { color: var(--teal-bright); }

@keyframes s-box {
  0% { left: 13%; top: var(--sc-y); opacity: 0; }
  5% { opacity: 1; }
  7% { left: 13%; }
  20% { left: 44%; top: var(--sc-y); }
  50% { left: 44%; top: var(--sc-y); scale: 1; }
  72% { left: 83.2%; top: 58%; scale: 0.8; }
  95% { left: 83.2%; top: 58%; opacity: 1; scale: 0.8; }
  100% { left: 83.2%; top: 58%; opacity: 0; scale: 0.8; }
}
@keyframes s-beam {
  0%, 19% { opacity: 0; top: 10px; }
  21% { opacity: 1; }
  31% { top: calc(100% - 13px); }
  41% { top: 10px; opacity: 1; }
  43%, 100% { opacity: 0; }
}
@keyframes s-corner {
  0%, 18% { border-color: var(--teal-bright); }
  20%, 42% { border-color: var(--amber-bright); }
  44%, 100% { border-color: var(--teal-bright); }
}
@keyframes s-tag-valid {
  0%, 38% { opacity: 0; transform: translate(-50%, 8px); }
  43%, 60% { opacity: 1; transform: translate(-50%, 0); }
  66%, 100% { opacity: 0; transform: translate(-50%, -6px); }
}
@keyframes s-slot {
  0%, 68% { background: var(--bg-2); border-color: var(--line); box-shadow: none; }
  74%, 96% { background: var(--teal-soft); border-color: var(--teal-bright); box-shadow: 0 0 0 4px var(--teal-soft); }
  100% { background: var(--bg-2); border-color: var(--line); box-shadow: none; }
}
@keyframes s-tag-done {
  0%, 76% { opacity: 0; transform: translateY(8px); }
  81%, 96% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0); }
}


/* ---------- Escena OV: OV → QR → camión → despacho ---------- */
.s-doc-ov { color: var(--amber); }
.s-doc-ot { color: #4f47c8; }
.scene-ov .s-track { right: 14%; }
.s-truck {
  position: absolute;
  left: 80%;
  top: var(--sc-y);
  width: 112px;
  height: 58px;
  transform: translate(-50%, -50%);
  animation: s-truck 10s cubic-bezier(0.5, 0, 0.6, 1) infinite;
  z-index: 1;
}
.s-cargo {
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 74px;
  height: 46px;
  border-radius: 6px 4px 2px 6px;
  background: var(--panel);
  border: 2px solid var(--navy);
  overflow: hidden;
}
.s-cargo-fill {
  position: absolute;
  left: 10px;
  bottom: 6px;
  width: 30px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f7b04a, #e8891d);
  opacity: 0;
  animation: s-cargo-fill 10s linear infinite;
}
.s-cab {
  position: absolute;
  right: 0;
  bottom: 10px;
  width: 36px;
  height: 34px;
  border-radius: 4px 10px 2px 2px;
  background: var(--navy);
}
.s-cab::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 11px;
  border-radius: 2px;
  background: rgba(60, 203, 208, 0.9);
}
.s-wheel {
  position: absolute;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: inset 0 0 0 4px #ffffff, inset 0 0 0 6px var(--navy);
}
.s-w1 { left: 12px; }
.s-w2 { right: 12px; }
.scene-ov .s-box { animation-name: s-box-ov; }
.scene-ov .s-tag-done { right: auto; left: 60%; transform: translateX(-50%); bottom: 12%; animation-name: s-tag-done-ov; }
@keyframes s-box-ov {
  0% { left: 13%; top: var(--sc-y); opacity: 0; }
  5% { opacity: 1; }
  7% { left: 13%; }
  20% { left: 44%; top: var(--sc-y); }
  50% { left: 44%; top: var(--sc-y); scale: 1; }
  66% { left: 75.5%; top: calc(var(--sc-y) + 4px); scale: 0.55; opacity: 1; }
  68%, 100% { left: 75.5%; top: calc(var(--sc-y) + 4px); scale: 0.55; opacity: 0; }
}
@keyframes s-cargo-fill {
  0%, 66% { opacity: 0; }
  68%, 100% { opacity: 1; }
}
@keyframes s-truck {
  0%, 70% { transform: translate(-50%, -50%); opacity: 1; }
  92% { transform: translate(60%, -50%); opacity: 1; }
  93% { opacity: 0; }
  94% { transform: translate(-50%, -50%); opacity: 0; }
  100% { transform: translate(-50%, -50%); opacity: 1; }
}
@keyframes s-tag-done-ov {
  0%, 74% { opacity: 0; transform: translate(-50%, 8px); }
  79%, 96% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}
.flow-ov .flow-steps-sync .step:nth-child(1) { animation-name: sync-ov-1; }
.flow-ov .flow-steps-sync .step:nth-child(2) { animation-name: sync-2; }
.flow-ov .flow-steps-sync .step:nth-child(3) { animation-name: sync-ov-3; }
@keyframes sync-ov-1 { 0%, 1% { box-shadow: none; } 3%, 16% { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); background: var(--amber-soft); } 20%, 100% { box-shadow: none; } }
@keyframes sync-ov-3 { 0%, 48% { box-shadow: none; } 51%, 96% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 100% { box-shadow: none; } }

/* ---------- Escena OT: OT → QR → MP a producción → PT recibido ---------- */
.scene-ot .s-track { right: 6%; }
.s-box-label {
  position: absolute;
  left: 7px;
  bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.06em;
}
.s-box-pt {
  background: linear-gradient(180deg, #3ccbd0, #1a9ea9);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.14), 0 14px 26px -16px rgba(14, 26, 43, 0.6);
}
.s-box-pt .s-box-top { border-bottom-color: rgba(0, 70, 75, 0.4); }
.s-machine {
  position: absolute;
  left: 70%;
  top: var(--sc-y);
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid rgba(79, 71, 200, 0.5);
  box-shadow: 0 16px 30px -20px rgba(14, 26, 43, 0.45);
  z-index: 3;
}
.s-gear { width: 30px; height: 30px; color: #4f47c8; animation: s-gear 10s linear infinite; }
.s-machine-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scene-ot .s-box-mp { animation-name: s-box-mp; }
.scene-ot .s-box-pt { animation-name: s-box-pt; }
.scene-ot .s-tag-done { right: auto; left: 70%; transform: translateX(-50%); bottom: 8%; animation-name: s-tag-done-ot; }
@keyframes s-box-mp {
  0% { left: 13%; top: var(--sc-y); opacity: 0; }
  5% { opacity: 1; }
  7% { left: 13%; }
  20% { left: 44%; top: var(--sc-y); }
  46% { left: 44%; top: var(--sc-y); scale: 1; opacity: 1; }
  58% { left: 70%; top: var(--sc-y); scale: 0.7; opacity: 1; }
  61%, 100% { left: 70%; top: var(--sc-y); scale: 0.4; opacity: 0; }
}
@keyframes s-box-pt {
  0%, 66% { left: 70%; top: var(--sc-y); scale: 0.4; opacity: 0; }
  70% { opacity: 1; scale: 0.8; }
  80% { left: 89%; top: var(--sc-y); scale: 1; opacity: 1; }
  96% { left: 89%; opacity: 1; }
  100% { left: 89%; opacity: 0; }
}
@keyframes s-gear {
  0%, 52% { transform: rotate(0deg); }
  72% { transform: rotate(540deg); }
  100% { transform: rotate(540deg); }
}
@keyframes s-tag-done-ot {
  0%, 80% { opacity: 0; transform: translate(-50%, 8px); }
  85%, 96% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}
.flow-ot .flow-steps-sync .step:nth-child(1) { animation-name: sync-ot-1; }
.flow-ot .flow-steps-sync .step:nth-child(2) { animation-name: sync-2; }
.flow-ot .flow-steps-sync .step:nth-child(3) { animation-name: sync-ot-3; }
.flow-ot .flow-steps-sync .step:nth-child(4) { animation-name: sync-ot-4; }
@keyframes sync-ot-1 { 0%, 1% { box-shadow: none; } 3%, 16% { border-color: #4f47c8; box-shadow: 0 0 0 3px var(--ai-soft); background: var(--ai-soft); } 20%, 100% { box-shadow: none; } }
@keyframes sync-ot-3 { 0%, 46% { box-shadow: none; } 49%, 62% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 66%, 100% { box-shadow: none; } }
@keyframes sync-ot-4 { 0%, 66% { box-shadow: none; } 69%, 96% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 100% { box-shadow: none; } }

/* Pasos del rail OC sincronizados con la escena */
.flow-steps-sync .step { animation: 10s linear infinite; }
.flow-oc .flow-steps-sync .step:nth-child(1) { animation-name: sync-1; }
.flow-oc .flow-steps-sync .step:nth-child(2) { animation-name: sync-2; }
.flow-oc .flow-steps-sync .step:nth-child(3) { animation-name: sync-3; }
.flow-oc .flow-steps-sync .step:nth-child(4) { animation-name: sync-4; }
.flow-oc .flow-steps-sync .step:nth-child(5) { animation-name: sync-5; }
@keyframes sync-1 { 0%, 1% { border-color: var(--line); box-shadow: none; } 3%, 16% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 20%, 100% { box-shadow: none; } }
@keyframes sync-2 { 0%, 18% { box-shadow: none; } 21%, 46% { border-color: var(--amber-bright); box-shadow: 0 0 0 3px var(--amber-soft); } 50%, 100% { box-shadow: none; } }
@keyframes sync-3 { 0%, 48% { box-shadow: none; } 51%, 66% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 70%, 100% { box-shadow: none; } }
@keyframes sync-4 { 0%, 68% { box-shadow: none; } 71%, 82% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 86%, 100% { box-shadow: none; } }
@keyframes sync-5 { 0%, 78% { box-shadow: none; } 81%, 96% { border-color: var(--teal-bright); box-shadow: 0 0 0 3px var(--teal-soft); background: var(--teal-soft); } 100% { box-shadow: none; } }

/* ---------- Capacidades ---------- */
.capabilities { padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover { border-color: rgba(26, 158, 169, 0.55); transform: translateY(-3px); box-shadow: 0 24px 48px -32px rgba(14, 26, 43, 0.35); }
.card-icon {
  width: 44px;
  height: 44px;
  padding: 9px;
  border-radius: 12px;
  background: var(--teal-soft);
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card p { color: var(--muted); font-size: 15px; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.tags li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tags-large li { font-size: 13px; padding: 7px 13px; color: var(--text); border-color: var(--line-strong); }
.tags-warn li { color: var(--danger); background: var(--danger-soft); border-color: transparent; }

.ecosystem {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 56px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.ecosystem-copy h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 14px; }
.ecosystem-copy p { color: var(--muted); }
.ecosystem-art {
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -36px rgba(14, 26, 43, 0.4);
}
.ecosystem-art img { width: 100%; height: auto; border-radius: 10px; }


/* ---------- Gerente digital ---------- */
.manager { padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.flow-steps.chain {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 34px;
  margin-bottom: 48px;
}
.chain .step { margin-right: 0; background: var(--panel); }
.chain .step-type { color: var(--teal); }
.step-ai { border-color: rgba(79, 71, 200, 0.4); background: linear-gradient(180deg, var(--ai-soft), var(--panel)); }
.step-ai .step-type, .chain .step-ai .step-type { color: var(--ai); }
.chain .step-scan .step-type { color: var(--amber); }

.manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.key-message {
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
.key-message em { font-style: normal; color: var(--teal); }
.manager-text { margin-top: 18px; color: var(--muted); font-size: 16px; }

.legend { display: grid; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.legend li { display: flex; align-items: baseline; gap: 12px; font-size: 14px; color: var(--muted); }
.legend b { color: var(--text); margin-right: 2px; }
.light {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(1px);
}
.light-red { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.light-yellow { background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.light-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.light-ai { background: var(--ai); box-shadow: 0 0 0 4px var(--ai-soft); }

.motto {
  margin-top: 28px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.motto em { font-style: normal; color: var(--ai); }

.panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -36px rgba(14, 26, 43, 0.4);
}
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.signals { display: grid; gap: 10px; margin-top: 14px; }
.signal {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left-width: 4px;
}
.signal-ico { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 2px; }
.signal-red .signal-ico { color: var(--red); }
.signal-yellow .signal-ico { color: var(--yellow); }
.signal-green .signal-ico { color: var(--green); }
.signal-red { border-left-color: var(--red); }
.signal-yellow { border-left-color: var(--yellow); }
.signal-green { border-left-color: var(--green); }
.signal-kind {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.signal-red .signal-kind { color: var(--red); }
.signal-yellow .signal-kind { color: var(--yellow); }
.signal-green .signal-kind { color: var(--green); }
.signal p { font-size: 14px; color: var(--text); }
.suggestion { margin-top: 6px; color: var(--muted) !important; }
.ai-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ai-soft);
  color: var(--ai);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chip-ai { background: var(--ai-soft); color: var(--ai); }

.observe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 48px;
}
.observe > div {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.observe h3 { font-size: 15px; margin-bottom: 14px; color: var(--muted); letter-spacing: 0.02em; }
.observe-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.observe-3 h3 { font-size: 19px; color: var(--text); letter-spacing: -0.01em; text-wrap: balance; }
.observe-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.observe-detect .observe-kicker { color: var(--amber); }
.observe-suggest .observe-kicker { color: var(--ai); }
.observe-detect { border-color: rgba(245, 165, 36, 0.4); }
.observe-suggest { border-color: rgba(79, 71, 200, 0.4); }
.tags-signal li { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.tags-suggest li { color: var(--ai); background: var(--ai-soft); border-color: transparent; }
.tags-suggest li.tag-calm { color: var(--green); background: var(--green-soft); }

.insight-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.balance {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.wh-list { display: grid; gap: 12px; margin-top: 18px; }
.wh {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.wh-code { font-family: var(--mono); font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.wh-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--bg-3);
  overflow: hidden;
}
.wh-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}
.wh-high .wh-bar i { width: 84%; background: linear-gradient(90deg, var(--teal-bright), var(--teal)); }
.wh-low .wh-bar i { width: 22%; background: linear-gradient(90deg, var(--amber-bright), var(--amber)); }
.wh-state { font-weight: 700; color: var(--muted); white-space: nowrap; }
.wh-low .wh-state { color: var(--amber); }
.balance-arrow {
  position: relative;
  width: 2px;
  height: 30px;
  margin: 16px auto 12px;
  background: var(--ai);
}
.balance-arrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ai);
  border-bottom: 2px solid var(--ai);
  transform: translateX(-50%) rotate(45deg);
}
.balance-suggest {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ai);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.balance-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

.outlook {
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px dashed rgba(79, 71, 200, 0.45);
}
.outlook .chip { display: inline-block; margin-bottom: 12px; }
.outlook .motto { margin-top: 0; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.02em; }
.outlook p { color: var(--muted); font-size: 15px; max-width: 860px; }
.outlook .outlook-lead { margin-top: 10px; color: var(--text); font-size: 17px; }
.outlook p + p { margin-top: 12px; }
.outlook-sub { margin-top: 20px; font-size: 12px; color: var(--dim); letter-spacing: 0.14em; text-transform: uppercase; }
.outlook .tags { margin-top: 10px; }
.tags-ai li { color: var(--ai); background: var(--ai-soft); border-color: transparent; }
.outlook .outlook-fine { margin-top: 16px; font-size: 13px; color: var(--dim); }

/* ---------- Apps iOS / Android ---------- */
.apps { padding: 0 0 clamp(64px, 8vw, 110px); }
.apps-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.store-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
}
.store-badge.is-pending { border-style: dashed; }
.store-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.store-text { display: grid; gap: 2px; min-width: 0; }
.store-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.store-status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}
a.store-badge .store-status { color: var(--teal); }
a.store-badge:hover { border-color: var(--teal-bright); }

/* ---------- ERP ---------- */
.erp {
  padding: clamp(64px, 8vw, 110px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.erp-heading { margin-bottom: 44px; }
.erp-claim {
  margin-top: 22px;
  max-width: 720px;
  padding: 14px 18px;
  border-radius: 12px;
  border-left: 4px solid var(--teal-bright);
  background: var(--panel);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.erp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.systems {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}
.system-group {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.system-group h3 {
  margin-bottom: 12px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.system-list { display: grid; gap: 8px; }
.system {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  font-size: 15px;
  letter-spacing: -0.01em;
}
.system-live { border-color: var(--teal-bright); background: linear-gradient(180deg, rgba(26, 158, 169, 0.12), var(--bg-2)); }
.system-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.system-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.mode {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.mode h3 { font-size: 17px; margin-bottom: 8px; color: var(--teal); }
.mode p { font-size: 14px; color: var(--muted); }
.mode strong { color: var(--text); }

.arch {
  display: grid;
  gap: 0;
  padding: clamp(18px, 2.5vw, 28px);
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.arch-node {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
}
.arch-node > div { display: grid; gap: 4px; min-width: 0; }
.arch-node strong { font-size: 17px; letter-spacing: -0.01em; }
.arch-ico { width: 36px; height: 36px; color: var(--teal-bright); }
.arch-connector .arch-ico, .arch-erp .arch-ico { color: var(--amber); }
.arch-kicker {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.arch-note { color: var(--muted); font-size: 13px; }
.arch-core { border-color: var(--teal-bright); background: linear-gradient(180deg, rgba(26, 158, 169, 0.12), var(--bg-2)); }
.arch-connector, .arch-erp { border-style: dashed; }
.arch-connector .arch-kicker, .arch-erp .arch-kicker { color: var(--amber); }
.arch-link {
  position: relative;
  height: 34px;
  width: 2px;
  margin-inline: auto;
  background: var(--teal-bright);
}
.arch-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--teal-bright);
  border-bottom: 2px solid var(--teal-bright);
  transform: translateX(-50%) rotate(45deg);
}
.arch-link-optional { background: repeating-linear-gradient(180deg, var(--amber-bright) 0 4px, transparent 4px 8px); }
.arch-link-optional::after { border-color: var(--amber-bright); }
.arch-link-sync::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--teal-bright);
  border-top: 2px solid var(--teal-bright);
  transform: translateX(-50%) rotate(45deg);
}
.arch-link-optional.arch-link-sync::before { border-color: var(--amber-bright); }
.arch-ops {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #ffffff;
}
.arch-ops li {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(60, 203, 208, 0.35);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Móvil ---------- */
.mobile { padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 26px 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--teal-bright), var(--amber-bright));
}
.steps-ico {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 30px;
  height: 30px;
  color: var(--teal-bright);
  opacity: 0.9;
}
.step-num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--amber);
}
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15px; }

.validation {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.validation > div {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}
.validation h3 { font-size: 15px; margin-bottom: 14px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- CTA ---------- */
.final-cta { padding: 0 0 clamp(64px, 8vw, 110px); }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(36px, 5vw, 64px);
  border-radius: var(--radius-lg);
  color: #ffffff;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(245, 165, 36, 0.18), transparent 70%),
    linear-gradient(135deg, var(--navy-2), var(--navy));
  border: 1px solid rgba(26, 158, 169, 0.35);
  box-shadow: 0 40px 80px -40px rgba(14, 26, 43, 0.6);
}
.cta-inner h2 { max-width: 720px; }
.cta-text { margin-top: 16px; max-width: 640px; color: rgba(255, 255, 255, 0.78); font-size: 17px; }
.cta-inner .eyebrow, .cta-inner h2 em { color: #3ccbd0; }
.cta-inner .button-primary { background: #3ccbd0; color: var(--navy); box-shadow: 0 10px 30px -12px rgba(60, 203, 208, 0.7); }
.cta-inner .button-primary:hover { background: #57d7db; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 36px 0;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .brand-icon { width: 40px; height: 40px; }
.site-footer .brand-name { font-size: 17px; }
.footer-by { display: inline-flex; align-items: center; gap: 10px; }
.fx-group {
  width: 124px;
  height: auto;
}
.footer-meta { text-align: right; }
.footer-meta a { text-decoration-color: var(--teal-bright); text-underline-offset: 3px; }
.footer-meta a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .flow-steps.chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain .step:nth-child(3)::after, .chain .step:nth-child(3)::before { display: none; }
  .phone { width: min(266px, 82vw); }
  .trace-card { width: 186px; padding: 12px 14px; bottom: 14%; }
}

@media (max-width: 1100px) {
  .differentiators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .observe-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .anim-toggle span { display: none; }
  .anim-toggle { padding: 8px 10px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 24px 0 20px;
  }
  .phone { width: min(300px, 82vw); }
  .trace-card { position: static; width: 240px; padding: 14px 16px; order: 2; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ecosystem { grid-template-columns: 1fr; }
  .erp-grid { grid-template-columns: 1fr; }
  .validation { grid-template-columns: 1fr; }
  .manager-grid { grid-template-columns: 1fr; }
  .observe { grid-template-columns: 1fr; }
  .insight-row { grid-template-columns: 1fr; }
  .apps-inner { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 16px; }
  .footer-meta { text-align: left; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .header-inner { min-height: 68px; }
  .brand-icon { width: 44px; height: 44px; }
  .brand-name { font-size: 18px; }
  .hero-actions .button { width: 100%; }
  .differentiators { grid-template-columns: 1fr 1fr; gap: 12px 8px; }
  .differentiators li { font-size: 13px; }
  .hero-visual { flex-direction: column; gap: 16px; }
  .trace-card { width: min(100%, 320px); }
  .phone { width: min(280px, 100%); }
  .section-heading { margin-bottom: 36px; }
  .flow-steps { flex-direction: column; gap: 22px; }
  .step { margin-right: 0; flex-basis: auto; }
  .scene { height: 180px; --sc-y: 58%; }
  .s-scanner { width: 84px; height: 84px; }
  .s-box { width: 52px; height: 42px; }
  .s-doc { width: 48px; font-size: 10px; }
  .s-shelf { width: 30%; height: 62%; top: 19%; grid-template-rows: 1fr 1fr; padding: 6px; gap: 5px; }
  .s-shelf-label { display: none; }
  .s-tag { font-size: 11px; padding: 6px 10px; }
  .s-tag-done { right: auto; left: 6%; bottom: 6%; }
  .scene-ov .s-tag-done, .scene-ot .s-tag-done { left: 50%; bottom: 5%; }
  .s-truck { width: 92px; height: 50px; left: 79%; }
  .s-cargo { width: 58px; height: 38px; }
  .s-cab { width: 30px; height: 28px; }
  .s-wheel { width: 15px; height: 15px; }
  .s-machine { width: 66px; height: 66px; left: 69%; }
  .s-machine-label { display: none; }
  .s-gear { width: 28px; height: 28px; }
  .header-actions { gap: 8px; }
  .lang-switch label { min-width: 34px; height: 30px; }
  .step::after {
    top: auto;
    right: auto;
    left: 24px;
    bottom: -22px;
    width: 1px;
    height: 22px;
    background: linear-gradient(180deg, var(--line-strong), var(--teal-bright));
  }
  .step::before {
    top: auto;
    right: auto;
    left: 20px;
    bottom: -8px;
    transform: rotate(135deg);
  }
  .card-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .systems { grid-template-columns: 1fr; }
  .wh { grid-template-columns: 58px minmax(0, 1fr); }
  .wh-state { grid-column: 2; font-size: 12px; }
  .outlook { padding: 22px 18px; }
  .steps { grid-template-columns: 1fr; }
  .stores { grid-template-columns: 1fr; }
  .flow-steps.chain { grid-template-columns: 1fr; gap: 22px; margin-bottom: 36px; }
  .chain .step:nth-child(3)::after, .chain .step:nth-child(3)::before { display: block; }
  .button-large { width: 100%; white-space: normal; }
  .cta-inner { padding: 28px 20px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scan-line { top: 50%; }
  .anim-toggle { display: none; }
  .s-beam { display: none; }
  .s-box { left: 83.2%; top: 58%; opacity: 1; scale: 0.8; }
  .s-tag-done { opacity: 1; }
  .s-tag-valid { opacity: 1; transform: translate(-50%, 0); }
  .s-slot-target { background: var(--teal-soft); border-color: var(--teal-bright); }
  .scene-ov .s-box { opacity: 0; }
  .s-cargo-fill { opacity: 1; }
  .scene-ot .s-box-mp { opacity: 0; }
  .scene-ot .s-box-pt { left: 89%; opacity: 1; scale: 1; }
}
