/* documentos.css — estilos compartidos de terminos.html, privacidad.html y
   cookies.html. Fuentes en archivos .woff2 aparte (/landing/poppins-*.woff2):
   el navegador las descarga una vez y las reutiliza en las 4 páginas.
   Mismos tokens de marca que index.html, reducidos a lo que usa un documento. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/landing/poppins-400.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/landing/poppins-500.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/landing/poppins-600.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/landing/poppins-700.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --navy: #0D2B45; --blue: #1E4E79; --blue-mid: #3B7FBF; --teal: #37A3A6; --sun: #FFC83D;
  --ground: #FAF6EF; --surface: #FFFFFF; --sunken: #F4ECDF;
  --line: #E3D8C6; --line-soft: #EFE7D9;
  /* --ink-soft oscurecido (#67788A → #56667A): 5,0:1 sobre --sunken (WCAG 1.4.3). */
  --ink-soft: #56667A;
  --ink: #14314A; --ink-mid: #4A6076;
  --accent: var(--blue);
  --stripe-a: #1E4E79; --stripe-b: #FFFFFF;
  --display: "Poppins", "Futura", "Century Gothic", ui-rounded, system-ui, sans-serif;
  --body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --gut: clamp(20px, 5vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0A1E2E; --surface: #122C42; --sunken: #0D2436;
    --line: #234B6B; --line-soft: #193A55;
    --ink: #F1F0E9; --ink-mid: #B5C6D5; --ink-soft: #8AA0B4;
    --accent: #6DB6E8; --stripe-a: #3B7FBF; --stripe-b: #122C42;
  }
}
:root[data-theme="dark"] {
  --ground: #0A1E2E; --surface: #122C42; --sunken: #0D2436;
  --line: #234B6B; --line-soft: #193A55;
  --ink: #F1F0E9; --ink-mid: #B5C6D5; --ink-soft: #8AA0B4;
  --accent: #6DB6E8; --stripe-a: #3B7FBF; --stripe-b: #122C42;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 3px; }

.awning {
  height: 30px;
  background: repeating-linear-gradient(90deg, var(--stripe-a) 0 26px, var(--stripe-b) 26px 52px);
  -webkit-mask:
    linear-gradient(#000 0 0) 0 0 / 100% 17px no-repeat,
    radial-gradient(circle at 13px 0, #000 0 12.4px, transparent 13px) 0 17px / 26px 13px repeat-x;
  mask:
    linear-gradient(#000 0 0) 0 0 / 100% 17px no-repeat,
    radial-gradient(circle at 13px 0, #000 0 12.4px, transparent 13px) 0 17px / 26px 13px repeat-x;
}

/* cabecera: fija arriba como .nav de la landing; el toldo queda debajo y se
   va con el scroll. scroll-padding-top evita que un salto a un ancla (índice,
   #s16) deje el título tapado por la cabecera (66px de alto + aire). */
html { scroll-padding-top: 88px; }
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.top-in {
  max-width: 1120px; margin-inline: auto; padding: 0 var(--gut);
  height: 66px; display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 38px; height: 38px; border-radius: 50%; display: block; }
.brand-name { font-family: var(--display); font-size: 1.2rem; font-weight: 500; letter-spacing: -.02em; }
.brand-name b { font-weight: 700; color: var(--blue-mid); }
.back {
  font-family: var(--display); font-size: .92rem; font-weight: 600;
  text-decoration: none; color: var(--ink-mid);
}
.back:hover { color: var(--accent); }

/* layout de lectura */
.doc {
  max-width: 1120px; margin-inline: auto; padding: clamp(36px, 6vw, 64px) var(--gut) 90px;
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
/* minmax(0, 1fr): sin esto la columna crece al ancho de la tabla más larga
   y la página entera scrollea en horizontal en el celular. */
@media (max-width: 900px) { .doc { grid-template-columns: minmax(0, 1fr); } }

/* índice */
.toc { position: sticky; top: 26px; }
@media (max-width: 900px) {
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
}
.toc-title {
  font-family: var(--display); font-size: .7rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 12px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: s; }
.toc li { counter-increment: s; }
.toc a {
  display: grid; grid-template-columns: 22px 1fr; gap: 6px;
  padding: 5px 8px 5px 0; border-radius: 5px;
  font-size: .88rem; line-height: 1.35; color: var(--ink-mid); text-decoration: none;
}
.toc a::before {
  content: counter(s) ".";
  font-family: var(--mono); font-size: .76rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.toc a:hover { color: var(--accent); }

/* cuerpo */
.doc-head { margin-bottom: 38px; }
.doc-head .kicker {
  font-family: var(--display); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
.doc-head h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -.025em;
  font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.1; text-wrap: balance;
  margin: 10px 0 14px;
}
.doc-head .meta { font-size: .9rem; color: var(--ink-soft); }

article { max-width: 68ch; }
article h2 {
  font-family: var(--display); font-weight: 700; letter-spacing: -.018em;
  font-size: 1.32rem; line-height: 1.25; text-wrap: balance;
  margin: 44px 0 14px; padding-top: 22px; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline;
}
article h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
article h2 .n {
  font-family: var(--mono); font-size: .95rem; font-weight: 600;
  /* --accent en vez de --blue-mid: contraste ≥ 7:1 en claro y oscuro. */
  color: var(--accent); font-variant-numeric: tabular-nums;
}
article p { margin: 0 0 16px; color: var(--ink-mid); }
article ul { margin: 0 0 16px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
/* Viñeta absoluta y no grilla: con grilla, un <li> que empieza con
   <strong> partía el texto siguiente en una columna angosta. */
article li {
  position: relative; padding-left: 28px;
  color: var(--ink-mid);
}
article li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
}
article strong { color: var(--ink); font-weight: 600; }

/* tablas de precios */
.tw { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
caption {
  caption-side: top; text-align: left; padding: 14px 16px 10px;
  font-family: var(--display); font-weight: 600; font-size: .98rem; color: var(--ink);
}
th, td { padding: 10px 16px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th {
  font-family: var(--display); font-size: .74rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft);
  background: var(--sunken); border-block: 1px solid var(--line-soft);
}
tbody td { border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .88rem; }
tbody tr:last-child td { border-bottom: none; }
tbody td:first-child { font-family: var(--display); font-weight: 600; font-size: .92rem; }
td.hi { color: var(--ink); font-weight: 600; }

/* aviso destacado (sección fiscal) */
.callout {
  background: var(--sunken); border-left: 3px solid var(--sun);
  border-radius: 0 9px 9px 0; padding: 18px 20px; margin: 0 0 18px;
}
.callout p:last-child { margin-bottom: 0; }

/* Borrador v2 para revisión: aviso arriba y etiqueta por sección
   modificada o nueva. Se quitan al publicar la versión aprobada. */
.v2-aviso {
  margin: 14px 0 0; padding: 10px 14px; border-radius: 9px;
  background: var(--sunken); border-left: 3px solid var(--teal);
  font-size: .9rem; color: var(--ink-mid);
}
.v2-tag {
  /* h2 es grilla (número | título): la etiqueta va debajo del título. */
  grid-column: 2; justify-self: start;
  display: inline-block;
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--sunken); color: var(--ink); font-family: var(--body);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}

/* marcadores de datos pendientes */
.todo {
  background: color-mix(in srgb, var(--sun) 30%, transparent);
  border-bottom: 1.5px dashed color-mix(in srgb, var(--sun) 80%, var(--ink));
  padding: 0 4px; border-radius: 2px; color: var(--ink); font-weight: 500;
}

.doc-foot {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: .86rem; color: var(--ink-soft); font-style: italic;
}

/* tabla de texto (cookies.html): permite cortar líneas en celulares */
.t-texto th, .t-texto td { white-space: normal; text-align: left; }
.t-texto tbody td { font-family: var(--body); }

/* links cruzados entre documentos legales (fuera del <article>: no entra al hash) */
.doc-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .92rem; }
.doc-links a { display: inline-block; padding-block: .75em; }
.doc-links [aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }

/* Volver arriba: "#top" sube al inicio sin id ni JavaScript (HTML spec).
   Con soporte de scroll-driven animations aparece recién al bajar;
   sin soporte queda siempre visible. */
.subir {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  font-size: 1.3rem; line-height: 1;
}
.subir:hover { border-color: var(--accent); color: var(--accent); }
@supports (animation-timeline: scroll()) {
  .subir {
    animation: subir-aparece linear both;
    animation-timeline: scroll();
    animation-range: 0 300px;
  }
  @keyframes subir-aparece {
    from { opacity: 0; visibility: hidden; }
    to { opacity: 1; visibility: visible; }
  }
}
