/* ============================================================
   Legal pages — Rocket Nova
   Tema oscuro corporativo, optimizado para lectura larga.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

:root {
  --navy: #0a0d18;
  --navy-1: #0b0e1a;
  --navy-2: #111829;
  --navy-3: #18213a;
  --navy-4: #1c2540;
  --navy-5: #222e50;
  --blue: #2563eb;
  --blue-l: #60a5fa;
  --gold: #c9933a;
  --gold-l: #e8b55a;
  --gold-soft: rgba(201, 147, 58, 0.16);
  --text: #d8d2c6;
  --text-soft: #b6b0a4;
  --text-mute: #8a93a8;
  --rule: rgba(255, 255, 255, 0.07);
  --rule-gold: rgba(201, 147, 58, 0.28);
  --r: 18px;
  --r-s: 12px;
  --shadow: 0 30px 80px -32px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(
      1200px 600px at 50% -10%,
      rgba(37, 99, 235, 0.12),
      transparent 70%
    ),
    radial-gradient(
      900px 500px at 90% 110%,
      rgba(201, 147, 58, 0.08),
      transparent 70%
    ),
    var(--navy);
  background-attachment: fixed;
  color: var(--text);
  font-family:
    'DM Sans',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-l);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-l);
}

/* ────── Header ────── */
.legal-header {
  background: linear-gradient(
    180deg,
    rgba(11, 14, 26, 0.95) 0%,
    rgba(17, 24, 41, 0.7) 100%
  );
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-gold);
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.legal-header-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff;
  font-family: 'Libre Baskerville', serif;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.legal-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(201, 147, 58, 0.3);
}

.legal-brand-name {
  color: #fff;
}

.legal-brand-accent {
  color: var(--gold-l);
}

.legal-lang {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
}

.legal-lang button {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font:
    600 12px/1 'DM Sans',
    sans-serif;
  letter-spacing: 0.6px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    background 0.2s,
    color 0.2s;
}

.legal-lang button[aria-pressed='true'] {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-l) 100%);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(201, 147, 58, 0.35);
}

.legal-lang button:hover:not([aria-pressed='true']) {
  color: #fff;
}

/* ────── Main reading panel ────── */
.legal-main {
  padding: 56px 24px 72px;
  width: 100%;
}

.legal-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background:
    linear-gradient(
      180deg,
      rgba(28, 37, 64, 0.55) 0%,
      rgba(17, 24, 41, 0.85) 100%
    ),
    var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 64px 64px 56px;
  position: relative;
  overflow: hidden;
}

.legal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--blue) 100%);
}

.legal-card::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  pointer-events: none;
}

.legal-kicker {
  font:
    600 11px/1 'DM Sans',
    sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-l);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legal-kicker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.legal-card h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 38px;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.legal-card .legal-subtitle {
  color: var(--text-mute);
  font-size: 15px;
  margin: 0 0 30px;
  font-style: italic;
}

.legal-card .legal-intro {
  font-size: 17px;
  color: var(--text);
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.legal-card h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: 23px;
  color: #fff;
  margin: 44px 0 16px;
  position: relative;
  padding-left: 16px;
}

.legal-card h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--blue) 100%);
  border-radius: 2px;
}

.legal-card h3 {
  font:
    700 16px/1.4 'DM Sans',
    sans-serif;
  color: #fff;
  margin: 26px 0 8px;
}

.legal-card p,
.legal-card li {
  color: var(--text);
  overflow-wrap: anywhere;
}

.legal-card ol,
.legal-card ul {
  padding-left: 0;
  list-style: none;
  margin: 18px 0 28px;
  counter-reset: legal;
}

.legal-card ol > li {
  counter-increment: legal;
  position: relative;
  padding: 18px 20px 18px 60px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--rule);
  border-left: 3px solid transparent;
  border-radius: var(--r-s);
  transition:
    border-color 0.2s,
    background 0.2s;
}

.legal-card ol > li:hover {
  border-left-color: var(--gold);
  background: rgba(201, 147, 58, 0.04);
}

.legal-card ol > li::before {
  content: counter(legal, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font:
    700 12px/1 'DM Sans',
    sans-serif;
  color: var(--gold-l);
  background: rgba(201, 147, 58, 0.12);
  border: 1px solid var(--rule-gold);
  border-radius: 50%;
}

.legal-card ul > li {
  position: relative;
  padding: 8px 0 8px 22px;
}

.legal-card ul > li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201, 147, 58, 0.15);
}

.legal-card strong {
  color: #fff;
  font-weight: 700;
}

.legal-callout {
  margin: 32px 0;
  padding: 18px 22px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(201, 147, 58, 0.06) 100%
  );
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-left: 3px solid var(--blue-l);
  border-radius: 10px;
  color: var(--text);
  font-size: 14.5px;
}

.legal-meta {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px dashed var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-mute);
}

.legal-disclaimer {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-mute);
  font-style: italic;
  line-height: 1.6;
}

/* ────── Footer ────── */
.legal-footer {
  background: rgba(10, 13, 24, 0.85);
  border-top: 1px solid var(--rule-gold);
  color: var(--text-mute);
  padding: 32px 24px 40px;
}

.legal-footer-inner {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 28px;
  font-size: 13.5px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.legal-footer-links a {
  color: var(--text-soft);
}

.legal-footer-links a:hover {
  color: var(--gold-l);
}

.legal-footer-copy {
  color: var(--text-mute);
}

/* ────── Responsive ────── */
@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .legal-header {
    padding: 12px 14px;
    position: static;
  }

  .legal-header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .legal-brand {
    font-size: 16px;
  }

  .legal-brand img {
    width: 30px;
    height: 30px;
  }

  .legal-lang {
    margin-left: auto;
  }

  .legal-main {
    padding: 18px 10px 36px;
  }

  .legal-card {
    padding: 30px 16px 28px;
    border-radius: 12px;
    overflow: visible;
  }

  .legal-card h1 {
    font-size: 26px;
    letter-spacing: 0;
  }

  .legal-card h2 {
    font-size: 18px;
    margin-top: 32px;
    padding-left: 12px;
  }

  .legal-card .legal-subtitle {
    margin-bottom: 22px;
  }

  .legal-card .legal-intro {
    margin-bottom: 26px;
    padding-bottom: 22px;
    font-size: 16px;
  }

  .legal-card ol,
  .legal-card ul {
    margin: 16px 0 24px;
  }

  .legal-card ol > li {
    padding: 14px 14px 14px 48px;
    margin-bottom: 10px;
    border-radius: 10px;
  }

  .legal-card ol > li::before {
    left: 12px;
    top: 14px;
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .legal-card ul > li {
    padding-left: 18px;
  }

  .legal-callout {
    margin: 26px 0;
    padding: 16px;
  }

  .legal-footer {
    padding: 26px 16px 32px;
  }

  .legal-footer-inner {
    display: block;
  }

  .legal-footer-links {
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }
}

@media (max-width: 380px) {
  .legal-card {
    padding: 26px 12px 24px;
  }

  .legal-card h1 {
    font-size: 23px;
  }

  .legal-card ol > li {
    padding-left: 14px;
  }

  .legal-card ol > li::before {
    position: static;
    margin: 0 0 10px;
  }
}
