/* La web de Templa (Firebase Hosting): lo común a todas las páginas. Los colores, la letra y
   el espacio son los de la app (design/design-system/tokens.json) y el diseño, el de
   design/web (Claude Design). La home suma home.css.

   Claro u oscuro: el del sistema, salvo que la persona elija uno con el botón de tema
   (idioma.js pone data-tema en <html>). Todo cuadrado, sin sombras ni degradados, y el rojo
   solo donde la app lo usa: el músculo, el descanso corriendo, la serie actual, lo que no
   tiene vuelta atrás y los discos del logo. */

@font-face {
  font-family: 'Archivo72';
  src: url('/fuentes/Archivo72-Black850.woff2') format('woff2');
  font-weight: 850;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fuentes/Figtree-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fuentes/Figtree-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fuentes/Figtree-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fuentes/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fuentes/IBMPlexMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

/* Los tokens. .oscuro sirve también para lo que es oscuro siempre (el reloj, la tapa del
   trailer), como en la app de Wear OS. */
:root,
.claro {
  --surface-0: #f5f5f3;
  --surface-1: #e9e9e6;
  --line: #dcdcd8;
  --line-strong: #86867f;
  --ink: #0a0a0b;
  --ink-muted: #55555c;
  --ink-faint: #6b6b73;
  --accent: #d42a2e;
  --on-accent: #ffffff;
  --action: #0a0a0b;
  --on-action: #ffffff;
  --success: #1f7a4d;
  --warning: #8a6d00;
  --band: #b07d00; /* la banda elástica de la figura */
  --stage: #efe8da; /* el recuadro del ejercicio */
  --map-body: #fbf8f2; /* el mapa de músculos */
  --muscle-secondary: #e3a600;
  --lejos: #c4c4bf;
  --bisel: #0a0a0b;
  --velo: rgba(10, 10, 11, 0.5);
  --z1: #6a4fc4;
  --z2: #1f7a4d;
  --z3: #1f6fb2;
  --z4: #b25e00;
  --z5: #c62828;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    --surface-0: #0a0a0b;
    --surface-1: #17171a;
    --line: #26262b;
    --line-strong: #606067;
    --ink: #ffffff;
    --ink-muted: #9a9aa2;
    --ink-faint: #85858d;
    --accent: #e5383b;
    --on-accent: #0a0a0b;
    --action: #ffffff;
    --on-action: #0a0a0b;
    --success: #4cb782;
    --warning: #e8b931;
    --band: #f2c230;
    --stage: #0a0a0b;
    --map-body: #17171a;
    --muscle-secondary: #e8b931;
    --lejos: #3a3a3f;
    --bisel: #17171a;
    --velo: rgba(10, 10, 11, 0.62);
    --z1: #a48cf2;
    --z2: #4cb782;
    --z3: #4aa3df;
    --z4: #f09a36;
    --z5: #ef4f4f;
    color-scheme: dark;
  }
}
:root[data-tema='oscuro'],
.oscuro {
  --surface-0: #0a0a0b;
  --surface-1: #17171a;
  --line: #26262b;
  --line-strong: #606067;
  --ink: #ffffff;
  --ink-muted: #9a9aa2;
  --ink-faint: #85858d;
  --accent: #e5383b;
  --on-accent: #0a0a0b;
  --action: #ffffff;
  --on-action: #0a0a0b;
  --success: #4cb782;
  --warning: #e8b931;
  --band: #f2c230;
  --stage: #0a0a0b;
  --map-body: #17171a;
  --muscle-secondary: #e8b931;
  --lejos: #3a3a3f;
  --bisel: #17171a;
  --velo: rgba(10, 10, 11, 0.62);
  --z1: #a48cf2;
  --z2: #4cb782;
  --z3: #4aa3df;
  --z4: #f09a36;
  --z5: #ef4f4f;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background: var(--surface-0);
  color: var(--ink);
  font:
    400 17px/1.55 'Figtree',
    system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg,
video {
  display: block;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* El idioma (idioma.js): en las páginas con un bloque por idioma, se ve solo el elegido. */
html[lang='es'] [data-lang='en'],
html[lang='en'] [data-lang='es'] {
  display: none !important;
}

/* Las rarezas de las medallas (rarity-* de los tokens, DM2): las mismas en claro y en
   oscuro. El relleno tiene el mismo brillo en las cinco y el ícono va en negro; el borde, del
   mismo tono más oscuro, da el contraste sobre el fondo claro. */
:root {
  --rarity-comun: #95959c;
  --rarity-comun-edge: #3b3b3f;
  --rarity-poco: #29a965;
  --rarity-poco-edge: #114529;
  --rarity-rara: #4c97f1;
  --rarity-rara-edge: #1a3c66;
  --rarity-epica: #a77ff6;
  --rarity-epica-edge: #45306e;
  --rarity-legendaria: #e1791b;
  --rarity-legendaria-edge: #5b310b;
  --rarity-ink: #0a0a0b;
}
.r-comun {
  --rc: var(--rarity-comun);
  --rb: var(--rarity-comun-edge);
}
.r-poco {
  --rc: var(--rarity-poco);
  --rb: var(--rarity-poco-edge);
}
.r-rara {
  --rc: var(--rarity-rara);
  --rb: var(--rarity-rara-edge);
}
.r-epica {
  --rc: var(--rarity-epica);
  --rb: var(--rarity-epica-edge);
}
.r-legendaria {
  --rc: var(--rarity-legendaria);
  --rb: var(--rarity-legendaria-edge);
}

/* La tipografía */
.disp {
  font-family: 'Archivo72', 'Arial Narrow', sans-serif;
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.9;
}
.eyebrow {
  font:
    600 12px/16px 'Plex Mono',
    monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.data {
  font:
    600 13px/18px 'Plex Mono',
    monospace;
  font-variant-numeric: tabular-nums;
}
.label {
  font:
    600 11px/14px 'Plex Mono',
    monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.micro {
  font:
    600 10px/15px 'Plex Mono',
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.muted {
  color: var(--ink-muted);
}
.faint {
  color: var(--ink-faint);
}
.acc {
  color: var(--accent);
}
.ok {
  color: var(--success);
}
.tinta {
  color: var(--ink);
}
.ico {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}
.oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Los botones y el selector */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 30px;
  background: var(--action);
  color: var(--on-action);
  font-family: 'Archivo72', sans-serif;
  font-weight: 850;
  font-size: 21px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-0);
  color: var(--ink);
  font:
    700 15px/1 'Figtree',
    sans-serif;
  white-space: nowrap;
}
.btn-sec:hover,
.cuad:hover,
.menu-b:hover {
  border-color: var(--ink);
}
.seg {
  display: inline-flex;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-1);
}
.seg button,
.seg-b {
  display: flex;
  align-items: center;
  height: 37px;
  padding: 0 12px;
  color: var(--ink-muted);
  font:
    600 11px 'Plex Mono',
    monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.seg button:hover {
  color: var(--ink);
}
.seg [aria-pressed='true'],
.seg-on {
  background: var(--action);
  color: var(--on-action) !important;
}
.cuad {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  flex: none;
}
.cuad .ico {
  width: 22px;
  height: 22px;
}
.menu-b {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
}

/* El tema: el botón muestra el sol en oscuro y la luna en claro. */
.tema .luna {
  display: none;
}
:root[data-tema='claro'] .tema .sol {
  display: none;
}
:root[data-tema='claro'] .tema .luna {
  display: block;
}
@media (prefers-color-scheme: light) {
  :root:not([data-tema='oscuro']) .tema .sol {
    display: none;
  }
  :root:not([data-tema='oscuro']) .tema .luna {
    display: block;
  }
}

/* El logo */
.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.isotipo {
  display: block;
  height: 34px;
  width: auto;
  flex: none;
}
.nombre {
  font-family: 'Archivo72', sans-serif;
  font-weight: 850;
  font-size: 27px;
  line-height: 1;
  text-transform: uppercase;
  transform: skewX(-7.3deg);
  letter-spacing: 0.01em;
}

/* La barra de arriba: queda pegada y se achica al bajar (en compu). */
.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-0);
  border-bottom: 1px solid var(--line);
}
.barra-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 22px;
  transition: height 0.2s;
}
.barra .isotipo {
  height: 28px;
}
.barra .nombre {
  font-size: 22px;
}
/* En los celulares más angostos no entra todo: queda el isotipo, para no cortar el Menú. */
@media (max-width: 349px) {
  .barra .nombre {
    display: none;
  }
}
.anclas {
  display: none;
}
.ajustes {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-chico {
  display: none;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  background: var(--action);
  color: var(--on-action);
  font-family: 'Archivo72', sans-serif;
  font-weight: 850;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.volver {
  display: none;
  color: var(--ink-muted);
  margin-right: 10px;
}
.volver:hover {
  color: var(--ink);
}
@media (min-width: 900px) {
  .barra-in {
    height: 72px;
    padding: 0 48px;
    gap: 32px;
  }
  .barra .isotipo {
    height: 34px;
  }
  .barra .nombre {
    font-size: 27px;
  }
  .barra.chica .barra-in {
    height: 56px;
  }
  .barra.chica .isotipo {
    height: 26px;
  }
  .barra.chica .nombre {
    font-size: 21px;
  }
  .anclas {
    display: flex;
    align-self: stretch;
    gap: 28px;
    margin-left: auto;
    color: var(--ink-muted);
  }
  .anclas a {
    display: flex;
    align-items: center;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
  }
  .anclas a:hover,
  .anclas a[aria-current='true'] {
    color: var(--ink);
  }
  .anclas a[aria-current='true'] {
    border-bottom-color: var(--ink);
  }
  .ajustes {
    gap: 10px;
  }
  .btn-chico,
  .volver {
    display: flex;
  }
  .menu-b {
    display: none;
  }
}
/* Son ocho y enteros entran recién desde 1400 px. En las notebooks se esconden por nombre,
   no por posición: Planes (el séptimo) es de los que más importan y antes era el primero en
   irse. A lo escondido se llega bajando. */
@media (min-width: 900px) and (max-width: 1399px) {
  .anclas {
    gap: 18px;
  }
  .anclas a[href='#historia'],
  .anclas a[href='#como'] {
    display: none;
  }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .anclas a[href='#medallas'],
  .anclas a[href='#comidas'],
  .anclas a[href='#entrenadores'] {
    display: none;
  }
}

/* El pie: el mismo en todas las páginas */
.pie {
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 15px;
}
.pie-in {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 22px 44px;
}
.pie .isotipo {
  height: 28px;
}
.pie .nombre {
  font-size: 22px;
}
.pie-links {
  display: flex;
  flex-direction: column;
  gap: 14px 28px;
}
.pie-links a:hover,
.pie-links a[aria-current='page'] {
  color: var(--ink);
}
@media (min-width: 900px) {
  .pie-in {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 28px 48px;
  }
  .pie-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Una página de texto: privacidad, términos, eliminar la cuenta y verificar. El texto es
   el de siempre; cambia solo el vestido. */
.lg {
  max-width: 1440px;
  margin: 0 auto;
  padding: 44px 22px 64px;
}
.lg-indice {
  display: none;
}
.lg h1 {
  font-family: 'Archivo72', 'Arial Narrow', sans-serif;
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.9;
  font-size: 48px;
  letter-spacing: -0.01em;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.lg h2 {
  font-family: 'Archivo72', 'Arial Narrow', sans-serif;
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.95;
  font-size: 28px;
  margin: 44px 0 0;
}
.lg h3 {
  font:
    700 17px/24px 'Figtree',
    sans-serif;
  margin: 28px 0 0;
}
.lg p,
.lg li {
  font-size: 16px;
  line-height: 25px;
  text-wrap: pretty;
}
.lg p {
  margin: 16px 0 0;
}
.lg h3 + p {
  margin-top: 6px;
}
.lg a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* El botón de la 404 es un enlace dentro del texto: sin esto, quedaba blanco sobre blanco. */
.lg a.btn {
  color: var(--on-action);
  text-decoration: none;
}
.lg .rotulo {
  font:
    600 13px/18px 'Plex Mono',
    monospace;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.lg h1 + .rotulo {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lg .clave {
  color: var(--accent);
}
.tenue {
  color: var(--ink-muted);
}
.lg ul,
.lg ol {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.lg li + li {
  margin-top: 10px;
}
.lg ul > li {
  position: relative;
  padding-left: 32px;
}
/* El tilde de la app (icons.json: check), como máscara para que tome el color del texto. */
.lg ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M378-246 154-470l43-43 181 181 384-384 43 43-427 427Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M378-246 154-470l43-43 181 181 384-384 43 43-427 427Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.lg ol {
  counter-reset: paso;
  border-bottom: 1px solid var(--line);
}
/* El número va al costado (y no en una grilla) para no partir el texto del paso. */
.lg ol > li {
  counter-increment: paso;
  position: relative;
  padding: 12px 0 12px 48px;
  margin: 0;
  border-top: 1px solid var(--line);
}
.lg ol > li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: 'Archivo72', sans-serif;
  font-weight: 850;
  font-size: 30px;
  line-height: 0.9;
}
.caja {
  background: var(--surface-1);
  border: 1px solid var(--line);
  padding: 20px 22px;
  margin: 28px 0 0;
}
.caja > :first-child {
  margin-top: 0;
}
.caja strong:only-child {
  font:
    600 11px/14px 'Plex Mono',
    monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
@media (min-width: 900px) {
  .lg {
    display: grid;
    grid-template-columns: 300px minmax(0, 720px);
    gap: 48px;
    padding: 96px 48px 120px;
  }
  .lg-indice {
    display: grid;
    gap: 12px;
    align-content: start;
    position: sticky;
    top: 104px;
    padding-top: 34px;
    color: var(--ink-muted);
  }
  .lg-indice a:hover,
  .lg-indice a[aria-current='true'] {
    color: var(--ink);
  }
  .lg h1 {
    font-size: 88px;
  }
  .lg h2 {
    font-size: 32px;
    margin-top: 56px;
  }
  .lg p,
  .lg li {
    font-size: 17px;
    line-height: 27px;
  }
}

/* Las páginas sin índice (eliminar la cuenta y verificar): una sola columna. */
@media (min-width: 900px) {
  .lg-solo {
    grid-template-columns: minmax(0, 860px);
  }
}
