/* Catálogo NeuralSync Labs — identidad visual de neuralsync-labs.com */
:root {
  --bg: #05060f;
  --surface: #0a0c18;
  --card: #10142a;
  --fg: #f4f6fb;
  --muted: #9aa3bd;
  --brand: #6366f1;
  --accent: #22d3ee;
  --violet: #a855f7;
  --border: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.045);
  --ok: #22c55e;
  --warn: #eab308;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.hero::before { width: 480px; height: 480px; right: -120px; top: -180px; background: rgba(34, 211, 238, 0.10); }
.hero::after { width: 420px; height: 420px; left: -140px; bottom: -220px; background: rgba(168, 85, 247, 0.10); }
.brandline { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brandline svg { height: 40px; width: 40px; }
.brandline .name { font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; font-weight: 800; max-width: 22ch; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { margin-top: 18px; max-width: 62ch; color: var(--muted); font-size: 17px; }
.hero .meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; color: #a9b2cc; }
.hero .meta strong { color: var(--fg); font-weight: 600; }

/* ---------- Barra de control ---------- */
.controls {
  position: sticky; top: 0; z-index: 30;
  background: rgba(5, 6, 15, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.controls .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search {
  flex: 1 1 240px; min-width: 200px;
  background: var(--glass); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; color: var(--fg); font-size: 14.5px; outline: none;
}
.search:focus { border-color: var(--accent); }
select.filter {
  background: var(--surface); color: var(--fg); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 14px; font-size: 13.5px; outline: none; cursor: pointer;
}
.btn {
  border: 1px solid var(--border); background: var(--glass); color: var(--fg);
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(90deg, var(--brand), var(--accent)); border: none; font-weight: 600; color: #04121a; }
.mode-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mode-toggle button { border: none; background: transparent; color: var(--muted); padding: 9px 16px; font-size: 13.5px; cursor: pointer; }
.mode-toggle button.on { background: var(--accent); color: #04121a; font-weight: 700; }

/* ---------- Resumen ejecutivo ---------- */
.summary { padding: 40px 0 8px; }
.summary h2, section.block h2 { font-size: 26px; font-weight: 750; margin-bottom: 8px; }
.summary p.lead { color: var(--muted); max-width: 74ch; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.kpi .n { font-size: 30px; font-weight: 800; color: var(--accent); }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* ---------- Grid de tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding: 26px 0 8px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: border-color .15s, transform .15s;
  display: flex; flex-direction: column; gap: 10px;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card .cat { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet); font-weight: 700; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.card h3 { font-size: 17.5px; font-weight: 700; line-height: 1.25; }
.card p.desc { font-size: 13.5px; color: var(--muted); flex: 1; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.card .idlabel { font-size: 11px; color: #aab4cf; font-family: ui-monospace, monospace; }

/* ---------- Ficha (modal) ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(3, 4, 10, 0.78); backdrop-filter: blur(4px);
  z-index: 50; display: none; overflow-y: auto; padding: 30px 14px;
}
.overlay.open { display: block; }
.sheet {
  max-width: 880px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; padding: 30px clamp(18px, 4vw, 40px) 40px;
}
.sheet .head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.sheet h2 { font-size: clamp(21px, 3.4vw, 28px); font-weight: 800; line-height: 1.15; }
.sheet .close { background: var(--glass); border: 1px solid var(--border); color: var(--fg); border-radius: 50%; width: 36px; height: 36px; font-size: 17px; cursor: pointer; flex-shrink: 0; }
.sheet .sub { color: var(--muted); margin-top: 10px; font-size: 15px; }
.sheet h4 { margin: 24px 0 8px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.sheet ul { padding-left: 20px; font-size: 14px; color: #cdd4e6; }
.sheet li { margin: 4px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.pillrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cta-box {
  margin-top: 26px; background: linear-gradient(120deg, rgba(99,102,241,.16), rgba(34,211,238,.13));
  border: 1px solid rgba(34,211,238,.3); border-radius: var(--radius); padding: 16px 20px; font-size: 14.5px;
}
.internal-block {
  margin-top: 28px; border: 1px dashed rgba(234, 179, 8, 0.45); border-radius: var(--radius);
  padding: 18px 20px; background: rgba(234, 179, 8, 0.05);
}
.internal-block .warn-label { font-size: 11px; letter-spacing: 0.1em; color: var(--warn); font-weight: 800; text-transform: uppercase; }
.internal-block h5 { margin: 12px 0 4px; font-size: 12.5px; color: var(--fg); }
.internal-block ul { font-size: 13px; color: var(--muted); }
.internal-block code { font-size: 12px; color: #b7e3f0; background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 5px; }

/* ---------- Diagramas ---------- */
.diagram { margin-top: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.diagram svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }

/* ---------- Secciones (sectores / cómo trabajamos / contacto) ---------- */
section.block { padding: 44px 0 10px; }
.sector-grid, .steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 20px; }
.sector { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.sector h3 { font-size: 15.5px; margin-bottom: 8px; }
.sector ul { list-style: none; font-size: 13px; color: var(--muted); }
.sector li { padding: 3px 0; }
.sector li::before { content: "→ "; color: var(--accent); }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; border: 1px solid var(--border); }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); }
.contact {
  margin: 50px 0 30px; text-align: center; padding: 44px 24px;
  background: linear-gradient(120deg, rgba(99,102,241,.14), rgba(168,85,247,.10));
  border: 1px solid var(--border); border-radius: 20px;
}
.contact h2 { font-size: clamp(22px, 4vw, 32px); font-weight: 800; }
.contact p { color: var(--muted); margin: 12px auto 20px; max-width: 56ch; }
.contact .lines { display: flex; flex-direction: column; gap: 6px; font-size: 15.5px; }
footer.foot { border-top: 1px solid var(--border); padding: 22px 0 40px; font-size: 12.5px; color: #9aa4bf; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- Modo interno: marca visual global ---------- */
body.interno .controls { border-bottom: 2px solid var(--warn); }
.interno-banner { display: none; background: rgba(234,179,8,.12); color: var(--warn); font-size: 12.5px; font-weight: 700; text-align: center; padding: 6px; letter-spacing: .06em; }
body.interno .interno-banner { display: block; }

/* ---------- Impresión: limpio y SIN datos internos ---------- */
@media print {
  :root { --bg: #ffffff; --surface: #ffffff; --card: #f4f6fb; --fg: #0c1020; --muted: #444c63; --border: #d3d8e6; --glass: #eef1f8; }
  body { background: #fff; color: #0c1020; }
  .controls, .interno-banner, .btn, .mode-toggle, .search, select.filter, .sheet .close { display: none !important; }
  .internal-block { display: none !important; }
  body.interno .internal-block { display: none !important; } /* nunca imprimir lo interno */
  .card { break-inside: avoid; cursor: default; }
  .hero::before, .hero::after { display: none; }
  .overlay { position: static; display: block !important; background: none; padding: 0; }
  .overlay:not(.open) { display: none !important; }
  a { color: #0c1020; }
  .print-all .grid { display: block; }
  .print-all .card { margin-bottom: 12px; }
}
@page { margin: 1.4cm; }

/* --- tarjetas con pictograma (rediseño fichas visuales 2026-07-30) --- */
.card .card-hero { display: flex; gap: 12px; align-items: center; margin: 10px 0 6px; }
.card .card-hero h3 { margin: 0; }
.card .card-problema { font-size: 12.8px; color: #b7c0d8; background: rgba(34,211,238,.06); border-left: 2px solid var(--accent); padding: 6px 10px; border-radius: 0 8px 8px 0; margin: 8px 0; }
.card .card-ver { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.card:hover .card-ver { text-decoration: underline; }
