/* =====================================================================
   Innobyte - sitio corporativo v2 (oscuro)
   Paleta: azul profundo, cian de señal, aguamarina de dato.
   ===================================================================== */

:root {
  --bg: #03111b;
  --bg-2: #051a28;
  --bg-3: #072233;
  --surface: rgb(255 255 255 / 0.035);
  --surface-2: rgb(255 255 255 / 0.06);
  --border: rgb(148 214 255 / 0.12);
  --border-2: rgb(148 214 255 / 0.22);
  --text: #e9f4f9;
  --muted: #9bb0bb;
  --dim: #6b8390;
  --cyan: #38c6ff;
  --aqua: #2ee6c9;
  --blue: #3d7bff;
  --violet: #8b7bff;
  --amber: #f2b544;
  --grad: linear-gradient(100deg, var(--cyan), var(--aqua));

  --font: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(2rem, 1.2rem + 2.8vw, 3.25rem);
  --step-4: clamp(2.75rem, 1rem + 6.6vw, 6.25rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --section: clamp(88px, 11vw, 160px);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
#productos, #ia, #arquitectura { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 500; color: var(--text); }
a { color: inherit; }
::selection { background: rgb(56 198 255 / 0.35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.ic { width: 1.25em; height: 1.25em; flex: none; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--cyan); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: 999px;
  font: 500 var(--step-0)/1.1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s;
  will-change: transform;
}
.btn .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .ic { transform: translate(2px, -2px); }
.btn--primary {
  color: #02121c; border: 0;
  background: var(--grad);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15) inset, 0 10px 40px -10px rgb(56 198 255 / 0.7);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.3) inset, 0 14px 50px -8px rgb(46 230 201 / 0.8); }
.btn--ghost {
  color: var(--text); background: rgb(255 255 255 / 0.04);
  border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(148 214 255 / 0.4); }
.btn--sm { min-height: 42px; padding: 8px 18px; font-size: 0.9375rem; }

/* ---------- Cabecera ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 40;
  transition: background-color .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(3 17 27 / 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.brand { display: inline-flex; }
.brand img { width: 160px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 400;
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: rgb(255 255 255 / 0.06); }
.nav a { white-space: nowrap; }
@media (max-width: 1180px) {
  .site-header__inner { gap: 16px; }
  .nav a { padding: 8px 10px; font-size: 0.875rem; }
  .brand img { width: 140px; }
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate;
  min-height: max(760px, 100svh);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 40px; overflow: hidden;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__glow {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 18%, rgb(56 198 255 / 0.22), transparent 70%),
    radial-gradient(45% 40% at 12% 30%, rgb(61 123 255 / 0.16), transparent 70%),
    radial-gradient(50% 45% at 50% 105%, rgb(46 230 201 / 0.14), transparent 70%),
    var(--bg);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgb(148 214 255 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(148 214 255 / 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 220px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(3 17 27 / 0.82) 0%, rgb(3 17 27 / 0.55) 38%, transparent 68%);
}
.hero__content, .stack { position: relative; z-index: 1; }
.hero__content { display: grid; gap: 28px; justify-items: start; padding-bottom: clamp(48px, 7vh, 88px); }
@media (max-width: 680px) { .hero::before { background: linear-gradient(180deg, rgb(3 17 27 / 0.7), rgb(3 17 27 / 0.35)); } }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 12px; border-radius: 999px;
  background: rgb(255 255 255 / 0.05); border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: var(--step--1); color: var(--text);
}
.pill__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); }
.pill__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--aqua); animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.hero__title {
  max-width: 13ch;
  font-size: var(--step-4); font-weight: 500; letter-spacing: -0.04em; line-height: 0.98;
  color: #fff;
  padding-bottom: 0.06em;
}
.hero__title .word { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.02em 0.1em; margin-bottom: -0.1em; }
.hero__title .word__inner {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 35%, #9fd8f2 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__lead { max-width: 40rem; font-size: var(--step-1); line-height: 1.55; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.stack { position: relative; display: grid; gap: 16px; }
.stack__label { text-align: center; font-size: var(--step--1); color: var(--dim); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9375rem; white-space: nowrap; transition: color .2s; }
.marquee__track li:hover { color: var(--text); }
.marquee__track svg { width: 22px; height: 22px; opacity: 0.85; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */

.section { position: relative; padding: var(--section) 0; }
.section--deep {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%);
}
.section-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px 24px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head h2 { grid-column: 1 / span 7; font-size: var(--step-3); letter-spacing: -0.03em; }
.section-head p { grid-column: 8 / span 5; align-self: end; color: var(--muted); }

/* Ícono en caja */
.tile__icon {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  color: var(--cyan);
  background: linear-gradient(180deg, rgb(56 198 255 / 0.16), rgb(56 198 255 / 0.04));
  border: 1px solid rgb(56 198 255 / 0.25);
  box-shadow: 0 0 24px -6px rgb(56 198 255 / 0.5);
}
.tile__icon .ic { width: 22px; height: 22px; }

/* ---------- Bento ---------- */

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }

.tile {
  position: relative; isolation: isolate; overflow: hidden;
  grid-column: span 2;
  display: flex; flex-direction: column; gap: 24px;
  padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.015));
  border: 1px solid var(--border);
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(56 198 255 / 0.12), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.tile:hover::before { opacity: 1; }
.tile--wide { grid-column: span 4; grid-row: span 2; }
.tile--half { grid-column: span 3; }
.tile--full { grid-column: span 6; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tile__head { display: flex; gap: 16px; align-items: flex-start; }
.tile__head h3 { font-size: var(--step-1); margin-bottom: 6px; letter-spacing: -0.01em; }
.tile__head p { color: var(--muted); font-size: 0.9688rem; }
.tile--full .tile__head { max-width: 30rem; }

/* Instrumento señal -> datos */
.instrument {
  margin: 0; flex: 1;
  display: grid; grid-template-columns: minmax(0, 0.9fr) 56px minmax(0, 1.3fr);
  border-radius: 16px; overflow: hidden;
  background: rgb(2 10 16 / 0.6); border: 1px solid var(--border);
}
.instrument__signal, .instrument__data { padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; }
.instrument__label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--dim); margin-bottom: 12px; }
.instrument__label .ic { width: 16px; height: 16px; color: var(--cyan); }
#signal { display: block; width: 100%; height: 230px; flex: none;
  -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
.instrument__gate { position: relative; display: grid; place-items: center; }
.instrument__gate::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 50%; width: 2px; transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, rgb(56 198 255 / 0.6) 0 6px, transparent 6px 12px); background-size: 2px 24px; animation: gate 1s linear infinite; }
@keyframes gate { to { background-position: 0 24px; } }
.instrument__gate span { position: relative; padding: 8px 6px; border-radius: 8px; background: #06283a; border: 1px solid var(--border-2); font-size: 0.75rem; color: var(--cyan); font-weight: 500; }

.readings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.readings th { text-align: left; font-weight: 400; color: var(--dim); padding: 0 10px 8px 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.readings td { padding: 9px 10px 9px 0; border-bottom: 1px solid rgb(148 214 255 / 0.07); white-space: nowrap; color: var(--text); font-weight: 400; }
.readings tbody tr:last-child td { border-bottom: 0; }
.readings tr.is-new td { animation: arrive 1.6s var(--ease); }
@keyframes arrive { from { background: rgb(56 198 255 / 0.22); } to { background: transparent; } }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--aqua); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status--flag { color: var(--amber); }

/* DAG de ETL con escaneo */
.dag { position: relative; flex: 1; min-height: 170px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(80% 80% at 50% 50%, rgb(56 198 255 / 0.06), transparent 70%); }
.dag__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.dag__lines path { fill: none; stroke: rgb(148 214 255 / 0.25); stroke-width: 1.5; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
.dag__node {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: #06283a; border: 1px solid var(--border-2); color: var(--muted);
  animation: nodeHit 4s var(--ease) infinite;
}
.dag__node .ic { width: 20px; height: 20px; }
.dag__node:nth-of-type(1), .dag__node:nth-of-type(2) { animation-delay: 0.45s; }
.dag__node--core { width: 52px; height: 52px; color: var(--cyan); animation-delay: 1.9s !important; }
.dag__node:nth-of-type(4), .dag__node:nth-of-type(5) { animation-delay: 3.3s; }
@keyframes nodeHit {
  0%, 18%, 100% { box-shadow: none; border-color: var(--border-2); color: var(--muted); }
  6% { box-shadow: 0 0 0 4px rgb(46 230 201 / 0.15), 0 0 24px rgb(46 230 201 / 0.6); border-color: var(--aqua); color: var(--aqua); }
}
.dag__scan { position: absolute; top: 0; bottom: 0; left: 0; width: 70px;
  background: linear-gradient(90deg, transparent, rgb(46 230 201 / 0.22), transparent);
  border-right: 1px solid rgb(46 230 201 / 0.6);
  animation: scan 4s linear infinite; }
@keyframes scan { from { left: -80px; } to { left: 100%; } }

/* Reloj con pulso */
.watch { position: relative; flex: 1; min-height: 190px; display: grid; place-items: center; }
.watch__ring { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 1px solid rgb(56 198 255 / 0.5); animation: ring 3s var(--ease) infinite; }
.watch__ring + .watch__ring { animation-delay: 1.5s; }
@keyframes ring { from { transform: scale(0.7); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
.watch__body {
  position: relative; width: 132px; height: 150px; border-radius: 38px;
  background: linear-gradient(160deg, #0b2f44, #041620);
  border: 1px solid var(--border-2);
  box-shadow: 0 20px 50px -20px rgb(56 198 255 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.1);
  display: grid; place-items: center; align-content: center; gap: 6px; padding: 14px;
}
.watch__body::before, .watch__body::after { content: ""; position: absolute; left: 30px; right: 30px; height: 26px; background: #072233; border: 1px solid var(--border); z-index: -1; }
.watch__body::before { top: -24px; border-radius: 10px 10px 0 0; }
.watch__body::after { bottom: -24px; border-radius: 0 0 10px 10px; }
.watch__ecg { width: 100%; height: 40px; }
.watch__ecg path { fill: none; stroke: var(--aqua); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; animation: ecg 2.2s linear infinite; filter: drop-shadow(0 0 4px rgb(46 230 201 / 0.8)); }
@keyframes ecg { from { stroke-dashoffset: 200; } to { stroke-dashoffset: -200; } }
.watch__bpm { font-size: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.watch__bpm small { font-size: 0.75rem; color: var(--muted); margin-left: 3px; font-weight: 400; }

/* Capas de software */
.layers { position: relative; flex: 1; min-height: 210px; perspective: 900px; }
.layers__item {
  position: absolute; left: 50%; top: calc(18px + var(--i) * 42px);
  width: min(88%, 300px); transform: translateX(-50%) rotateX(52deg) rotateZ(-8deg);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(120deg, rgb(56 198 255 / 0.16), rgb(46 230 201 / 0.06));
  border: 1px solid var(--border-2); font-size: 0.875rem; color: var(--text);
  box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.8);
  transition: transform .6s var(--ease), top .6s var(--ease);
}
.layers__item .ic { width: 18px; height: 18px; color: var(--cyan); }
.layers__item:nth-child(1) { --i: 0; } .layers__item:nth-child(2) { --i: 1; }
.layers__item:nth-child(3) { --i: 2; } .layers__item:nth-child(4) { --i: 3; }
.tile:hover .layers__item { top: calc(8px + var(--i) * 50px); transform: translateX(-50%) rotateX(0deg) rotateZ(0deg); }

/* Órbita AWS */
.orbit { position: relative; flex: 1; min-height: 210px; display: grid; place-items: center; }
.orbit__core { position: relative; z-index: 2; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(160deg, #0b3a55, #062233); border: 1px solid var(--border-2); color: #ff9f1c;
  box-shadow: 0 0 40px -6px rgb(56 198 255 / 0.55); }
.orbit__core svg { width: 34px; height: 34px; }
.orbit__ring { position: absolute; border-radius: 50%; border: 1px dashed rgb(148 214 255 / 0.22); animation: spin 26s linear infinite; }
.orbit__ring--1 { width: 150px; height: 150px; }
.orbit__ring--2 { width: 220px; height: 220px; animation-duration: 40s; animation-direction: reverse; }
.orbit__sat {
  position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  display: grid; place-items: center; border-radius: 11px; background: #06283a; border: 1px solid var(--border-2); color: var(--muted);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}
.orbit__ring--1 .orbit__sat { --r: 75px; } .orbit__ring--2 .orbit__sat { --r: 110px; }
.orbit__sat svg { width: 20px; height: 20px; animation: spin 26s linear infinite reverse; }
.orbit__ring--2 .orbit__sat svg { animation-duration: 40s; animation-direction: normal; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Checks de seguridad */
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.checks li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.9063rem; color: var(--text); }
.checks .ic { width: 18px; height: 18px; color: var(--aqua); }

/* ---------- IA ---------- */

.section--ai { overflow: hidden; background: radial-gradient(60% 50% at 85% 40%, rgb(139 123 255 / 0.1), transparent 70%), radial-gradient(50% 50% at 10% 80%, rgb(56 198 255 / 0.08), transparent 70%); }
.ai__net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; pointer-events: none;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 80%); }
.ai { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.ai__list { display: grid; gap: 8px; }
.ai__item { display: flex; gap: 18px; padding: 18px; border-radius: 18px; border: 1px solid transparent; transition: background-color .3s, border-color .3s; }
.ai__item:hover { background: var(--surface); border-color: var(--border); }
.ai__item h3 { font-size: var(--step-1); margin-bottom: 6px; }
.ai__item p { color: var(--muted); font-size: 0.9688rem; }
.ai__item .tile__icon { color: #b4a9ff; border-color: rgb(139 123 255 / 0.35); background: linear-gradient(180deg, rgb(139 123 255 / 0.18), rgb(139 123 255 / 0.04)); box-shadow: 0 0 24px -6px rgb(139 123 255 / 0.6); }

.rag {
  position: sticky; top: 110px; margin: 0;
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, rgb(10 30 46 / 0.92), rgb(4 16 25 / 0.92));
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 100px -40px rgb(139 123 255 / 0.55), 0 0 0 1px rgb(255 255 255 / 0.03) inset;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.rag__bar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.rag__avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--violet), var(--cyan)); }
.rag__avatar .ic { width: 20px; height: 20px; }
.rag__name { font-weight: 500; font-size: 0.9375rem; }
.rag__status { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.rag__status span { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 8px var(--aqua); }
.rag__body { display: grid; gap: 16px; padding: 22px 20px; min-height: 360px; align-content: start; }
.rag__msg { max-width: 90%; padding: 12px 16px; border-radius: 16px; font-size: 0.9375rem; line-height: 1.5; font-weight: 400; }
.rag__msg--user { justify-self: end; background: linear-gradient(135deg, #1b4f6e, #133b55); border-bottom-right-radius: 6px; }
.rag__msg--bot { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.rag__msg.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--cyan); animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.rag__search { display: grid; gap: 10px; font-size: 0.8125rem; color: var(--muted); }
.rag__search > p { display: flex; align-items: center; gap: 8px; }
.rag__search > p .ic { width: 16px; height: 16px; color: var(--violet); }
.rag__search ul { display: flex; flex-wrap: wrap; gap: 8px; }
.rag__search li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--dim); transition: all .4s var(--ease); }
.rag__search li .ic { width: 14px; height: 14px; }
.rag__search li.is-hit { color: var(--text); border-color: rgb(139 123 255 / 0.6); background: rgb(139 123 255 / 0.14); box-shadow: 0 0 18px -4px rgb(139 123 255 / 0.7); }
.rag__cites { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.75rem; }
.rag__cites span { padding: 4px 10px; border-radius: 8px; background: rgb(56 198 255 / 0.1); color: var(--cyan); border: 1px solid rgb(56 198 255 / 0.25); }
.rag__input { display: flex; align-items: center; justify-content: space-between; margin: 0 16px 16px; padding: 10px 10px 10px 18px; border-radius: 14px; border: 1px solid var(--border); background: rgb(255 255 255 / 0.03); color: var(--dim); font-size: 0.875rem; }
.rag__send { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #02121c; }
.rag__send .ic { width: 16px; height: 16px; }
[data-rag].is-armed [data-rag-q], [data-rag].is-armed [data-rag-a], [data-rag].is-armed [data-rag-search], [data-rag].is-armed [data-rag-cites] { opacity: 0; transition: opacity .4s; }
[data-rag].is-armed .is-shown { opacity: 1; }

.rag-steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: clamp(56px, 7vw, 96px); counter-reset: rs; }
.rag-steps li { position: relative; display: grid; gap: 6px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.rag-steps li:not(:last-child)::after { content: ""; position: absolute; right: -14px; top: 50%; width: 10px; height: 10px; border-top: 1.5px solid var(--border-2); border-right: 1.5px solid var(--border-2); transform: translateY(-50%) rotate(45deg); }
.rag-steps .ic { width: 24px; height: 24px; color: var(--violet); margin-bottom: 6px; }
.rag-steps strong { font-size: 1rem; }
.rag-steps span { color: var(--muted); font-size: 0.875rem; }
.ai__tech { margin-top: 24px; text-align: center; color: var(--dim); font-size: 0.9375rem; }

/* ---------- Catálogo ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter {
  font: 400 0.9375rem/1 var(--font); color: var(--muted); cursor: pointer;
  padding: 11px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s;
}
.filter:hover { color: var(--text); border-color: var(--border-2); }
.filter[aria-pressed="true"] { color: #02121c; background: var(--grad); border-color: transparent; font-weight: 500; box-shadow: 0 8px 30px -10px rgb(56 198 255 / 0.8); }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.svc {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 10px; align-content: start;
  padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s, transform .4s var(--ease);
}
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgb(56 198 255 / 0.12), transparent 60%); opacity: 0; transition: opacity .3s; }
.svc:hover { border-color: var(--border-2); transform: translateY(-3px); }
.svc:hover::before { opacity: 1; }
.svc > .ic { width: 26px; height: 26px; color: var(--cyan); margin-bottom: 6px; }
.svc[data-cat="ia"] > .ic { color: #b4a9ff; }
.svc[data-cat="dispositivos"] > .ic { color: var(--aqua); }
.svc h3 { font-size: 1.0625rem; letter-spacing: -0.005em; }
.svc p { font-size: 0.9063rem; color: var(--muted); }
.svc.is-hidden { display: none; }

/* ---------- Haces de arquitectura ---------- */

.beams { position: relative; display: grid; grid-template-columns: 1fr minmax(240px, 0.9fr) 1fr; gap: 72px; align-items: center; }
.beams__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.beams__svg .beam-base { fill: none; stroke: rgb(148 214 255 / 0.14); stroke-width: 1.5; }
.beams__svg .beam-light { fill: none; stroke: url(#beamGrad); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 70 600; stroke-dashoffset: 670; opacity: 0; }
.beams.is-live .beam-light { opacity: 1; animation: beam 3.2s var(--ease) infinite; animation-delay: var(--d, 0s); }
@keyframes beam { from { stroke-dashoffset: 670; } to { stroke-dashoffset: 0; } }
.beams__col { position: relative; z-index: 1; display: grid; gap: 14px; }
.beams__node {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px;
  background: rgb(6 30 45 / 0.85); border: 1px solid var(--border); font-size: 0.9375rem; color: var(--text);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.beams__node .ic { width: 20px; height: 20px; color: var(--cyan); }
.beams__col--out .beams__node .ic { color: var(--aqua); }
.beams__hub {
  position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; text-align: center;
  padding: 32px 24px; border-radius: 24px;
  background: radial-gradient(120% 100% at 50% 0%, rgb(56 198 255 / 0.2), rgb(6 30 45 / 0.95) 60%);
  border: 1px solid var(--border-2);
  box-shadow: 0 0 80px -20px rgb(56 198 255 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.beams__hub img { width: 88px; }
.beams__hub-title { font-weight: 500; font-size: var(--step-1); }
.beams__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.beams__chips li { padding: 5px 10px; border-radius: 8px; font-size: 0.8125rem; background: rgb(255 255 255 / 0.06); border: 1px solid var(--border); color: var(--muted); }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 56px; counter-reset: st; }
.stages li { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--border-2); counter-increment: st; }
.stages li::before { content: counter(st, decimal-leading-zero); font-size: 0.8125rem; color: var(--cyan); }
.stages strong { font-size: 1rem; }
.stages span { font-size: 0.875rem; color: var(--muted); }

/* ---------- Proceso ---------- */

.process { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.process__aside { position: sticky; top: 120px; align-self: start; display: grid; gap: 20px; }
.process__aside h2 { font-size: var(--step-3); letter-spacing: -0.03em; }
.process__aside p { color: var(--muted); max-width: 28rem; }
.process__bar { width: 100%; max-width: 280px; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 12px; }
.process__bar span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.process__steps { display: grid; gap: 18px; }
.step {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: center;
  padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  opacity: 0.45; transition: opacity .5s var(--ease), border-color .5s, background-color .5s;
}
.step.is-active { opacity: 1; border-color: var(--border-2); background: linear-gradient(180deg, rgb(56 198 255 / 0.07), rgb(255 255 255 / 0.02)); }
.step__num { position: absolute; top: 24px; right: 28px; font-size: 0.875rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.step__icon { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgb(56 198 255 / 0.08); border: 1px solid var(--border-2); color: var(--cyan); }
.step__icon .ic { width: 26px; height: 26px; }
.step h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.step p { grid-column: 2; color: var(--muted); }

/* ---------- Productos ---------- */

.product { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.product + .product { margin-top: clamp(96px, 12vw, 180px); }
.product--flip .product__text { order: 2; }
.product { perspective: 1600px; }
.device-holder { transform-style: preserve-3d; will-change: transform; }
.product--gosleep { --accent: var(--violet); --accent-rgb: 139 123 255; }
.product--zonapez { --accent: #2ee6b6; --accent-rgb: 46 230 182; }
.product__text { display: grid; gap: 20px; justify-items: start; }
.product__badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 0.8125rem; color: var(--accent); background: rgb(var(--accent-rgb) / 0.1); border: 1px solid rgb(var(--accent-rgb) / 0.35); }
.product__badge .ic { width: 16px; height: 16px; }
.product h3 { font-size: clamp(2.5rem, 1.5rem + 3vw, 4rem); letter-spacing: -0.04em; line-height: 1; }
.product__lead { font-size: var(--step-1); line-height: 1.4; }
.product__text > p:not(.product__lead) { color: var(--muted); }
.feature-list { display: grid; gap: 10px; }
.feature-list li { display: flex; align-items: center; gap: 12px; }
.feature-list .ic { width: 20px; height: 20px; color: var(--accent); }
.industries { display: flex; flex-wrap: wrap; gap: 8px; }
.industries li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 0.875rem; }
.industries .ic { width: 16px; height: 16px; color: var(--muted); }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0; width: 100%; }
.figures div { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.figures dt { font-size: 2rem; font-weight: 500; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.figures dd { margin: 4px 0 0; font-size: 0.8125rem; color: var(--muted); }

.device {
  position: relative; display: block; border-radius: 18px; text-decoration: none;
  background: #0a1d2a; border: 1px solid var(--border-2);
  box-shadow: 0 50px 120px -40px rgb(var(--accent-rgb) / 0.55), 0 0 0 1px rgb(255 255 255 / 0.03) inset;
  transform-style: preserve-3d; will-change: transform;
}
.device::before { content: ""; position: absolute; inset: -40px; z-index: -1; border-radius: 40px; background: radial-gradient(50% 50% at 50% 50%, rgb(var(--accent-rgb) / 0.35), transparent 70%); filter: blur(30px); }
.device__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.device__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 0.14); }
.device__bar span { margin-left: 12px; padding: 3px 12px; border-radius: 8px; background: rgb(255 255 255 / 0.05); font-size: 0.75rem; color: var(--muted); }
.device img { width: 100%; border-radius: 0 0 17px 17px; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }

/* ---------- Empresa ---------- */

.company { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.company__text { display: grid; gap: 22px; }
.company__text h2 { font-size: var(--step-3); letter-spacing: -0.03em; }
.company__text > p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.timeline { position: relative; display: grid; gap: 28px; padding-left: 32px; margin-top: 8px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--border-2), var(--cyan)); }
.timeline li { position: relative; display: grid; gap: 6px; }
.timeline__dot { position: absolute; left: -32px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); }
.timeline li:last-child .timeline__dot { background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.timeline h3 { font-size: var(--step-1); }
.timeline p { color: var(--muted); }
.legal-card { padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)); border: 1px solid var(--border); }
.legal-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-weight: 500; }
.legal > div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.legal dt { color: var(--dim); font-size: var(--step--1); padding-top: 2px; }
.legal dd { margin: 0; font-weight: 400; }

/* ---------- CTA ---------- */

.section--cta { padding-top: 0; }
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding: clamp(36px, 6vw, 80px); border-radius: 32px;
  background: linear-gradient(135deg, #07324a 0%, #04192a 55%, #052a2e 100%);
  border: 1px solid var(--border-2);
}
.cta__glow { position: absolute; inset: -50%; z-index: -1; background: conic-gradient(from 0deg, transparent 0 60%, rgb(56 198 255 / 0.35) 75%, rgb(46 230 201 / 0.35) 85%, transparent 95%); animation: spin 14s linear infinite; filter: blur(60px); opacity: 0.8; }
.cta__text { display: grid; gap: 18px; }
.cta h2 { font-size: var(--step-3); letter-spacing: -0.03em; }
.cta p { color: var(--muted); max-width: 32rem; }
.contact-cards { display: grid; gap: 12px; }
.contact-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; text-decoration: none;
  background: rgb(3 17 27 / 0.55); border: 1px solid var(--border);
  transition: border-color .3s, transform .4s var(--ease);
}
.contact-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgb(56 198 255 / 0.16), transparent 60%); opacity: 0; transition: opacity .3s; }
.contact-card:hover { border-color: var(--border-2); transform: translateX(4px); }
.contact-card:hover::before { opacity: 1; }
.contact-card > span:last-child { display: grid; font-size: var(--step-1); font-weight: 400; }
.contact-card small { font-size: 0.8125rem; color: var(--dim); }
.ic--brand { color: #25d366; }

/* ---------- Pie ---------- */

.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--border); background: linear-gradient(180deg, var(--bg), #020c13); }
.site-footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer__brand { display: grid; gap: 16px; align-content: start; }
.site-footer__brand img { width: 150px; }
.site-footer__brand p { color: var(--muted); max-width: 22rem; font-size: 0.9375rem; }
.site-footer nav { display: grid; gap: 10px; align-content: start; }
.site-footer nav p { font-size: 0.8125rem; color: var(--dim); margin-bottom: 4px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; transition: color .2s; }
.site-footer nav a:hover { color: var(--text); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--dim); }
.site-footer__made { display: inline-flex; align-items: center; gap: 6px; }
.site-footer__made .ic { width: 16px; height: 16px; }

/* ---------- Página legal ---------- */

.doc { padding: 150px 0 var(--section); }
.doc__inner { max-width: 46rem; }
.doc h1 { font-size: var(--step-3); letter-spacing: -0.03em; margin-bottom: 12px; }
.doc .doc__meta { color: var(--dim); margin-bottom: 48px; }
.doc h2 { font-size: var(--step-1); margin: 44px 0 12px; }
.doc p, .doc li { line-height: 1.75; color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { list-style: disc; padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 6px; }
.doc a { color: var(--cyan); }

/* ---------- Estados de animación ---------- */

.js [data-reveal], .js [data-tile], .js [data-hero-fade] { opacity: 0; }
.js .hero__title[data-split] { visibility: hidden; }
.js .hero__title.is-split { visibility: visible; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .section-head h2, .section-head p { grid-column: 1 / -1; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile--half { grid-column: span 1; }
  .tile--wide, .tile--full { grid-column: span 2; grid-row: auto; }
  .ai { grid-template-columns: 1fr; }
  .rag { position: relative; top: 0; }
  .rag-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rag-steps li:nth-child(2)::after { display: none; }
  .beams { grid-template-columns: 1fr; gap: 28px; }
  .beams__svg { display: none; }
  .beams__col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: 1fr; }
  .process__aside { position: relative; top: 0; }
  .product, .product--flip { grid-template-columns: 1fr; }
  .product--flip .product__text { order: 0; }
  .company, .cta { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; margin-right: -10px; background: none; border: 0; color: var(--text); cursor: pointer; }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transition: transform .3s var(--ease), background-color .2s; }
  .nav-toggle__bar { position: relative; }
  .nav-toggle__bar::before { position: absolute; top: -7px; }
  .nav-toggle__bar::after { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 12px var(--gutter) 24px;
    background: rgb(3 17 27 / 0.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .nav.is-open a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--border); font-size: var(--step-0); color: var(--text); }
  .site-header:has(.nav.is-open) { background: rgb(3 17 27 / 0.96); }
}

@media (max-width: 680px) {
  .hero { padding-top: 120px; }
  .hero__lead { font-size: var(--step-0); }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile--wide, .tile--full, .tile--half { grid-column: auto; }
  .tile { padding: 22px; }
  .instrument { grid-template-columns: 1fr; }
  .instrument__gate { height: 40px; }
  .instrument__gate::before { top: 50%; bottom: auto; left: 16px; right: 16px; width: auto; height: 2px; transform: none;
    background: repeating-linear-gradient(90deg, rgb(56 198 255 / 0.6) 0 6px, transparent 6px 12px); background-size: 24px 2px; animation: gateH 1s linear infinite; }
  @keyframes gateH { to { background-position: 24px 0; } }
  #signal { height: 140px; -webkit-mask-image: none; mask-image: none; }
  .col-device { display: none; }
  .beams__col { grid-template-columns: 1fr; }
  .rag-steps, .stages { grid-template-columns: 1fr; }
  .rag-steps li::after { display: none; }
  .step { padding: 24px; grid-template-columns: 1fr; }
  .step__icon { grid-row: auto; }
  .step p { grid-column: 1; }
  .figures { grid-template-columns: 1fr 1fr 1fr; }
  .figures dt { font-size: 1.5rem; }
  .legal > div { grid-template-columns: 1fr; gap: 2px; }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
}
