/* ============================================================
   AntNox · legal.css — estilos compartidos de las páginas legales
   (aviso-legal.html, privacidad.html, terminos.html, cookies.html)
   Estructura basada en antdm.com. Sin build: CSS plano.
   ============================================================ */

:root {
  --bg: #0d1424;
  --bg-deep: #0a101e;
  --card: #141c30;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7fa;
  --muted: #93a0b8;
  --accent: #a3e635;
  --accent-soft: rgba(163, 230, 53, 0.1);
  --gradient-flat: linear-gradient(90deg, #a3e635 0%, #c4f250 100%);
  --gradient-text: linear-gradient(90deg, #a3e635 0%, #c4f250 100%);
  --font: Futura, "Futura PT", "Trebuchet MS", "Century Gothic", Avenir Next,
    Avenir, "Jost", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --radius: 16px;
  --container: 1280px;
  --gutter: 80px;
  --nav-height: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 24px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--muted); }
strong { color: var(--text); font-weight: 600; }

a.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a.link:hover { color: #c4f250; }

.divider { height: 1px; background: var(--line); margin: 0; border: 0; }

/* Barra de scroll sutil, acorde al tema */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(163, 230, 53, 0.4); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

/* ---------- Botones (misma familia que el resto de la web) ---------- */

.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gradient-flat);
  color: #0a101e; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.35), 0 8px 24px rgba(163, 230, 53, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.cta-btn:hover { color: #0a101e; transform: translateY(-1px); filter: brightness(1.05); }
.cta-btn.sm { padding: 9px 18px; font-size: 0.85rem; }
.cta-btn.full { width: 100%; }

.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text); font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); transition: border-color 0.2s ease, color 0.2s ease;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Nav (idéntica al resto de páginas del sitio) ---------- */

.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-height);
  background: rgba(13, 20, 36, 0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; margin-left: auto; margin-right: 8px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.login { color: var(--muted); font-size: 0.95rem; }
.login:hover { color: var(--text); }

.nav-toggle {
  display: none; background: none; border: 0; color: var(--text);
  padding: 6px; cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; fill: currentColor; }

.nav-menu {
  display: none; flex-direction: column; gap: 4px;
  position: absolute; top: var(--nav-height); left: 0; right: 0;
  background: var(--bg-deep); border-bottom: 1px solid var(--line);
  padding: 16px var(--gutter) 24px;
}
.nav-menu a { padding: 10px 0; color: var(--muted); font-size: 1.05rem; }
.nav-menu a:hover { color: var(--accent); }
.nav-menu .cta-btn { margin-top: 10px; width: 100%; }
.nav.open .nav-menu { display: flex; }

/* ---------- Hero de página legal ---------- */

.page-hero { border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%; height: 60%;
  background: radial-gradient(600px 300px at 75% 30%, rgba(163, 230, 53, 0.1), transparent 70%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: var(--container); margin: 0 auto; padding: 96px var(--gutter) 80px;
  position: relative; animation: fadeUp 0.6s ease both;
}
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 20px;
}
.page-hero .eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.page-hero h1 { max-width: 16ch; }
.page-hero .meta { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 24px; }
.page-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin-bottom: 0; }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Cuerpo con índice lateral fijo ---------- */

.page-body { padding: 72px 0 96px; }
.page-body-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; align-items: start; }

.legal-toc {
  position: sticky; top: calc(var(--nav-height) + 32px);
  padding-top: 8px;
}
.legal-toc .label {
  display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px; font-weight: 600;
}
.legal-toc a {
  display: block; padding: 7px 0 7px 16px; border-left: 2px solid var(--line);
  color: var(--muted); font-size: 0.9rem; line-height: 1.4; transition: all 0.2s ease;
}
.legal-toc a:hover { color: var(--accent); border-left-color: var(--accent); }

.legal-content { max-width: 760px; }
.legal-content section { margin-bottom: 56px; }
.legal-content section:last-child { margin-bottom: 0; }
.legal-content h2 { padding-top: 8px; }
.legal-content h3 { margin-top: 28px; }

.legal-content ul { list-style: none; padding: 0; margin: 0 0 1.2em; }
.legal-content ul li {
  position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--muted);
}
.legal-content ul li::before {
  content: ""; position: absolute; left: 4px; top: 0.6em; width: 12px; height: 12px;
  background: currentColor; opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.legal-content code {
  font-family: var(--mono); font-size: 0.85em; color: var(--accent);
  background: var(--accent-soft); padding: 2px 7px; border-radius: 6px;
}

/* Tablas (misma estética que el resto de la web) */
.legal-content table { width: 100%; border-collapse: collapse; margin: 20px 0 28px; font-size: 0.95rem; }
.legal-content th {
  text-align: left; padding: 14px 18px; background: var(--bg-deep);
  color: var(--muted); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal-content th:first-child { border-top-left-radius: 12px; }
.legal-content th:last-child { border-top-right-radius: 12px; }
.legal-content td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.legal-content tr:last-child td { border-bottom: 0; }
.legal-content tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.legal-content tr:last-child td:last-child { border-bottom-right-radius: 12px; }

/* ---------- Footer (centrado, como el resto de la web) ---------- */

.footer { border-top: 1px solid var(--line); padding: 56px 0 48px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }

.footer .brand { justify-content: center; margin-bottom: 24px; }
.footer .brand img { height: 30px; }

.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px; }
.footer-links a { color: var(--muted); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }

.footer-divider { height: 1px; background: var(--line); margin: 36px auto; max-width: 720px; }

.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; }
.footer-legal { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 0.82rem; }
.footer-email { color: var(--accent); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .legal-toc {
    position: static; display: flex; flex-wrap: wrap; gap: 8px 20px;
    padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  }
  .legal-toc .label { display: none; }
  .legal-toc a { border-left: 0; padding: 2px 0; }

  .nav-links, .nav-actions .login, .nav-actions .cta-btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .legal-content table { display: block; max-width: 100%; overflow-x: auto; }
  .page-hero-inner { padding: 64px var(--gutter) 56px; }
  .page-body { padding: 56px 0 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
