/* =====================================================
   legal.css — Páginas legales (Política de Privacidad,
                Términos de Servicio y futuros documentos).
   Tipografía editorial legible, jerarquía clara, look & feel
   coherente con el resto del sitio (color accent mint, mono
   para metadatos, display para títulos grandes).
   ===================================================== */

.legal {
  padding-top: calc(var(--header-height) + var(--space-8));
  padding-bottom: var(--space-10);
  min-height: 100vh;
}

/* ---------- Header del documento ---------- */
.legal__header {
  max-width: 760px;
  margin: 0 auto var(--space-9);
  text-align: center;
}

.legal__kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--accent-color);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-3);
  background: rgba(73, 197, 182, 0.06);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
}

.legal__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-4);
  color: var(--text-main);
  text-wrap: balance;
}

.legal__updated {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.legal__updated time {
  color: var(--accent-color);
}

/* ---------- Cuerpo del documento ---------- */
.legal__body {
  max-width: 760px;
  margin: 0 auto;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-muted);
}

/* Cada <section> del documento */
.legal__section {
  margin-bottom: var(--space-8);
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

.legal__section > h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--accent-border);
}

.legal__section > h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-color);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

.legal__section > p {
  margin-bottom: var(--space-3);
}

.legal__section strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Listas con bullet custom (›) */
.legal__section ul {
  list-style: none;
  padding-left: 0;
  margin: var(--space-3) 0;
}

.legal__section ul li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-2);
  line-height: 1.7;
}

.legal__section ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-color);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 1.1em;
  line-height: 1.7;
}

/* Links dentro del documento */
.legal__section a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth),
              text-shadow var(--dur-fast) var(--ease-smooth);
}

.legal__section a:hover,
.legal__section a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-shadow: 0 0 8px var(--accent-glow);
}

/* ---------- Botón "Volver al inicio" ---------- */
.legal__back {
  text-align: center;
  margin-top: var(--space-10);
}

.legal__back a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-color);
  background: transparent;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition:
    background var(--dur-base) var(--ease-smooth),
    color var(--dur-base) var(--ease-smooth),
    box-shadow var(--dur-base) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-spring);
}

.legal__back a:hover,
.legal__back a:focus-visible {
  background: var(--accent-color);
  color: var(--bg-primary);
  text-decoration: none;
  text-shadow: none;
  box-shadow: 0 0 24px rgba(73, 197, 182, 0.4);
  transform: translateY(-2px);
}

/* ---------- Highlight del link legal en el footer ---------- */
.footer__nav a.is-current,
.footer__nav a[aria-current="page"] {
  color: var(--accent-color);
  text-shadow: 0 0 8px var(--accent-glow);
  position: relative;
}

.footer__nav a.is-current::before,
.footer__nav a[aria-current="page"]::before {
  content: "▸";
  display: inline-block;
  margin-right: var(--space-2);
  color: var(--accent-color);
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  .legal {
    padding-top: calc(var(--header-height) + var(--space-6));
    padding-bottom: var(--space-8);
  }

  .legal__section {
    margin-bottom: var(--space-7);
  }
}
