:root {
  --bg: #04111f;
  --bg-deep: #071a31;
  --surface: rgba(7, 22, 43, 0.82);
  --surface-strong: rgba(9, 26, 51, 0.94);
  --surface-soft: rgba(244, 248, 255, 0.96);
  --line: rgba(154, 198, 255, 0.16);
  --line-strong: rgba(154, 198, 255, 0.28);
  --text: #f6f8fd;
  --muted: #bfd0e6;
  --muted-deep: #5c6f8e;
  --blue: #61b8ff;
  --blue-soft: #b6e0ff;
  --orange: #ff9228;
  --orange-soft: #ffd4a6;
  --green: #71d7a7;
  --green-soft: #c6f1dd;
  --hero-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --shell: min(980px, calc(100% - 32px));
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Aptos", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
  background:
    linear-gradient(180deg, rgba(4, 10, 18, 0.74), rgba(4, 10, 18, 0.96)),
    url("fondo.png") center top / cover fixed no-repeat,
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 14%, rgba(97, 184, 255, 0.22), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(255, 146, 40, 0.18), transparent 22%),
    radial-gradient(circle at 50% 78%, rgba(10, 87, 173, 0.18), transparent 28%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 24%, transparent 78%, rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(4, 12, 23, 0.05), rgba(4, 12, 23, 0.42));
  opacity: 0.76;
}

main::before,
main::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.8;
}

main::before {
  top: 140px;
  left: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(97, 184, 255, 0.2), transparent 72%);
}

main::after {
  right: -120px;
  bottom: 120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 146, 40, 0.18), transparent 72%);
}

a {
  color: inherit;
}

.legal-shell {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin: 0 auto;
  padding: 24px 0 56px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(6, 20, 40, 0.9), rgba(7, 27, 53, 0.76));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.legal-brand img {
  width: 144px;
  height: auto;
  display: block;
}

.legal-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.legal-home-link:hover,
.legal-nav a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

.legal-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(140deg, rgba(12, 36, 68, 0.96), rgba(7, 24, 48, 0.9) 55%, rgba(9, 33, 64, 0.96)),
    var(--surface-strong);
  box-shadow: var(--hero-shadow);
  overflow: hidden;
}

.legal-hero::before,
.legal-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.legal-hero::before {
  top: -40px;
  right: -20px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(97, 184, 255, 0.2), transparent 70%);
}

.legal-hero::after {
  bottom: -90px;
  left: 30%;
  width: 280px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 146, 40, 0.16), transparent 70%);
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 800;
}

h1,
h2,
h3,
.legal-nav a {
  font-family: "Bahnschrift SemiBold", "Segoe UI Variable Display", "Arial Narrow", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.04;
  max-width: 12ch;
}

.legal-lead {
  margin: 0;
  max-width: 72ch;
  color: #d6e6fb;
  font-size: 1.06rem;
  line-height: 1.78;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  color: #d9e8fb;
  font-size: 0.94rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.legal-notice {
  position: relative;
  margin-bottom: 24px;
  padding: 22px 24px 22px 72px;
  border: 1px solid rgba(255, 146, 40, 0.26);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 146, 40, 0.18), rgba(255, 146, 40, 0.08));
  box-shadow: var(--shadow);
}

.legal-notice::before {
  content: "!";
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #ffb460);
  color: #091323;
  font-family: "Bahnschrift SemiBold", "Segoe UI Variable Display", "Arial Narrow", sans-serif;
  font-size: 1.1rem;
  box-shadow: 0 14px 28px rgba(255, 146, 40, 0.22);
}

.legal-notice strong {
  display: block;
  margin-bottom: 8px;
  color: var(--orange-soft);
}

.legal-notice p,
.legal-notice li,
.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.72;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.legal-grid {
  display: grid;
  gap: 20px;
}

.legal-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(10, 28, 54, 0.92), rgba(8, 24, 46, 0.86)),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.legal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--orange), var(--green));
  opacity: 0.92;
}

.legal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(154, 198, 255, 0.28);
  box-shadow: 0 34px 82px rgba(0, 0, 0, 0.4);
}

.legal-card h2 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.legal-card h3 {
  margin: 22px 0 10px;
  font-size: 1.08rem;
  color: var(--blue-soft);
}

.legal-card p:first-of-type {
  margin-top: 0;
}

.legal-card ul,
.legal-card ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.legal-card li + li {
  margin-top: 8px;
}

.legal-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.legal-card th,
.legal-card td {
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  text-align: left;
}

.legal-card th {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.legal-card td {
  background: rgba(255, 255, 255, 0.03);
}

.placeholder {
  color: #ffd4a8;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 212, 168, 0.5);
  text-underline-offset: 3px;
}

.legal-footer {
  margin-top: 24px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(7, 22, 43, 0.92), rgba(12, 33, 62, 0.84));
  color: var(--muted);
  box-shadow: var(--shadow);
}

.legal-footer p {
  margin: 0;
  line-height: 1.7;
}

.legal-card a,
.legal-footer a {
  color: var(--blue-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-card strong,
.legal-footer strong {
  color: #f9fbff;
}

@keyframes legalFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legal-hero,
.legal-notice,
.legal-nav,
.legal-card,
.legal-footer {
  animation: legalFadeUp 700ms ease both;
}

.legal-notice {
  animation-delay: 70ms;
}

.legal-nav {
  animation-delay: 120ms;
}

.legal-card:nth-child(1) { animation-delay: 160ms; }
.legal-card:nth-child(2) { animation-delay: 220ms; }
.legal-card:nth-child(3) { animation-delay: 280ms; }
.legal-card:nth-child(4) { animation-delay: 340ms; }
.legal-card:nth-child(5) { animation-delay: 400ms; }
.legal-card:nth-child(6) { animation-delay: 460ms; }
.legal-card:nth-child(7) { animation-delay: 520ms; }
.legal-card:nth-child(8) { animation-delay: 580ms; }
.legal-card:nth-child(9) { animation-delay: 640ms; }
.legal-footer { animation-delay: 700ms; }

@media (max-width: 720px) {
  .legal-shell {
    padding-top: 16px;
  }

  .legal-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-hero,
  .legal-card,
  .legal-footer {
    padding: 22px;
  }

  .legal-notice {
    padding: 22px;
  }

  .legal-notice::before {
    position: static;
    margin-bottom: 12px;
  }

  .legal-card table,
  .legal-card thead,
  .legal-card tbody,
  .legal-card tr,
  .legal-card th,
  .legal-card td {
    display: block;
  }

  .legal-card thead {
    display: none;
  }

  .legal-card td {
    border-top: none;
  }

  h1 {
    max-width: none;
  }
}
