/* Tono claro. El pastel entra solo con data-fase, sin texto en pantalla. */
:root {
  --paper: #fbfaf6;
  --ink: #1c2823;
  --muted: #5e6a63;
  --line: #e3dcd0;
  --mint: #e7f5ee;
  --pine: #1d6a46;
  --serif: "Roboto Serif", Palatino, serif;
  --display: "Roboto Serif", Palatino, serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
}
body::before {
  content: "";
  display: block;
  height: 7px;
  background: #d7efe4;
}
.hoja { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.skip {
  position: absolute; left: 12px; top: -40px; background: #fff; padding: 6px 10px;
}
.skip:focus { top: 8px; }

.mast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 24px;
  align-items: start;
  padding: 22px 0 16px;
}
.mast-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 6px;
}
.lang { position: relative; }
.lang summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 16px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; font-size: 0.75em; color: var(--muted); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 88px;
  margin: 0;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(20, 23, 20, 0.08);
}
.lang-menu a {
  display: block;
  padding: 7px 14px;
  text-decoration: none;
  font-family: var(--cond);
  letter-spacing: 0.08em;
  color: var(--ink);
}
.lang-menu a[aria-current="true"] { background: var(--mint); }
.lang-menu a:hover { color: var(--pine); }
.word {
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.word span {
  display: block;
  margin-top: 4px;
  font-style: italic;
  font-weight: 560;
  font-size: 0.42em;
  letter-spacing: 0;
  color: var(--muted);
}
.fecha {
  margin: 0;
  font-family: var(--cond);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 16px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--cond);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 16px;
}
.nav a { text-decoration: none; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.nav a:hover { color: var(--pine); }
.nav a[href*="/secciones/"] {
  color: #14231d;
  border-radius: 999px;
  padding: 2px 8px;
}
.nav a[href*="/secciones/"]:hover { color: #14231d; }
.nav a[href*="/secciones/ciudades.html"] { background: #d4e6f8; }
.nav a[href*="/secciones/taxi-vtc.html"] { background: #e4dcf6; }
.nav a[href*="/secciones/logistica.html"] { background: #d3f0e4; }
.nav a[href*="/secciones/tecnologia.html"] { background: #b7e3a8; }
.nav a[href*="/secciones/regulacion.html"] { background: #f8efb0; }
.nav a[href*="/secciones/alianzas.html"] { background: #ffd4b0; }
.nav-ambitos {
  border-top: 0;
  padding-top: 0;
  color: var(--pine);
}
.nav-ambitos a { color: var(--pine); }
.stance {
  margin: 14px 0 0;
  font-style: italic;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  grid-template-areas: "copy side" "photo side";
  gap: 22px 36px;
  align-items: start;
  padding: 28px 0 28px;
}
.hero-copy { grid-area: copy; }
.foto { grid-area: photo; }
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  font-size: 16px;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}
.sub {
  margin: 16px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 560;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}
.dek { margin: 16px 0 0; max-width: 42rem; font-size: 19px; }
.meta { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.leer {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--pine);
  color: var(--pine);
  font-size: 18px;
}
.foto { margin: 6px 0 0; min-width: 0; }
.foto img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
.foto figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.35; }

.cifras {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cifras a {
  min-width: 0;
  padding: 16px 14px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--line);
}
.cifras a:first-child { border-left: 0; }
.cifras a[data-ambito="espana"] { background: #f3faf6; }
.cifras a[data-ambito="internacional"] { background: #f6f3fb; }
.cifras a[data-ambito="regulacion-eu"] { background: #fdf4ef; }
.cifras a[data-ambito="logistica"] { background: #f3f8f4; }
.cifras a:hover { filter: brightness(0.98); }
.cifras .k {
  font-family: var(--cond);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--pine);
}
.cifras .n {
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.cifras .t { font-size: 14px; line-height: 1.35; color: #314038; }

.piezas { display: flex; flex-direction: column; }
.pieza {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.pieza img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.pieza:hover h2 { color: var(--pine); }
.sec {
  margin: 0 0 6px;
  font-family: var(--cond);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--muted);
}
.pieza h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.pieza p { margin: 8px 0 0; color: #314038; }

.bajo {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  padding: 28px 0;
  align-items: start;
}
.cal h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 560;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}
.years a { text-decoration: none; color: var(--muted); }
.years a.now { color: var(--ink); }
.years a:hover { color: var(--pine); }
.depot {
  display: block;
  text-decoration: none;
  min-width: 0;
}
.depot img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}
.depot span {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}
.depot:hover span { color: var(--pine); }

.via {
  grid-area: side;
  position: sticky;
  top: 14px;
  padding: 16px 16px 18px;
  background: #14231d;
  color: #f4efe6;
  border-radius: 16px;
}
.via-lead { color: #a8e0cc; }
.via h2 { color: #fff; }
.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #fff;
}
.mode-switch button {
  font-family: var(--cond);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  cursor: pointer;
}
.mode-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
html[data-modo="magazine"] {
  --paper: #a8e0cc;
  --ink: #14231d;
  --pine: #14231d;
  --muted: #2c463c;
  --line: #14231d;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --serif: "Big Shoulders Text", "Roboto Serif", sans-serif;
}
html[data-modo="magazine"] body { background: #a8e0cc; color: #14231d; }
html[data-modo="magazine"] body::before { height: 8px; background: #14231d; }
html[data-modo="magazine"] .word,
html[data-modo="magazine"] h1,
html[data-modo="magazine"] h2,
html[data-modo="magazine"] h3,
html[data-modo="magazine"] .n { font-weight: 800; letter-spacing: -0.02em; }
.via-lead {
  margin: 0;
  font-family: var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pine);
  font-size: 15px;
}
.via h2 {
  margin: 4px 0 12px;
  font-family: var(--display);
  font-weight: 560;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.panels a {
  min-width: 0;
  padding: 12px 14px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--pine);
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 6px;
  align-items: baseline;
  color: #14231d;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}
.panels a:hover,
.panels a:hover h3,
.panels a:hover p { color: #14231d; }
.panels a:nth-child(2) { border-top-color: #8d74c9; }
.panels a:nth-child(3) { border-top-color: #c4846a; }
.panels a:hover {
  background: #d7efe4;
  border-color: #1d6a46;
}
.panels a:nth-child(2):hover {
  background: #efeaf8;
  border-color: #8d74c9;
}
.panels a:nth-child(3):hover {
  background: #f8eee8;
  border-color: #c4846a;
}
.pk {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: 26px;
  line-height: 1;
  color: #14231d;
}
.panels h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: #1d6a46;
  text-underline-offset: 0.16em;
}
.panels a > p:not(.pk) { grid-column: 2; margin: 0; font-size: 16px; }
.soon {
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #14231d;
  font-size: 14px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.foot p { margin: 0; max-width: 46rem; }
.foot a { color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.foot nav a { text-decoration: none; font-family: var(--cond); letter-spacing: 0.06em; }
.otras { display: flex; gap: 14px; }
.otras a { color: var(--pine); }

@media (max-width: 900px) {
  .hoja { width: min(1080px, calc(100% - 28px)); }
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "side" "photo";
    gap: 18px;
  }
  .bajo, .cifras { grid-template-columns: 1fr 1fr; }
  .foto img { height: 220px; }
  .pieza { grid-template-columns: 1fr; }
  .pieza img { height: 180px; }
  .cifras a:nth-child(odd) { border-left: 0; }
}
html[data-fase="pastel"][data-tono="menta"] { --paper: #d9f3e6; --pine: #146b45; --ink: #14261e; }
html[data-fase="pastel"][data-tono="lila"] { --paper: #ebe4fb; --pine: #5b4584; --ink: #241c33; }
html[data-fase="pastel"][data-tono="melocoton"] { --paper: #fde8df; --pine: #9a4e32; --ink: #2c1c16; }
html[data-fase="pastel"][data-tono="cielo"] { --paper: #e5f0fb; --pine: #24527a; --ink: #172433; }
html[data-fase="pastel"] body { background: var(--paper); color: var(--ink); }
html[data-fase="pastel"] .cifras { gap: 8px; border: 0; }
html[data-fase="pastel"] .cifras a {
  border: 0;
  border-radius: 14px;
  background: #f6f1e4;
}
html[data-fase="pastel"] .cifras a[data-ambito="espana"] { background: #cfeedd; }
html[data-fase="pastel"] .cifras a[data-ambito="regulacion-eu"] { background: #f8d9cc; }
html[data-fase="pastel"] .cifras a[data-ambito="internacional"] { background: #e4d9f8; }
html[data-fase="pastel"] .cifras a[data-ambito="logistica"] { background: #d5eee4; }
html[data-fase="pastel"] .pieza { background: color-mix(in srgb, #fff 70%, var(--paper)); border-radius: 16px; border-bottom: 0; padding: 12px; }
body { transition: background-color 0.6s ease, color 0.6s ease; }
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}

@media (max-width: 640px) {
  .mast { grid-template-columns: 1fr; }
  .cifras, .panels, .bajo { grid-template-columns: 1fr; }
  .cifras a { border-left: 0; border-top: 1px solid var(--line); }
  .cifras a:first-child { border-top: 0; }
}

.hero.sin-foto { grid-template-areas: "copy side"; }
.pieza.sin-foto { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) {
  .hero.sin-foto { grid-template-areas: "copy" "side"; }
}

/* La portada se queda en claro. Revista y pastel no cambian el fondo. */
html[data-modo="magazine"] {
  --paper: #fbfaf6;
  --ink: #1c2823;
  --pine: #1d6a46;
  --muted: #5e6a63;
  --line: #e3dcd0;
  --display: "Roboto Serif", Palatino, serif;
  --serif: "Roboto Serif", Palatino, serif;
}
html[data-modo="magazine"] body,
html[data-fase="pastel"] body {
  background: #fbfaf6;
  color: #1c2823;
}
html[data-modo="magazine"] body::before { height: 7px; background: #d7efe4; }
