/* ==========================================================================
   Real-Time Labs — hoja de estilos
   Estilo: tecnológico, claro, alto contraste. Sin dependencias externas.
   ========================================================================== */

:root {
  --bg: #060a12;
  --bg-2: #0a1220;
  --panel: #0d1626;
  --panel-2: #101b2f;
  --line: rgba(148, 174, 214, 0.15);
  --line-strong: rgba(148, 174, 214, 0.3);
  --text: #e8eef8;
  --muted: #93a4bf;
  --cyan: #2de2e6;
  --blue: #4c8dff;
  --violet: #8b7cff;
  --amber: #ffb84d;
  --green: #3ddc97;
  --red: #ff6b6b;
  --grad: linear-gradient(120deg, #2de2e6 0%, #4c8dff 55%, #8b7cff 100%);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 16px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(45, 226, 230, 0.28); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--cyan); color: #04121a; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15.5px; line-height: 1; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #04121a; box-shadow: 0 8px 30px -8px rgba(45, 226, 230, 0.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(76, 141, 255, 0.7); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(45, 226, 230, 0.07); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .25s, border-color .25s, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6, 10, 18, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand .logo-mark { width: 34px; height: 34px; }
.brand b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 9px 13px; border-radius: 9px; font-size: 15px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links .nav-cta { margin-left: 8px; color: #04121a; background: var(--grad); font-weight: 600; }
.nav-links .nav-cta:hover { color: #04121a; background: var(--grad); filter: brightness(1.1); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--text); margin: auto; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 168px 0 96px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 78% 8%, rgba(76, 141, 255, 0.2), transparent 60%),
    radial-gradient(700px 420px at 8% 30%, rgba(45, 226, 230, 0.12), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  opacity: .9;
}
#net-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .75; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cyan);
  padding: 8px 14px; border: 1px solid rgba(45, 226, 230, 0.3); border-radius: 999px; background: rgba(45, 226, 230, 0.06);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.hero h1 { font-size: clamp(36px, 5vw, 62px); font-weight: 750; margin: 26px 0 22px; letter-spacing: -0.035em; }
.hero h1 .rotator { display: block; min-height: 1.15em; }
.hero h1 .rotator-word { display: inline-block; transition: opacity .35s, transform .35s; }
.hero h1 .rotator-word.out { opacity: 0; transform: translateY(10px); }
.hero .lead { font-size: clamp(18px, 1.7vw, 21px); color: var(--muted); max-width: 640px; }
.hero .lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.terminal {
  background: linear-gradient(180deg, rgba(16, 27, 47, 0.92), rgba(8, 14, 26, 0.95));
  border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 70px -20px rgba(76, 141, 255, .35);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3a55; }
.terminal-bar i:nth-child(1) { background: #ff6b6b; opacity: .8; }
.terminal-bar i:nth-child(2) { background: #ffb84d; opacity: .8; }
.terminal-bar i:nth-child(3) { background: #3ddc97; opacity: .8; }
.terminal-bar span { margin-left: 10px; font: 12.5px var(--mono); color: var(--muted); }
.terminal-body { padding: 20px 20px 22px; font: 13.5px/1.75 var(--mono); min-height: 318px; color: #c7d4ea; white-space: pre-wrap; word-break: break-word; }
.terminal-body .t-prompt { color: var(--cyan); }
.terminal-body .t-dim { color: #6f819e; }
.terminal-body .t-ok { color: var(--green); }
.terminal-body .t-key { color: var(--violet); }
.terminal-body .caret { display: inline-block; width: 8px; height: 15px; background: var(--cyan); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal-note { padding: 0 20px 16px; font: 11.5px var(--mono); color: #5d6f8c; }

/* ---------- Métricas ---------- */
.stats { border-block: 1px solid var(--line); background: linear-gradient(180deg, rgba(13, 22, 38, .6), rgba(6, 10, 18, 0)); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num { font: 700 clamp(30px, 3.6vw, 44px)/1 var(--sans); letter-spacing: -0.03em; }
.stat .num small { font-size: .5em; color: var(--cyan); margin-left: 4px; font-weight: 600; letter-spacing: 0; }
.stat .lbl { margin-top: 10px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.stats-foot { padding: 0 0 20px; font: 12px var(--mono); color: #5d6f8c; }

/* ---------- Secciones ---------- */
section { position: relative; }
.section { padding: 112px 0; }
.section.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head .kicker { font: 500 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 12px; }
.section-head .kicker::before { content: ""; width: 28px; height: 1px; background: var(--cyan); }
.section-head h2 { font-size: clamp(30px, 3.8vw, 46px); margin: 18px 0 16px; font-weight: 720; letter-spacing: -0.03em; }
.section-head p { color: var(--muted); font-size: 18.5px; }

/* ---------- Tarjetas de investigación ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 30px 28px 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px;
  transition: transform .25s, border-color .25s, background .25s;
}
.card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad); opacity: 0; transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card:hover { transform: translateY(-4px); background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)); }
.card:hover::after { opacity: .8; }
.card .ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--cyan);
  background: rgba(45, 226, 230, .08); border: 1px solid rgba(45, 226, 230, .25);
}
.card .idx { position: absolute; top: 26px; right: 26px; font: 12px var(--mono); color: #50627f; }
.card h3 { font-size: 21px; font-weight: 650; }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.card .question {
  font-size: 14.5px; line-height: 1.55; color: var(--text); padding: 14px 16px; border-radius: 10px;
  background: rgba(76, 141, 255, .08); border-left: 2px solid var(--blue);
}
.card .question b { display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }
.tag { font: 12px var(--mono); padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }

/* ---------- Laboratorio interactivo ---------- */
.lab { border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); overflow: hidden; box-shadow: 0 40px 100px -50px rgba(76, 141, 255, .45); }
.tablist { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.tab {
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 15px; transition: color .2s, background .2s, border-color .2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: rgba(45, 226, 230, .1); border-color: rgba(45, 226, 230, .35); }
.tabpanel[hidden] { display: none; }
.lab-body { padding: 32px; }
.lab-intro { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 26px; }
.lab-intro h3 { font-size: 24px; font-weight: 680; }
.lab-intro p { color: var(--muted); max-width: 640px; margin-top: 8px; font-size: 15.5px; }
.badge-sim { font: 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(255, 184, 77, .4); background: rgba(255, 184, 77, .08); padding: 7px 12px; border-radius: 999px; white-space: nowrap; }

.route-wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: start; }
#route-svg { width: 100%; height: auto; background: radial-gradient(400px 220px at 50% 50%, rgba(76, 141, 255, .1), transparent 70%), #08101d; border: 1px solid var(--line); border-radius: 14px; }
#route-svg .lk { fill: none; stroke: #27395a; stroke-width: 2; stroke-dasharray: 4 6; transition: stroke .3s, opacity .3s; }
#route-svg .lk.on { stroke: var(--cyan); stroke-dasharray: none; filter: drop-shadow(0 0 6px rgba(45, 226, 230, .7)); }
#route-svg .lk.bad { stroke: var(--red); opacity: .55; }
#route-svg .nd { fill: #0f1c33; stroke: var(--line-strong); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
#route-svg .nd.on { stroke: var(--cyan); fill: #0d2a3a; }
#route-svg .nd.bad { stroke: var(--red); fill: #2a1520; }
#route-svg text { fill: var(--text); font: 600 13px var(--sans); text-anchor: middle; dominant-baseline: middle; }
#route-svg text.sub { fill: var(--muted); font: 11px var(--mono); }
#route-svg .router { fill: #0f1c33; stroke: var(--violet); stroke-width: 1.8; }
#route-svg .router-ring { fill: none; stroke: var(--violet); stroke-opacity: .35; animation: spin 14s linear infinite; transform-origin: 230px 150px; stroke-dasharray: 3 7; }
@keyframes spin { to { transform: rotate(360deg); } }
#packet { fill: var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); opacity: 0; }

.ctrl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg button { padding: 10px 14px; background: transparent; border: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: rgba(45, 226, 230, .14); color: var(--text); }
.toggle-btn { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .2s; }
.toggle-btn[aria-pressed="true"] { border-color: rgba(255, 107, 107, .6); background: rgba(255, 107, 107, .12); color: #ffb3b3; }
.ops { display: grid; gap: 10px; margin-bottom: 16px; }
.op { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: border-color .3s, background .3s; }
.op.chosen { border-color: rgba(45, 226, 230, .6); background: rgba(45, 226, 230, .07); }
.op.bad .op-state { color: var(--red); }
.op-name { font-weight: 600; font-size: 15px; }
.op-state { font: 12.5px var(--mono); color: var(--green); text-align: right; }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .5s; }
.op.bad .bar > i { background: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.kpi b { display: block; font: 700 24px/1.1 var(--sans); letter-spacing: -.02em; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.fail b { color: var(--red); }
.kpi.ok b { color: var(--green); }
.log { font: 12.5px/1.9 var(--mono); color: #9fb1cc; min-height: 118px; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .ok { color: var(--green); }
.log .ko { color: var(--red); }

/* Demo 3DS */
.risk-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.field { margin-bottom: 20px; }
.field label, .field .flabel { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; margin-bottom: 10px; }
.field output { font: 13.5px var(--mono); color: var(--cyan); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); outline-offset: 6px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--cyan); border: 3px solid #07111c; box-shadow: 0 0 0 1px var(--cyan), 0 0 14px rgba(45, 226, 230, .6); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); border: 3px solid #07111c; cursor: pointer; }
.switches { display: grid; gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); font-size: 14.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .sw { width: 42px; height: 24px; border-radius: 24px; background: rgba(255, 255, 255, .12); position: relative; transition: background .2s; flex: none; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .sw { background: var(--blue); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--cyan); outline-offset: 3px; }
.risk-out { padding: 26px; border-radius: 16px; border: 1px solid var(--line-strong); background: #08101d; align-self: start; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font: 750 64px/1 var(--sans); letter-spacing: -.04em; }
.score span { color: var(--muted); font: 13px var(--mono); }
.gauge { position: relative; height: 12px; border-radius: 12px; margin: 22px 0 8px; background: linear-gradient(90deg, var(--green) 0 30%, var(--amber) 30% 65%, var(--red) 65% 100%); opacity: .9; }
.gauge i { position: absolute; top: -6px; width: 6px; height: 24px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 3px rgba(6, 10, 18, .9), 0 0 14px rgba(255, 255, 255, .6); left: 0; transition: left .35s cubic-bezier(.3, .9, .3, 1); }
.gauge-scale { display: flex; justify-content: space-between; font: 11px var(--mono); color: #5d6f8c; }
.decision { margin-top: 22px; padding: 16px 18px; border-radius: 12px; border: 1px solid; transition: all .3s; }
.decision strong { display: block; font-size: 17px; margin-bottom: 4px; }
.decision p { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.decision.low { border-color: rgba(61, 220, 151, .5); background: rgba(61, 220, 151, .08); }
.decision.low strong { color: var(--green); }
.decision.mid { border-color: rgba(255, 184, 77, .5); background: rgba(255, 184, 77, .08); }
.decision.mid strong { color: var(--amber); }
.decision.high { border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .08); }
.decision.high strong { color: var(--red); }
.factors { margin-top: 22px; display: grid; gap: 9px; }
.factors h4 { font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.factor { display: grid; grid-template-columns: 150px 1fr 40px; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.factor .bar { grid-column: auto; }
.factor .bar > i { background: var(--blue); }
.factor.neg .bar > i { background: var(--green); }
.factor em { font: normal 12.5px var(--mono); text-align: right; color: var(--text); }

/* ---------- Metodología ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; top: 22px; left: 4%; right: 4%; height: 1px; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet)); opacity: .55; }
.step { position: relative; padding: 0 14px; }
.step .n {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--cyan); color: var(--cyan); font: 600 14px var(--mono); margin-bottom: 20px;
  box-shadow: 0 0 0 6px var(--bg);
}
.step h3 { font-size: 17.5px; margin-bottom: 8px; font-weight: 650; }
.step p { font-size: 14.5px; color: var(--muted); line-height: 1.55; }

/* ---------- IA responsable ---------- */
.principles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.principle { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .02); }
.principle .icon { color: var(--violet); width: 28px; height: 28px; margin-bottom: 16px; }
.principle h3 { font-size: 17px; margin-bottom: 8px; font-weight: 650; }
.principle p { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.certs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; align-items: center; }
.certs .lbl { font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #5d6f8c; margin-right: 6px; }
.cert { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-strong); font: 600 13.5px var(--mono); background: rgba(255, 255, 255, .03); }
.cert.ms { border-color: rgba(76, 141, 255, .5); color: #9ec0ff; }

/* ---------- Plataforma ---------- */
.platform { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.layers { display: grid; gap: 12px; }
.layer { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.layer:nth-child(1) { border-color: rgba(139, 124, 255, .4); }
.layer:nth-child(2) { border-color: rgba(76, 141, 255, .4); }
.layer:nth-child(3) { border-color: rgba(45, 226, 230, .4); }
.layer:nth-child(4) { border-color: rgba(61, 220, 151, .4); }
.layer h3 { font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.layer p { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-strong); font-size: 14px; }
.platform-copy p { color: var(--muted); font-size: 17.5px; margin-bottom: 14px; }
.platform-copy h2 { font-size: clamp(28px, 3.4vw, 42px); margin: 18px 0 18px; font-weight: 720; letter-spacing: -0.03em; }

/* ---------- Industrias ---------- */
.ind-body { padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.ind-body h3 { font-size: 26px; font-weight: 680; margin-bottom: 12px; }
.ind-body p { color: var(--muted); }
.ind-body ul { display: grid; gap: 12px; }
.ind-body li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); font-size: 15.5px; }
.ind-body li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 2px; background: var(--grad); transform: rotate(45deg); }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact h2 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 720; letter-spacing: -0.03em; margin: 18px 0 18px; }
.contact > div > p { color: var(--muted); font-size: 18px; margin-bottom: 30px; }
.info { display: grid; gap: 14px; }
.info a, .info div { display: flex; gap: 14px; align-items: flex-start; color: var(--text); font-size: 16px; }
.info .icon { flex: none; width: 22px; height: 22px; color: var(--cyan); margin-top: 3px; }
.info a:hover span { color: var(--cyan); }
.socials { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.socials a { padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 14px; color: var(--muted); transition: all .2s; }
.socials a:hover { color: var(--text); border-color: var(--cyan); }
.form { padding: 32px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: #c7d4ea; }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: #08101d; color: var(--text); font: inherit; font-size: 15.5px;
  transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(45, 226, 230, .15); }
.form select option { background: #0d1626; }
.form .note { font-size: 13px; color: #6f819e; align-self: center; }
.form-status { grid-column: 1 / -1; font-size: 14px; color: var(--green); min-height: 20px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 34px; background: #04070d; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid p { color: var(--muted); font-size: 14.5px; margin-top: 16px; max-width: 340px; }
.foot-grid h4 { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6f819e; margin-bottom: 16px; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid li a { color: var(--muted); font-size: 15px; }
.foot-grid li a:hover { color: var(--cyan); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: #6f819e; }

/* ---------- Animaciones de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 24px; }
.notfound h1 { font-size: clamp(64px, 14vw, 140px); font-weight: 800; letter-spacing: -.05em; }
.notfound p { color: var(--muted); margin: 12px 0 30px; font-size: 19px; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
  .route-wrap, .risk-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 24px 22px;
    background: rgba(6, 10, 18, .96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 12px; font-size: 16px; }
  .nav-links .nav-cta { margin: 8px 0 0; text-align: center; }
  .hero { padding-top: 130px; }
  .hero-grid, .platform, .contact, .ind-body { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .container { width: min(100% - 32px, var(--container)); }
  .section { padding: 80px 0; }
  .cards, .principles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .lab-body, .ind-body, .form { padding: 22px; }
  .form { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; }
  .factor { grid-template-columns: 110px 1fr 36px; }
  .layer { grid-template-columns: 1fr; gap: 6px; }
  .stat { padding: 24px 18px; }
  .foot-grid { grid-template-columns: 1fr; }
  .terminal-body { font-size: 12.5px; min-height: 290px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.section-head.flush { margin: 0; }
