/* Netkido — web pública (estática). Sin dependencias externas. */

@font-face { font-family: "Rajdhani"; font-weight: 500; font-display: swap; src: url("../fonts/rajdhani-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("../fonts/rajdhani-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("../fonts/rajdhani-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 400; font-display: swap; src: url("../fonts/exo-2-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 500; font-display: swap; src: url("../fonts/exo-2-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 600; font-display: swap; src: url("../fonts/exo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 700; font-display: swap; src: url("../fonts/exo-2-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --navy: #071E38;
  --navy-2: #0B2A4A;
  --navy-3: #12385F;
  --line: #1D4670;
  --sky: #6AB8E0;
  --sky-2: #A8D8F0;
  --orange: #F47920;
  --orange-2: #FF8F3D;
  --text: #EAF2F8;
  --muted: #9DB4C8;
  --ok: #5BD49B;
  --err: #FF8A80;

  --display: "Rajdhani", "Arial Narrow", system-ui, sans-serif;
  --body: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--sky-2); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--orange); color: var(--navy); }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .88em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--orange); color: var(--navy); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1.05rem/1 var(--display); letter-spacing: .02em;
  padding: .85em 1.35em; border-radius: 8px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #1B0D00; }
.btn-primary:hover { background: var(--orange-2); color: #1B0D00; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--sky); color: #fff; }
.btn-sm { font-size: .95rem; padding: .6em 1em; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Franja beta y cabecera ---------- */
.beta {
  background: var(--navy-3); color: var(--sky-2);
  font-size: .9rem; text-align: center; padding: 7px var(--gutter);
}
.beta a { color: #fff; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 30, 56, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(29, 70, 112, .6);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { font: 700 1.7rem/1 var(--display); letter-spacing: .04em; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.logo .wm span { color: var(--sky); }
.logo svg { width: 30px; height: 30px; }
.logo:hover { color: #fff; }
.nav { display: flex; gap: 24px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: #fff; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.lang { color: var(--muted); font: 600 .95rem var(--display); text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.lang:hover { color: #fff; background: var(--navy-2); }
.login { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 8px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; cursor: pointer; }

@media (max-width: 920px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
         background: var(--navy); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(29, 70, 112, .5); font-size: 1.05rem; }
  .menu-btn { display: inline-block; margin-left: auto; }
  .site-head .wrap { gap: 12px; }
}
@media (max-width: 560px) {
  .head-actions .login, .head-actions .btn { display: none; }
  .nav .only-mobile { display: block; }
}
.nav .only-mobile { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px); overflow: hidden; }
.hero::before { /* retícula muy tenue, como un plano de red */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(106, 184, 224, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 184, 224, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { max-width: 12.5ch; }
.hero .lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; margin: 22px 0 30px; }
.hero .lead strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .fine { margin: 16px 0 0; font-size: .92rem; color: var(--muted); }

.topo { width: 100%; aspect-ratio: 560 / 470; }
.topo .tunnel { stroke: var(--line); stroke-width: 2; fill: none; }
.topo .tunnel-live { stroke: var(--sky); stroke-width: 2; fill: none; stroke-dasharray: 3 9; opacity: .55; }
.topo .site rect { fill: var(--navy-2); stroke: var(--line); stroke-width: 1.5; }
.topo .site text { fill: var(--text); font: 600 15px var(--display); }
.topo .site .sub { fill: var(--muted); font: 400 11.5px var(--mono); }
.topo .site .dot { fill: var(--ok); }
.topo .hub circle.core { fill: var(--navy-3); stroke: var(--sky); stroke-width: 2; }
.topo .hub circle.ring { fill: none; stroke: var(--sky); stroke-opacity: .25; stroke-width: 1; }
.topo .hub text { fill: #fff; font: 700 15px var(--display); letter-spacing: .06em; }
.topo .pkt { fill: var(--orange); }
.topo .pkt-b { fill: var(--sky-2); }
.topo .outside { fill: none; stroke: rgba(157, 180, 200, .25); stroke-dasharray: 4 6; }
.topo .outside-label { fill: var(--muted); font: 400 12px var(--body); }
@media (prefers-reduced-motion: reduce) { .topo .pkt, .topo .pkt-b, .topo .tunnel-live, .topo .hub .ring { display: none; } html { scroll-behavior: auto; } }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .topo { max-width: 520px; margin: 8px auto 0; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: var(--navy-2); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.12rem; margin: 16px 0 0; }

/* Cómo funciona: tres pasos reales, en orden */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 28px 0 0; counter-increment: step; }
.steps > li::before {
  content: counter(step); display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--sky); color: var(--sky);
  font: 700 1.3rem var(--display); margin-bottom: 18px; background: var(--navy);
  position: relative; z-index: 1;
}
.steps > li::after { /* línea que une los pasos */
  content: ""; position: absolute; top: 22px; left: 44px; right: 0; height: 1.5px; background: var(--line);
}
.steps > li:last-child::after { display: none; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps > li { padding: 0 0 0 64px; }
  .steps > li::before { position: absolute; left: 0; top: -6px; }
  .steps > li::after { left: 21px; top: 44px; bottom: -38px; right: auto; width: 1.5px; height: auto; }
}

.term {
  margin-top: clamp(32px, 5vw, 48px);
  background: #04142A; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; max-width: 860px;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.term-bar span { margin-left: 8px; color: var(--muted); font: 400 .8rem var(--mono); }
.term pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 .86rem/1.75 var(--mono); color: var(--text); }
.term .p { color: var(--sky); user-select: none; }
.term .c { color: var(--muted); }
.term .b { color: #6FA8FF; font-weight: 700; }
.term .g { color: var(--ok); }
.term .tok { color: var(--orange); }

/* Capacidades + captura */
.features { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.feat-list { list-style: none; margin: 0; padding: 0; }
.feat-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.feat-list li:last-child { border-bottom: 1px solid var(--line); }
.feat-list h3 { font-size: 1.25rem; margin-bottom: 4px; }
.feat-list p { margin: 0; color: var(--muted); font-size: .98rem; }
.shot { margin: 0; position: sticky; top: 96px; }
.shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.shot figcaption { color: var(--muted); font-size: .88rem; margin-top: 12px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .shot { position: static; } }

/* Casos de uso */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.case { border-left: 2px solid var(--orange); padding: 2px 0 2px 20px; }
.case h3 { margin-bottom: 8px; }
.case p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }

/* ---------- Planes ---------- */

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan {
  display: flex; flex-direction: column;
  background: var(--navy); border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px 22px;
}
.plan.featured { border-color: var(--sky); box-shadow: inset 0 3px 0 var(--sky); }
.plan h3 { font-size: 1.6rem; }
.plan .desc { color: var(--muted); margin: 4px 0 18px; font-size: .95rem; min-height: 3em; }
@media (max-width: 560px) { .plan .desc, .plan .price-note { min-height: 0; } }
.plan .price { font: 700 2.6rem/1 var(--display); margin-bottom: 4px; }
.plan .price small { font: 500 1rem var(--body); color: var(--muted); }
.plan .price-note { color: var(--muted); font-size: .85rem; min-height: 2.6em; margin-bottom: 18px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: .97rem; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px;
  border-left: 2px solid var(--sky); border-bottom: 2px solid var(--sky); transform: rotate(-45deg);
}
.plan .btn { width: 100%; }
.plans-note { color: var(--muted); font-size: .95rem; margin: 24px 0 0; max-width: 60em; }
.plans.plans-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 560px) { .plans.plans-two { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font: 600 1.25rem/1.3 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--sky); border-bottom: 2px solid var(--sky); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--sky-2); }
.faq .answer { padding: 0 0 20px; color: var(--muted); max-width: 68ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); }
.contact-aside h2 { margin-bottom: 18px; }
.contact-aside p { color: var(--muted); }
.contact-aside .mail { font: 600 1.3rem var(--display); color: #fff; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: .95rem; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--navy); border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 13px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--sky) 50%), linear-gradient(135deg, var(--sky) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .error { color: var(--err); font-size: .88rem; min-height: 0; }
.field .error:empty { display: none; }
.check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange); flex: none; }
.check .error { display: block; color: var(--err); font-size: .88rem; margin-top: 4px; }
.check .error:empty { display: none; }
.check input[aria-invalid="true"] { outline: 2px solid var(--err); outline-offset: 2px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.plan-chip { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--navy); border: 1px dashed var(--sky); border-radius: 8px; padding: 10px 14px; font-size: .95rem; }
.plan-chip[hidden] { display: none; }
.plan-chip button { background: none; border: 0; color: var(--sky-2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; margin-left: auto; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: .95rem; }
.form-status.err { color: var(--err); }
.form-flash { display: none; grid-column: 1 / -1; border: 1px solid; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 4px; }
.form-flash:target { display: block; }
.form-flash.ok { border-color: var(--ok); }
.form-flash.err { border-color: var(--err); }
.form-done { grid-column: 1 / -1; border: 1px solid var(--ok); border-radius: var(--radius); padding: 24px; }
.form-done h3 { color: var(--ok); margin-bottom: 8px; }
.form-done p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: .92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .logo { font-size: 1.35rem; }

/* ---------- Páginas legales y 404 ---------- */
.doc { padding: clamp(40px, 6vw, 72px) 0 80px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.doc .updated { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.doc h3 { font-size: 1.2rem; margin: 24px 0 8px; }
.doc p, .doc li { color: #C9D9E6; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; color: var(--text); }
.doc .table-scroll { overflow-x: auto; }
.ph { background: rgba(244, 121, 32, .18); color: #FFC08F; padding: 0 4px; border-radius: 3px; font-style: normal; }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.notfound h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--sky); }
.notfound p { color: var(--muted); }
.notfound .cta-row { justify-content: center; margin-top: 24px; }

/* Sin estilos en línea: la web se sirve con una CSP estricta (style-src 'self'). */
.site-foot .copy { margin: 0; }
.spacer { margin-right: auto; }
.head-actions.doc-actions, .head-actions.doc-actions .login { display: flex; }
