/* =========================================================
   CAMINOS DE BELGRANO — Landing page
   Mobile first · Sin dependencias de JavaScript externas
   ========================================================= */

:root {
  --blue: #1E3D84;
  --blue-900: #10265b;
  --blue-950: #091a42;
  --sky: #40A7C8;
  --sky-100: #e9f6fa;
  --yellow: #F8B03B;
  --yellow-100: #fff4dc;
  --white: #FFFFFF;
  --ink: #152038;
  --muted: #64708a;
  --line: #dce3ee;
  --surface: #f5f8fc;
  --surface-2: #edf3f8;
  --success: #1a8a78;

  --font-body: "Sofia Sans", "Aptos", "Segoe UI", sans-serif;
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;

  --container: 1180px;
  --header-h: 74px;
  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 34px;
  --shadow-sm: 0 10px 30px rgba(13, 35, 80, .08);
  --shadow: 0 24px 70px rgba(13, 35, 80, .14);
  --transition: 240ms cubic-bezier(.2, .75, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

::selection {
  color: var(--blue-950);
  background: var(--yellow);
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: .75rem 1rem;
  color: var(--white);
  background: var(--blue-950);
  border-radius: 8px;
  transform: translateY(-150%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: 5.5rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 .85rem;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.6rem;
  height: 4px;
  content: "";
  background: var(--yellow);
  border-radius: 999px;
}

.section-heading h2,
.closing h2 {
  max-width: 15ch;
  margin: 0;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 11vw, 5.2rem);
  font-weight: 400;
  letter-spacing: .008em;
  line-height: .92;
  text-transform: uppercase;
}

.section-heading h2 span,
.closing h2 span {
  color: var(--sky);
}

.section-heading--light .eyebrow {
  color: rgba(255, 255, 255, .8);
}

.section-heading--light h2 {
  color: var(--white);
}

.section-heading--light h2 span {
  color: var(--yellow);
}

.lead {
  color: var(--ink);
  font-size: clamp(1.14rem, 2.5vw, 1.38rem);
  font-weight: 520;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .91rem;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition);
}

.button svg,
.text-link svg,
.route-detail a svg {
  width: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--primary {
  color: var(--blue-950);
  background: var(--yellow);
  box-shadow: 0 10px 32px rgba(248, 176, 59, .28);
}

.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(248, 176, 59, .37);
}

.button--ghost {
  color: var(--white);
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .45);
  backdrop-filter: blur(10px);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, .18);
  border-color: var(--white);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--blue);
  font-weight: 800;
  border-bottom: 2px solid rgba(30, 61, 132, .2);
  transition: color var(--transition), border-color var(--transition);
}

.text-link:hover {
  color: var(--sky);
  border-color: var(--sky);
}

/* Reveal animation ------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1) var(--delay, 0s), transform 700ms cubic-bezier(.2,.7,.2,1) var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll progress -------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  z-index: 1200;
  inset: 0 0 auto;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--yellow));
}

/* Header ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: var(--header-h);
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(30, 61, 132, .08);
  box-shadow: 0 2px 16px rgba(11, 31, 72, .04);
  backdrop-filter: blur(16px);
  transition: height var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.site-header.is-scrolled {
  height: 66px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 35px rgba(13, 35, 80, .09);
}

.site-header__inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 176px;
  max-height: 54px;
  object-fit: contain;
  transition: width var(--transition);
}

.site-header.is-scrolled .brand img {
  width: 158px;
}

.nav-toggle {
  position: relative;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-content: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(4) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  /* El header usa backdrop-filter, por lo que es el bloque contenedor de sus
     descendientes fijos: se posiciona en absolute respecto del header para que
     el panel conserve su alto (si no, colapsa a 0 y se ve transparente). */
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: calc(100svh - var(--header-h));
  max-height: calc(100vh - 66px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  padding: 2rem 1rem;
  background: var(--white);
  box-shadow: 0 24px 40px rgba(11, 31, 72, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}

.site-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav a {
  padding: 1rem;
  color: var(--blue);
  font-size: 1.08rem;
  font-weight: 760;
  border-bottom: 1px solid var(--line);
}

.site-nav__cta {
  margin-top: .8rem;
  color: var(--blue-950) !important;
  background: var(--yellow);
  border: 0 !important;
  border-radius: 999px;
  text-align: center;
}

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: max(700px, 100svh);
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--blue-950);
}

.hero::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 20, 52, .86) 0%, rgba(5, 20, 52, .62) 45%, rgba(5, 20, 52, .08) 85%),
    linear-gradient(0deg, rgba(5, 20, 52, .70) 0%, rgba(5, 20, 52, .02) 45%);
  pointer-events: none;
}

.hero__slides,
.hero__slide,
.hero__slide picture,
.hero__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__slides {
  z-index: 0;
}

.hero__slide {
  isolation: isolate;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms ease, transform 7s ease;
}

.hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero__slide img {
  object-fit: cover;
}

/* Manual de marca: capa institucional #1E3D84 al 40% en Multiplicar. */
.hero__slide::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: var(--blue);
  opacity: .40;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 10rem;
}

.hero__eyebrow {
  color: rgba(255,255,255,.78);
}

.hero h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 17vw, 7rem);
  font-weight: 400;
  letter-spacing: .006em;
  line-height: .83;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero h1 span {
  color: var(--yellow);
}

.hero__lead {
  max-width: 620px;
  margin: 1.4rem 0 0;
  color: rgba(255,255,255,.88);
  font-size: clamp(1.06rem, 2.5vw, 1.25rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.hero__tags li {
  padding: .5rem .8rem;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero__bottom {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 3.5rem;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero__location {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.hero__location-mark {
  position: relative;
  width: 12px;
  height: 12px;
  background: var(--yellow);
  border: 3px solid rgba(255,255,255,.55);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(248,176,59,.14);
}

.hero__controls {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.hero__controls > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: var(--white);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}

.hero__controls > button:hover {
  background: rgba(255,255,255,.18);
  transform: scale(1.05);
}

.hero__controls svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__dots {
  display: flex;
  gap: 6px;
}

.hero__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  background: rgba(255,255,255,.4);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width var(--transition), background-color var(--transition);
}

.hero__dots button.is-active {
  width: 24px;
  background: var(--yellow);
}

.hero__scroll {
  position: absolute;
  z-index: 4;
  bottom: 1.25rem;
  left: 50%;
  display: none;
  align-items: center;
  gap: .7rem;
  color: rgba(255,255,255,.65);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
}

.hero__scroll i {
  position: relative;
  width: 1px;
  height: 46px;
  overflow: hidden;
  background: rgba(255,255,255,.3);
}

.hero__scroll i::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--yellow);
  animation: scroll-line 2s ease-in-out infinite;
  transform: translateY(100%);
}

@keyframes scroll-line {
  0% { transform: translateY(100%); }
  50%, 100% { transform: translateY(-100%); }
}

/* Impact strip ----------------------------------------------------------- */
.impact-strip {
  position: relative;
  z-index: 5;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.impact-strip__grid {
  display: grid;
}

.impact-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.impact-stat:last-child {
  border-bottom: 0;
}

.impact-stat strong {
  color: var(--blue);
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 400;
  line-height: .8;
}

.impact-stat span {
  max-width: 20ch;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 760;
  line-height: 1.25;
}

/* Project --------------------------------------------------------------- */
.project {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 4%, rgba(64,167,200,.12), transparent 26rem),
    var(--white);
}

.project__intro {
  display: grid;
  gap: 2rem;
}

.project__copy {
  max-width: 700px;
}

.project__copy p {
  margin-top: 0;
  color: var(--muted);
}

.project__copy p + p {
  margin-top: 1.1rem;
}

.project__copy .lead {
  color: var(--ink);
}

.project__cards {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.project-card {
  position: relative;
  min-height: 320px;
  padding: 1.5rem;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card::after {
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 9rem;
  height: 9rem;
  content: "";
  background: rgba(64,167,200,.12);
  border-radius: 50%;
  transition: transform 600ms ease;
}

.project-card:hover {
  border-color: rgba(64,167,200,.45);
  box-shadow: var(--shadow-sm);
  transform: translateY(-6px);
}

.project-card:hover::after {
  transform: scale(1.7);
}

.project-card--blue {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.project-card--blue::after {
  background: rgba(255,255,255,.08);
}

.project-card--yellow {
  color: var(--blue-950);
  background: var(--yellow);
  border-color: var(--yellow);
}

.project-card--yellow::after {
  background: rgba(255,255,255,.23);
}

.project-card__number {
  display: block;
  color: currentColor;
  font-family: var(--font-display);
  font-size: 1.4rem;
  opacity: .45;
}

.project-card__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-top: 2.4rem;
  color: var(--blue);
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(11,31,72,.09);
}

.project-card__icon svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-card h3 {
  position: relative;
  z-index: 1;
  margin: 1.2rem 0 .55rem;
  font-size: 1.55rem;
  line-height: 1.1;
}

.project-card p {
  position: relative;
  z-index: 1;
  max-width: 33ch;
  margin: 0;
  color: inherit;
  opacity: .78;
  font-size: .97rem;
}

/* Marca de agua sobre las fotos (manual de marca) ----------------------- */
.photo-mark {
  position: absolute;
  z-index: 4;
  right: var(--mark-inset, .9rem);
  bottom: var(--mark-inset, .9rem);
  width: calc(var(--mark-size, 40px) * 2.45);
  aspect-ratio: 900 / 367;
  background: url("../assets/images/logo-caminos-blanco.png") center / contain no-repeat;
  opacity: .92;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(6, 18, 44, .55));
}

.photo-mark.photo-mark--hero {
  --mark-size: clamp(52px, 7vw, 86px);
  top: calc(var(--header-h) + 1.6rem);
  right: clamp(1rem, 5vw, 2.5rem);
  bottom: auto;
}

/* Galería por jurisdicción ---------------------------------------------- */
.gallery-intro {
  display: grid;
  gap: 1.25rem;
  margin-top: 5rem;
}

.gallery-intro p {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
}

.province-gallery {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2rem;
}

.province-gallery__fallback {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.js .province-gallery__fallback {
  display: none;
}

.province-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  color: var(--white);
  text-align: left;
  background: var(--blue-950);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.province-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.province-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(.2, .7, .2, 1);
}

.province-tile:hover img {
  transform: scale(1.06);
}

.province-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(8, 25, 61, .92), rgba(8, 25, 61, .05) 62%);
}

.province-tile--empty {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 10px, transparent 10px 20px),
    linear-gradient(160deg, var(--blue), var(--blue-950));
}

.province-tile .province-tile__silueta {
  position: absolute;
  z-index: 1;
  top: 7%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: 66%;
  height: 66%;
  opacity: .17;
  object-fit: contain;
  transform: translateX(-50%);
  transition: opacity var(--transition), transform var(--transition);
}

.province-tile:hover .province-tile__silueta {
  opacity: .26;
  transform: translateX(-50%) scale(1.05);
}

.province-tile--empty::after {
  background: none;
}

.province-tile .photo-mark {
  --mark-size: 22px;
  --mark-inset: .65rem;
}

.province-tile__body {
  position: absolute;
  z-index: 3;
  right: 2.9rem;
  bottom: .85rem;
  left: .9rem;
  display: grid;
  gap: .1rem;
}

.province-tile__body small {
  color: var(--yellow);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.province-tile__body strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .01em;
  line-height: 1;
}

.province-tile__body em {
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-style: normal;
}

/* Route ----------------------------------------------------------------- */
.route {
  background:
    linear-gradient(rgba(30,61,132,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,61,132,.025) 1px, transparent 1px),
    var(--surface);
  background-size: 36px 36px;
}

.route__header {
  display: grid;
  gap: 1.5rem;
}

.route__intro {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}

.route__filters {
  display: flex;
  gap: .5rem;
  margin-top: 2rem;
  overflow-x: auto;
  padding-bottom: .35rem;
  scrollbar-width: thin;
}

.route__filters button {
  flex: 0 0 auto;
  padding: .65rem 1rem;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.route__filters button:hover,
.route__filters button.is-active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.route__filters button:hover {
  transform: translateY(-2px);
}

.route-map {
  display: grid;
  margin-top: 1.5rem;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* La relación de aspecto replica el viewBox del SVG (330 x 362) para que las
   chinchetas, ubicadas en %, caigan exactamente sobre el mapa. Si cambiás el
   recorte del SVG, actualizá también este aspect-ratio. */
.map-stage {
  position: relative;
  aspect-ratio: 330 / 362;
  overflow: hidden;
  background:
    radial-gradient(circle at 55% 45%, rgba(64,167,200,.14), transparent 40%),
    linear-gradient(145deg, #f8fbfd, #eaf2f8);
}

.map-stage::before {
  position: absolute;
  z-index: 0;
  inset: 1rem;
  content: "";
  border: 1px solid rgba(30,61,132,.08);
  border-radius: calc(var(--radius-lg) - .8rem);
  pointer-events: none;
}

.map-stage__base {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.map-stage__routes {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* Referencia: dónde está el recorte dentro del país --------------------- */
.map-locator {
  position: absolute;
  z-index: 3;
  top: 1.1rem;
  right: 1.1rem;
  display: grid;
  gap: .3rem;
  justify-items: center;
  margin: 0;
  padding: .6rem .7rem .5rem;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.map-locator img {
  width: auto;
  height: clamp(74px, 12vw, 108px);
}

.map-locator figcaption {
  color: var(--blue);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.map-stage__routes polyline {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 6 5;
  vector-effect: non-scaling-stroke;
  animation: route-dash 16s linear infinite;
  filter: drop-shadow(0 2px 3px rgba(248,176,59,.35));
}

@keyframes route-dash {
  to { stroke-dashoffset: -80; }
}

.map-marker {
  position: absolute;
  z-index: 4;
  top: var(--y, 50%);
  left: var(--x, 50%);
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  background: var(--white);
  border: 4px solid var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(30,61,132,.11), 0 4px 14px rgba(13,35,80,.22);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}

.map-marker.is-active {
  z-index: 5;
}

.map-marker:hover,
.map-marker.is-active {
  background: var(--yellow);
  border-color: var(--white);
  box-shadow: 0 0 0 6px rgba(248,176,59,.28), 0 8px 20px rgba(13,35,80,.26);
  transform: translate(-50%, -50%) scale(1.18);
}

.map-marker.is-muted {
  opacity: .18;
  pointer-events: none;
}

.map-marker span {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  width: max-content;
  max-width: 150px;
  padding: .38rem .55rem;
  color: var(--white);
  background: var(--blue-950);
  border-radius: 7px;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.05;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity var(--transition), transform var(--transition);
}

.map-marker span::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  content: "";
  border: 5px solid transparent;
  border-top-color: var(--blue-950);
  transform: translateX(-50%);
}

.map-marker:hover span,
.map-marker:focus-visible span,
.map-marker.is-active span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.route-detail {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 1.75rem;
  color: var(--white);
  background:
    radial-gradient(circle at 90% 8%, rgba(64,167,200,.35), transparent 12rem),
    var(--blue);
}

.route-detail::after {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 10rem;
  height: 10rem;
  content: "";
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(255,255,255,.035), 0 0 0 4rem rgba(255,255,255,.025);
}

.route-detail__topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255,255,255,.58);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.route-detail h3 {
  position: relative;
  z-index: 1;
  margin: 1.45rem 0 .2rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 14vw, 5.5rem);
  font-weight: 400;
  line-height: .88;
  text-transform: uppercase;
}

.route-detail__theme {
  position: relative;
  z-index: 1;
  margin: .6rem 0 1.8rem;
  color: var(--yellow);
  font-size: .92rem;
  font-weight: 800;
}

.route-detail__site {
  position: relative;
  z-index: 1;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.route-detail__site small {
  display: block;
  color: rgba(255,255,255,.55);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.route-detail__site strong {
  display: block;
  margin-top: .25rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.route-detail > p:not(.route-detail__theme) {
  position: relative;
  z-index: 1;
  margin: 1.15rem 0;
  color: rgba(255,255,255,.74);
  font-size: .92rem;
}

.route-detail a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--white);
  font-size: .82rem;
  font-weight: 800;
}

.route-detail a svg {
  transition: transform var(--transition);
}

.route-detail a:hover svg {
  transform: translateX(4px);
}

.route-detail.is-changing > * {
  animation: detail-in 420ms ease both;
}

@keyframes detail-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.province-grid {
  display: grid;
  gap: .8rem;
  margin-top: 1.4rem;
}

.province-card {
  position: relative;
  display: grid;
  min-height: 155px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: .6rem 1rem;
  padding: 1.1rem;
  color: var(--ink);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.province-card:hover,
.province-card.is-active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 14px 34px rgba(30,61,132,.17);
  transform: translateY(-4px);
}

.province-card.is-filtered {
  display: none;
}

.province-card__index {
  color: var(--sky);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
}

.province-card__region {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.province-card:hover .province-card__region,
.province-card.is-active .province-card__region {
  color: rgba(255,255,255,.55);
}

.province-card strong {
  align-self: end;
  grid-column: 1 / -1;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1.05;
}

.province-card small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25;
}

.province-card:hover small,
.province-card.is-active small {
  color: rgba(255,255,255,.67);
}

.province-card__arrow {
  align-self: end;
  justify-self: end;
  color: var(--sky);
  font-size: 1.2rem;
}

.province-card:hover .province-card__arrow,
.province-card.is-active .province-card__arrow {
  color: var(--yellow);
}

/* Education ------------------------------------------------------------- */
.education {
  background: var(--white);
}

.education__grid {
  display: grid;
  gap: 3rem;
}

.education__visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--blue);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.education__visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(0deg, rgba(9,26,66,.88), rgba(9,26,66,.04) 58%),
    rgba(30,61,132,.32);
  mix-blend-mode: multiply;
}

.education__visual picture,
.education__visual img {
  width: 100%;
  height: 100%;
}

.education__visual img {
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.education__badge {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  color: var(--blue-950);
  background: var(--yellow);
  border-radius: 12px;
  transform: rotate(-2deg);
}

.education__badge span,
.education__badge strong {
  display: block;
  line-height: 1;
}

.education__badge span {
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.education__badge strong {
  margin-top: .3rem;
  font-size: 1.15rem;
}

.education__quote {
  position: absolute;
  z-index: 2;
  right: 1.4rem;
  bottom: 1.4rem;
  left: 1.4rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 13vw, 5.6rem);
  letter-spacing: .01em;
  line-height: .82;
  text-transform: uppercase;
  padding-right: 6.5rem;
}

.education__content > p {
  color: var(--muted);
}

.education__content .lead {
  color: var(--ink);
}

.learning-path {
  display: grid;
  gap: .7rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.learning-path li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: .9rem;
  padding: .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color var(--transition), transform var(--transition), background-color var(--transition);
}

.learning-path li:hover {
  background: var(--sky-100);
  border-color: rgba(64,167,200,.35);
  transform: translateX(4px);
}

.learning-path li > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--blue);
  background: var(--yellow);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.learning-path strong,
.learning-path small {
  display: block;
}

.learning-path strong {
  color: var(--blue);
  line-height: 1.15;
}

.learning-path small {
  margin-top: .18rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25;
}

.education__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Technology ------------------------------------------------------------ */
.technology {
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--blue-950);
  background-size: 42px 42px;
}

.technology__glow {
  position: absolute;
  z-index: -1;
  top: -12rem;
  right: -12rem;
  width: 36rem;
  height: 36rem;
  background: radial-gradient(circle, rgba(64,167,200,.28), transparent 67%);
  border-radius: 50%;
}

.technology__header {
  display: grid;
  gap: 1.5rem;
}

.technology__intro {
  max-width: 620px;
  margin: 0;
  color: rgba(255,255,255,.66);
}

.technology__grid {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
}

.tech-features {
  display: grid;
  gap: .8rem;
}

.tech-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 1rem;
  padding: 1.2rem;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.tech-card:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(64,167,200,.5);
  transform: translateX(5px);
}

.tech-card__icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--blue-950);
  background: var(--yellow);
  border-radius: 14px;
}

.tech-card__icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-card span {
  color: var(--sky);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tech-card h3 {
  margin: .3rem 0 .35rem;
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1.1;
}

.tech-card p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: .87rem;
}

.tech-demo {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
}

.phone {
  position: relative;
  z-index: 2;
  width: min(270px, 70vw);
  padding: 10px;
  background: #07132f;
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 38px;
  box-shadow: 0 30px 70px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06);
  transform: rotate(-4deg);
}

.phone__speaker {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 50%;
  width: 60px;
  height: 6px;
  background: #091a42;
  border-radius: 999px;
  transform: translateX(-50%);
}

.phone__screen {
  overflow: hidden;
  background: var(--surface);
  border-radius: 29px;
}

.phone__map {
  position: relative;
  height: 240px;
  background:
    linear-gradient(30deg, transparent 0 45%, rgba(30,61,132,.06) 45% 48%, transparent 48% 100%),
    linear-gradient(-20deg, transparent 0 54%, rgba(30,61,132,.06) 54% 57%, transparent 57% 100%),
    radial-gradient(circle at 45% 48%, rgba(64,167,200,.24), transparent 40%),
    #eaf3f8;
}

.phone__map::before,
.phone__map::after {
  position: absolute;
  content: "";
  background: rgba(30,61,132,.11);
  border-radius: 999px;
  transform: rotate(-18deg);
}

.phone__map::before {
  top: 70px;
  left: -30px;
  width: 330px;
  height: 10px;
}

.phone__map::after {
  top: 130px;
  left: -20px;
  width: 290px;
  height: 6px;
  transform: rotate(27deg);
}

.phone__pin {
  position: absolute;
  z-index: 2;
  top: 92px;
  left: 50%;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  border: 6px solid var(--white);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(13,35,80,.25);
  transform: translateX(-50%) rotate(-45deg);
}

.phone__pin::after {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--blue);
  border-radius: 50%;
}

.phone__route {
  position: absolute;
  z-index: 1;
  top: 55px;
  left: 35px;
  width: 185px;
  height: 120px;
  border: 3px dashed var(--sky);
  border-color: var(--sky) transparent transparent var(--sky);
  border-radius: 60% 40% 50% 30%;
  transform: rotate(12deg);
}

.phone__content {
  padding: 1.25rem 1.1rem 1.4rem;
  color: var(--ink);
}

.phone__content small {
  color: var(--sky);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.phone__content strong {
  display: block;
  margin-top: .28rem;
  color: var(--blue);
  font-size: 1.25rem;
}

.phone__content p {
  margin: .55rem 0 .85rem;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.4;
}

.phone__chips {
  display: flex;
  gap: .4rem;
}

.phone__chips span {
  padding: .35rem .55rem;
  color: var(--blue);
  background: var(--sky-100);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
}

.qr-demo {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  width: 175px;
  padding: .8rem;
  overflow: hidden;
  color: var(--blue-950);
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(0,0,0,.28);
  transform: rotate(5deg);
}

.qr-demo img {
  width: 100%;
  border-radius: 8px;
}

.qr-demo small a {
  color: var(--blue);
  font-weight: 800;
  border-bottom: 1px solid rgba(30, 61, 132, .35);
}

.qr-demo strong,
.qr-demo small {
  display: block;
}

.qr-demo strong {
  margin-top: .55rem;
  color: var(--blue);
  font-size: .86rem;
}

.qr-demo small {
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.25;
}

.qr-demo__beam {
  position: absolute;
  z-index: 2;
  right: .8rem;
  left: .8rem;
  height: 2px;
  background: var(--yellow);
  box-shadow: 0 0 12px var(--yellow);
  animation: qr-scan 2.8s ease-in-out infinite;
}

@keyframes qr-scan {
  0%, 100% { top: 1.1rem; opacity: .35; }
  50% { top: 9.4rem; opacity: 1; }
}

/* Closing --------------------------------------------------------------- */
.closing {
  position: relative;
  overflow: hidden;
  padding-block: 4rem;
  background: var(--yellow);
}

.closing__pattern {
  position: absolute;
  top: -6rem;
  right: -5rem;
  width: 24rem;
  height: 24rem;
  opacity: .14;
  background:
    repeating-radial-gradient(circle, transparent 0 18px, var(--blue) 19px 21px);
  border-radius: 50%;
}

.closing__inner {
  position: relative;
  display: grid;
  align-items: center;
  gap: 1.5rem;
}

.closing__inner > img {
  width: 88px;
}

.closing .eyebrow {
  color: var(--blue-950);
}

.closing .eyebrow::before {
  background: var(--blue);
}

.closing h2 {
  max-width: 13ch;
  color: var(--blue-950);
  font-size: clamp(3rem, 10vw, 4.8rem);
}

.closing h2 span {
  color: var(--blue);
}

.closing .button--primary {
  justify-self: start;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 12px 30px rgba(30,61,132,.23);
}

/* Footer ---------------------------------------------------------------- */
.site-footer {
  color: var(--white);
  background: var(--blue);
}

.site-footer__top {
  display: grid;
  gap: 2.5rem;
  padding-block: 4rem 2.5rem;
}

.site-footer__brand img {
  width: min(300px, 80vw);
  margin-left: -12px;
}

.site-footer__brand p {
  max-width: 38ch;
  margin: .8rem 0 0;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
}

.site-footer__nav {
  display: grid;
  align-content: start;
  gap: .7rem;
}

.site-footer__nav strong {
  margin-bottom: .3rem;
  color: var(--yellow);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.site-footer__nav a {
  width: fit-content;
  color: rgba(255,255,255,.72);
  font-size: .88rem;
  transition: color var(--transition), transform var(--transition);
}

.site-footer__nav a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.site-footer__bottom {
  background: rgba(5,20,52,.35);
}

.site-footer__bottom .container {
  display: flex;
  min-height: 70px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__bottom small,
.site-footer__bottom a {
  color: rgba(255,255,255,.56);
  font-size: .72rem;
}

.site-footer__bottom a:hover {
  color: var(--yellow);
}

/* Back to top ----------------------------------------------------------- */
.back-to-top {
  position: fixed;
  z-index: 900;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  color: var(--white);
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(13,35,80,.22);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), background-color var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--sky);
}

.back-to-top svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Responsive ------------------------------------------------------------ */
/* Acciones del panel lateral -------------------------------------------- */
.route-detail__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: auto;
  padding-top: 1.6rem;
}

.button--yellow {
  min-height: 46px;
  padding: .7rem 1.15rem;
  color: var(--blue-950);
  background: var(--yellow);
  font-size: .85rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(248, 176, 59, .26);
}

.button--yellow:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(248, 176, 59, .34);
}

.button--yellow svg {
  transition: transform var(--transition);
}

.button--yellow:hover svg {
  transform: translateX(4px);
}

/* Ficha ampliada (modal) ------------------------------------------------- */
body.modal-open {
  overflow: hidden;
}

.modal {
  width: min(100vw - 1.5rem, 1040px);
  max-width: none;
  max-height: min(92dvh, 900px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 40px 110px rgba(6, 18, 44, .42);
}

.modal::backdrop {
  background: rgba(6, 18, 44, .68);
  backdrop-filter: blur(3px);
}

.modal__close {
  position: absolute;
  z-index: 6;
  top: .85rem;
  right: .85rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: var(--white);
  background: rgba(9, 26, 66, .62);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background-color var(--transition), transform var(--transition);
}

.modal__close:hover {
  background: var(--blue);
  transform: rotate(90deg);
}

.modal__close svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.modal__body {
  max-height: min(92dvh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__hero {
  position: relative;
  margin: 0;
  min-height: 210px;
  overflow: hidden;
  text-align: center;
  background: #071634;
}

/* Cuando la foto no llena el ancho (verticales, o pantallas bajas) el hueco a
   los costados se rellena con la misma imagen ampliada y desenfocada, en vez
   de dos franjas planas. La foto se sigue viendo entera y sin recortar. */
.modal__hero-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--foto, none) center / cover no-repeat;
  filter: blur(34px) saturate(1.25) brightness(.42);
  transform: scale(1.25);
}

/* Alto fijo: la foto cambia de proporción pero la tira de miniaturas de
   abajo no se mueve de lugar. */
.modal__hero-stage {
  position: relative;
  display: grid;
  height: min(50dvh, 500px);
  place-items: center;
  overflow: hidden;
}

/* El contenedor se ajusta a la foto, así la marca de agua cae sobre la imagen
   y no sobre el fondo. */
.modal__hero-foto {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
}

/* Ancho y alto automáticos con topes: la imagen se ve entera y conserva su
   relación de aspecto, sea apaisada o vertical. */
/* Ancho y alto automáticos con tope: la foto se ve entera y sin deformar,
   sea apaisada o vertical. */
.modal__hero-foto img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(50dvh, 500px);
}

.modal__hero figcaption {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: left;
  gap: .2rem;
  margin: 0;
  padding: 1.1rem 1.4rem 1.35rem;
  color: var(--white);
}

.modal__hero--empty > p {
  position: absolute;
  z-index: 3;
  right: 1.4rem;
  bottom: 1.2rem;
  left: 1.4rem;
  display: grid;
  gap: .15rem;
  margin: 0;
  color: var(--white);
}

.modal__hero small {
  color: var(--yellow);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.modal__hero figcaption p {
  display: -webkit-box;
  overflow: hidden;
  max-width: 68ch;
  margin: .4rem 0 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: rgba(255, 255, 255, .84);
  font-size: .92rem;
  line-height: 1.45;
}

.modal__hero strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.9rem);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
}

.modal__hero--empty {
  display: grid;
  align-content: center;
  justify-items: start;
  height: auto;
  min-height: 190px;
  padding: 1.8rem 1.4rem;
  text-align: left;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--blue), var(--blue-950));
}

.modal__hero--empty::after {
  content: none;
}

.modal__hero--empty > p {
  position: static;
}

.modal__hero--empty em {
  position: relative;
  z-index: 3;
  margin-top: .5rem;
  color: rgba(255, 255, 255, .7);
  font-size: .8rem;
  font-style: normal;
}

.modal__content {
  padding: 1.6rem 1.4rem 2.2rem;
}

.modal__content h2 {
  margin: 0;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4rem);
  font-weight: 400;
  line-height: .95;
  text-transform: uppercase;
}

.modal__theme {
  margin: .35rem 0 1.1rem;
  color: var(--sky);
  font-size: .95rem;
  font-weight: 800;
}

.modal__content .lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.modal__subtitle {
  margin: 2.2rem 0 .9rem;
  color: var(--blue);
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.modal__filmstrip {
  display: flex;
  gap: .5rem;
  padding: .6rem 1.4rem .7rem;
  overflow-x: auto;
  background: #071634;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
}

.modal__thumb {
  flex: 0 0 auto;
  width: 76px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border: 2px solid transparent;
  border-radius: 9px;
  opacity: .58;
  cursor: pointer;
  scroll-snap-align: start;
  transition: opacity var(--transition), border-color var(--transition);
}

.modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__thumb:hover {
  opacity: 1;
}

.modal__thumb.is-active {
  border-color: var(--yellow);
  opacity: 1;
}

.modal__sites {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal__sites li {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border-left: 3px solid var(--sky);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.modal__sites strong {
  display: block;
  color: var(--blue);
  font-size: 1.02rem;
  line-height: 1.25;
}

.modal__sites small {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.modal__sites p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.6rem;
}

.modal__links a {
  padding: .6rem 1rem;
  color: var(--blue);
  background: var(--sky-100);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  transition: background-color var(--transition), color var(--transition);
}

.modal__links a:hover {
  color: var(--white);
  background: var(--blue);
}


/* Horarios y enlace por sitio ------------------------------------------- */
.modal__hours {
  margin: .5rem 0 0 !important;
  font-size: .84rem !important;
}

.modal__hours span {
  margin-right: .4rem;
  color: var(--blue);
  font-weight: 850;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.modal__sites a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .6rem;
  color: var(--blue);
  font-size: .8rem;
  font-weight: 800;
  border-bottom: 2px solid rgba(30, 61, 132, .22);
  transition: color var(--transition), border-color var(--transition);
}

.modal__sites a:hover {
  color: var(--sky);
  border-color: var(--sky);
}

.modal__links-main {
  color: var(--white) !important;
  background: var(--blue) !important;
}

.modal__links-main:hover {
  background: var(--blue-950) !important;
}

/* Logos institucionales del pie ----------------------------------------- */
.partner-logos {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.partner-logos__label {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.partner-logos__grid {
  display: grid;
  gap: 1.75rem 2.25rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner-logos__grid li {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.partner-logos__grid img {
  width: auto;
  max-width: min(100%, 162px);
  max-height: 44px;
  object-fit: contain;
  opacity: .92;
  transition: opacity var(--transition);
}

.partner-logos__grid a:hover img {
  opacity: 1;
}

.partner-logos__note {
  max-width: 78ch;
  margin: 0;
  color: rgba(255, 255, 255, .55);
  font-size: .8rem;
  line-height: 1.5;
}

@media (min-width: 560px) {
  .container {
    width: min(100% - 3rem, var(--container));
  }

  .hero__content {
    padding-bottom: 8rem;
  }

  .impact-strip__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .impact-stat {
    grid-template-columns: 1fr;
    gap: .4rem;
    padding: 1.6rem 1.2rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .impact-stat:first-child {
    padding-left: 0;
  }

  .impact-stat:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .project__cards,
  .province-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .province-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }



  .learning-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-demo {
    right: 6%;
  }

}

@media (min-width: 760px) {
  :root {
    --header-h: 82px;
  }

  .section {
    padding-block: 7rem;
  }

  .brand img {
    width: 215px;
  }

  .site-header.is-scrolled .brand img {
    width: 190px;
  }

  .hero__content {
    padding-top: calc(var(--header-h) + 5rem);
  }

  .hero h1 {
    max-width: 11ch;
  }

  .hero__scroll {
    display: flex;
  }

  .project__intro,
  .gallery-intro,
  .route__header,
  .technology__header {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 4rem;
  }

  .project__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-card {
    min-height: 360px;
    padding: 1.7rem;
  }




  .route-map {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
  }


  .route-detail {
    min-height: 540px;
    padding: 2rem;
  }

  .route-detail h3 {
    font-size: clamp(4.4rem, 8vw, 6rem);
  }

  .province-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .province-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .education__grid {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 4rem;
  }

  .education__visual {
    min-height: 680px;
  }

  .technology__grid {
    grid-template-columns: minmax(0, 1fr) minmax(430px, .9fr);
    align-items: center;
    gap: 4rem;
  }

  .tech-demo {
    min-height: 650px;
  }

  .phone {
    width: 300px;
  }

  .qr-demo {
    right: 0;
    width: 190px;
  }

  .closing__inner {
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
  }

  .closing__inner > img {
    width: 110px;
  }

  .closing .button--primary {
    justify-self: end;
  }

  .site-footer__top {
    grid-template-columns: 1.5fr .65fr 1fr;
    gap: 3rem;
  }
}

@media (min-width: 1020px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .15rem;
    padding: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    position: relative;
    padding: .7rem .8rem;
    color: var(--blue);
    font-size: .82rem;
    border: 0;
  }

  .site-nav a:not(.site-nav__cta)::after {
    position: absolute;
    right: .8rem;
    bottom: .35rem;
    left: .8rem;
    height: 2px;
    content: "";
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
  }

  .site-nav a:hover::after,
  .site-nav a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .site-nav__cta {
    margin: 0 0 0 .5rem;
    padding: .72rem 1.15rem !important;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(5,20,52,.87) 0%, rgba(5,20,52,.62) 40%, rgba(5,20,52,.12) 72%, transparent 100%),
      linear-gradient(0deg, rgba(5,20,52,.62) 0%, rgba(5,20,52,.01) 46%);
  }

  .hero__content {
    padding-top: calc(var(--header-h) + 4rem);
  }

  .hero h1 {
    font-size: clamp(4.6rem, 7.8vw, 7.6rem);
  }

  .hero__lead {
    max-width: 650px;
  }

  .impact-strip {
    margin-top: -1px;
  }

  .impact-stat {
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding-block: 2rem;
  }

  .project__cards {
    margin-top: 4rem;
  }

  .province-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .province-gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .province-card {
    min-height: 175px;
  }

  .technology__grid {
    margin-top: 4rem;
  }

  .site-footer__top {
    padding-block: 5rem 3.5rem;
  }
}

@media (min-width: 1260px) {
  .site-nav a {
    padding-inline: 1rem;
  }

  .site-nav a:not(.site-nav__cta)::after {
    right: 1rem;
    left: 1rem;
  }

  .hero__bottom {
    bottom: 4.5rem;
  }

  .project-card {
    min-height: 390px;
    padding: 2rem;
  }

  .project-card__icon {
    margin-top: 3rem;
  }


  .route-detail {
    min-height: 610px;
    padding: 2.5rem;
  }
}

/* =======================================================================
   Ajustes para teléfonos. Corrigen superposiciones y el largo de página:
   las grillas de una sola columna hacían que la galería y el listado de
   provincias sumaran más de 5.500 px de scroll.
   ======================================================================= */
@media (max-width: 559px) {
  /* Dos columnas: la galería pasa de ~3.900 px a ~1.950 px de alto. */
  .province-gallery {
    gap: .7rem;
  }

  .province-tile__body strong {
    font-size: 1.15rem;
  }

  .province-tile__body em {
    font-size: .66rem;
  }

  .province-tile .photo-mark {
    --mark-size: 17px;
    --mark-inset: .5rem;
  }

  /* El listado de jurisdicciones también: de ~1.665 px a ~830 px. */
  .province-grid {
    gap: .6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .province-card {
    min-height: 132px;
    padding: .85rem;
  }

  .province-card strong {
    font-size: 1.02rem;
  }

  .province-card small {
    font-size: .74rem;
  }

  /* La referencia del país tapaba las chinchetas del litoral. */
  .map-locator {
    top: .6rem;
    right: .6rem;
    padding: .35rem .4rem .3rem;
  }

  .map-locator img {
    height: 52px;
  }

  .map-locator figcaption {
    font-size: .5rem;
  }

  /* La tarjeta del QR tapaba el texto del teléfono: se apila debajo. */
  .tech-demo {
    min-height: 0;
    gap: 1.6rem;
  }

  .qr-demo {
    position: static;
    width: min(100%, 250px);
    transform: none;
  }

  /* La marca de agua pisaba el cierre de la cita. */
  .education__quote {
    padding-right: 5.5rem;
  }

  .photo-mark {
    --mark-size: 34px;
    --mark-inset: .7rem;
  }

  /* Botón flotante más chico: tapaba menos texto del cuerpo. */
  .back-to-top {
    right: .8rem;
    bottom: .8rem;
    width: 46px;
    height: 46px;
  }

  /* Las tarjetas del proyecto quedaban con mucho aire en una columna. */
  .project-card {
    min-height: 0;
  }

  .project-card__icon {
    margin-top: 1.5rem;
  }

  /* Botones del hero a todo el ancho: bloque más prolijo y mejor táctil. */
  .hero__actions {
    display: grid;
    gap: .7rem;
  }

  .hero__actions .button {
    width: 100%;
  }

  /* Superficie táctil de 44 px en las chinchetas, sin agrandar el punto. */
  .map-marker::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    content: "";
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }

  .modal__content {
    padding: 1.4rem 1.1rem 2rem;
  }

  /* Menos alto de foto en teléfono: así la tira entra siempre en pantalla
     junto a la imagen, sin tener que desplazarse. */
  .modal__hero-stage {
    height: min(48dvh, 460px);
  }

  .modal__hero-foto img {
    max-height: min(48dvh, 460px);
  }

  .modal__hero figcaption {
    padding: .9rem 1.1rem 1.1rem;
  }

  .modal__filmstrip {
    padding: .6rem 1.1rem .7rem;
  }

  .modal__thumb {
    width: 68px;
  }
}

@media (max-width: 430px) {
  .hero__location {
    max-width: 58%;
    line-height: 1.2;
  }

  .hero__controls > button {
    display: none;
  }

  .hero__tags li:last-child {
    display: none;
  }

  .map-marker span {
    display: none;
  }

}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .hero__slide {
    transform: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
