/* =========================================================
   Eulogio Rivas - Banner de cookies + páginas legales
   Reutiliza los tokens de styles.css (colores, tipografías, radios).
   ========================================================= */

/* ---------- Banner de cookies ---------- */
.cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  padding: 16px;
  transform: translateY(120%);
  transition: transform .45s var(--ease);
}
.cookiebar.is-visible { transform: translateY(0); }
.cookiebar__inner {
  max-width: 780px; margin-inline: auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
}
.cookiebar__text { flex: 1 1 320px; font-size: 0.92rem; color: rgba(250,250,248,.82); }
.cookiebar__text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookiebar__actions { display: flex; gap: 10px; flex: none; }
.cookiebar .btn--ghost { color: var(--bg); border-color: rgba(250,250,248,.3); }
.cookiebar .btn--ghost:hover { background: rgba(250,250,248,.08); border-color: rgba(250,250,248,.5); color: var(--bg); }

@media (max-width: 560px) {
  .cookiebar__inner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookiebar__actions { flex-direction: column-reverse; }
  .cookiebar__actions .btn { justify-content: center; }
}

/* ---------- Footer: dos filas de enlaces ---------- */
.footer__navs { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.footer__links--legal { font-size: 0.88rem; }
.footer__links--legal .legal-prefs-btn { color: var(--ink-soft); }
.footer__links--legal .legal-prefs-btn:hover { color: var(--accent-deep); }
@media (max-width: 620px) {
  .footer__navs { align-items: flex-start; }
}

/* ---------- Páginas legales ---------- */
.legal-hero { padding: clamp(40px, 7vw, 72px) 0 clamp(24px, 4vw, 40px); }
.legal-hero .eyebrow { margin-bottom: 16px; }
.legal-hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.06; letter-spacing: -0.03em;
  margin-bottom: 14px; max-width: 22ch;
}
.legal-hero__updated { color: var(--ink-soft); font-size: 0.92rem; }

.legal-body { padding-bottom: clamp(56px, 8vw, 96px); }
.legal-body__grid { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }

.legal-toc {
  position: sticky; top: 92px;
  display: flex; flex-direction: column; gap: 2px;
  border-left: 1px solid var(--line); padding-left: 16px;
}
.legal-toc a {
  color: var(--ink-soft); font-size: 0.9rem; font-weight: 500;
  padding: 6px 0; transition: color .2s var(--ease);
}
.legal-toc a:hover { color: var(--accent-deep); }

.legal-prose { max-width: 68ch; }
.legal-prose h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem; letter-spacing: -0.01em;
  margin-top: 40px; margin-bottom: 14px; scroll-margin-top: 90px;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.1rem; margin-top: 24px; margin-bottom: 8px;
}
.legal-prose p { color: var(--ink-soft); margin-bottom: 14px; }
.legal-prose p strong, .legal-prose li strong { color: var(--ink); }
.legal-prose ul, .legal-prose ol { color: var(--ink-soft); margin: 0 0 14px 1.3em; }
.legal-prose li { margin-bottom: 6px; }
.legal-prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }

.legal-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px 22px; margin: 18px 0; font-size: 0.95rem; color: var(--ink-soft);
}
.legal-card strong { color: var(--ink); }

.legal-table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--radius-card); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { font-family: var(--font-display); font-weight: 700; background: var(--surface-2); }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td { color: var(--ink-soft); }

.legal-prefs-btn {
  background: none; border: none; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

@media (max-width: 780px) {
  .legal-body__grid { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc {
    position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 18px;
    border-left: none; border-bottom: 1px solid var(--line); padding: 0 0 16px;
  }
}
