/* SuChatBot — hoja de estilos compartida. Fuentes autoalojadas (assets/fuentes/), sin recursos externos.
   Paleta de marca: violeta #5B3DF5, lila #B8C7FF (solo sobre oscuro), Noche #0F1020. Ver marca/guia.html. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fuentes/SpaceGrotesk-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fuentes/Inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fuentes/Inter-600.woff2") format("woff2");
}

:root {
  --bg: #f7f7fb;
  --bg-alt: #ece8ff;
  --surface: #ffffff;
  --text: #0f1020;
  --muted: #5a5a70;
  --primary: #5b3df5;
  --primary-hover: #3a22b8;
  --on-primary: #ffffff;
  --link: #5b3df5;
  --link-hover: #3a22b8;
  --accent: #3a22b8;
  --accent-soft: #ece8ff;
  --border: #d8d2f3;
  --focus: #5b3df5;
  --shadow: 0 1px 2px rgba(15, 16, 32, 0.06), 0 8px 24px rgba(58, 34, 184, 0.08);
  --bubble-in: #ece8ff;
  --bubble-in-text: #0f1020;
  --bubble-out: #5b3df5;
  --bubble-out-text: #ffffff;
  --band-bg: #5b3df5;
  --band-text: #ffffff;
  --band-btn-bg: #ffffff;
  --band-btn-text: #5b3df5;
  --radius: 14px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1020;
    --bg-alt: #15162b;
    --surface: #1a1b33;
    --text: #f7f7fb;
    --muted: #a9a9c2;
    --primary: #5b3df5;
    --primary-hover: #6c50fa;
    --on-primary: #ffffff;
    --link: #b8c7ff;
    --link-hover: #ffffff;
    --accent: #b8c7ff;
    --accent-soft: #26264f;
    --border: #2d2f55;
    --focus: #b8c7ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --bubble-in: #26284a;
    --bubble-in-text: #f7f7fb;
    --bubble-out: #b8c7ff;
    --bubble-out-text: #0f1020;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-primary); }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }

/* Cabecera */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.logo img { display: block; height: 40px; width: auto; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.site-nav .lang-switch a {
  border: 1px solid var(--border);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--primary);
  line-height: 1.2;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn-ghost { background: transparent; color: var(--link); border-color: var(--link); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--link-hover); border-color: var(--link-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Tipografía: H1 52/1.15, H2 34/1.2, H3 20/1.3, cuerpo 17/1.65 (ver marca/guia.html) */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 6.2vw, 3.25rem); line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.625rem, 4.2vw, 2.125rem); line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* Secciones */
section { padding: 56px 0; }
@media (min-width: 800px) { section { padding: 80px 0; } }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

/* Héroe */
.hero { padding-top: 44px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }

.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.mock-top .tag { color: var(--accent); font-weight: 600; }
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.bubble.in { background: var(--bubble-in); color: var(--bubble-in-text); border-bottom-left-radius: 4px; }
.bubble.out { background: var(--bubble-out); color: var(--bubble-out-text); margin-left: auto; border-bottom-right-radius: 4px; }
.mock-foot { font-size: 0.8125rem; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* Tarjetas y pasos */
.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card-soon { border-style: dashed; }
.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { color: var(--muted); margin: 0; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--link);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L21 7.5l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L21 7.5l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checklist strong { display: block; font-weight: 600; }
.checklist span { color: var(--muted); }

/* Contacto */
.cta-band {
  background: var(--band-bg);
  color: var(--band-text);
  border-radius: 22px;
  padding: 40px 24px;
  text-align: center;
}
.cta-band h2 { color: var(--band-text); }
.cta-band p { color: var(--band-text); max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-band a.btn { background: var(--band-btn-bg); color: var(--band-btn-text); border-color: var(--band-btn-bg); }
.cta-band a.btn:hover { background: var(--bg-alt); color: var(--primary-hover); border-color: var(--bg-alt); }
.cta-band a:focus-visible { outline-color: var(--band-text); }
.cta-band .btn-row { justify-content: center; }
.cta-band .mail { color: var(--band-text); font-weight: 600; overflow-wrap: anywhere; }

/* Páginas legales */
.page-head { padding: 48px 0 24px; border-bottom: 1px solid var(--border); }
.page-head p { color: var(--muted); margin: 0; }
.prose { max-width: 74ch; padding: 40px 0 72px; }
.prose h2 { margin-top: 2em; font-size: clamp(1.35rem, 3.6vw, 1.7rem); scroll-margin-top: 16px; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose .toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 8px; }
.prose .toc p { margin: 0 0 6px; font-weight: 700; }
.prose .toc ol { margin: 0; columns: 1; }
@media (min-width: 700px) { .prose .toc ol { columns: 2; column-gap: 32px; } }
.prose .toc li { margin-bottom: 0.25em; break-inside: avoid; }

.providers { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.providers li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0;
}
.providers strong { display: block; }
.providers span { display: block; color: var(--muted); font-size: 0.97rem; }

.notice {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 1.2em;
}
.notice p:last-child { margin-bottom: 0; }

.status-box {
  background: var(--surface);
  border: 2px solid var(--link);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 28px;
}
.status-box[hidden] { display: none; }
.status-box p { margin: 0; }
.status-box code {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--bg-alt);
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Pie */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0 36px;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr; } }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer strong { color: var(--text); }
.site-footer a { color: var(--link); overflow-wrap: anywhere; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { display: inline-block; padding: 4px 0; }
.footer-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.88rem; }
.footer-legal p { margin: 0 0 6px; }
.footer-legal .footer-by { font-size: 0.8125rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.footer-by span { letter-spacing: 0.18em; text-transform: uppercase; }

/* 404 */
.center-page { min-height: 55vh; display: flex; align-items: center; }
.center-page .container { padding-top: 48px; padding-bottom: 48px; }
