/* Páginas legales (/terminos y /privacidad), con el mismo estilo editorial de la portada:
   casi negro, Instrument Sans, palabras destacadas en Instrument Serif cursiva, líneas finas
   e índice fijo a la izquierda (lo arma legal.js con los títulos de cada sección). */

:root {
  --bg: #050608;
  --bg-2: #0b0d12;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --text: #f3f4f6;
  --body: #c9ccd2;
  --muted: #8b919c;
  --accent: #00d4ff;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
::selection { background: var(--accent); color: #001018; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lg-skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600; }
.lg-skip:focus { top: 12px; }

/* Navegación */
.lg-nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(5, 6, 8, .78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.lg-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.02em; justify-self: start; }
.lg-brand img { border-radius: 8px; }
.lg-links { display: flex; gap: 28px; }
.lg-links a { position: relative; color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color .25s; }
.lg-links a:hover, .lg-links a[aria-current="page"] { color: var(--text); }
.lg-links a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); }
.lg-pill {
  justify-self: end;
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.lg-pill:hover { background: var(--text); color: var(--bg); }

/* Portada del documento */
.legal { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.lg-hero { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.lg-label {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 32px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.lg-label span:first-child { color: var(--text); }
.lg-hero h1 { margin: 0; color: var(--text); font-size: clamp(44px, 8vw, 112px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.lg-hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.015em; color: var(--accent); }

/* Cuerpo con índice */
.lg-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding-bottom: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.lg-toc { position: sticky; top: calc(var(--nav-h) + 24px); padding-top: 28px; }
.lg-toc p { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lg-toc a {
  display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line);
  color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.35;
  transition: color .2s, padding .3s var(--ease);
}
.lg-toc a span { font-size: 11.5px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.lg-toc a:hover { color: var(--text); }
.lg-toc a.on { color: var(--text); padding-left: 8px; }
.lg-toc a.on span { color: var(--accent); }
.lg-body { max-width: 720px; padding-top: 28px; }
.lg-body > p:first-child { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; color: var(--text); letter-spacing: -.01em; }
.lg-body h2 {
  margin: 56px 0 14px; padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text); font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; line-height: 1.2; letter-spacing: -.02em;
}
.lg-body p, .lg-body li { color: var(--body); }
.lg-body strong { color: var(--text); font-weight: 600; }
.lg-body ul { margin: 0; padding: 0; list-style: none; }
.lg-body li { position: relative; margin: 0; padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); }
.lg-body li:first-child { border-top: 1px solid var(--line); }
.lg-body li::before { content: ''; position: absolute; left: 4px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lg-body code { font-size: .9em; background: var(--bg-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--text); }

/* Pie */
.lg-foot { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); overflow: hidden; }
.lg-foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; padding: 28px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.lg-foot-top p { margin: 0; display: flex; align-items: center; gap: 10px; }
.lg-foot-top nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.lg-foot-top nav a { color: var(--muted); text-decoration: none; }
.lg-foot-top nav a:hover { color: var(--text); }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.lg-word {
  margin: 8px 0 -0.08em; font-size: 26vw; font-weight: 600; line-height: .8; letter-spacing: -.065em; white-space: nowrap;
  background: linear-gradient(180deg, #f3f4f6 10%, #20232a 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none;
}
@media (min-width: 1240px) { .lg-word { font-size: 322px; } }

@media (max-width: 900px) {
  .lg-layout { grid-template-columns: 1fr; gap: 0; }
  .lg-toc { display: none !important; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .lg-nav { grid-template-columns: 1fr auto; }
  .lg-links { display: none; }
  .lg-pill { height: 36px; padding: 0 14px; font-size: 12px; }
  .lg-body h2 { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Subtítulos dentro de una sección y aviso de estado (eliminación de datos) */
.lg-body h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.lg-note { padding: 14px 16px; border: 1px solid var(--accent); border-radius: 12px; color: var(--text); }
