/* Tipografías alojadas en la propia web (subconjunto latino de Google Fonts, licencia OFL:
   assets/fonts/OFL-*.txt). Montserrat es variable: un solo fichero para los pesos 400–800. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../assets/fonts/montserrat-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/barlow-condensed-700-latin.woff2) format("woff2");
}

:root {
  --red: #af2d36;
  --red-light: #c65b64;
  --pink-light: #e1c0c2;
  --panel-dark: rgba(0, 0, 0, 0.18);
  --panel-dark-hover: rgba(0, 0, 0, 0.28);
  --paper: #f1f1f1;
  --ink: #1b1b1b;
  --muted: #3f3f3f;
  --line: rgba(27, 27, 27, 0.14);
  --on-red-line: rgba(241, 241, 241, 0.28);
  --bar-h: 64px;
  --crumb-h: 44px;
  --measure: 40rem;
  --gutter: clamp(16px, 5vw, 48px);
  --radius: 12px;
  --font: "Montserrat", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 16px);
  -webkit-text-size-adjust: 100%;
  background: var(--red);
}

body {
  margin: 0;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 40;
  background: var(--paper); color: var(--red); padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Barra superior */
.bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: var(--gutter); background: var(--red);
  border-bottom: 1px solid var(--on-red-line);
}
.bar__logo { display: block; line-height: 0; }
.logo-full { height: 28px; width: auto; }
.logo-short { display: none; height: 36px; width: auto; }

.langs ul { display: flex; gap: clamp(10px, 2vw, 22px); list-style: none; margin: 0; padding: 0; }
.langs a, .langs .is-disabled {
  display: block; padding: 6px 0; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.langs a:hover { border-color: rgba(241, 241, 241, 0.6); }
.langs a[aria-current] { border-color: var(--paper); }
.langs .is-disabled { opacity: 0.45; cursor: default; }
.l-short { display: none; }

@media (max-width: 760px) {
  .l-full { display: none; }
  .l-short { display: inline; }
  .logo-full { display: none; }
  .logo-short { display: block; }
}

/* Portada: lema principal centrado */
.hero {
  min-height: calc(100vh - var(--bar-h)); min-height: calc(100svh - var(--bar-h));
  display: grid; place-items: center; padding: clamp(32px, 6vw, 72px) var(--gutter);
}
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(20px, 3vw, 36px); }
.hero__h1 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.92;
}
.hero__lema { width: min(900px, 88vw); max-height: 62vh; object-fit: contain; }
.hero__down {
  display: grid; place-items: center; width: 52px; height: 52px; margin-top: clamp(8px, 2vw, 24px);
  border: 2px solid var(--on-red-line); border-radius: 50%; transition: border-color 0.2s, background-color 0.2s;
}
.hero__down:hover { border-color: var(--paper); background: rgba(241, 241, 241, 0.1); }
.hero__down span {
  width: 20px; height: 20px; background: var(--paper); transform: rotate(135deg);
  -webkit-mask: url("../assets/flecha.svg") center / contain no-repeat; mask: url("../assets/flecha.svg") center / contain no-repeat;
}

/* Contenedores */
.block { padding: 0 var(--gutter) clamp(24px, 4vw, 40px); }
.block:first-of-type { padding-top: 0; }
#presentacion { padding-bottom: clamp(64px, 10vw, 128px); }
.stack { width: 100%; max-width: calc(var(--measure) + 2 * clamp(24px, 5vw, 56px)); margin-inline: auto; }
.wrap { width: 100%; max-width: 68rem; margin-inline: auto; }

.panel {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px); box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.45);
}
.panel--dark { background: var(--panel-dark); color: var(--paper); box-shadow: none; }

/* Texto corrido: medida cómoda de lectura */
.prose p { margin: 0 0 1.2em; max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.panel:not(.panel--dark) .prose p, .panel:not(.panel--dark).prose p { color: var(--muted); }
/* Frases clave en negrita */
.prose strong, .axes strong { font-weight: 700; color: var(--ink); }
.panel--dark strong { color: var(--paper); font-weight: 800; }
.lead { font-size: clamp(1.2rem, 2.2vw, 1.4rem); line-height: 1.5; font-weight: 600; color: var(--ink) !important; }

.eyebrow {
  margin: 0 0 20px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.eyebrow--center { text-align: center; }

/* Índice */
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tcard {
  display: flex; flex-direction: column; height: 100%; min-height: 230px; padding: 26px 26px 28px;
  background: var(--panel-dark); color: #fff; border-radius: 12px; text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.tcard:hover { background: var(--panel-dark-hover); transform: translateY(-3px); }
.tcard__icon {
  display: block; width: 44px; height: 44px; margin-bottom: auto; background: var(--pink-light);
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.tcard__n { margin: 28px 0 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; color: var(--pink-light); }
.tcard__title { font-family: var(--display); font-size: 1.65rem; font-weight: 700; line-height: 1.02; text-transform: uppercase; }

/* Bloques: título e introducción fijos a la izquierda, cards a la derecha */
.blocks { width: 100%; max-width: 88rem; margin-inline: auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 0; }
.sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: clamp(56px, 8vw, 112px); }
@media (min-width: 960px) {
  .sec { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
  /* "top" lo ajusta un script según la altura de cada tarjeta, para que las largas se vean enteras al llegar al final */
  .js .sec__intro { position: sticky; top: calc(var(--bar-h) + var(--crumb-h) + 24px); }
}
/* Introducción del bloque: directamente sobre el rojo, en texto claro */
.sec__intro { padding: 0; color: var(--paper); }
.sec__intro .prose p { color: rgba(241, 241, 241, 0.92); }
.sec__intro .prose strong { color: var(--paper); font-weight: 800; }
.sec__axes { min-width: 0; }

/* Bloques */
.sec__head { grid-column: 1 / -1; margin-bottom: clamp(24px, 4vw, 56px); }
.sec__n { display: block; margin-bottom: clamp(10px, 1.5vw, 18px); font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; letter-spacing: 0.04em; color: var(--pink-light); }
.sec__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2.7rem, 11vw, 10rem); line-height: 0.92; text-transform: uppercase; overflow-wrap: break-word; }

/* Ejes de lucha: cards a la derecha, en filas que se adaptan al ancho */
.axes__label { margin: 24px 0 18px; }
@media (min-width: 960px) { .axes__label { margin-top: 0; } }
.axes { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.axes li {
  background: var(--paper); border-radius: 8px; padding: 32px 30px 34px;
  box-shadow: 0 18px 36px -26px rgba(0, 0, 0, 0.5);
}
.axis__title { margin: 0 0 20px; color: #0d0d0d; font-size: clamp(1.4rem, 2vw, 1.65rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.axes p { margin: 0; color: #555; font-size: 1rem; font-weight: 400; line-height: 1.7; }
.axes strong { color: #262626; }

/* Cierre */
.close { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(64px, 10vw, 128px); }
.close__title {
  margin: 0 0 clamp(28px, 4vw, 48px); text-align: center; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 4.8rem); line-height: 0.96; text-transform: uppercase;
}
.panel--dark p { color: rgba(241, 241, 241, 0.94); }
.panel--dark .shout { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 800; line-height: 1.35; color: var(--paper); margin-block: 1.5em; }
.panel--dark .final { font-weight: 600; color: var(--paper); }
.close__sec { width: min(300px, 70%); margin: clamp(40px, 6vw, 72px) auto 0; }

.contact {
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
  margin-top: clamp(40px, 6vw, 64px); padding-top: 32px; border-top: 1px solid var(--on-red-line);
}
.contact__logo { height: 64px; width: auto; }
.contact ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 28px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.contact__label { flex-basis: 100%; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.contact a { text-decoration: none; border-bottom: 2px solid rgba(241, 241, 241, 0.45); }
.contact a:hover { border-color: var(--paper); }
.contact .social { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; transition: background-color 0.2s; }
.contact .social:hover { background: rgba(241, 241, 241, 0.16); }
.social__icon {
  display: block; width: 28px; height: 28px; background: var(--paper);
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.contact__legal, .notfound__legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  margin: 0; font-size: 0.85rem; font-weight: 500; opacity: 0.85;
}

/* Página 404 */
.notfound {
  min-height: 100vh; min-height: 100svh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(24px, 4vw, 40px); padding: clamp(32px, 6vw, 72px) var(--gutter); text-align: center;
}
.notfound__logo { height: 72px; width: auto; }
.notfound__code {
  margin: 0; font-family: var(--display); font-weight: 700; line-height: 0.9;
  font-size: clamp(5rem, 18vw, 10rem); color: var(--pink-light);
}
.notfound__langs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 40px;
  width: min(960px, 100%);
}
.notfound__title {
  margin: 0 0 0.4em; font-family: var(--display); font-weight: 700; font-size: 1.6rem;
  line-height: 1.05; text-transform: uppercase;
}
.notfound__langs p { margin: 0 0 0.8em; font-size: 0.95rem; line-height: 1.5; }
.notfound a { font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(241, 241, 241, 0.45); }
.notfound a:hover { border-color: var(--paper); }

/* Indicador del bloque actual: aparece bajo la barra cuando el título grande ya no se ve */
.crumb {
  position: fixed; left: 0; right: 0; top: var(--bar-h); z-index: 25; height: var(--crumb-h);
  background: rgba(143, 37, 44, 0.72); border-bottom: 1px solid var(--on-red-line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transform: translateY(-100%);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.crumb.is-visible { opacity: 1; visibility: visible; transform: none; }
.crumb__inner {
  display: flex; align-items: center; gap: 12px; height: 100%; width: 100%; max-width: 88rem; margin-inline: auto;
  padding-inline: var(--gutter); font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1; text-transform: uppercase;
}
.crumb__n { flex: none; color: var(--pink-light); letter-spacing: 0.04em; }
.crumb__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--paper); }

/* Botón flotante para volver arriba */
.totop {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 35;
  display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  background: var(--paper); cursor: pointer; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.totop:hover { transform: translateY(-3px); }
.totop span {
  width: 22px; height: 22px; background: var(--red); transform: rotate(-45deg);
  -webkit-mask: url("../assets/flecha.svg") center / contain no-repeat; mask: url("../assets/flecha.svg") center / contain no-repeat;
}
.totop:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .totop, .crumb { transition: none; } }

@media print {
  html, body { background: #fff; color: #000; }
  .bar, .bg, .hero__down, .totop, .crumb, nav.block { display: none; }
  .hero { min-height: 0; }
  .hero__lema, .close__sec, .contact__logo { filter: invert(1); }
  .panel, .panel--dark { box-shadow: none; background: none; color: #000; padding: 0; }
  .prose p, .panel--dark p { color: #000 !important; }
}
