/* Credysistemas — Estilos compartidos para páginas legales */
:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --text: #f0f0f5;
  --text-muted: #8888a8;
  --accent: #c8a0e0;
  --accent-pink: #b04090;
  --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* ============ NAV (compartido) ============ */
nav {
  width: 100%;
  max-width: 1600px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 24px;
  margin-bottom: 14px;
}
.nav-logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-menu { display: contents; }
.nav-links {
  display: flex;
  gap: 32px;
  justify-content: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn-login, .btn-signup {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.btn-login {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}
.btn-login:hover { background: rgba(255, 255, 255, 0.12); }
.btn-signup {
  background: #ffffff;
  color: #0a0a0f;
  font-weight: 600;
}
.btn-signup:hover { opacity: 0.88; }

.menu-toggle {
  display: none;
  width: 24px;
  height: 14px;
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, top 0.3s ease;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 12px; }
.menu-toggle.active span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { top: 6px; transform: rotate(-45deg); }

/* ============ HEADER CARD (arco rosa más pequeño) ============ */
.legal-header {
  width: 100%;
  max-width: 1600px;
  min-height: 460px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  position: relative;
  background: #0d0b12;
  padding: 110px 40px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.legal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -70%,
      transparent 60%,
      rgba(176, 48, 136, 0.03) 63%,
      rgba(176, 48, 136, 0.08) 65%,
      rgba(176, 48, 136, 0.16) 67%,
      rgba(176, 48, 136, 0.28) 69%,
      rgba(176, 48, 136, 0.40) 71%,
      rgba(176, 48, 136, 0.52) 73%,
      rgba(176, 48, 136, 0.64) 75%,
      rgba(176, 48, 136, 0.74) 77%,
      rgba(176, 48, 136, 0.82) 79%,
      rgba(210, 70, 175, 0.92) 85%,
      rgba(240, 110, 210, 0.88) 87%,
      rgba(255, 205, 250, 0.92) 91%,
      rgba(255, 240, 255, 0.98) 93%,
      #ffffff 95%),
    radial-gradient(circle at 50% 35%, rgba(120, 40, 180, 0.08) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}
.legal-header-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 50% -70%, transparent 60%, black 78%);
          mask-image: radial-gradient(circle at 50% -70%, transparent 60%, black 78%);
  z-index: 0;
  pointer-events: none;
}

.legal-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}
.legal-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.legal-title strong {
  display: block;
  font-weight: 400;
  margin-top: 4px;
  background: linear-gradient(to right, #ffffff, #a98597);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.legal-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 1;
}
.legal-meta strong { color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.legal-meta .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 0;
  align-self: center;
}

/* ============ CONTENT ============ */
.legal-body {
  width: 100%;
  max-width: 1000px;
  margin: 60px auto 0;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 24px;
  padding: 20px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.legal-toc .toc-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
  display: block;
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: tocnum;
}
.legal-toc ol li { counter-increment: tocnum; }
.legal-toc ol a {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1.4;
}
.legal-toc ol a::before {
  content: counter(tocnum, decimal-leading-zero);
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.legal-toc ol a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.legal-content {
  min-width: 0;
}
.legal-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  border-left: 2px solid var(--accent-pink);
  padding: 4px 0 4px 22px;
  margin: 0 0 56px;
  max-width: 640px;
}
.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: 24px;
}
.legal-section:last-child { margin-bottom: 0; }

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 18px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.legal-section h2 .num {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.legal-section p,
.legal-section li {
  font-size: 0.93rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.65);
}
.legal-section p { margin: 0 0 14px; }
.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-section ul li {
  position: relative;
  padding-left: 22px;
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.legal-section ul li strong {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}
.legal-section a {
  color: var(--accent);
  border-bottom: 1px solid rgba(200, 160, 224, 0.3);
  transition: border-color 0.2s ease;
}
.legal-section a:hover { border-color: var(--accent); }

/* note callout */
.legal-callout {
  margin: 22px 0;
  padding: 18px 22px;
  border: 1px solid rgba(176, 48, 136, 0.25);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(176, 48, 136, 0.08), rgba(120, 40, 180, 0.03));
}
.legal-callout strong {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* contact block at end */
.legal-contact {
  margin-top: 56px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.legal-contact h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 14px;
}
.legal-contact dl {
  margin: 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px 18px;
}
.legal-contact dt {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}
.legal-contact dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--text); }
.back-link::before {
  content: '←';
  font-size: 1rem;
}

/* ============ FOOTER (compartido) ============ */
footer.site-footer {
  width: 100%;
  max-width: 1600px;
  padding: 24px 40px 16px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 80px;
}
footer.site-footer a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}
footer.site-footer a:hover { color: var(--text); }
footer.site-footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer.site-footer strong { color: rgba(255, 255, 255, 0.7); font-weight: 600; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .legal-body {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0 28px;
  }
  .legal-toc {
    position: static;
  }
}

@media (max-width: 768px) {
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .menu-toggle { display: block; }
  .nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  .nav-menu.active { right: 0; }
  .nav-links {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .nav-links a { font-size: 1.2rem; }
  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn-login, .btn-signup {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    text-align: center;
  }
  .legal-header { padding: 80px 24px 70px; min-height: 380px; }
  .legal-body { padding: 0 22px; margin-top: 40px; }
  .legal-section { margin-bottom: 44px; }
  .legal-section h2 { font-size: 1.3rem; flex-direction: column; gap: 6px; }
  .legal-contact dl { grid-template-columns: 1fr; gap: 4px 0; }
  .legal-contact dt { margin-top: 8px; }
  footer.site-footer { flex-direction: column; padding: 24px 24px 16px; }
}

@media (max-width: 480px) {
  .legal-header { border-radius: 16px; }
}
