/* ==========================================================================
   HEROSMACE — Sistema de diseño
   Paleta derivada del logotipo: azul navy profundo + cyan tecnológico + acero
   ========================================================================== */

:root {
  /* Marca */
  --navy-900: #0B2239;
  --navy-800: #0F2A47;
  --navy-700: #143A60;
  --navy-600: #1B4E7F;
  --navy-500: #2A6499;

  --cyan-800: #0A6480;   /* cyan para texto sobre fondos con tinte (5.6:1) */
  --cyan-700: #0B7CA8;   /* cyan accesible sobre blanco (4.7:1) */
  --cyan-600: #0E8FC0;
  --cyan-500: #16A6DC;   /* cyan de marca */
  --cyan-400: #35BCEE;
  --cyan-300: #7FD6F5;

  --steel-600: #4A5A6E;
  --steel-500: #5B6678;
  --steel-400: #8C9EAC;
  --steel-200: #C9D6E0;

  /* Superficies */
  --bg: #FFFFFF;
  --bg-muted: #F3F7FA;
  --card: #FFFFFF;
  --border: #E1E9F0;
  --border-strong: #CFDCE7;

  /* Texto */
  --ink: #10233A;
  --ink-soft: #4A5A6E;
  --ink-light: rgba(255, 255, 255, .92);
  --ink-light-soft: rgba(214, 231, 243, .78);

  /* Estados */
  --ok: #0A7350;          /* 5.2:1 sobre --ok-bg */
  --ok-bg: #E6F6EF;
  --warn: #B26A00;
  --stop: #C0392B;

  /* Tipografía */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  /* Escala de espaciado (4/8) */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;

  /* Radios y sombras */
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 20px;  --r-xl: 28px;  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11, 34, 57, .06), 0 2px 8px rgba(11, 34, 57, .05);
  --shadow-md: 0 4px 12px rgba(11, 34, 57, .08), 0 12px 32px rgba(11, 34, 57, .07);
  --shadow-lg: 0 12px 28px rgba(11, 34, 57, .12), 0 32px 64px rgba(11, 34, 57, .12);

  /* Movimiento */
  --ease: cubic-bezier(.22, .68, .28, 1);
  --t-fast: 160ms;
  --t-base: 260ms;

  --shell: 1200px;
  --header-h: 76px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--cyan-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -110%);
  z-index: 200; background: var(--navy-800); color: #fff;
  padding: var(--sp-3) var(--sp-5); border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600; transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
@media (min-width: 900px) { .shell { width: min(100% - 4rem, var(--shell)); } }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

/* ── Botones ───────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--navy-700);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px;
  padding: .8rem 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: .975rem; letter-spacing: -.01em;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--navy-700);
  box-shadow: 0 6px 18px rgba(20, 58, 96, .28);
}
.btn--primary:hover { --btn-bg: var(--navy-600); box-shadow: 0 10px 26px rgba(20, 58, 96, .34); }

.btn--accent {
  --btn-bg: var(--cyan-500);
  --btn-fg: var(--navy-900);          /* texto oscuro: 5.6:1 sobre el cyan */
  box-shadow: 0 6px 16px rgba(22, 166, 220, .3);
}
.btn--accent:hover { --btn-bg: var(--cyan-400); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy-800);
  border-color: var(--border-strong);
}
.btn--ghost:hover { --btn-bg: #fff; border-color: var(--navy-600); }

.btn--wa { --btn-bg: #1FA855; --btn-fg: #fff; box-shadow: 0 6px 18px rgba(31, 168, 85, .28); }
.btn--wa:hover { --btn-bg: #178B45; }

.btn--sm { min-height: 44px; padding: .5rem 1.05rem; font-size: .9rem; }
.btn--block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .34rem .85rem; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-light);
}
.chip--accent { background: rgba(22, 166, 220, .18); border-color: rgba(53, 188, 238, .45); color: var(--cyan-300); }

/* ── Encabezado ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: 0 2px 16px rgba(11, 34, 57, .07); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: .7rem; padding: .25rem 0; }
.brand__mark { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-size: 1.12rem; font-weight: 800; letter-spacing: .16em; color: var(--navy-800);
}
.brand__tag {
  font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--steel-500);
}
@media (max-width: 380px) { .brand__tag { display: none; } }

.nav__list { display: flex; align-items: center; gap: var(--sp-2); }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 .9rem; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; color: var(--ink);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.nav__link:hover { color: var(--cyan-700); background: rgba(22, 166, 220, .09); }
.nav__link.is-active { color: var(--cyan-700); }
.nav__cta-item { margin-left: var(--sp-2); }

.nav-toggle {
  display: none; align-items: center; gap: .55rem;
  min-height: 44px; padding: .4rem .8rem .4rem .6rem;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--r-pill); font-weight: 600; cursor: pointer;
}
.nav-toggle__box { position: relative; width: 20px; height: 14px; }
.nav-toggle__bar, .nav-toggle__box::before, .nav-toggle__box::after {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: var(--navy-800); transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle__bar { top: 6px; }
.nav-toggle__box::before { content: ''; top: 0; }
.nav-toggle__box::after  { content: ''; bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__box::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__box::after  { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { opacity: 0; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--sp-4) 1.25rem var(--sp-5);
    transform: translateY(-14px); opacity: 0; visibility: hidden;
    transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility var(--t-base);
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: var(--sp-1); }
  .nav__link { min-height: 52px; padding: 0 1rem; font-size: 1.05rem; }
  .nav__cta-item { margin: var(--sp-3) 0 0; }
  .nav__cta-item .btn { width: 100%; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem);
  background: linear-gradient(168deg, #0A1F35 0%, var(--navy-800) 48%, #16456F 100%);
  color: #fff;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__grid {
  position: absolute; inset: -10%;
  background-image:
    linear-gradient(rgba(127, 214, 245, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 214, 245, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 35%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 60% 35%, #000 30%, transparent 78%);
}
.hero__glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.hero__glow--a { width: 42vw; height: 42vw; top: -14%; right: -8%; background: radial-gradient(circle, rgba(22, 166, 220, .55), transparent 68%); }
.hero__glow--b { width: 36vw; height: 36vw; bottom: -18%; left: -10%; background: radial-gradient(circle, rgba(27, 78, 127, .7), transparent 66%); }

.hero__inner {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 1000px) { .hero__inner { grid-template-columns: 1.05fr .95fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em; margin-bottom: var(--sp-4);
  padding: .4rem .95rem; border-radius: var(--r-pill);
  background: rgba(127, 214, 245, .12); border: 1px solid rgba(127, 214, 245, .26);
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--cyan-300);
}
.eyebrow--dark {
  background: rgba(22, 166, 220, .1); border-color: rgba(22, 166, 220, .26); color: var(--cyan-800);
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px rgba(22, 166, 220, .22);
}

.hero__title {
  font-size: clamp(2.35rem, 6vw, 4.1rem);
  font-weight: 800; letter-spacing: -.035em; margin-bottom: var(--sp-5);
}
.grad {
  display: block;
  background: linear-gradient(100deg, var(--cyan-400) 8%, #9FE4FA 55%, var(--cyan-400) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead {
  max-width: 46ch; font-size: clamp(1.03rem, 1.6vw, 1.18rem);
  color: var(--ink-light-soft); margin-bottom: var(--sp-6);
}
.hero__lead strong { color: #fff; font-weight: 700; }

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.hero__actions .btn--ghost { --btn-fg: #fff; border-color: rgba(255, 255, 255, .3); }
.hero__actions .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); }

.hero__badges { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); }
.hero__badges li {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem; font-weight: 600; color: var(--ink-light-soft);
}
.hero__badges .icon { color: var(--cyan-400); width: 1.25em; height: 1.25em; }

/* Panel ilustrativo */
.hero__panel { display: flex; flex-direction: column; gap: var(--sp-3); }
.panel {
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 24px 60px rgba(4, 16, 30, .45);
  overflow: hidden;
}
.panel__head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: .85rem 1.1rem;
  background: rgba(10, 31, 53, .5);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.panel__dots { display: inline-flex; gap: 5px; }
.panel__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .24); }
.panel__title {
  font-family: var(--mono); font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; color: var(--cyan-300);
}
.panel__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .12em;
  color: #8FE9BE;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #35D89A;
  box-shadow: 0 0 0 0 rgba(53, 216, 154, .6);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(53, 216, 154, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(53, 216, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 216, 154, 0); }
}

.panel__body { padding: 1.1rem; display: grid; gap: 1.1rem; }
.panel__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.kpi {
  padding: .8rem .85rem; border-radius: var(--r-md);
  background: rgba(9, 28, 48, .45); border: 1px solid rgba(255, 255, 255, .1);
}
.kpi__label {
  display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(200, 224, 240, .7);
}
.kpi__value {
  display: block; margin: .2rem 0 .55rem;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem); font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: #fff;
}
.kpi__value small { font-size: .58em; font-weight: 700; color: var(--cyan-300); margin-left: .06em; }
.mono { font-family: var(--mono); font-weight: 600; }

.bar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bar__fill {
  display: block; height: 100%; width: var(--w); border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-600), var(--cyan-300));
  transform-origin: left; animation: grow 1.1s var(--ease) both;
}
.bar__fill--alt { background: linear-gradient(90deg, var(--navy-500), var(--cyan-500)); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.machines { display: grid; gap: .4rem; }
.machine {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem;
  padding: .55rem .75rem; border-radius: 10px;
  background: rgba(9, 28, 48, .38); border: 1px solid rgba(255, 255, 255, .07);
}
.machine__led { width: 8px; height: 8px; border-radius: 50%; }
.machine__led--run  { background: #35D89A; box-shadow: 0 0 8px rgba(53, 216, 154, .8); }
.machine__led--idle { background: #F2B441; box-shadow: 0 0 8px rgba(242, 180, 65, .7); }
.machine__led--stop { background: #F0655A; box-shadow: 0 0 8px rgba(240, 101, 90, .7); }
.machine__name { font-size: .76rem; letter-spacing: .06em; color: rgba(216, 234, 246, .88); }
.machine__state { font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.machine__state--run  { color: #8FE9BE; }
.machine__state--idle { color: #F7CE7E; }
.machine__state--stop { color: #F5A29A; }

.spark { border-radius: var(--r-md); overflow: hidden; background: rgba(9, 28, 48, .38); border: 1px solid rgba(255, 255, 255, .08); }
.spark svg { width: 100%; height: 64px; }
.spark__line { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 1.8s var(--ease) .3s both; }
.spark__area { opacity: 0; animation: fade 1s var(--ease) 1.1s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.panel__note {
  font-size: .76rem; color: rgba(200, 224, 240, .72); text-align: center; font-style: italic;
}

/* ── Secciones ─────────────────────────────────────────────────────────── */
.section { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--muted { background: var(--bg-muted); }
.section--dark {
  background: linear-gradient(180deg, var(--navy-900), #0D2A48 60%, var(--navy-800));
  color: #fff; overflow: hidden; isolation: isolate;
}
.section__bg { position: absolute; inset: 0; z-index: -1; opacity: .55; }

.section__head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__title {
  font-size: clamp(1.85rem, 3.8vw, 2.85rem); font-weight: 800;
  letter-spacing: -.03em; margin-bottom: var(--sp-4);
}
.section__lead { font-size: clamp(1rem, 1.4vw, 1.1rem); color: var(--ink-soft); max-width: 60ch; }
.section__lead--light { color: var(--ink-light-soft); }

/* ── Tabla de especialidades ───────────────────────────────────────────── */
.table-wrap {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table thead th {
  padding: 1rem 1.4rem;
  background: var(--navy-800); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.table tbody th, .table tbody td {
  padding: 1.05rem 1.4rem; border-top: 1px solid var(--border);
  font-size: .98rem; vertical-align: middle;
}
.table tbody th { font-weight: 700; color: var(--navy-800); }
.table tbody td { color: var(--ink-soft); }
.table tbody tr { transition: background-color var(--t-fast) var(--ease); }
.table tbody tr:hover { background: rgba(22, 166, 220, .05); }

.tag {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .3rem .8rem; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 700;
}
.tag--ok { background: var(--ok-bg); color: var(--ok); }
.tag__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

@media (max-width: 720px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table tbody tr {
    padding: .35rem 0 .8rem; border-top: 1px solid var(--border);
  }
  .table tbody tr:first-child { border-top: 0; }
  .table tbody th, .table tbody td {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .5rem 1.15rem; border: 0;
  }
  .table tbody th { padding-top: .9rem; font-size: 1.05rem; }
  .table tbody td::before {
    content: attr(data-label);
    font-size: .78rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--steel-500);
  }
}

/* ── Tarjetas de servicios ─────────────────────────────────────────────── */
.cards { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
@media (min-width: 860px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.card__icon {
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, rgba(22, 166, 220, .14), rgba(20, 58, 96, .1));
  border: 1px solid rgba(22, 166, 220, .22);
  color: var(--cyan-700);
}
.card__icon svg { width: 27px; height: 27px; }
.card__title { font-size: 1.16rem; font-weight: 700; color: var(--navy-800); }
.card__text { color: var(--ink-soft); font-size: .97rem; }

.card--wide { grid-column: 1 / -1; }
@media (min-width: 860px) { .card--wide { grid-column: span 2; } }
.card--feature {
  background:
    linear-gradient(150deg, rgba(22, 166, 220, .07), transparent 55%),
    var(--card);
  border-color: rgba(22, 166, 220, .28);
}

.sublist { display: grid; gap: var(--sp-3); margin-top: var(--sp-2); }
@media (min-width: 700px) { .sublist { grid-template-columns: repeat(3, 1fr); } }
.sublist__item {
  display: flex; gap: .85rem; padding: 1rem;
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.sublist__icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 9px;
  background: #fff; border: 1px solid var(--border);
  color: var(--cyan-700);
}
.sublist__icon svg { width: 19px; height: 19px; }
.sublist__title { font-size: .97rem; font-weight: 700; color: var(--navy-800); margin-bottom: .25rem; }
.sublist__text { font-size: .89rem; color: var(--ink-soft); line-height: 1.55; }

/* ── Caso real: demo animada ───────────────────────────────────────────── */
.chip--dark {
  background: rgba(22, 166, 220, .12); border-color: rgba(22, 166, 220, .3);
  color: var(--cyan-800);
}
.demo {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background:
    linear-gradient(150deg, rgba(22, 166, 220, .07), transparent 60%),
    var(--card);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 940px) { .demo { grid-template-columns: .85fr 1.15fr; } }
.demo__title {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 800;
  color: var(--navy-800); margin: var(--sp-4) 0 var(--sp-3);
}
.demo__text { color: var(--ink-soft); font-size: .97rem; margin-bottom: var(--sp-4); }
.demo__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.demo__tags li {
  padding: .32rem .8rem; border-radius: var(--r-pill);
  background: var(--bg-muted); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
}
.demo__ref {
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: .88rem; color: var(--ink-soft);
}
.demo__ref strong { color: var(--navy-800); font-weight: 700; }

.demo__player {
  position: relative; display: block; width: 100%; padding: 0;
  background: #0A0A12; border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.demo__player:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
/* Sin recorte: la captura se ve entera, en su relación natural */
.demo__poster { width: 100%; height: auto; display: block; }
.demo__gif {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: fill;
  opacity: 0; transition: opacity 320ms var(--ease);
}
.demo__gif.is-ready { opacity: 1; }

.demo__player.is-loading .demo__play { opacity: 0; }
.demo__loading {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-content: center; justify-items: center; gap: .8rem;
  background: rgba(6, 16, 28, .55); backdrop-filter: blur(2px);
  color: #fff; font-size: .85rem; font-weight: 600;
}
.demo__loading::before {
  content: ''; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  animation: spin 900ms linear infinite;
}
.demo__play {
  position: absolute; inset: 0; margin: auto;
  display: grid; place-items: center; width: 74px; height: 74px;
  border-radius: 50%; background: rgba(15, 42, 71, .82);
  border: 2px solid rgba(255, 255, 255, .5); color: #fff;
  backdrop-filter: blur(4px);
  transition: transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}
.demo__play svg { width: 34px; height: 34px; margin-left: 3px; }
.demo__player:hover .demo__play { transform: scale(1.09); background: var(--cyan-600); }
.demo__hint {
  position: absolute; left: .7rem; bottom: .7rem;
  padding: .3rem .75rem; border-radius: var(--r-pill);
  background: rgba(10, 21, 33, .82); border: 1px solid rgba(255, 255, 255, .2);
  font-size: .76rem; font-weight: 600; color: #fff;
}
.demo__player.is-playing .demo__play,
.demo__player.is-playing .demo__hint { opacity: 0; pointer-events: none; }

/* ── SCADA / Industria ─────────────────────────────────────────────────── */
.scada { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
@media (min-width: 1000px) { .scada { grid-template-columns: minmax(280px, 340px) 1fr; } }

.scada__aside {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  display: grid; gap: var(--sp-3);
}
@media (max-width: 999px) { .scada__aside { position: static; } }

.scada__intro {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* ── Visor 3D ──────────────────────────────────────────────────────────── */
.viewer {
  margin: 0; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(22, 166, 220, .16), transparent 70%),
    linear-gradient(165deg, rgba(9, 28, 48, .7), rgba(11, 34, 57, .5));
  border: 1px solid rgba(255, 255, 255, .14);
}
.viewer__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
}
.viewer__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.viewer__stage canvas:active { cursor: grabbing; }
.viewer__stage.is-loading::after {
  content: ''; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(127, 214, 245, .25); border-top-color: var(--cyan-400);
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.viewer__fallback { padding: var(--sp-5); text-align: center; color: var(--ink-light-soft); font-size: .9rem; }
.viewer__caption {
  display: flex; align-items: center; gap: .55rem;
  padding: .7rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  color: rgba(214, 231, 243, .8);
}
.viewer__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan-400);
  box-shadow: 0 0 8px rgba(53, 188, 238, .9);
}
.scada__title {
  margin: var(--sp-4) 0 .4rem;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 800; letter-spacing: -.02em;
}
.scada__sub { color: var(--cyan-300); font-weight: 600; margin-bottom: var(--sp-3); }
.scada__sub strong { color: #fff; }
.scada__text { color: var(--ink-light-soft); font-size: .97rem; }

.features { display: grid; gap: var(--sp-3); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }

.feature {
  display: flex; gap: 1rem; padding: 1.25rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .11);
  transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.feature:hover {
  background: rgba(22, 166, 220, .1);
  border-color: rgba(53, 188, 238, .38);
  transform: translateY(-3px);
}
.feature__icon {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(22, 166, 220, .16); border: 1px solid rgba(53, 188, 238, .3);
  color: var(--cyan-300);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature__title { font-size: 1.02rem; font-weight: 700; margin-bottom: .35rem; color: #fff; }
.feature__text { font-size: .91rem; color: var(--ink-light-soft); line-height: 1.55; }

/* ── Capturas del producto ─────────────────────────────────────────────── */
.shots { margin-top: clamp(2.5rem, 5vw, 4rem); }
.shots__head { margin-bottom: var(--sp-5); }
.shots__title { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 800; margin-bottom: .5rem; }
.shots__lead { color: var(--ink-light-soft); font-size: .97rem; }

.shots__grid { display: grid; gap: var(--sp-4); }
@media (min-width: 760px)  { .shots__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .shots__grid { grid-template-columns: repeat(3, 1fr); } }

.shot { display: flex; flex-direction: column; gap: .7rem; }
.shot__btn {
  position: relative; display: block; width: 100%; padding: 0;
  background: rgba(6, 20, 34, .6);
  border: 1px solid rgba(255, 255, 255, .13); border-radius: var(--r-md);
  overflow: hidden; cursor: pointer;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.shot__btn:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 188, 238, .5);
  box-shadow: 0 18px 40px rgba(2, 12, 24, .55);
}
.shot__img {
  /* height:auto es obligatorio: sin él, el atributo height del HTML se aplica
     como altura literal y la caja queda con el alto natural de la captura. */
  width: 100%; height: auto;
  aspect-ratio: 16 / 10; object-fit: contain;
  background: #0A1521;
}
.shot__zoom {
  position: absolute; right: .6rem; bottom: .6rem;
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(11, 34, 57, .8);
  border: 1px solid rgba(127, 214, 245, .4); color: var(--cyan-300);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.shot__zoom svg { width: 18px; height: 18px; }
.shot__btn:hover .shot__zoom, .shot__btn:focus-visible .shot__zoom { opacity: 1; transform: none; }
.shot__cap { font-size: .88rem; color: var(--ink-light-soft); line-height: 1.5; }
.shot__cap strong { color: #fff; font-weight: 700; }

/* ── Lightbox ──────────────────────────────────────────────────────────── */
.lightbox {
  width: min(96vw, 1500px); max-width: none;
  max-height: 94vh; padding: 0; border: 0;
  background: transparent; color: #fff; overflow: visible;
}
.lightbox::backdrop { background: rgba(4, 14, 26, .88); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in 260ms var(--ease) both; }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lightbox__figure {
  margin: 0; background: #0A1521;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
}
.lightbox__img { width: 100%; max-height: 80vh; object-fit: contain; background: #0A1521; }
.lightbox__cap {
  padding: .9rem 1.2rem; font-size: .9rem; line-height: 1.55;
  color: rgba(214, 231, 243, .85);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.lightbox__close {
  position: absolute; top: -14px; right: -10px; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: #fff; color: var(--navy-800);
  border: 0; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  transition: transform var(--t-fast) var(--ease);
}
.lightbox__close:hover { transform: scale(1.08); }
.lightbox__close svg { width: 22px; height: 22px; }

.retrofit {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(1.6rem, 3vw, 2.75rem);
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, rgba(22, 166, 220, .14), rgba(11, 34, 57, .3));
  border: 1px solid rgba(53, 188, 238, .26);
}
@media (min-width: 900px) { .retrofit { grid-template-columns: 1.35fr 1fr; } }
.retrofit__title { font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 800; margin: var(--sp-4) 0 var(--sp-3); }
.retrofit__lead { color: var(--cyan-300); margin-bottom: var(--sp-3); font-size: 1.05rem; }
.retrofit__text { color: var(--ink-light-soft); font-size: .97rem; }

.flow { display: grid; gap: .6rem; justify-items: stretch; }
.flow__node {
  padding: .9rem 1.1rem; border-radius: var(--r-md); text-align: center;
  background: rgba(9, 28, 48, .5); border: 1px dashed rgba(127, 214, 245, .35);
  font-family: var(--mono); font-size: .82rem; font-weight: 600; color: var(--ink-light);
}
.flow__node--end {
  background: linear-gradient(120deg, rgba(22, 166, 220, .3), rgba(27, 78, 127, .35));
  border-style: solid; border-color: rgba(53, 188, 238, .55); color: #fff;
}
.flow__arrow { justify-self: center; width: 2px; height: 20px; background: linear-gradient(180deg, rgba(127, 214, 245, .1), rgba(127, 214, 245, .6)); position: relative; }
.flow__arrow::after {
  content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid rgba(127, 214, 245, .6);
}

/* ── Infraestructura ───────────────────────────────────────────────────── */
.infra { display: grid; gap: var(--sp-4); }
@media (min-width: 820px) { .infra { grid-template-columns: repeat(2, 1fr); } }
.infra__card {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.infra__icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--navy-800), var(--navy-600));
  color: var(--cyan-300);
}
.infra__icon svg { width: 28px; height: 28px; }
.infra__title { font-size: 1.22rem; font-weight: 700; color: var(--navy-800); }
.infra__text { color: var(--ink-soft); font-size: .98rem; }

/* ── Contacto ──────────────────────────────────────────────────────────── */
.section--contact { background: linear-gradient(180deg, #fff, var(--bg-muted)); }
.contact { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 940px) { .contact { grid-template-columns: 1fr minmax(380px, .85fr); } }

.contact__list { display: grid; gap: var(--sp-3); margin: var(--sp-6) 0; }
.contact__item { display: flex; align-items: center; gap: 1rem; }
.contact__icon {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px;
  border-radius: var(--r-md); background: #fff;
  border: 1px solid var(--border); color: var(--cyan-700); box-shadow: var(--shadow-sm);
}
.contact__icon svg { width: 23px; height: 23px; }
.contact__label {
  display: block; font-size: .76rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--steel-500);
}
.contact__value { font-size: 1.08rem; font-weight: 700; color: var(--navy-800); }
.contact__value--link {
  display: inline-flex; align-items: center; min-height: 44px;
  border-bottom: 2px solid rgba(22, 166, 220, .35);
  transition: border-color var(--t-fast) var(--ease);
}
.contact__value--link:hover { border-color: var(--cyan-500); }

.contact__form-wrap {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-md);
}
.form__title { font-size: 1.3rem; font-weight: 800; color: var(--navy-800); margin-bottom: .4rem; }
.form__hint { font-size: .9rem; color: var(--ink-soft); margin-bottom: var(--sp-5); }

.field { margin-bottom: var(--sp-4); }
.field__label { display: block; font-size: .9rem; font-weight: 700; color: var(--navy-800); margin-bottom: .4rem; }
.req { color: var(--stop); }
.field__input {
  width: 100%; min-height: 48px; padding: .7rem .95rem;
  background: var(--bg-muted); color: var(--ink);
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field__input:hover { border-color: var(--steel-400); }
.field__input:focus {
  background: #fff; border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(22, 166, 220, .16); outline: none;
}
.field__input--area { min-height: 118px; resize: vertical; line-height: 1.6; }
select.field__input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5A6E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px;
  padding-right: 2.6rem;
}
.field__help { font-size: .82rem; color: var(--steel-500); margin-top: .35rem; }
.field__error { font-size: .85rem; font-weight: 600; color: var(--stop); margin-top: .35rem; }
.field__input[aria-invalid="true"] { border-color: var(--stop); background: #FEF4F3; }
.form__status { margin-top: var(--sp-3); font-size: .9rem; font-weight: 600; color: var(--ok); min-height: 1.4em; }

/* ── Pie ───────────────────────────────────────────────────────────────── */
.footer { background: var(--navy-900); color: var(--ink-light); padding-top: clamp(2.5rem, 5vw, 4rem); }
.footer__inner {
  display: grid; gap: var(--sp-5); align-items: center;
  padding-bottom: var(--sp-6);
}
@media (min-width: 900px) { .footer__inner { grid-template-columns: 1.2fr auto auto; } }
.footer__brand { display: flex; align-items: center; gap: .9rem; }
.footer__mark-chip {
  display: grid; place-items: center; flex: none;
  width: 60px; height: 60px; padding: 9px;
  border-radius: var(--r-md);
  background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.footer__mark { width: 100%; height: auto; }
.footer__name { font-size: 1.05rem; font-weight: 800; letter-spacing: .16em; }
.footer__tag { font-size: .85rem; color: var(--ink-light-soft); }
.footer__nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.footer__nav a {
  min-height: 44px; display: inline-flex; align-items: center;
  font-size: .93rem; font-weight: 600; color: var(--ink-light-soft);
  transition: color var(--t-fast) var(--ease);
}
.footer__nav a:hover { color: var(--cyan-300); }
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .93rem; color: var(--ink-light-soft); }
.footer__link { font-weight: 700; color: var(--cyan-300); }
.footer__sep { color: rgba(255, 255, 255, .3); }
.footer__bottom {
  padding: var(--sp-4) 0; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .85rem; color: rgba(214, 231, 243, .6);
}

/* ── WhatsApp flotante ─────────────────────────────────────────────────── */
.wa-float {
  position: fixed; right: 1.15rem; bottom: 1.15rem; z-index: 90;
  display: grid; place-items: center; width: 58px; height: 58px;
  border-radius: 50%; background: #1FA855; color: #fff;
  box-shadow: 0 8px 24px rgba(11, 34, 57, .3);
  transition: transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}
.wa-float svg { width: 31px; height: 31px; fill: currentColor; }
.wa-float:hover { transform: scale(1.08); background: #178B45; }
@supports (padding: env(safe-area-inset-bottom)) {
  .wa-float { bottom: calc(1.15rem + env(safe-area-inset-bottom)); }
}

/* ── Inclinación al puntero (tarjetas de medios) ───────────────────────── */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  transition: transform 420ms var(--ease);
  will-change: transform;
}
.tilt.is-tilting { transition: transform 90ms linear; }

/* ── Secuencia del diagrama de retrofitting ────────────────────────────── */
.flow__node, .flow__arrow {
  opacity: .35;
  transition: opacity 420ms var(--ease), transform 420ms var(--ease), border-color 420ms var(--ease);
}
.flow.is-running .flow__node { opacity: 1; }
.flow.is-running .flow__arrow { opacity: 1; }
.flow.is-running .flow__node:nth-child(1) { transition-delay: 0ms; }
.flow.is-running .flow__arrow:nth-child(2) { transition-delay: 220ms; }
.flow.is-running .flow__node:nth-child(3) { transition-delay: 380ms; }
.flow.is-running .flow__arrow:nth-child(4) { transition-delay: 600ms; }
.flow.is-running .flow__node:nth-child(5) { transition-delay: 760ms; }
.flow.is-running .flow__node--end { box-shadow: 0 0 26px rgba(22, 166, 220, .35); }

/* ── Parallax del hero (capas decorativas únicamente) ──────────────────── */
.hero__glow, .hero__grid { will-change: transform; }

/* ── Ajustes de lectura en móvil ───────────────────────────────────────── */
@media (max-width: 600px) {
  .card__text, .feature__text, .sublist__text,
  .infra__text, .retrofit__text, .scada__text { font-size: 1rem; line-height: 1.6; }
  .field__input { font-size: 16px; }   /* evita el zoom automático de iOS al enfocar */
  .footer__inner { text-align: left; }
  .hero__badges { gap: var(--sp-3); }
}

/* ── Animaciones de entrada ────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bar__fill { animation: none; }
  .spark__line { stroke-dashoffset: 0; }
  .spark__area { opacity: 1; }
  .tilt { transform: none !important; }
  .flow__node, .flow__arrow { opacity: 1; }
  .hero__glow, .hero__grid { transform: none !important; }
  .viewer__stage.is-loading::after { animation: none; }
}

@media print {
  .site-header, .wa-float, .hero__bg, .nav-toggle { display: none !important; }
  body { color: #000; }
  .section--dark, .hero { background: #fff !important; color: #000 !important; }
}
