/* =========================================================
   VIGILANTYX — Hoja de estilos principal
   ========================================================= */

:root {
  --red: #c8102e;
  --red-bright: #e0223f;
  --red-deep: #7a0710;
  --red-btn: #b00d1c;
  --ink: #1f2532;          /* secciones oscuras */
  --ink-2: #171c28;        /* paneles */
  --ink-3: #0e1320;        /* campos del formulario */
  --text: #2d2f34;
  --text-soft: #5a5e66;
  --bg: #f8f9fb;
  --header: #e5e7eb;
  --card: #cdd0d6;
  --slate: #3d5566;
  --mint: #4ade80;
  --radius: 14px;
  --container: 1220px;
  --header-h: 76px;

  --f-display: "Avenir Next", "Avenir", "Figtree", system-ui, sans-serif;
  --f-ui: "Plus Jakarta Sans", "Figtree", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(.22,.8,.24,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-display);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- Botones ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 34px;
  font: 700 14px/1 var(--f-display);
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border: 0; border-radius: 8px; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s;
}
.btn-red {
  color: #fff;
  background: linear-gradient(180deg, #d0142b, var(--red-btn));
  box-shadow: 0 6px 18px -8px rgba(200,16,46,.7);
}
/* destello tipo "barrido de sensor" */
.btn-red::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(200,16,46,.85); }
.btn-red:hover::after { transform: translateX(120%); }
.btn-sm { --h: 36px; padding: 0 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(229,231,235,.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  transition: box-shadow .3s, background-color .3s;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header.is-scrolled { box-shadow: 0 8px 30px -18px rgba(15,20,30,.45); background: rgba(229,231,235,.98); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand img { width: 196px; height: auto; transition: width .3s var(--ease); }
.site-header.is-scrolled .brand img { width: 170px; }

.main-nav { display: flex; gap: 42px; margin-inline: auto; }
.main-nav a {
  position: relative; text-decoration: none;
  font-size: 17px; font-weight: 500; color: #3a3c42;
  padding: 6px 0;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.main-nav a:not(.btn):hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: #111; }
.nav-cta-mobile { display: none; }

/* ---------- Selector de idioma ---------- */
.lang-switch { position: relative; flex-shrink: 0; margin-right: -12px; }
.lang-switch summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px 0 9px; border-radius: 999px;
  border: 1px solid rgba(31,37,50,.16); background: rgba(255,255,255,.55);
  font-family: var(--f-ui); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: #2d3140;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: #fff; border-color: rgba(31,37,50,.28); }
.lang-switch summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.lang-switch[open] summary { background: #fff; box-shadow: 0 6px 18px -10px rgba(15,20,30,.5); }
.lang-globe { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-caret { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.lang-switch[open] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 168px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 12px; border: 1px solid #e3e5ea;
  box-shadow: 0 18px 40px -18px rgba(15,20,30,.45);
  animation: langIn .22s var(--ease);
}
@keyframes langIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lang-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; text-decoration: none;
  font-family: var(--f-ui); font-size: 14px; font-weight: 500; color: #2d3140;
}
.lang-menu a span {
  display: inline-grid; place-items: center; width: 28px; height: 20px; border-radius: 5px;
  background: #eef0f3; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: #5a5e66;
}
.lang-menu a:hover { background: #f3f4f6; }
.lang-menu a[aria-current="true"] { color: var(--red); font-weight: 600; }
.lang-menu a[aria-current="true"] span { background: var(--red); color: #fff; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; margin-left: auto; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .3s, opacity .3s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 60px) 0 110px;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.hero-inner { position: relative; }

.pill-badge {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 9px 22px 9px 18px; border-radius: 999px;
  background: #eeeff2; color: #4b4e55;
  font-size: 16px;
}
.pulse-dot { position: relative; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e0223f, #7a0710); }
.pulse-dot::before, .pulse-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--red); animation: ping 2.4s var(--ease) infinite;
}
.pulse-dot::after { animation-delay: 1.2s; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }

.hero-title {
  margin: 34px auto 26px;
  max-width: 840px;
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 700;
  letter-spacing: .012em;
  line-height: 1.07;
  color: #0c0d10;
}
.grad-text {
  background: linear-gradient(90deg, #c8102e 0%, #c8102e 45%, #5e0610 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.hero-lead {
  max-width: 660px; margin: 0 auto;
  font-size: clamp(16px, 1.5vw, 18.5px);
  color: var(--text-soft); line-height: 1.4;
}

.pillars {
  position: relative;
  margin: 96px auto 0; max-width: 904px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #1a2132; color: #fff;
  border-radius: 12px; padding: 30px 20px;
  overflow: hidden;
}
.pillar { display: grid; place-items: center; padding: 6px 26px; position: relative; }
.pillar + .pillar::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: rgba(255,255,255,.85);
}
.pillar span { font-weight: 600; font-size: 14.5px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.45; max-width: 22ch; }
/* señal roja que recorre la barra */
.pillar-signal {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 28%;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  animation: signal 5.5s ease-in-out infinite;
}
@keyframes signal { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(360%); } }

/* =========================================================
   PROTECCIÓN CONTINUA (robot)
   ========================================================= */
.protect { position: relative; background: var(--bg); overflow-x: clip; }
.protect-band { position: relative; height: clamp(420px, 42vw, 560px); overflow: visible; }
.protect-bg-clip { position: absolute; inset: 0; overflow: hidden; }
.protect-bg {
  position: absolute; inset: -10% 0;
  background-size: cover; background-position: center;
  will-change: transform;
}

.protect-top { position: relative; z-index: 4; pointer-events: none; height: 100%; display: flex; align-items: center; }
.protect-copy { padding-top: 10px; }
.protect-title {
  font-size: clamp(34px, 4.6vw, 58px); font-weight: 700; color: #2b2d31;
  line-height: 1.02; max-width: 430px;
}
.stat { margin-top: 44px; padding-left: 8px; }
.stat-num { display: block; font-size: clamp(38px, 4.2vw, 50px); font-weight: 700; color: var(--red); line-height: 1; letter-spacing: -.01em; }
.stat-label { display: block; margin-top: 4px; font-size: 17px; color: #4f535a; }

.robot {
  position: absolute; z-index: 3; left: 33%; top: 5%;
  width: clamp(300px, 36vw, 510px);
  pointer-events: none;
}
.robot-tilt { position: relative; transform-style: preserve-3d; will-change: transform; }
.robot-tilt img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(20,40,60,.25)); }
.robot-eye {
  position: absolute; left: 62.8%; top: 50%;
  width: 18%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(calc(-50% + var(--ex, 0px)), calc(-50% + var(--ey, 0px)));
  background: radial-gradient(circle, rgba(120,220,255,.85) 0%, rgba(40,160,255,.45) 35%, rgba(40,160,255,0) 70%);
  mix-blend-mode: screen;
  animation: eyePulse 3.2s ease-in-out infinite;
  /* --glow (0–1) lo controla main.js según la velocidad del giro */
  filter: brightness(calc(1 + var(--glow, 0) * 1.1)) saturate(calc(1 + var(--glow, 0) * .6));
}
.robot-eye::before, .robot-eye::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
/* halo amplio que aparece al moverse */
.robot-eye::before {
  inset: -95%;
  background: radial-gradient(circle, rgba(150,230,255,.75) 0%, rgba(60,170,255,.35) 28%, rgba(40,160,255,0) 62%);
  opacity: var(--glow, 0);
  transform: scale(calc(.7 + var(--glow, 0) * .45));
}
/* destello blanco en el centro del lente */
.robot-eye::after {
  inset: 32%;
  background: radial-gradient(circle, #fff 0%, rgba(220,248,255,.9) 35%, rgba(160,230,255,0) 75%);
  opacity: calc(.25 + var(--glow, 0) * .75);
}
@keyframes eyePulse {
  0%, 100% { opacity: calc(.55 + var(--glow, 0) * .45); transform: translate(calc(-50% + var(--ex, 0px)), calc(-50% + var(--ey, 0px))) scale(calc(.9 + var(--glow, 0) * .35)); }
  50%      { opacity: 1; transform: translate(calc(-50% + var(--ex, 0px)), calc(-50% + var(--ey, 0px))) scale(calc(1.15 + var(--glow, 0) * .3)); }
}
.robot.is-alert .robot-eye::before { background: radial-gradient(circle, rgba(255,140,150,.75) 0%, rgba(224,34,63,.35) 28%, rgba(224,34,63,0) 62%); }
.robot.is-alert .robot-eye::after { background: radial-gradient(circle, #fff 0%, rgba(255,210,215,.9) 35%, rgba(255,120,130,0) 75%); }
.robot.is-alert .robot-eye { background: radial-gradient(circle, rgba(255,120,130,.9) 0%, rgba(224,34,63,.5) 35%, rgba(224,34,63,0) 70%); }

.protect-bottom {
  position: relative; z-index: 4;
  display: grid; grid-template-columns: 1fr 420px; gap: 48px;
  padding-bottom: 60px;
}
.protect-bottom-copy { padding-top: 90px; display: flex; flex-direction: column; }
.protect-lead { font-size: clamp(20px, 2.1vw, 27px); line-height: 1.28; color: #16181c; max-width: 600px; font-weight: 500; }
.protect-bottom-copy .btn { align-self: flex-end; margin-top: 56px; margin-right: 14%; }

/* ---------- Panel en vivo ---------- */
.live-panel {
  margin-top: -58px;
  background: #d8dce2; padding: 14px; border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgba(10,15,30,.6);
}
.live-card { background: #10141f; border-radius: 6px; padding: 16px 14px 14px; font-family: var(--f-mono); color: #d6dae3; }
.live-head { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; padding: 0 6px 12px; border-bottom: 1px solid rgba(255,255,255,.08); color: #cfd4de; }
.live-feed { color: #6e7584; display: inline-flex; align-items: center; gap: 6px; }
.live-feed b { font-weight: 400; }
.rec { width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright); animation: blink 1.2s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.live-view {
  position: relative; margin: 16px 0 12px; height: 190px;
  border: 1px solid rgba(255,255,255,.07); border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0/ 100% 22px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0/ 22px 100%,
    linear-gradient(180deg, #151b28, #10141f);
  overflow: hidden;
}
.ai-chip {
  position: absolute; left: 12px; top: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10.5px; color: #a8e6bd; padding: 4px 9px; border-radius: 4px;
  border: 1px solid rgba(74,222,128,.25); background: rgba(74,222,128,.06);
}
.ai-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.live-clock { position: absolute; right: 12px; top: 14px; font-size: 10px; color: #596071; }
.det-box {
  position: absolute; left: 22%; top: 30%; width: 90px; height: 90px;
  border: 1.5px solid #e0223f; border-radius: 3px;
  background: rgba(224,34,63,.08);
  box-shadow: 0 0 0 1px rgba(224,34,63,.15), inset 0 0 24px rgba(224,34,63,.12);
  transition: left 1.1s var(--ease), top 1.1s var(--ease), width 1.1s var(--ease), height 1.1s var(--ease);
}
.det-box em {
  position: absolute; left: 5px; top: 5px; font-style: normal;
  font-size: 8.5px; background: #e0223f; color: #fff; padding: 1px 5px; border-radius: 2px; white-space: nowrap;
}
.det-box.is-locking { animation: lock .45s ease-out; }
@keyframes lock { 0% { transform: scale(1.3); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }
.cam-icon { position: absolute; right: 30%; top: 44%; width: 42px; fill: #2c3342; }
.scanline {
  position: absolute; left: 0; right: 0; height: 40px; top: -40px;
  background: linear-gradient(180deg, transparent, rgba(120,190,255,.07) 70%, rgba(150,210,255,.25));
  animation: scan 3.6s linear infinite;
}
@keyframes scan { to { transform: translateY(270px); } }
.live-caption { position: absolute; left: 12px; bottom: 10px; font-size: 10px; color: #aab0bc; letter-spacing: .02em; }

.live-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.live-log li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; padding: 9px 10px; border-radius: 5px;
  animation: logIn .5s var(--ease);
}
.live-log li span { display: inline-flex; align-items: center; gap: 8px; }
.live-log svg { width: 13px; height: 13px; flex: none; }
.live-log time { font-size: 9.5px; color: #6f7686; }
.log-alert { background: rgba(224,34,63,.12); border: 1px solid rgba(224,34,63,.28); color: #f3a3ae; }
.log-alert svg { fill: #e0223f; }
.log-ok { background: #161c29; border: 1px solid rgba(255,255,255,.06); color: #c9ced8; }
.log-ok svg { stroke: var(--mint); }
@keyframes logIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* =========================================================
   APLICACIONES
   ========================================================= */
.apps {
  position: relative; background: #232937; color: #fff; overflow-x: clip;
  padding: 72px 0 110px;
}
.apps::before, .caps::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background: linear-gradient(90deg, #5a060e, #a00c1c 45%, #d8132f);
}
.apps::before { top: 0; }
.section-title { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; text-align: center; }
.section-title.light { color: #fff; }
.apps-sub { text-align: center; font-style: italic; font-size: clamp(15px, 1.4vw, 17px); letter-spacing: .06em; color: #d9dce2; margin-top: 18px; }
.apps-sub span { color: var(--red-bright); }

.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 64px; margin-top: 62px; }
.app-card {
  position: relative;
  background: #cfd2d8; color: #25272c;
  border: 3px solid #9ea3ab; border-radius: 8px;
  padding: 24px 28px 26px;
  outline: none;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.app-card:hover, .app-card:focus-visible { transform: translateY(-6px); box-shadow: 0 30px 50px -28px rgba(0,0,0,.8); }
.app-card h3 { font-size: 16.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .01em; margin: 6px 0 14px; }
.app-card p { font-size: 15.5px; line-height: 1.35; color: #2c2e33; }
.app-card:first-child p { text-align: justify; hyphens: auto; }

/* Marco de enfoque tipo cámara (hover) */
.focus-frame { position: absolute; inset: -14px; pointer-events: none; }
.focus-frame i {
  position: absolute; width: 22px; height: 22px; border: 2px solid var(--red-bright);
  opacity: 0; transition: all .45s var(--ease);
}
.focus-frame i:nth-child(1) { left: -10px; top: -10px; border-right: 0; border-bottom: 0; }
.focus-frame i:nth-child(2) { right: -10px; top: -10px; border-left: 0; border-bottom: 0; }
.focus-frame i:nth-child(3) { left: -10px; bottom: -10px; border-right: 0; border-top: 0; }
.focus-frame i:nth-child(4) { right: -10px; bottom: -10px; border-left: 0; border-top: 0; }
.app-card:hover .focus-frame i, .app-card:focus-visible .focus-frame i { opacity: 1; }
.app-card:hover .focus-frame i:nth-child(1), .app-card:focus-visible .focus-frame i:nth-child(1) { left: 0; top: 0; }
.app-card:hover .focus-frame i:nth-child(2), .app-card:focus-visible .focus-frame i:nth-child(2) { right: 0; top: 0; }
.app-card:hover .focus-frame i:nth-child(3), .app-card:focus-visible .focus-frame i:nth-child(3) { left: 0; bottom: 0; }
.app-card:hover .focus-frame i:nth-child(4), .app-card:focus-visible .focus-frame i:nth-child(4) { right: 0; bottom: 0; }

.app-icon { width: 32px; height: auto; }
.heart .heart-shape { fill: #d0112b; }
.heart .ecg { stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 70; stroke-dashoffset: 0; }
.heart .ecg-dot { fill: #fff; }
.app-card:hover .heart, .app-card:focus-visible .heart { animation: beat 1s ease-in-out infinite; }
.app-card:hover .ecg, .app-card:focus-visible .ecg { animation: ecgDraw 1s linear infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 30% { transform: scale(.98); } 45% { transform: scale(1.08); } }
@keyframes ecgDraw { from { stroke-dashoffset: 70; } to { stroke-dashoffset: 0; } }

.cars { width: 38px; }
.cars .car path { fill: #3d5566; }
.cars .hl { fill: #cfd2d8; transition: fill .3s; }
.app-card:hover .cars .hl, .app-card:focus-visible .cars .hl { fill: #ffd166; }
.app-card:hover .car-a, .app-card:focus-visible .car-a { animation: drive 1.2s ease-in-out infinite; }
.app-card:hover .car-b, .app-card:focus-visible .car-b { animation: drive 1.2s ease-in-out .3s infinite; }
@keyframes drive { 50% { transform: translateX(3px); } }

.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 6px; }
.checks li { position: relative; padding-left: 30px; font-size: 15.5px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.checks.red { --c: #d0112b; }
.checks.slate { --c: #3d5566; }

/* =========================================================
   CAPACIDADES INTEGRADAS
   ========================================================= */
.caps {
  position: relative; min-height: clamp(460px, 50vw, 720px);
  display: flex; align-items: center;
  background: #eef3f6; overflow: hidden;
}
.caps::after { bottom: 0; height: 8px; }
.caps-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: left center;
}
.caps-media::after { /* velo para legibilidad del título */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 50%, rgba(240,245,248,.55) 78%, rgba(240,245,248,.7));
}
/* barrido HUD sobre la imagen */
.caps-scan {
  position: absolute; top: 0; bottom: 0; left: 0; width: 140px;
  background: linear-gradient(90deg, transparent, rgba(80,210,230,.14) 80%, rgba(120,235,255,.55) 98%, transparent);
  mix-blend-mode: screen; pointer-events: none;
  animation: hudSweep 7s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes hudSweep { 0% { transform: translateX(-160px); } 55%, 100% { transform: translateX(62vw); } }

.caps-inner { position: relative; z-index: 2; display: flex; justify-content: flex-end; }
.caps-copy { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.caps-title { font-size: clamp(34px, 4.2vw, 56px); font-weight: 700; color: #2a2c30; line-height: 1.04; }
.caps-logo { width: 190px; margin-top: 26px; }
.caps-copy .btn { margin-top: 30px; min-width: 150px; }

/* =========================================================
   CARACTERÍSTICAS (4 columnas)
   ========================================================= */
.features { background: #232937; color: #fff; padding: 120px 0 128px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.feature { position: relative; padding: 0 30px 40px; }
.feature:first-child { padding-left: 0; }
.feature + .feature::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: rgba(255,255,255,.85);
}
/* la línea se ilumina en rojo cuando la sección entra en pantalla */
.feature + .feature::after {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 0;
  background: linear-gradient(180deg, var(--red-bright), transparent);
  transition: height 1.2s var(--ease);
}
.features.is-lit .feature + .feature::after { height: 100%; }
.features.is-lit .feature:nth-child(3)::after { transition-delay: .2s; }
.features.is-lit .feature:nth-child(4)::after { transition-delay: .4s; }
.feature h3 { font-size: 18px; font-weight: 600; letter-spacing: .02em; line-height: 1.15; }
.feature p { margin-top: 22px; font-size: 14px; color: #b7bcc6; line-height: 1.45; max-width: 26ch; }

/* =========================================================
   VISIÓN + FORMULARIO
   ========================================================= */
.vision { padding: 36px 0 70px; background: var(--bg); }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.kicker { font-size: 15px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .02em; margin: 6px 0 14px 6px; }
.vision-title { font-size: clamp(34px, 4.1vw, 54px); font-weight: 700; color: #2a2c30; line-height: 1.04; max-width: 540px; }
.vision-text { margin-top: 28px; font-size: 18px; color: #50545b; line-height: 1.5; max-width: 42ch; }

.privacy-pill {
  display: inline-flex; align-items: center; gap: 22px;
  margin-top: 30px; padding: 12px 44px 12px 14px;
  background: #1e2433; color: #fff; border-radius: 999px;
  font-family: var(--f-ui);
}
.privacy-pill .lock { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #262d3d; }
.privacy-pill svg { width: 18px; fill: #e0223f; stroke: #e0223f; }
.privacy-pill strong { display: block; font-size: 14px; font-weight: 600; }
.privacy-pill small { display: block; font-size: 12px; color: #9aa1ae; }

.form-card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 110%, rgba(170,16,40,.38), transparent 55%),
    linear-gradient(160deg, #1b2132, #111626);
  color: #fff; border-radius: 16px; padding: 26px 22px 20px;
  font-family: var(--f-ui);
  box-shadow: 0 30px 60px -32px rgba(10,15,30,.7);
}
.form-card h3 { font-family: var(--f-ui); font-size: 20px; font-weight: 600; }
.form-sub { font-size: 12px; color: #9aa1ae; margin-top: 8px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; color: #d9dde5; margin-bottom: 7px; }
.field input, .field select {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--ink-3); color: #fff;
  border: 1px solid rgba(255,255,255,.06); border-radius: 8px;
  font: 500 14px var(--f-ui);
  transition: border-color .25s, box-shadow .25s;
}
.field input::placeholder { color: #6d7485; }
.field input:focus, .field select:focus { outline: none; border-color: rgba(224,34,63,.7); box-shadow: 0 0 0 3px rgba(224,34,63,.18); }
.field.has-error input { border-color: #ff5a6e; }
.field-error { display: block; min-height: 0; font-size: 12px; color: #ff8b99; margin-top: 5px; }
.field-error:empty { display: none; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid #cfd3db; border-bottom: 1.5px solid #cfd3db;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.field select option { background: #111626; }

.btn-submit {
  width: 100%; margin-top: 20px; height: 44px;
  background: #d23a4f; color: #fff;
  font-family: var(--f-ui); font-size: 13.5px; font-weight: 600; letter-spacing: .03em;
}
.btn-submit:hover { background: #dc2d45; transform: translateY(-1px); }
.btn-submit[disabled] { opacity: .75; cursor: progress; transform: none; }
.btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn-submit.is-loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { font-size: 13px; margin-top: 12px; min-height: 1em; }
.form-status.ok { color: #86efac; }
.form-status.err { color: #ff8b99; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* estado de éxito */
.form-card.is-sent form { display: none; }
.sent-box { text-align: center; padding: 34px 10px 24px; animation: logIn .5s var(--ease); }
.sent-box svg { width: 56px; height: 56px; margin: 0 auto 16px; }
.sent-box circle { fill: none; stroke: rgba(74,222,128,.25); stroke-width: 3; }
.sent-box path { fill: none; stroke: var(--mint); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent-box h4 { font-size: 18px; margin: 0 0 6px; }
.sent-box p { font-size: 13.5px; color: #aab0bc; }

/* Fila de fortalezas */
.highlights {
  list-style: none; margin: 60px auto 0; padding: 0;
  width: min(100% - 48px, 1180px);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; text-align: center;
}
.highlights li { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.highlights img { width: 62px; height: 62px; transition: transform .5s var(--ease); }
.highlights li:hover img { transform: translateY(-4px) rotate(-6deg); }
.highlights span { font-size: 19px; line-height: 1.12; color: #16181c; max-width: 12ch; letter-spacing: -.01em; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: #fff; padding: 40px 0 44px; padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand img { width: 74px; }
.footer-brand span { border-left: 1px solid #d7dae0; padding-left: 16px; font-family: var(--f-ui); font-size: 12.5px; color: #6c7382; line-height: 1.4; }
.footer-tags { text-align: center; font-family: var(--f-ui); font-size: 12.5px; font-weight: 700; color: #c8203a; text-transform: uppercase; letter-spacing: .02em; line-height: 1.5; max-width: 440px; margin-inline: auto; }
.footer-tags i { font-style: normal; margin: 0 4px; }
.footer-copy { font-family: var(--f-mono); font-size: 12.5px; color: #6c7382; max-width: 26ch; }

/* =========================================================
   MODAL (apertura tipo obturador de cámara)
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(30,36,50,.62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .45s var(--ease);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-dialog {
  --ox: 50%; --oy: 50%;
  position: relative;
  width: min(100%, 632px);
  min-height: 364px; max-height: calc(100dvh - 40px);
  border-radius: 8px; border: 6px solid #b9bdc4;
  background: #eef2f5; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.6);
  clip-path: circle(0% at var(--ox) var(--oy));
  transition: clip-path .75s cubic-bezier(.7,0,.2,1);
}
.modal.is-open .modal-dialog { clip-path: circle(2200px at var(--ox) var(--oy)); }
.modal-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: right center;
  transform: scale(1.08); transition: transform 1.4s var(--ease);
}
.modal.is-open .modal-media { transform: scale(1); }
.modal-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(240,245,249,.93) 0%, rgba(240,245,249,.85) 45%, rgba(240,245,249,0) 66%);
}
.modal-body {
  position: relative; z-index: 1;
  width: 64%; max-height: calc(100dvh - 52px);
  padding: 40px 0 26px 50px;
  color: #111; overflow-y: auto;
}
.modal-body > * { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease); }
.modal.is-open .modal-body > * { opacity: 1; transform: none; }
.modal.is-open .modal-body > *:nth-child(2) { transition-delay: .35s; }
.modal.is-open .modal-body > *:nth-child(3) { transition-delay: .42s; }
.modal.is-open .modal-body > *:nth-child(4) { transition-delay: .5s; }
.modal.is-open .modal-body > *:nth-child(5) { transition-delay: .56s; }
.modal.is-open .modal-body > *:nth-child(6) { transition-delay: .62s; }
.modal.is-open .modal-body > *:first-child { transition-delay: .28s; }

.modal-body h2 { font-size: 16.5px; font-weight: 600; color: #e0284a; text-transform: uppercase; letter-spacing: .03em; }
.modal-body p { font-size: 13.5px; line-height: 1.32; }
.modal-lead { margin-top: 6px; }
.modal-body h3 { font-size: 13.5px; font-weight: 700; margin: 16px 0 4px; }
.modal-body ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.45; }
.modal-body .btn { margin-top: 16px; }

.modal-close {
  position: absolute; z-index: 3; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: #2b313e; color: #fff;
  transition: transform .3s var(--ease), background-color .3s;
}
.modal-close svg { width: 14px; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.modal-close:hover { transform: rotate(90deg); background: var(--red); }
body.modal-lock { overflow: hidden; }

/* =========================================================
   REVEAL (entrada al hacer scroll)
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .main-nav { gap: 26px; }
  .main-nav a { font-size: 15.5px; }
  .protect-bottom { grid-template-columns: 1fr 380px; }
  .robot { left: 36%; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .brand img, .site-header.is-scrolled .brand img { width: 160px; }
  .header-cta { display: none; }
  .header-inner { gap: 12px; }
  .lang-switch { margin: 0 0 0 auto; }
  .nav-toggle { display: block; margin-left: 0; }
  .main-nav {
    position: fixed; left: 0; right: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    flex-direction: column; gap: 0; margin: 0;
    background: #eceef1; padding: 8px 24px 24px;
    box-shadow: 0 20px 30px -20px rgba(0,0,0,.35);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: all .3s var(--ease);
  }
  .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid #d9dce1; font-size: 17px; }
  .main-nav a:not(.btn)::after { display: none; }
  .nav-cta-mobile { display: inline-flex; margin-top: 18px; align-self: flex-start; }

  .hero { padding-bottom: 80px; }
  .pillars { grid-template-columns: 1fr; padding: 10px 20px; margin-top: 64px; }
  .pillar { padding: 16px 10px; }
  .pillar + .pillar::before { left: 15%; right: 15%; top: 0; bottom: auto; width: auto; height: 1px; }

  .protect-band { height: auto; }
  .protect-top { align-items: flex-start; padding-top: 40px; }
  .robot { display: none; }
  .protect-band { min-height: 600px; background: #e9eff2; }
  .protect-bg { inset: 42% 0 0 0; background-position: 58% center; background-size: cover; }
  .protect-bg-clip::after { content: ""; position: absolute; left: 0; right: 0; top: 42%; height: 60px; background: linear-gradient(180deg, #e9eff2, rgba(233,239,242,0)); }
  .protect-bottom { grid-template-columns: 1fr; gap: 36px; }
  .protect-bottom-copy { padding-top: 40px; }
  .protect-bottom-copy .btn { align-self: flex-start; margin: 30px 0 0; }
  .live-panel { margin-top: 0; }

  .apps-grid { grid-template-columns: 1fr; gap: 36px; }

  .caps { align-items: flex-end; min-height: 0; flex-direction: column; }
  .caps-media { position: relative; inset: auto; width: 100%; aspect-ratio: 1188/640; }
  .caps-media::after { display: none; }
  .caps-scan { bottom: auto; height: 0; display: none; }
  .caps-inner { padding: 36px 0 52px; justify-content: flex-start; }
  .caps-copy { text-align: left; align-items: flex-start; }

  .features { padding: 70px 0; }
  .features-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .feature:nth-child(3) { padding-left: 0; }
  .feature:nth-child(3)::before, .feature:nth-child(3)::after { display: none; }

  .vision-grid { grid-template-columns: 1fr; gap: 44px; }
  .highlights { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }

  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 22px; }
  .footer-copy { max-width: none; }

  .modal-dialog { min-height: 0; overflow-y: auto; }
  .modal-media { position: relative; height: 200px; background-position: right 20%; }
  .modal-media::after { background: linear-gradient(0deg, #eef2f5 0%, rgba(238,242,245,0) 50%); }
  .modal-body { width: 100%; max-height: none; padding: 0 24px 26px; margin-top: -30px; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 36px, var(--container)); }
  .pill-badge { font-size: 13px; padding: 8px 16px 8px 14px; }
  .hero { padding-top: calc(var(--header-h) + 36px); }
  .features-grid { grid-template-columns: 1fr; }
  .feature { padding: 0 0 0 22px; }
  .feature:first-child, .feature:nth-child(3) { padding-left: 22px; }
  .feature::before, .feature:nth-child(3)::before { display: block !important; content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.85); }
  .feature::after { display: none !important; }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .highlights span { font-size: 17px; }
  .privacy-pill { padding-right: 22px; }
  .live-head { font-size: 9px; }
  .app-card { padding: 22px 20px; }
  .app-card:first-child p { text-align: left; }
}

/* =========================================================
   BANNER DE COOKIES
   ========================================================= */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  width: min(440px, calc(100vw - 40px));
  margin-bottom: env(safe-area-inset-bottom, 0px);
  opacity: 0; transform: translateY(24px);
  transition: opacity .35s var(--ease), transform .45s var(--ease), width .35s var(--ease);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-in { opacity: 1; transform: none; }
.cookie-banner.is-expanded { width: min(520px, calc(100vw - 40px)); }
.cookie-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #e6e9ef; border-radius: 16px; padding: 22px 22px 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px -24px rgba(8,12,22,.7), 0 0 0 1px rgba(0,0,0,.15);
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.cookie-card::before { /* línea roja superior, como los paneles del sitio */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright) 60%, transparent);
}
.cookie-main { display: flex; gap: 14px; align-items: flex-start; }
.cookie-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(224,34,63,.14); color: var(--red-bright);
}
.cookie-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cookie-icon circle { fill: currentColor; stroke: none; }
.cookie-title { font-size: 17px; font-weight: 700; color: #fff; margin: 2px 0 6px; line-height: 1.2; }
.cookie-text { font-family: var(--f-ui); font-size: 13px; line-height: 1.55; color: #b7bdc9; margin: 0; }

.cookie-prefs { margin-top: 16px; display: grid; gap: 8px; }
.cookie-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06); cursor: pointer;
}
div.cookie-opt { cursor: default; }
.cookie-opt-txt { display: flex; flex-direction: column; gap: 3px; }
.cookie-opt strong { font-family: var(--f-ui); font-size: 13.5px; color: #fff; }
.cookie-opt small { font-family: var(--f-ui); font-size: 12px; line-height: 1.45; color: #9aa1af; }
.cookie-always { flex-shrink: 0; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--mint); }

/* interruptor */
.cookie-switch {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; margin: 0; cursor: pointer;
  position: relative; width: 42px; height: 24px; border-radius: 999px;
  background: #3a4252; transition: background-color .25s;
}
.cookie-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .25s var(--ease);
}
.cookie-switch:checked { background: var(--red); }
.cookie-switch:checked::after { transform: translateX(18px); }
.cookie-switch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.cookie-btn {
  height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font-family: var(--f-ui); font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.cookie-btn[hidden] { display: none; }
.cookie-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cookie-btn-link { margin-right: auto; padding: 0 4px; border: 0; background: none; color: #b7bdc9; text-decoration: underline; text-underline-offset: 3px; }
.cookie-btn-link:hover { color: #fff; }
.cookie-btn-ghost { border: 1px solid rgba(255,255,255,.28); background: transparent; color: #fff; }
.cookie-btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.cookie-btn-solid { border: 0; background: var(--red); color: #fff; }
.cookie-btn-solid:hover { background: var(--red-bright); transform: translateY(-1px); }

.footer-link {
  margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.footer-link:hover { color: var(--red); }

@media (max-width: 560px) {
  .cookie-banner, .cookie-banner.is-expanded { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .cookie-card { padding: 18px 16px 14px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-btn-link { grid-column: 1 / -1; justify-self: start; margin: 0; }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .caps-scan, .pillar-signal, .scanline { display: none; }
}
