/* =========================================================
   Agentium Systems — hoja de estilos única
   CSS externo (sin <style> ni style="" en el HTML) para poder
   servir una Content-Security-Policy con style-src 'self',
   es decir, sin 'unsafe-inline'.
   ========================================================= */

/* ---------- Tipografías autoalojadas ----------
   Se sirven desde el propio dominio. No se carga nada de
   fonts.googleapis.com ni fonts.gstatic.com, de modo que no se
   comunica la IP del visitante a un tercero. Son fuentes
   variables: un solo archivo cubre todos los pesos.          */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-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;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('sora-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;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('sora-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;
}

:root {
  --navy: #14345C;
  --navy-dark: #0D2440;
  --teal: #12A5A0;
  --teal-dark: #0E837F;
  --bg-light: #F4F8FB;
  --text: #2A3B4D;
  --text-soft: #5A6B7D;
  --white: #FFFFFF;
  --border: #E3ECF3;
  --shadow: 0 10px 30px rgba(20, 52, 92, 0.08);
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Sora', 'Inter', sans-serif; color: var(--navy); line-height: 1.2; }
/* height:auto es imprescindible: sin él, los atributos width/height del HTML
   fijan la altura y deforman la imagen al reducirse el ancho. */
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }

/* ---------- Accesibilidad ---------- */
/* Foco visible en todo elemento interactivo (navegación por teclado) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy-dark);
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}
.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;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--teal-dark);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(18, 165, 160, 0.35);
}
.btn-primary:hover { background: #0b6b68; transform: translateY(-2px); }
.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Navbar ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 66px; width: auto; }
.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 22px;
  align-items: center;
  font-weight: 500;
  font-size: .95rem;
}
.nav-links a { color: var(--text-soft); white-space: nowrap; }
/* teal-dark en lugar de teal: 4,65:1 sobre blanco, cumple WCAG AA */
.nav-links a:hover { color: var(--teal-dark); }
.nav-cta { padding: 10px 22px; font-size: .9rem; white-space: nowrap; }
@media (max-width: 1120px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-light) 100%);
  padding: 72px 0 80px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero .eyebrow {
  display: inline-block;
  background: rgba(18, 165, 160, 0.12);
  color: var(--teal-dark);
  font-weight: 600;
  font-size: .85rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: 20px; }
.hero h1 .accent { color: var(--teal-dark); }
.hero p.lead { font-size: 1.15rem; color: var(--text-soft); margin-bottom: 32px; max-width: 34rem; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-note { font-size: .88rem; color: var(--text-soft); }
.hero-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; }
}

/* ---------- Encabezados de sección ---------- */
.section-head { max-width: 46rem; margin: 0 auto 52px; text-align: center; }
.kicker {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.section-head p { color: var(--text-soft); font-size: 1.05rem; }

/* ---------- Problemas ---------- */
.problemas { background: var(--white); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-4px); }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  background: rgba(18, 165, 160, 0.12);
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--teal-dark); }
.card.problema .icon { background: rgba(20, 52, 92, 0.08); }
.card.problema .icon svg { stroke: var(--navy); }
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { font-size: .95rem; color: var(--text-soft); }

/* ---------- Soluciones ---------- */
.soluciones { background: var(--bg-light); }

/* ---------- Sectores ---------- */
.sectores-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .sectores-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .sectores-grid { grid-template-columns: repeat(2, 1fr); } }
.sector {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.sector .icon {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  display: flex; align-items: center; justify-content: center;
}
.sector .icon svg { width: 24px; height: 24px; stroke: #fff; }
.sector h3 { font-size: .98rem; }

/* ---------- Cómo funciona ---------- */
.funcionamiento { background: var(--bg-light); }
.pasos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .pasos { grid-template-columns: 1fr; max-width: 30rem; margin: 0 auto; } }
.paso {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--shadow);
  position: relative;
}
.paso .num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.paso h3 { font-size: 1rem; margin-bottom: 6px; }
.paso p { font-size: .88rem; color: var(--text-soft); }

/* ---------- Sobre ---------- */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .sobre-grid { grid-template-columns: 1fr; } }
.sobre-img { border-radius: var(--radius); box-shadow: var(--shadow); }
.sobre h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; }
.sobre p { color: var(--text-soft); margin-bottom: 16px; }
.sobre ul { list-style: none; margin: 22px 0; }
.sobre li {
  padding-left: 34px;
  position: relative;
  margin-bottom: 12px;
  font-weight: 500;
}
.sobre li svg {
  position: absolute; left: 0; top: 3px;
  width: 22px; height: 22px;
  stroke: var(--teal-dark);
}

/* ---------- CTA final ---------- */
.cta-final {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--teal-dark) 130%);
  color: #fff;
  text-align: center;
}
.cta-final h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 16px; }
.cta-final p { color: rgba(255,255,255,.88); max-width: 40rem; margin: 0 auto 34px; font-size: 1.08rem; }
.cta-final .btn-primary { background: var(--teal); color: #08302E; box-shadow: 0 8px 24px rgba(18,165,160,.45); }
.cta-final .btn-primary:hover { background: #16bdb7; }
.cta-final .contacto { margin-top: 26px; font-size: .95rem; color: rgba(255,255,255,.85); }
.cta-final .contacto a { color: #9FE5E2; font-weight: 600; text-decoration: underline; }
/* Información básica de protección de datos (art. 11 RGPD).
   Discreta, pero legible: no bajar de .75rem ni del contraste actual. */
.cta-final .aviso-datos {
  margin: 26px auto 0;
  max-width: 38rem;
  font-size: .75rem;
  line-height: 1.5;
  color: rgba(255,255,255,.78);
  text-align: left;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 12px 16px;
}
.cta-final .aviso-datos a { color: #9FE5E2; text-decoration: underline; }
.cta-final .aviso-datos strong { color: #fff; }

/* ---------- Footer ---------- */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.85);
  padding: 40px 0 28px;
  font-size: .9rem;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-top .brand { font-family: 'Sora', sans-serif; font-weight: 700; color: #fff; font-size: 1.1rem; }
.footer-top .brand span { color: #4FD1CD; }
.footer-top .claim { color: rgba(255,255,255,.8); margin-top: 4px; }
.footer-legal {
  display: flex;
  gap: 10px 24px;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
}
.footer-legal a {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal a:hover { color: #9FE5E2; }
.footer-legal button {
  background: none;
  border: 1px solid rgba(255,255,255,.5);
  color: rgba(255,255,255,.95);
  font: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.footer-legal button:hover { border-color: #9FE5E2; color: #9FE5E2; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(255,255,255,.8);
  font-size: .84rem;
}
.footer-bottom a { color: rgba(255,255,255,.9); text-decoration: underline; }
.footer-bottom a:hover { color: #9FE5E2; }

/* =========================================================
   Páginas legales
   ========================================================= */
.legal-header {
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 20px 0 56px;
}
.legal-header .nav-logo img { height: 60px; }
.legal-header h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 36px;
}
.legal-header .actualizado {
  color: rgba(255,255,255,.85);
  margin-top: 12px;
  font-size: .95rem;
}
.legal-header .volver {
  display: inline-block;
  margin-top: 18px;
  color: #9FE5E2;
  text-decoration: underline;
  font-size: .92rem;
}
.legal-body { padding: 56px 0 72px; }
.legal-body .container { max-width: 820px; }
.legal-body h2 {
  font-size: 1.35rem;
  margin: 40px 0 14px;
  padding-top: 8px;
}
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin: 24px 0 10px; }
.legal-body p { margin-bottom: 14px; color: var(--text); }
.legal-body ul, .legal-body ol { margin: 0 0 18px 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--teal-dark); text-decoration: underline; }
.legal-body strong { color: var(--navy); }
.legal-body code, table.datos code {
  font-family: ui-monospace, 'Cascadia Mono', 'Consolas', monospace;
  font-size: .9em;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

/* Índice de contenidos */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 40px;
}
.toc h2 { font-size: 1rem; margin: 0 0 12px; padding: 0; }
.toc ol { margin: 0 0 0 20px; }
.toc li { margin-bottom: 4px; }

/* Marcador de dato legal pendiente. Imposible de pasar por alto. */
.pendiente {
  background: #FFF3CD;
  border: 1px dashed #B58105;
  color: #6B4B00;
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .93em;
  white-space: normal;
}
.aviso-pendientes {
  background: #FFF8E6;
  border: 1px solid #E9C766;
  border-left: 5px solid #B58105;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 36px;
}
.aviso-pendientes p { color: #6B4B00; margin-bottom: 8px; }
.aviso-pendientes p:last-child { margin-bottom: 0; }
.aviso-pendientes strong { color: #6B4B00; }

/* Tablas (cookies, datos) */
.tabla-wrap { overflow-x: auto; margin-bottom: 22px; }
table.datos {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 560px;
}
table.datos caption {
  text-align: left;
  font-weight: 600;
  color: var(--navy);
  padding-bottom: 10px;
}
table.datos th, table.datos td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
table.datos thead th { background: var(--bg-light); color: var(--navy); }

/* =========================================================
   Panel de preferencias de cookies
   ========================================================= */
.consent-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 300;
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(13, 36, 64, .28);
  padding: 22px 24px;
}
.consent-banner h2 { font-size: 1.1rem; margin-bottom: 8px; }
.consent-banner p { font-size: .92rem; color: var(--text-soft); margin-bottom: 16px; }
.consent-banner a { color: var(--teal-dark); text-decoration: underline; }
.consent-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.consent-actions .btn { padding: 11px 22px; font-size: .93rem; }

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(13, 36, 64, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.consent-modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(13, 36, 64, .35);
}
.consent-modal h2 { font-size: 1.25rem; margin-bottom: 10px; }
.consent-modal > p { font-size: .93rem; color: var(--text-soft); margin-bottom: 20px; }
.consent-modal a { color: var(--teal-dark); text-decoration: underline; }
.consent-cat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.consent-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}
.consent-cat-head h3 { font-size: 1rem; }
.consent-cat p { font-size: .87rem; color: var(--text-soft); margin: 0; }
.consent-cat .estado {
  display: inline-block;
  margin-top: 10px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: rgba(18, 165, 160, .12);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.consent-switch { display: flex; align-items: center; gap: 8px; font-size: .88rem; white-space: nowrap; }
.consent-switch input { width: 20px; height: 20px; accent-color: var(--teal-dark); cursor: pointer; }
.consent-switch input:disabled { cursor: not-allowed; }
.consent-modal .consent-actions { margin-top: 20px; }
.consent-registro {
  margin-top: 18px;
  font-size: .8rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.consent-hidden { display: none !important; }

@media (max-width: 520px) {
  .consent-actions .btn { width: 100%; text-align: center; }
}

/* =========================================================
   Página de error 404
   ========================================================= */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  text-align: center;
}
.error-page .codigo {
  font-family: 'Sora', sans-serif;
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: var(--teal-dark);
  line-height: 1;
  margin-bottom: 8px;
}
.error-page h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 14px; }
.error-page p { color: var(--text-soft); max-width: 34rem; margin: 0 auto 28px; }
