/* ============================================================
   CRIATech · components.css
   Componentes reutilizables: nav, footer, botones, tablas, etc.
   ============================================================ */

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad-x);
  background: rgba(5,7,10,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: padding 200ms ease, background 200ms ease;
}
.nav.scrolled {
  padding: 10px var(--pad-x);
  background: rgba(5,7,10,0.88);
}

.nav-logo {
  height: 26px;
  display: block;
  transition: filter 400ms ease;
}

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 13.5px;
  color: var(--text-dim);
  font-weight: 500;
  transition: color 160ms;
  position: relative;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--blue);
  color: white;
  font-weight: 500;
  font-size: 13.5px;
  clip-path: var(--clip-sm);
  transition: background 160ms;
  position: relative;
  overflow: hidden;
}
.nav-cta:hover { background: var(--blue-2); }
.nav-cta .dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

/* Acceso interno (discreto) */
.nav-intern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 8px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.nav-intern:hover {
  color: var(--blue-2);
  border-color: var(--blue-line);
  background: var(--blue-soft);
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--text);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top:  6px; }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  clip-path: var(--clip-md);
  transition: transform 250ms cubic-bezier(.2,.7,.2,1),
              background 200ms ease,
              border-color 200ms ease,
              box-shadow 300ms ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: white;
  color: black;
  font-weight: 600;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(255,255,255,0.25);
}

.btn-blue {
  background: var(--blue);
  color: white;
  font-weight: 600;
}
.btn-blue:hover {
  background: var(--blue-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(31,123,200,0.6);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: white;
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: "→";
  transition: transform 200ms ease;
}
.btn:hover .btn-arrow::after,
.btn-arrow:hover::after {
  transform: translateX(3px);
}

/* ============ SECTION HEADING ============ */
.section-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--blue-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--blue-2);
}

.section-title {
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section-title .hl {
  color: var(--blue-2);
  font-style: italic;
  font-weight: 400;
}

.section-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 620px;
  line-height: 1.55;
}

/* ============ TABLA INSTITUCIONAL ============ */
.cria-table-wrap {
  border: 1px solid var(--line);
  clip-path: var(--clip-lg);
  background: var(--ink-2);
  overflow: hidden;
}

.cria-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cria-table thead {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line-strong);
}

.cria-table th {
  padding: 16px 20px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-right: 1px solid var(--line);
}
.cria-table th:last-child { border-right: none; }

.cria-table td {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  color: var(--text);
}
.cria-table td:last-child { border-right: none; }

.cria-table tbody tr {
  transition: background 200ms ease;
}
.cria-table tbody tr:hover {
  background: rgba(255,255,255,0.015);
}

.cria-table .num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Badges de severidad */
.sev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid;
  white-space: nowrap;
}
.sev-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.sev-leve {
  color: var(--warn);
  background: rgba(232,178,87,0.12);
  border-color: rgba(232,178,87,0.4);
}
.sev-leve::before { background: var(--warn); }
.sev-grave {
  color: #f59f55;
  background: rgba(245,159,85,0.12);
  border-color: rgba(245,159,85,0.45);
}
.sev-grave::before { background: #f59f55; }
.sev-gravisima {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}
.sev-gravisima::before { background: var(--danger); }

/* ============ FOOTER ============ */
.footer {
  padding: 50px var(--pad-x) 40px;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.footer-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-shell img { height: 28px; }
.footer-shell .c {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-dim);
  transition: color 160ms;
}
.footer-links a:hover { color: var(--text); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  :root { --pad-x: 24px; }

  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5,7,10,0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a {
    padding: 16px var(--pad-x);
    border-bottom: 1px solid var(--line);
  }

  .cria-table { font-size: 13px; }
  .cria-table th, .cria-table td { padding: 12px 14px; }
}
