@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-600i.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg-deep: #050505;
  --bg-panel: #121212;
  --text: #ffffff;
  --accent: #e6ff7e;
  --accent-dark: #0f0f0f;
  --line: rgba(255, 255, 255, 0.18);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Ancho compartido: main.legal y pie .site-footer--legal en /legal/ */
  --legal-content-max: 820px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  isolation: isolate;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: nowrap;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0));
  transition: background 0.35s var(--ease-out);
}

.site-header.is-solid {
  background: rgba(5, 5, 5, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.brand__mark {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav__toggle-bar {
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav__toggle-bar::before {
  top: -6px;
}

.nav__toggle-bar::after {
  top: 6px;
}

.nav__panel {
  display: flex;
  align-items: center;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav__sep {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
}

.nav__link {
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.25s var(--ease-out);
  text-transform: uppercase;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.25s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.85);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  background: #ffffff;
  color: #111111;
}

.btn--accent {
  background: var(--accent);
  color: #111111;
  border-color: var(--accent);
}

.btn--accent:hover {
  box-shadow: 0 0 0 3px rgba(230, 255, 126, 0.35);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 7rem 4vw 6rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/hero.webp");
  background-size: cover;
  background-position: center 38%;
  transform: scale(1.03);
  animation: heroKen 18s ease-in-out infinite alternate;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(5, 5, 5, 0.75) 0%, rgba(5, 5, 5, 0.35) 45%, rgba(5, 5, 5, 0.65) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}

.hero__title {
  margin: 0 0 2.5rem;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__title span {
  display: block;
}

.hero__accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}

.hero__welcome {
  margin: 0 0 2.25rem;
  max-width: 46rem;
  font-size: clamp(0.92rem, 1.65vw, 1.02rem);
  line-height: 1.65;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
}

.hero__welcome strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.98);
}

.hero__welcome-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.hero__welcome-link:hover {
  color: #f2ff99;
}

.hero__intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
  max-width: 920px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero__intro p {
  margin: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Si el JS no carga (p. ej. file:// con módulos), el texto no debe quedar invisible */
@media (scripting: none) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/**
 * Hero: el texto debe verse siempre. Antes dependía de .is-visible + IntersectionObserver;
 * con el contenido al fondo del viewport a veces nunca se aplicaba y el usuario veía solo el fondo.
 */
.hero [data-reveal] {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.hero__title [data-reveal] {
  transition-delay: 0.05s;
}

.hero__title [data-reveal]:nth-child(2) {
  transition-delay: 0.18s;
}

.hero__welcome[data-reveal] {
  transition-delay: 0.22s;
}

.hero__intro [data-reveal]:nth-child(1) {
  transition-delay: 0.34s;
}

.hero__intro [data-reveal]:nth-child(2) {
  transition-delay: 0.46s;
}

@keyframes heroKen {
  from {
    transform: scale(1.03) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1%, 1%, 0);
  }
}

.philosophy {
  position: relative;
  color: #2d2d2d;
}

.philosophy__ticker {
  width: 100%;
  background: #d9ed7d;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(27, 45, 38, 0.08);
}

.philosophy__ticker-viewport {
  width: 100%;
  overflow: hidden;
}

.philosophy__track {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: none;
  will-change: transform;
  backface-visibility: hidden;
  animation: philosophyTicker var(--philosophy-ticker-duration, 32s) linear infinite;
}

.philosophy__ticker-text {
  flex-shrink: 0;
  padding-right: 2.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1b2d26;
  white-space: nowrap;
}

/* Dos mitades idénticas (la segunda la genera JS): un ciclo = −50% del ancho total. */
@keyframes philosophyTicker {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.philosophy__cream {
  background: #fdfbf7;
  padding: clamp(2.75rem, 7vw, 5rem) 4vw clamp(2rem, 5vw, 3.75rem);
}

.philosophy__cream-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.philosophy__label {
  margin: 0 auto 2.25rem;
  max-width: 40rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #9a9690;
}

.philosophy__headline {
  margin: 0;
  font-size: clamp(1.35rem, 3.8vw, 2.85rem);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: #2d2d2d;
}

.philosophy__lede {
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
  max-width: 38rem;
  text-align: center;
  font-size: clamp(0.95rem, 1.85vw, 1.05rem);
  line-height: 1.65;
  color: #5c5852;
}

.philosophy__fineprint {
  margin: 1rem auto 0;
  max-width: 34rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #7a756d;
}

.philosophy__axes {
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.75rem;
  max-width: 1040px;
}

.philosophy__axis {
  margin: 0;
  padding: 1.35rem 1.35rem 1.45rem;
  background: #fffefc;
  border: 1px solid rgba(45, 45, 45, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(27, 45, 38, 0.06);
}

.philosophy__axis-title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1b2d26;
}

.philosophy__axis-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.58;
  color: #4a4640;
}

@media (max-width: 900px) {
  .philosophy__axes {
    grid-template-columns: 1fr;
    max-width: 26rem;
  }
}

/**
 * Filosofía: el bloque cream no debe forzar altura mínima (dejaba franja vacía entre titular y franja oscura).
 * El texto y las tarjetas con data-reveal deben verse siempre aquí, como en .hero, para no ocupar hueco “invisible”.
 */
.philosophy__cream [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

.philosophy__cream .philosophy__lede[data-reveal] {
  transition-delay: 0.12s;
}

.philosophy__axes .philosophy__axis:nth-child(1)[data-reveal] {
  transition-delay: 0.2s;
}

.philosophy__axes .philosophy__axis:nth-child(2)[data-reveal] {
  transition-delay: 0.3s;
}

.philosophy__axes .philosophy__axis:nth-child(3)[data-reveal] {
  transition-delay: 0.4s;
}

.philosophy-pill {
  display: inline-flex;
  align-items: center;
  vertical-align: 0.08em;
  margin: 0.12em 0.2em;
  padding: 0.42em 1.05em 0.44em;
  font-size: clamp(0.76rem, 1.95vw, 0.98rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.035em;
  text-transform: none;
  color: #2d2d2d;
  background: #fffefc;
  border: 1px solid #d0d0d0;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .philosophy-pill {
    white-space: normal;
    max-width: 11rem;
    text-align: center;
    justify-content: center;
  }
}

.philosophy__rule {
  height: 1px;
  background: #1b2d26;
  opacity: 0.92;
}

.philosophy__dark {
  background: #000000;
  color: #f5f5f5;
  padding: clamp(2.25rem, 5vw, 3.5rem) 4vw clamp(2.75rem, 6vw, 4rem);
}

.philosophy__dark-inner {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.philosophy__dark-lead {
  margin: 0;
  font-size: clamp(1.12rem, 2.35vw, 1.68rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.philosophy__dark-tags {
  margin: 1.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #e6ff7e;
}

.philosophy__dot {
  color: rgba(255, 255, 255, 0.32);
  font-weight: 400;
}

.philosophy__dark-note {
  margin: 1.75rem auto 0;
  max-width: 32rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

@media (prefers-reduced-motion: reduce) {
  .philosophy__track {
    animation: none;
    justify-content: center;
  }
}

.philosophy__ticker--reduced .philosophy__track {
  animation: none !important;
  justify-content: center;
}

.section {
  padding: 4.5rem 4vw 5rem;
}

.section--tight {
  padding-top: 3rem;
}

.section__head {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.section__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section__intro {
  margin: 1.15rem 0 0;
  max-width: 42rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.section__intro--inline {
  margin-top: 0.85rem;
}

.section__fineprint {
  margin: 0.85rem 0 0;
  max-width: 42rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.52);
}

.section__fineprint a {
  color: var(--accent);
}

.section__fineprint a:hover {
  color: #f2ffb3;
}

.section__archive-link {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.section__archive-link:hover {
  color: #f2ffb3;
}

.page-hero__crumb a {
  color: rgba(255, 255, 255, 0.65);
}

.page-hero__crumb a:hover {
  color: var(--accent);
}

.nav__link[aria-current="page"] {
  color: var(--accent);
}

.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.blog-toolbar {
  margin-bottom: 2rem;
  max-width: 920px;
}

.blog-toolbar__label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
}

.blog-cat {
  font-family: inherit;
  cursor: pointer;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.65);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), background 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

.blog-cat:hover {
  border-color: rgba(230, 255, 126, 0.45);
  color: var(--accent);
}

.blog-cat.is-active {
  background: rgba(230, 255, 126, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(230, 255, 126, 0.2);
}

.blog-cat:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.blog-empty {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  border: 1px dashed var(--line);
  font-size: 0.92rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  max-width: 36rem;
}

.grid-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.post-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c0c0c;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

/* Ocultar al filtrar: .post-card { display: flex } y otros autor ganan al [hidden] del UA sin !important. */
.post-card[hidden],
.post-card.is-filtered-out {
  display: none !important;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.post-card--no-media .post-card__body {
  padding-top: 1.5rem;
}

.post-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.post-card:hover .post-card__media img {
  transform: scale(1.05);
}

.post-card__body {
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.post-card__meta {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.post-card__title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.post-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  flex: 1;
}

.post-card__link {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.5rem;
}

.page-hero {
  position: relative;
  padding: 8rem 4vw 3rem;
  background: radial-gradient(1200px 500px at 10% 0%, rgba(230, 255, 126, 0.08), transparent 55%),
    linear-gradient(180deg, #0a0a0a, #050505);
}

.page-hero__title {
  margin: 0;
  max-width: min(1050px, 92vw);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-hero__crumb {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1rem;
}

.prose {
  max-width: min(1050px, 92vw);
  margin: 0 auto;
  padding: 3rem 4vw 5rem;
  font-size: 1.05rem;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.9);
}

.prose h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prose h3 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
}

.prose p {
  margin: 0 0 1rem;
}

.prose .article-hero-img {
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

/* —— Bloques editoriales en artículos (.prose) —— */
.prose .article-callout {
  margin: 1.75rem 0;
  padding: 1.1rem 1.25rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(230, 255, 126, 0.22);
  background: rgba(230, 255, 126, 0.06);
}

.prose .article-callout--neutral {
  border-color: var(--line);
  background: rgba(14, 14, 14, 0.78);
}

.prose .article-callout__label {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.prose .article-callout p:last-child {
  margin-bottom: 0;
}

.prose ul.article-list {
  margin: 1.5rem 0;
  padding: 0 0 0 1.15rem;
  color: rgba(255, 255, 255, 0.88);
}

.prose ul.article-list li {
  margin-bottom: 0.45rem;
}

.prose ul.article-list--compact li {
  margin-bottom: 0.32rem;
}

.prose .article-table-wrap {
  margin: 1.75rem 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.45);
}

.prose table.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.prose table.article-table th,
.prose table.article-table td {
  padding: 0.6rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  vertical-align: top;
}

.prose table.article-table th {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(18, 18, 18, 0.95);
}

.prose table.article-table tbody tr:last-child td {
  border-bottom: none;
}

.prose .article-bars {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.72);
}

.prose .article-bars__title {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.prose .article-bars__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 10rem) 1fr;
  gap: 0.55rem 0.9rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

@media (max-width: 520px) {
  .prose .article-bars__row {
    grid-template-columns: 1fr;
    gap: 0.25rem 0;
  }
}

.prose .article-bars__lab {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.8);
}

.prose .article-bars__track {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.prose .article-bars__fill {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(230, 255, 126, 0.2), rgba(230, 255, 126, 0.62));
  min-width: 6%;
}

.prose .article-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin: 1.75rem 0;
}

.prose .article-kpi {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.75);
}

.prose .article-kpi__val {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
}

.prose .article-kpi__lab {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

.prose blockquote.article-pullquote {
  margin: 1.75rem 0;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.55);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
}

.prose ol.article-steps {
  margin: 1.5rem 0;
  padding: 0 0 0 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  counter-reset: step;
}

.prose ol.article-steps li {
  margin-bottom: 0.5rem;
}

.prose hr.article-rule {
  margin: 2rem auto;
  max-width: 10rem;
  border: none;
  border-top: 2px solid rgba(230, 255, 126, 0.28);
}

.prose .article-related {
  margin: 2.5rem 0 0;
  padding: 0;
  border: none;
  background: transparent;
}

.prose .article-related__title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(230, 255, 126, 0.92);
}

.prose ul.article-related__grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .prose ul.article-related__grid {
    grid-template-columns: 1fr;
  }
}

.prose ul.article-related__grid > li {
  margin: 0;
  min-width: 0;
}

.prose a.article-related-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  height: 100%;
  padding: 1.2rem 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #0c0c0c;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.25s ease;
}

.prose a.article-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  border-color: rgba(230, 255, 126, 0.35);
}

.prose a.article-related-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.prose .article-related-card__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.prose .article-related-card__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
}

.prose .article-related-card__cta {
  margin-top: auto;
  padding-top: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.legal {
  max-width: var(--legal-content-max);
  margin: 0 auto;
  padding: 3rem 4vw 5rem;
}

.legal h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.legal p,
.legal li {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.88);
}

.legal ul {
  padding-left: 1.2rem;
}

.legal .legal-crosslink {
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.55);
  font-size: 0.93rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

.legal .legal-crosslink a {
  color: var(--accent);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 4vw 5rem;
  align-items: start;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  background: rgba(15, 15, 15, 0.85);
  color: rgba(255, 255, 255, 0.9);
}

.contact-card__title {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.contact-card a {
  color: var(--accent);
}

.contact-card a:hover {
  color: #f2ffb3;
}

.contact-form__notice {
  margin: 0 0 1.15rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.contact-form__optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
}

.contact-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.form.contact-form .contact-form__checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  padding: 0;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.contact-form__checkbox label {
  display: block;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.contact-form__checkbox label a {
  color: var(--accent);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 0.25rem;
}

.contact-form .form-status {
  margin-top: 1rem;
  margin-bottom: 0;
}

.form label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.75);
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.85);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1.1rem;
  transition: border-color 0.25s var(--ease-out);
}

.form textarea {
  min-height: 160px;
  resize: vertical;
}

.form input:focus-visible,
.form textarea:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.input--error {
  border-color: #ff6b6b !important;
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 4vw;
  background: #080808;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 2rem;
}

.footer-block h3 {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-block p,
.footer-block a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-foundation {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-foundation__title {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-foundation__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-foundation__body p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.footer-foundation__tag {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.footer-foundation__muted {
  font-size: 0.72rem !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.48) !important;
}

.footer-note {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/**
 * Páginas en /legal/: pie con la misma jerarquía global (grid → bloque transversal → nota),
 * pero ancho máximo alineado a main.legal (820px) y borde superior reforzado respecto al cuerpo jurídico.
 */
body.page-legal .site-footer--legal {
  margin-top: 0;
  border-top-color: rgba(255, 255, 255, 0.14);
}

body.page-legal .site-footer--legal .footer-grid,
body.page-legal .site-footer--legal .footer-foundation,
body.page-legal .site-footer--legal .footer-note {
  max-width: var(--legal-content-max);
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 1.25rem 4vw 1.5rem;
  background: rgba(10, 10, 10, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
}

.cookie-banner__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-banner__meta {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.cookie-banner__meta a {
  color: var(--accent);
}

.cookie-banner__meta a:hover {
  text-decoration: underline;
}

.nav-lock {
  overflow: hidden;
}

/* --- Bloque «enfoque editorial» (después de artículos, estilo dos columnas) --- */
.editorial-focus {
  background: linear-gradient(180deg, #070b12 0%, #0a101c 45%, #080a10 100%);
  color: #f0f4fc;
  padding: clamp(3rem, 8vw, 5rem) 4vw clamp(4rem, 9vw, 6rem);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.editorial-focus__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Los pasos deben recibir el clic por encima de la columna visual si el grid solapa en algún viewport. */
.editorial-focus__col--text {
  position: relative;
  z-index: 2;
}

.editorial-focus__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(230, 255, 126, 0.75);
}

.editorial-focus__title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.editorial-focus__lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
}

.editorial-focus__steps {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.editorial-focus__step {
  display: flex;
  gap: 0;
  align-items: flex-start;
  width: 100%;
  padding: 1.1rem 0.75rem;
  margin: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.38);
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}

.editorial-focus__step:hover {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.03);
}

.editorial-focus__step.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.editorial-focus__step-label {
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  line-height: 1.55;
  font-weight: 500;
}

.editorial-focus__col--visual {
  position: relative;
  min-height: 260px;
}

.editorial-focus__card {
  padding: 1.5rem 1.5rem 1.35rem;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(20, 32, 52, 0.85) 0%, rgba(8, 12, 22, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.editorial-focus__svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
}

.editorial-focus__card-caption {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.editorial-focus__card[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .grid-posts {
    grid-template-columns: 1fr;
  }
  .hero__intro {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .editorial-focus__inner {
    grid-template-columns: 1fr;
  }
  .editorial-focus__col--visual {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  /* Misma navegación en línea que en escritorio: sin panel lateral ni hamburguesa. */
  .site-header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .nav__toggle {
    display: none;
  }

  .nav__panel {
    position: static;
    inset: auto;
    width: auto;
    max-width: none;
    background: transparent;
    padding: 0;
    transform: none;
    transition: none;
    z-index: auto;
    pointer-events: auto;
  }

  .nav__panel:not(.is-open),
  .nav__panel.is-open {
    transform: none;
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.55rem;
  }

  .nav__sep {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero__bg {
    animation: none;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
