/* Estilos compartidos por las páginas legales (aviso-legal, privacidad, cookies).
   Header y footer replican la landing — mismas variables, tipografías y
   estructura visual. El body de prosa se mantiene sobrio (sin grid pattern
   ni radial gradient) para no distraer de la lectura. */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-tint: #f0f0eb;
  --ink: #0a0a0f;
  --ink-2: #2a2a35;
  --ink-dim: #6b6b78;
  --ink-faint: #a8a8b3;
  --line: #e8e8e3;
  --line-strong: #d8d8d3;

  --accent: #2347e5;
  --accent-soft: #eef1ff;
  --accent-deep: #1530b8;

  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --sans:  'Geist', system-ui, sans-serif;
  --mono:  'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-deep); }

/* ====== TOP BANNER (idéntico al de la landing) ====== */
.top-banner {
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.top-banner .tag {
  background: var(--success, #00a955);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .1em;
  font-size: 10px;
  box-shadow: 0 0 0 0 rgba(0,169,85,.7);
  animation: tag-pulse 2.4s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes tag-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,169,85,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(0,169,85,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,169,85,0); }
}
@media (prefers-reduced-motion: reduce) {
  .top-banner .tag { animation: none; }
}
.top-banner strong {
  color: white;
  font-weight: 600;
  background: rgba(255,255,255,.12);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
}
.top-banner a {
  color: white;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.4);
  text-underline-offset: 3px;
}
.top-banner a:hover { text-decoration-color: white; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* ====== NAV (idéntico al de la landing) ====== */
nav {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.logo-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: var(--bg-elev);
  opacity: .25;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-family: var(--sans);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .2s;
}
.nav-cta:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}
.nav-cta .arrow { transition: transform .2s; }
.nav-cta:hover .arrow { transform: translateX(-3px); }

/* Selector de idioma — mismo estilo que la home */
.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.lang-switcher {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  background-color: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 28px 6px 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%236b6b78' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all .2s;
}
.lang-switcher:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.lang-switcher:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
@media (max-width: 540px) {
  .lang-switcher { font-size: 11px; padding: 5px 24px 5px 8px; }
}

/* ====== CONTENIDO LEGAL (prosa) ====== */
main.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 88px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}

main.legal .subtitle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

main.legal h1 {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 56px;
}
main.legal h1 em {
  font-style: italic;
  color: var(--accent);
}

main.legal h2 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 52px 0 14px;
}

main.legal h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 8px;
}

main.legal p {
  margin: 0 0 16px;
}

main.legal ul, main.legal ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
main.legal li { margin-bottom: 6px; }

main.legal strong { color: var(--ink); font-weight: 600; }
main.legal em { font-style: italic; }

main.legal code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-tint);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

main.legal .id-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 32px;
  font-size: 15px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
main.legal .id-table th,
main.legal .id-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
main.legal .id-table tr:last-child th,
main.legal .id-table tr:last-child td { border-bottom: none; }
main.legal .id-table th {
  width: 36%;
  font-weight: 500;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 13px;
}

main.legal .updated {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ====== FOOTER (idéntico al de la landing) ====== */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.footer-inner a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}
.footer-inner a:hover { text-decoration-color: currentColor; }
.footer-legal {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
}
.footer-legal a {
  color: var(--ink-faint);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--ink); }

.footer-legal .developed-by {
  margin-left: auto;
  color: var(--ink-faint);
}
.footer-legal .developed-by a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}
.footer-legal .developed-by a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

@media (max-width: 540px) {
  .wrap { padding: 0 16px; }
  main.legal { padding: 36px 16px 64px; }
  main.legal h1 { font-size: 42px; margin-bottom: 40px; }
  main.legal h2 { font-size: 20px; margin: 40px 0 12px; }

  .top-banner { font-size: 11px; gap: 8px; padding: 10px 12px; }
  .top-banner .tag { font-size: 9px; padding: 3px 8px; }

  /* Footer centrado en mobile */
  .footer-inner {
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
  .footer-legal {
    justify-content: center;
    text-align: center;
    gap: 14px;
  }
  .footer-legal .developed-by {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  nav { padding: 14px 0; gap: 8px; }
  .logo { gap: 8px; }
  .logo > span:not(.logo-mark) {
    font-size: 11px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-right { gap: 8px; }
  .nav-cta { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 380px) {
  .logo > span:not(.logo-mark) { display: none; }
  .top-banner { font-size: 10px; padding: 9px 10px; }
}

/* ====== COOKIE CONSENT BANNER (idéntico al de la landing) ====== */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 760px;
  margin: 0 auto;
  z-index: 1000;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 48px -12px rgba(10,10,15,.12), 0 4px 16px -4px rgba(10,10,15,.06);
  padding: 18px 22px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-banner p {
  flex: 1 1 280px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}
.cookie-banner a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-cookie {
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  transition: all .15s;
  white-space: nowrap;
}
.btn-cookie:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-cookie:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.reopen-cookie-banner {
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  transition: all .15s;
}
.reopen-cookie-banner:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

@media (max-width: 540px) {
  .cookie-banner { padding: 16px; bottom: 8px; left: 8px; right: 8px; }
  .cookie-banner-actions { flex: 1 1 100%; }
  .btn-cookie { flex: 1; }
}
