/* ==========================================================================
   uStreamers — Shared Stylesheet for Legal Pages
   Official Palette: Pure Black, Pure White, Neon Pink (#ff68c8) & Neon Coral (#ff5071)
   ========================================================================== */

/* Las fuentes se cargan con <link> desde el <head> de cada pagina. */

:root {
  color-scheme: dark light;
  --bg: #000000;
  --surface: #0e0e13;
  --border: #22232c;
  --text: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --brand-pink: #ff68c8;
  --brand-coral: #ff5071;
  --brand-gradient: linear-gradient(135deg, #ff68c8 0%, #ff5071 100%);
  --accent: #ff68c8;
  --accent-kick: #53fc18;
  --max-width: 820px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  padding-bottom: 80px;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

header.doc-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 24px;
  color: inherit;
  text-decoration: none;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-pink);
  box-shadow: 0 0 12px var(--brand-pink);
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 8px;
}

.lang-switch {
  margin-top: 16px;
  font-size: 14px;
}

.lang-switch a {
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: #ffffff;
  border-color: var(--brand-pink);
  background: rgba(255, 104, 200, 0.1);
}

nav.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 40px;
  font-size: 14px;
}

nav.toc p {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 16px;
}

nav.toc ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

nav.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

nav.toc a:hover,
nav.toc a:focus-visible {
  color: var(--brand-pink);
  text-decoration: underline;
}

section {
  margin-bottom: 40px;
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
  scroll-margin-top: 30px;
  color: var(--text);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text);
}

p, li {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 15px;
}

ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 6px;
}

.callout {
  background: rgba(255, 104, 200, 0.08);
  border: 1px solid rgba(255, 104, 200, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  margin: 20px 0;
}

.callout.age {
  border-color: rgba(83, 252, 24, 0.4);
  background: rgba(83, 252, 24, 0.06);
}

a {
  color: var(--brand-pink);
}

a:hover {
  color: var(--brand-coral);
}

footer.doc-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

footer.doc-footer a {
  color: var(--text-secondary);
  margin: 0 8px;
}

footer.doc-footer a:hover {
  color: var(--brand-pink);
}

/* ==========================================================================
   Tema: data-theme lo fija theme-init.js leyendo la misma clave de
   localStorage que usa la landing, para que la eleccion del usuario se
   mantenga al entrar aca. prefers-color-scheme queda como respaldo.
   ========================================================================== */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f8f9fc;
    --border: #e2e8f0;
    --text: #09090b;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f8f9fc;
  --border: #e2e8f0;
  --text: #09090b;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0e0e13;
  --border: #22232c;
  --text: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
}

/* Cabecera: marca a la izquierda, boton de tema a la derecha */
.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

/* El margin-bottom de .brand desalinearia el boton dentro del flex */
.doc-topbar .brand {
  margin-bottom: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--brand-pink);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brand-pink);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
