/* Estilos compartidos para /privacy y /terms de MiBB.
   Modo "prosa, no marketing": sin hero, sin grids, solo texto legible.
   Paleta salvia & crema + Nunito, a juego con la landing y la app.
   Dark-mode automático. */

/* ─── Nunito auto-hospedada (subsets latin + latin-ext) ───────────────────
   La CSP de producción de MiBB es `font-src 'self'` y bloquea Google Fonts,
   así que servimos los woff2 desde /assets/fonts/. El fichero normal es una
   fuente variable (cubre 400..900); la itálica solo 600. Este @font-face vive
   en la hoja compartida para cubrir todas las páginas legales de una vez. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin.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: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-italic.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: "Nunito";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
a { color: inherit; }

:root {
  --primary:      #4E8C74;
  --primary-soft: #E7F1EC;
  --primary-line: rgba(78,140,116,0.32);
  --bg:           #FBF8F3;
  --bg-alt:       #F4EFE6;
  --surface:      #FFFFFF;
  --border:       #E9E2D6;
  --border-2:     #D7CDBC;
  --text:         #33403B;
  --text-2:       #44524C;
  --muted:        #5E6B64;
  --dim:          #8A958E;
  --warn:         #B85C00;
  --warn-soft:    #FBE7D6;

  --font-sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;

  /* A juego con la landing: esquinas más redondeadas + sombra salvia suave. */
  --radius: 16px;
  --shadow-soft: 0 1px 2px rgba(79, 110, 96, .05), 0 10px 30px rgba(79, 110, 96, .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary:      #86C2A8;
    --primary-soft: #20322A;
    --primary-line: rgba(134,194,168,0.34);
    --bg:           #15201B;
    --bg-alt:       #1B2823;
    --surface:      #1E2C26;
    --border:       #2B3A33;
    --border-2:     #38483F;
    --text:         #E9EFEB;
    --text-2:       #CFDAD4;
    --muted:        #A8B6AF;
    --dim:          #748179;
    --warn:         #F0A874;
    --warn-soft:    #2A1F10;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.66;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--primary); color: #15201B; }

.container {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* ── Nav ────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 900;
  font-size: 1.15rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--text);
}
.brand img { width: 32px; height: 32px; display: block; }
.nav__right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav__back {
  font-size: 0.9rem; font-weight: 700;
  color: var(--muted); text-decoration: none;
  transition: color .15s ease; white-space: nowrap;
}
.nav__back:hover { color: var(--primary); }

/* ── Document ───────────────────────────────────────────────────── */
.doc { padding-bottom: 96px; }

.doc__eyebrow {
  font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--primary);
  font-weight: 800; margin: 0 0 16px;
}
.doc h1 {
  font-weight: 900;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 12px; color: var(--text);
}
.doc__meta {
  font-size: 0.92rem; color: var(--muted); font-weight: 600;
  margin: 0 0 40px; padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.doc h2 {
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.01em; line-height: 1.25;
  margin: 48px 0 14px; color: var(--text);
}
.doc h2:first-of-type { margin-top: 0; }
.doc h3 {
  font-weight: 800;
  font-size: 1.1rem; letter-spacing: -0.005em;
  margin: 28px 0 10px; color: var(--text);
}
.doc p, .doc li { color: var(--text-2); font-size: 1.02rem; line-height: 1.72; font-weight: 400; }
.doc p { margin: 0 0 18px; max-width: 68ch; }
.doc ul, .doc ol { margin: 0 0 22px; padding: 0 0 0 24px; max-width: 68ch; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--primary); }
.doc strong { color: var(--text); font-weight: 800; }
.doc em { color: var(--primary); font-style: normal; font-weight: 700; }
.doc code {
  font-family: var(--font-mono); font-size: 0.88em;
  color: var(--primary); background: var(--primary-soft);
  padding: 1px 6px; border-radius: 4px;
}
.doc a {
  color: var(--primary); text-decoration: underline;
  text-decoration-color: var(--primary-line); text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.doc a:hover { text-decoration-color: var(--primary); }

.doc__tldr {
  margin: 0 0 40px; padding: 18px 22px;
  border-left: 3px solid var(--primary); background: var(--primary-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-soft);
}
.doc__tldr p { margin: 0; color: var(--text); font-size: 1.04rem; font-weight: 600; }
.doc__tldr p strong { color: var(--primary); }

.doc__warn {
  margin: 0 0 40px; padding: 18px 22px;
  border-left: 3px solid var(--warn); background: var(--warn-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-soft);
}
.doc__warn p { margin: 0; color: var(--text); font-size: 1.02rem; font-weight: 600; }
.doc__warn strong { color: var(--warn); }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px 48px;
  font-size: 0.9rem; color: var(--dim); font-weight: 600;
}
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
}
.site-footer a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.site-footer a:hover { color: var(--primary); }
.site-footer__brand { font-weight: 800; color: var(--text-2); }
.site-footer__links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.88rem; }

/* ── Selector de idioma ─────────────────────────────────────────── */
.lang-wrap { display: inline-flex; align-items: center; gap: 6px; }
.lang-wrap label { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
#lang-select {
  font: inherit; font-size: 0.88rem; font-weight: 700;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; min-height: 34px; cursor: pointer;
}
#lang-select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
