/* ---------- tipografías self-hosted ---------- */
/* Antes se traían de fonts.googleapis.com. Se bajaron al proyecto para que la IP de
   cada visitante no viaje a Google en cada carga (Ley 25.326 / GDPR), para poder
   sacar fonts.googleapis.com y fonts.gstatic.com de la CSP, y para eliminar dos
   round-trips a un tercero del camino crítico de renderizado.
   Solo los subsets latin y latin-ext (el sitio es en español) y solo los pesos que
   styles.css realmente usa: JetBrains Mono 600, Sora 600/800, Space Grotesk 700. */

/* JetBrains Mono 600 — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/jetbrains-mono-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono 600 — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/jetbrains-mono-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sora 600 — latin-ext */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/sora-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Sora 600 — latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/sora-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sora 800 — latin-ext */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/sora-800-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Sora 800 — latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/sora-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Space Grotesk 700 — latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/space-grotesk-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk 700 — latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/space-grotesk-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --bg-dark: #0A0E13;
  --bar1: #2C333E;
  --bar2: #3C5060;
  --accent: #10C4CE;
  --accent-on-light: #0E8FA0;
  --ink-text: #1E2530;
  --muted: #5B6B78;
  --bg: #FCFDFD;
  --panel-border: #E4E9ED;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
body {
  margin: 0;
  color: var(--ink-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(700px 400px at 85% 8%, rgba(16,196,206,.10), transparent 55%),
    radial-gradient(600px 340px at 10% 55%, rgba(16,196,206,.06), transparent 55%),
    radial-gradient(600px 340px at 90% 92%, rgba(16,196,206,.06), transparent 55%),
    var(--bg);
}
img, svg { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, .brand, .btn, .eyebrow { font-family: "Space Grotesk", -apple-system, sans-serif; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { line-height: 1.65; }
a { color: inherit; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  color: var(--accent);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.tag, .idx-n { font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; padding: 12px 20px; border-radius: 9px;
  text-decoration: none; background: var(--bg-dark); color: var(--accent);
  transition: transform .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }

/* Reveal-on-scroll target state -- GSAP anima desde acá en script.js.
   Sin JS (o con reduced-motion) el contenido queda visible igual. */
.reveal { opacity: 1; transform: none; }
.js-gsap-ready .reveal { opacity: 0; transform: translateY(24px); }

section { scroll-margin-top: 80px; padding: 90px 0; }

/* ---------- nav ---------- */
nav.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--panel-border); }
/* index.html abre directo con el hero oscuro, ahora animado por #bg-network (canvas de
   red neuronal). Un fondo totalmente transparente dejaba pasar cualquier texto de página
   que scrolleara detrás del nav (choca con "SYSTEMAS OS"/los links, ilegible) -- por eso
   el fondo es casi negro sólido, a tono con --bg-dark, en vez de transparent puro: se ve
   igual de "invisible" sobre el canvas (mismo tono oscuro) pero no deja pasar contenido. */
nav.top.nav-on-dark { background: rgba(5,7,10,.88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
nav.top.nav-on-dark .brand {
  display: flex; align-items: center; gap: 8px;
  font-family: "Sora", sans-serif; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; font-size: 15px; color: #f3f6f8;
}
nav.top.nav-on-dark .brand-os-chip {
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 11px; letter-spacing: 0;
  color: #05808f; background: rgba(10,162,181,.1); border: 1.5px solid #0AA2B5;
  border-radius: 6px; padding: 2px 6px;
}
nav.top.nav-on-dark .nav-links {
  color: #f3f6f8; font-family: "Sora", sans-serif; font-weight: 600;
  text-transform: uppercase; letter-spacing: .02em;
}
nav.top.nav-on-dark .nav-links a:hover { color: #10C4CE; }
nav.top.nav-on-dark .btn {
  font-family: "Sora", sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
}
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; text-decoration: none; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink-text); }

.nav-toggle { display: none; }

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(5,7,10,.97); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 4px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-links a:last-child { border-bottom: none; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 36px; height: 36px; background: none; border: none; padding: 0; cursor: pointer;
    order: 3;
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: #f3f6f8; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  nav.top .wrap { position: relative; flex-wrap: wrap; }
}

/* ---------- fondo animado (red neuronal) ---------- */
/* Fail-safe: si initBgNetwork() nunca corre (JS bloqueado, error, etc.) el body ya tiene
   el negro sólido -- el sitio se ve exactamente como antes de esta feature, nunca con el
   fondo claro del sitio (var(--bg)) filtrándose por transparencia del nav/hero. */
body.dark-page { background: #05070a; color: #c7ccd3; }
#bg-network {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
/* Keeps all page content layered above the fixed canvas everywhere, not just
   in sections that happen to already declare their own position/z-index. */
#app { position: relative; z-index: 1; }

/* ---------- quienes somos ---------- */
.quienes-lead { font-size: 16px; color: #c7ccd3; max-width: 68ch; margin-top: 14px; margin-bottom: 44px; line-height: 1.65; }
.quienes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 700px) { .quienes-grid { grid-template-columns: 1fr; } }

/* ---------- album de casos ---------- */
/* Título de cada sección nueva -- agrandado y con el mismo glow teal del chip
   "OS" del hero, para que la división entre secciones se note de entrada. */
.section-title {
  font-size: clamp(30px, 4.6vw, 46px); margin-top: 10px; margin-bottom: 50px; color: #f3f6f8;
  text-shadow: 0 0 18px rgba(16,196,206,.55), 0 0 42px rgba(16,196,206,.28);
}

.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.case-grid:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .case-grid { grid-template-columns: 1fr; } }

.case-card { border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); transition: transform .15s ease, border-color .15s ease; }
.case-card:hover { transform: translateY(-3px); border-color: rgba(16,196,206,.35); }

.case-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-dark); }
.case-media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; }
.case-media--sample { position: relative; }
.case-media--sample img, .quienes-grid .case-media img { object-position: center; }

.case-body { padding: 20px 22px 22px; }
.case-body .tag { display: inline-block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; }
.case-body h3 { font-size: 18px; color: #f3f6f8; }
.case-body p { font-size: 13.5px; color: #c7ccd3; margin-top: 8px; line-height: 1.55; }
.case-link { display: inline-block; font-size: 13px; color: var(--accent); text-decoration: none; margin-top: 10px; }
.case-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Los 7 "más ejemplos" son relleno ilustrativo, no clientes reales -- distinguirlos
   claramente (borde punteado + badge "Ejemplo") es una decisión deliberada, no un
   descuido: evita que se lean como casos reales hasta que los reemplacemos por
   sistemas concretos en producción. */
.case-card--sample { background: rgba(255,255,255,.015); border-style: dashed; }
.case-sample-badge {
  position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #c7ccd3;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 3px 9px;
}

.case-sample-intro { margin: 8px 0 32px; }
.case-sample-title { font-size: clamp(19px, 2.4vw, 24px); color: #f3f6f8; margin-top: 8px; }

/* ---------- nichos ---------- */
.niche-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.1); }
.niche-list li { display: flex; gap: 20px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.niche-list .idx-n { font-size: 13px; color: var(--accent); font-weight: 700; flex-shrink: 0; width: 28px; }
.niche-list h4 { font-size: 16px; font-weight: 700; color: #f3f6f8; }
.niche-list p { font-size: 13.5px; color: #c7ccd3; margin-top: 4px; }

/* ---------- proceso ---------- */
.proceso-lead { font-size: 16px; color: #c7ccd3; max-width: 60ch; margin-top: 14px; margin-bottom: 44px; line-height: 1.65; }
.proceso-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-left: 30px; }
@media (max-width: 780px) { .proceso-grid { grid-template-columns: 1fr; } }
.proceso-line { position: absolute; left: 0; top: 6px; width: 4px; height: calc(100% - 12px); }
.step .idx-n { font-size: 13px; color: var(--accent); font-weight: 700; }
.step h4 { font-size: 16.5px; margin-top: 10px; color: #f3f6f8; }
.step p { font-size: 14px; color: #c7ccd3; margin-top: 8px; }

/* ---------- cta final ---------- */
.cta-final { background: transparent; color: #F2F6F9; padding: 84px 0; margin-top: 20px; }
/* Ámbar en vez del teal de las demás secciones: marca el cierre como un momento
   distinto. Era un style="color:#FBD98A" inline en index.html. */
.cta-final .eyebrow, .cta-final .eyebrow .dot { color: #FBD98A; background-color: currentColor; }
.cta-final .eyebrow { background-color: transparent; }
.cta-final h2 {
  font-size: clamp(30px, 4.6vw, 44px); max-width: 20ch; margin-top: 14px;
  text-shadow: 0 0 18px rgba(16,196,206,.55), 0 0 42px rgba(16,196,206,.28);
}
.cta-final p { color: #9FB0B8; max-width: 52ch; font-size: 16px; margin-top: 12px; }
/* Los tres canales pasaron a segunda fila: son links que se van del sitio y no
   dejan nada. La acción principal ahora abre el panel, que sí captura. */
.cta-final .cta-otras-vias { font-size: 14px; color: #8b98a3; margin-top: 30px; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.contact-buttons .btn { background: var(--accent); color: #04191B; }
.contact-buttons .btn-whatsapp { background: #25D366; color: #04191B; }
.contact-buttons .btn-linkedin { background: #0A66C2; color: #f3f6f8; }

/* ---------- legal pages (privacidad / terminos) ---------- */
.legal-page { padding: 70px 0 100px; }
.legal-wrap { max-width: 760px; }
.legal-updated { font-size: 13px; color: #8b98a3; margin-top: 8px; margin-bottom: 40px; }
.legal-body h2 { font-size: 20px; color: #f3f6f8; margin-top: 36px; margin-bottom: 12px; }
.legal-body p { font-size: 15px; color: #c7ccd3; margin-bottom: 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 20px; color: #c7ccd3; font-size: 15px; }
.legal-body li { margin-bottom: 6px; line-height: 1.6; }
.legal-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-body strong { color: #f3f6f8; }
.legal-disclaimer { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #8b98a3; font-style: italic; }

/* ---------- footer ---------- */
footer { padding: 40px 0; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
footer .footer-links { display: flex; gap: 20px; font-size: 13.5px; color: #c7ccd3; }
footer .footer-links a { text-decoration: none; }
footer .footer-links a:hover { color: #f3f6f8; }
footer .fine { font-size: 12.5px; color: #c7ccd3; }
.footer-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-brand-word {
  font-family: "Sora", sans-serif; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; font-size: 14px; color: #f3f6f8;
}
.footer-brand-chip {
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 10px; letter-spacing: 0;
  color: #05808f; background: rgba(10,162,181,.1); border: 1.5px solid #0AA2B5;
  border-radius: 6px; padding: 2px 6px;
}

/* ---------- code hero (autoplay) ---------- */
.code-hero { position: relative; height: calc(100vh - 65px); min-height: 600px; padding: 0; overflow: hidden; }
.code-hero { transition: height .6s ease, min-height .6s ease; }
.code-hero.ch-collapsed { height: 120px; min-height: 120px; }
.ch-stage { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

/* El contenido animado (barras con inclinación 3D + wordmark) mide 760x700px de verdad --
   .ch-fit se escala hacia abajo cuando el viewport no tiene ese espacio libre, para que
   nunca quede recortado por el overflow:hidden del contenedor. Ahora corre también en
   celulares (antes se saltaba el hero animado entero ahí), así que el scale tiene que
   respetar DOS límites, no solo la altura: min() toma el más chico de los dos, y clamp()
   pone un piso de 0.35 para que no se achique más allá de lo legible en un teléfono chico.
   Antes solo se consideraba la altura -- en una pantalla angosta pero alta (ej. un celular)
   ese cálculo por sí solo daba un scale mayor a 1x horizontal, y el contenido de 760px de
   ancho se salía ~140px por cada lado del viewport, recortado por overflow:hidden.
   Vive en un wrapper aparte de .ch-group porque GSAP ya escribe su propio transform
   (scale/opacity/blur del beat Intro) directamente sobre .ch-group -- puesto ahí, el
   transform de este CSS sería descartado por el que GSAP fija inline en cada frame. Los
   divisores "700px"/"760px" (no "700"/"760") son necesarios: calc() solo produce un
   <number> sin unidad -- válido para scale() -- al dividir una longitud por otra longitud;
   dividir por un número pelado deja el resultado en unidades de longitud, lo que invalida
   todo el valor de transform y el navegador lo descarta en silencio (confirmado con un caso
   mínimo reproducible aparte). */
.ch-fit {
  width: 760px; height: 610px;
  transform: scale(clamp(0.35, min(
    calc((100vh - 65px - 160px) / 700px),
    calc((100vw - 32px) / 760px)
  ), 1));
  transform-origin: 50% 50%;
}
.ch-group { position: relative; width: 760px; height: 610px; perspective: 1500px; }
.ch-camera { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(0deg) rotateY(0deg); }

.ch-floor {
  position: absolute; left: -350px; top: -80px; width: 1460px; height: 500px;
  transform: translateZ(-170px);
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 48px 48px; background-color: rgba(255,255,255,.02);
  opacity: 0; animation: chGridDrift 6s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}
@keyframes chGridDrift { from { background-position: 0 0; } to { background-position: 48px 48px; } }

/* Geometría, degradés y tipografía de las tres barras del hero.
   Vivían como atributos style="..." en index.html; se movieron acá para poder sacar
   'unsafe-inline' de style-src en la CSP. GSAP sigue animándolas sin problema: escribe
   vía CSSOM (element.style.x), que la CSP no intercepta -- solo bloquea el style="..."
   escrito en el markup y los bloques <style>. */
.ch-line { position: absolute; transform-style: preserve-3d; }
.ch-line-bg { position: absolute; inset: 0; opacity: 1; }

#ch-line-1 { left: 0; top: 0; width: 540px; height: 151px; }
#ch-line-1-bg {
  border-radius: 45px;
  background: linear-gradient(180deg, #23c3d6, #05808f 60%, #046672);
  box-shadow: 0 0 26px rgba(10,162,181,.45), 0 16px 30px rgba(10,162,181,.25),
              inset 0 2px 0 rgba(255,255,255,.55), inset 0 -3px 6px rgba(0,0,0,.2);
}
#ch-line-1-text { font-size: 58px; color: #0AA2B5; }

#ch-line-2 { left: 99px; top: 173px; width: 459px; height: 112px; }
#ch-line-2-bg {
  border-radius: 34px;
  background: linear-gradient(180deg, #8b98a3, #566068 60%, #3e454b);
  box-shadow: 0 0 20px rgba(92,116,128,.35), 0 14px 24px rgba(0,0,0,.15),
              inset 0 2px 0 rgba(255,255,255,.4), inset 0 -3px 6px rgba(0,0,0,.2);
}
#ch-line-2-text { font-size: 43px; color: #5C7480; }

#ch-line-3 { left: 198px; top: 320px; width: 378px; height: 130px; }
#ch-line-3-bg {
  border-radius: 39px;
  background: linear-gradient(180deg, #d3d8de, #a7afba 60%, #8b939d);
  box-shadow: 0 0 18px rgba(167,175,187,.4), 0 14px 24px rgba(0,0,0,.12),
              inset 0 2px 0 rgba(255,255,255,.7), inset 0 -3px 6px rgba(0,0,0,.12);
}
#ch-line-3-text { font-size: 50px; color: #A7AFBB; }
.ch-line-text {
  position: absolute; inset: 0; display: flex; align-items: center; padding-left: 4px;
  opacity: 0; overflow: hidden; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-weight: 600; white-space: pre;
}
.ch-line-text.ch-typing::after {
  content: ''; display: inline-block; width: 3px; height: .9em; margin-left: 2px;
  background: currentColor; vertical-align: middle; animation: chCursorBlink 1s steps(1) infinite;
}
@keyframes chCursorBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.ch-wordmark {
  position: absolute; left: 0; top: 520px; width: 760px;
  display: flex; align-items: center; gap: 20px; opacity: 1; transform: translateY(0px) translateZ(20px);
}
.ch-wordmark-text {
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 78px; letter-spacing: -0.01em;
  white-space: nowrap; color: #f3f6f8;
}
.ch-os-chip-wrap { position: relative; display: inline-flex; }
.ch-os-light {
  position: absolute; inset: -6px; width: 14px; height: 14px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #eafeff 0%, #1fe6ff 45%, transparent 72%);
  box-shadow: 0 0 14px 4px rgba(31,230,255,.75); pointer-events: none;
  offset-path: inset(0 round 18px); offset-distance: 0%;
}
.ch-os-chip {
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 42px; color: #05808f;
  background: rgba(10,162,181,.1); border: 2.5px solid #0AA2B5; border-radius: 18px;
  padding: 6px 20px; box-shadow: 0 0 18px rgba(10,162,181,.35);
}

.ch-cta {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; opacity: 1; text-align: center;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase; color: #eafeff;
  padding: 13px 30px; border-radius: 999px; border: 1.5px solid #0AA2B5;
  background: rgba(10,162,181,.12);
  animation: chCtaPulse 2.6s ease-in-out infinite;
}
@keyframes chCtaPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(10,162,181,.3); border-color: #0AA2B5; }
  50% { box-shadow: 0 0 26px rgba(10,162,181,.55); border-color: #1fe6ff; }
}

@media (prefers-reduced-motion: reduce) {
  .ch-floor, .ch-cta, .ch-line-text.ch-typing::after { animation: none !important; }
}

.ch-reduced-static { display: none; }
.code-hero.ch-reduced .ch-fit,
.code-hero.ch-reduced .ch-cta { display: none; }
.code-hero.ch-reduced .ch-reduced-static { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.ch-wordmark-static { display: flex; align-items: center; gap: 16px; }
.ch-wordmark-static .ch-wordmark-text { font-size: 48px; }
.ch-wordmark-static .ch-os-chip { font-size: 26px; padding: 5px 14px; }
.ch-cta-static {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; text-align: center;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase; color: #eafeff;
  padding: 13px 30px; border-radius: 999px; border: 1.5px solid #0AA2B5;
  background: rgba(10,162,181,.12); box-shadow: 0 0 14px rgba(10,162,181,.3);
}
.ch-cta:focus-visible, .ch-cta-static:focus-visible { outline: 2px solid #1fe6ff; outline-offset: 4px; border-radius: 999px; }

/* ---------- panel de contacto (captura.js) ---------- */

/* `display` de autor le gana al atributo `hidden`, así que sin esta regla
   `.panel-fondo { display: flex }` mostraría el panel aunque tenga [hidden].
   Va primero y global, igual que en diagnostico.css. */
[hidden] { display: none !important; }

.cta-principal {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 14px;
  letter-spacing: .03em; text-decoration: none; text-align: center;
  color: #04191B; background: var(--accent);
  border: 0; border-radius: 999px; padding: 15px 32px; cursor: pointer;
  margin-top: 26px;
  box-shadow: 0 0 22px rgba(16,196,206,.34);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cta-principal:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(16,196,206,.5); }
.cta-principal:disabled { opacity: .6; cursor: default; transform: none; }
.cta-principal:focus-visible { outline: 2px solid #1fe6ff; outline-offset: 3px; }
.cta-principal--link { margin-top: 22px; }

.panel-fondo {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 60;
  padding: 24px;
  background: rgba(3,6,9,.72);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.panel {
  position: relative;
  width: 100%; max-width: 520px;
  background: #0A0E13;
  border: 1px solid rgba(16,196,206,.22);
  border-radius: 18px;
  padding: 34px 34px 30px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03) inset;
  /* Sin esto, un panel más alto que la pantalla queda con la mitad de abajo
     inalcanzable: el fondo scrollea pero el panel centrado no se mueve. */
  margin: auto;
}

.panel-cerrar {
  position: absolute; top: 14px; right: 14px;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  color: #8b98a3; background: transparent;
  border: 1px solid rgba(255,255,255,.09); border-radius: 9px; cursor: pointer;
}
.panel-cerrar:hover { color: #f3f6f8; border-color: rgba(255,255,255,.2); }
.panel-cerrar:focus-visible { outline: 2px solid #1fe6ff; outline-offset: 2px; }

.panel .eyebrow, .panel .eyebrow .dot { color: var(--accent); }
.panel-titulo {
  font-family: "Sora", sans-serif; font-weight: 800;
  font-size: clamp(23px, 4.6vw, 28px); line-height: 1.18;
  color: #f3f6f8; margin-top: 12px;
}
.panel-sub { font-size: 15px; color: #9FB0B8; margin-top: 9px; }

.panel-form { margin-top: 24px; }
.campo { display: block; margin-bottom: 15px; }
.campo-label { display: block; font-size: 13px; color: #c7ccd3; margin-bottom: 7px; }
.campo-opcional { color: #6c7883; }
.campo select, .campo input, .campo textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: #f3f6f8;
  background: #05070a; border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 12px 13px;
  /* Safari iOS le pone su propio estilo a select y textarea y quedan blancos. */
  -webkit-appearance: none; appearance: none;
}
.campo textarea { resize: vertical; min-height: 62px; }
/* La flecha del select, que `appearance: none` se lleva puesta. Va como
   background y no como pseudo-elemento porque <select> no admite ::after. */
.campo select {
  background-image: linear-gradient(45deg, transparent 50%, #8b98a3 50%),
                    linear-gradient(135deg, #8b98a3 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.campo select:focus, .campo input:focus, .campo textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,196,206,.16);
}
.campo [aria-invalid="true"] { border-color: #E86A6A; }

/* El campo trampa. Fuera de pantalla y no `display:none`: algunos bots saltean
   lo que está oculto, y lo que buscamos es justamente que lo completen. */
.campo-trampa {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.panel-error {
  font-size: 14px; color: #F0A0A0; margin-top: 4px;
  background: rgba(232,106,106,.1); border-left: 3px solid #E86A6A;
  padding: 9px 12px; border-radius: 0 8px 8px 0;
}
.panel-form .cta-principal { width: 100%; margin-top: 8px; }

.panel-alt { font-size: 14px; color: #8b98a3; margin-top: 14px; }
.panel-alt a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.panel-alt a:hover { color: #1fe6ff; }

.panel-ok .cta-principal { width: 100%; }

@media (max-width: 560px) {
  .panel-fondo { padding: 14px; align-items: flex-start; }
  .panel { padding: 28px 20px 24px; border-radius: 15px; }
  .panel-cerrar { top: 10px; right: 10px; }
}

/* Los tres canales directos, ahora secundarios: mismo color, menos peso. */
.cta-final .contact-buttons .btn { font-size: 12.5px; padding: 10px 18px; }
