:root {
  color-scheme: light dark;
  --bg: #faf7fa;
  --panel: #ffffff;
  --fg: #221826;
  --muted: #6b5f70;
  --line: #e2dae2;
  --accent: #560056;
  --accent-hover: #7a007a;
  --on-accent: #ffffff;
  --franja: #560056;
  --franja-fg: #ffedcb;
  --franja-muted: #e5c9a4;
  --franja-line: #7a3d7a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141015;
    --panel: #1c161e;
    --fg: #f2ecf2;
    --muted: #b6a9b8;
    --line: #372e39;
    /* #560056 sobre el fondo oscuro da 1.37:1, invisible. El acento del modo
       oscuro tiene que ser este gemelo claro, que llega a 7.9:1. */
    --accent: #d98ed9;
    --accent-hover: #ecb8ec;
    --on-accent: #1a001a;
    --franja: #2b0a2b;
    --franja-fg: #ffedcb;
    --franja-muted: #e5c9a4;
    --franja-line: #4d2a4d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ui-serif da New York en Apple y Georgia en Windows: contraste tipografico
   real sin cargar una sola webfont. */
h1, h2, h3 {
  font-family: ui-serif, "New York", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
}

.envoltorio {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.angosto {
  max-width: 62ch;
}

section {
  padding: 72px 0;
}

section + section {
  border-top: 1px solid var(--line);
}

.seccion-titulo {
  margin-bottom: 12px;
}

.seccion-bajada {
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 36px;
}

/* La barra de navegacion se inyecta desde /assets/nav.js, con sus clases nav- propias. */

/* Botones */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.boton:hover,
.boton:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.boton-suave {
  background: transparent;
  border-color: var(--line);
  color: var(--fg);
  font-weight: 500;
}

.boton-suave:hover,
.boton-suave:focus-visible {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Tarjetas */
.tarjeta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.grilla-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.pie {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: 0.94rem;
}

.pie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
}
