/* ==========================================================================
   Fundación Izertis — Home
   Medidas de referencia: diseño a 1920px (diseño/Home.png)
   ========================================================================== */

/* Tipografía Satoshi alojada en el propio proyecto (assets/fonts/satoshi)
   Fuente original: Fontshare (Indian Type Foundry) */
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi/Satoshi-Regular.woff2") format("woff2"),
       url("../assets/fonts/satoshi/Satoshi-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi/Satoshi-Medium.woff2") format("woff2"),
       url("../assets/fonts/satoshi/Satoshi-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi/Satoshi-Bold.woff2") format("woff2"),
       url("../assets/fonts/satoshi/Satoshi-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0a1f4e;
  --coral: #ff505f;
  --coral-dark: #ec3a4a;
  --bg: #f2f3f7;
  --white: #ffffff;
  --muted: #9a9ca5;

  --font: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1380px;   /* ancho del contenido de las secciones */
  --bar: 1664px;         /* ancho de cabecera, pie y novedades */
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 16px;
  --radius-sm: 14px;
}

/* Reset básico
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* Tipografía común
   ========================================================================== */
.eyebrow {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 12px;
}

.title {
  max-width: 13em;
  font-size: clamp(30px, 2.3vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
}

.title--wide { max-width: 15.5em; }

.lead {
  max-width: 20em;
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.22;
}

.lead--wide { max-width: 35em; }

/* Botones y círculos
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 70px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-size: 18px;
  transition: background-color .2s ease;
}

.btn:hover { background: var(--coral-dark); }

.circle {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--size, 72px);
  height: var(--size, 72px);
  border-radius: 50%;
  color: var(--white);
}

.circle--navy { background: var(--navy); }
.circle--coral { background: var(--coral); }
.circle--sm { --size: 54px; }

/* Cabecera y pie (barra blanca flotante)
   ========================================================================== */
.bar {
  display: flex;
  align-items: center;
  gap: 32px;
  width: min(100% - 2 * var(--gutter), var(--bar));
  min-height: 86px;
  margin-inline: auto;
  padding: 0 32px;
  border-radius: var(--radius);
  background: var(--white);
}

.site-header {
  position: sticky;
  top: 15px;
  z-index: 10;
  margin-top: 15px;
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.brand__pre {
  font-size: 19px;
  color: #3b4566;
}

.brand__name {
  font-size: 25px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: -0.01em;
}

.main-nav { margin-inline: auto; }

.main-nav ul {
  display: flex;
  gap: 32px;
}

.main-nav a,
.legal a {
  font-size: 17px;
  transition: color .2s ease;
}

.main-nav a:hover,
.legal a:hover { color: var(--coral); }

.contact-link {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
}

.nav-toggle__line {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px auto;
  background: var(--navy);
  transition: transform .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:last-of-type { transform: translateY(-4px) rotate(-45deg); }

/* Pie de página (se inyecta desde js/footer.js)
   -------------------------------------------------------------------------- */
.site-footer { padding: clamp(110px, 10vw, 190px) 0 32px; }

.footer-box {
  width: min(100% - 2 * var(--gutter), var(--bar));
  margin-inline: auto;
  padding: clamp(32px, 3.6vw, 64px) clamp(24px, 3.6vw, 64px) 0;
  border-radius: var(--radius);
  background: var(--white);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 4fr);
  gap: 48px clamp(40px, 5vw, 96px);
  padding-bottom: clamp(40px, 4vw, 72px);
}

.footer-brand {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 24px;
}

.footer-brand__claim {
  max-width: 20em;
  font-size: 16px;
  line-height: 1.45;
  color: #3b4566;
}

.btn--sm {
  height: 52px;
  padding: 0 24px;
  font-size: 16px;
}

.social {
  display: flex;
  gap: 10px;
}

.social__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--navy);
  transition: background-color .2s ease, color .2s ease;
}

.social__link:hover,
.social__link:focus-visible {
  background: var(--navy);
  color: var(--white);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 24px;
}

.footer-col__title {
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 500;
}

.footer-col ul {
  display: grid;
  gap: 12px;
}

.footer-col li a {
  font-size: 15px;
  line-height: 1.3;
  color: #59607a;
}

.footer-col a { transition: color .2s ease; }

.footer-col a:hover,
.footer-col a[aria-current="page"] { color: var(--coral); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  padding: 24px 0;
  border-top: 1px solid rgb(10 31 78 / .12);
  font-size: 15px;
  color: #59607a;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-left: auto;
}

.footer-bottom .legal a { font-size: 15px; }

.to-top {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--navy);
  transition: background-color .2s ease, color .2s ease;
}

.to-top:hover {
  background: var(--navy);
  color: var(--white);
}

/* Hero
   ========================================================================== */
.hero {
  --h: clamp(44px, 4.875vw, 94px);    /* alto de píldoras y círculos (+30 % sobre el diseño) */
  display: grid;
  justify-content: center;
  row-gap: clamp(16px, 2.275vw, 43px);
  padding: clamp(80px, 7.8vw, 150px) var(--gutter) clamp(100px, 10vw, 190px);
}

.hero__row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.69vw, 33px);
}

/* Escalonado de las tres líneas como en el diseño */
.hero__row--1 { margin-left: 0; }
.hero__row--2 { margin-left: calc(var(--h) * 3.95); }
.hero__row--3 { margin-left: calc(var(--h) * 2.68); }

.hero__word {
  font-size: calc(var(--h) * 1.06);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.hero .circle { --size: var(--h); }

.pill {
  flex: none;
  width: calc(var(--h) * 3.4);
  height: var(--h);
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #c9d4e6;
}

.pill--short { width: calc(var(--h) * 1.42); }

.pill video,
.pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar {
  position: relative;
  flex: none;
  width: var(--h);
  height: var(--h);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: var(--coral);
}

.hero__claim {
  max-width: 14.5em;
  font-size: clamp(15px, 1.02vw, 19.5px);
  font-weight: 500;
  line-height: 1.07;
}

/* Destacado: texto + dos imágenes
   ========================================================================== */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 741px);
  gap: 48px;
  align-items: start;
}

.featured .title { max-width: 9em; }
.featured .lead { max-width: 19.5em; margin-bottom: 74px; }

.featured__media {
  display: grid;
  grid-template-columns: 314fr 385fr;
  gap: 42px;
  align-items: start;
}

.featured__img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* En el diseño la foto aparece reflejada horizontalmente */
.featured__img--tall { aspect-ratio: 314 / 398; object-position: 22% center; transform: scaleX(-1); }
.featured__img--wide { aspect-ratio: 385 / 277; }

/* Proyectos: carrusel
   ========================================================================== */
.projects { padding-top: clamp(100px, 12vw, 230px); }

.carousel {
  --w: min(1096px, 100vw - 2 * var(--gutter));
  --gap: clamp(16px, 2.5vw, 48px);
  position: relative;
  margin-top: 90px;
  overflow: hidden;
  padding-top: 27px;          /* espacio para el botón "+" que sobresale */
}

.carousel__track {
  display: flex;
  gap: var(--gap);
  transition: transform .6s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}

.slide {
  position: relative;
  flex: none;
  width: var(--w);
  aspect-ratio: 1096 / 616;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1b1b1f;
  color: var(--white);
}

.slide__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgb(0 0 0 / .6) 100%);
}

.slide__body {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 57.3%;
  right: 8%;
  transform: translateY(-50%);
}

.slide__title {
  font-size: clamp(22px, 2.1vw, 40px);
  font-weight: 500;
  line-height: 1.1;
}

.slide__body p {
  margin-top: 22px;
  font-size: clamp(14px, 0.95vw, 18px);
  line-height: 1.22;
}

.carousel__more {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--white);
  transition: transform .2s ease;
}

.carousel__more:hover { transform: translateX(-50%) scale(1.08); }

.carousel__nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 52px;
}

.arrow {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  transition: background-color .2s ease, color .2s ease;
}

.arrow:hover {
  background: var(--navy);
  color: var(--white);
}

/* Novedades
   ========================================================================== */
.news {
  width: min(100% - 2 * var(--gutter), var(--bar));
  padding-top: 112px;
}

.news__head {
  display: grid;
  justify-items: center;
  text-align: center;
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 68px;
}

.card__img {
  width: 100%;
  aspect-ratio: 528 / 380;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.card__title {
  max-width: 17em;
  margin-top: 40px;
  font-size: clamp(22px, 1.35vw, 26px);
  font-weight: 500;
  line-height: 1;
}

.card__text {
  max-width: 23em;
  margin-top: 26px;
  line-height: 1.22;
}

.card__link {
  display: inline-block;
  margin-top: 32px;
  font-weight: 500;
}

.card__link span {
  display: inline-block;
  transition: transform .2s ease;
}

.card__link:hover span { transform: translateX(4px); }

/* ==========================================================================
   Páginas interiores
   ========================================================================== */

.main-nav a[aria-current="page"] { color: var(--coral); }

/* Hero interior: bloque a sangre dentro del ancho de la barra
   -------------------------------------------------------------------------- */
.page-hero { padding-top: 24px; }

.page-hero__frame {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: min(100% - 2 * var(--gutter), var(--bar));
  min-height: clamp(540px, 84vh, 880px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
}

.page-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 2.4s cubic-bezier(.2, .7, .2, 1) both;
}

.page-hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(10 31 78 / .1) 0%, rgb(10 31 78 / .2) 40%, rgb(6 16 40 / .82) 100%);
}

@keyframes hero-zoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.page-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 32px 64px;
  align-items: end;
  width: 100%;
  padding: clamp(28px, 4.2vw, 80px);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 16px;
  color: rgb(255 255 255 / .75);
}

.breadcrumb a:hover { color: var(--white); }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; }

.page-hero__title {
  font-size: clamp(54px, 8.4vw, 160px);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -0.025em;
}

.page-hero__aside {
  display: grid;
  gap: 32px;
  justify-items: start;
}

.page-hero__lead {
  font-size: clamp(18px, 1.25vw, 22px);
  line-height: 1.35;
}

.page-hero__down {
  --size: 64px;
  transition: transform .2s ease, background-color .2s ease;
}

.page-hero__down:hover {
  background: var(--coral-dark);
  transform: translateY(4px);
}

/* Variante compacta (mitad de alto) para páginas de listado como Actualidad */
.page-hero--compact .page-hero__frame { min-height: clamp(270px, 42vh, 440px); }
.page-hero--compact .page-hero__title { font-size: clamp(46px, 5.6vw, 108px); }
.page-hero--compact .page-hero__content { padding-block: clamp(24px, 2.6vw, 48px); }
.page-hero--compact .breadcrumb { margin-bottom: 12px; }
/* Con el contenido ya a la vista, el botón de bajar sobra */
.page-hero--compact .page-hero__down { display: none; }

/* Submenú de secciones de la página */
.subnav {
  position: sticky;
  top: 116px;
  z-index: 5;
  width: min(100% - 2 * var(--gutter), var(--bar));
  margin: 24px auto 0;
}

.subnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subnav a {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--white);
  font-size: 16px;
  transition: background-color .2s ease, color .2s ease;
}

.subnav a:hover,
.subnav a.is-current {
  background: var(--navy);
  color: var(--white);
}

/* Secciones de contenido
   -------------------------------------------------------------------------- */
.section {
  padding-top: clamp(96px, 9vw, 170px);
  scroll-margin-top: 140px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px clamp(48px, 6vw, 120px);
  align-items: start;
}

.split .title { max-width: 9em; }

.prose {
  max-width: 38em;
  font-size: clamp(17px, 1.05vw, 19px);
  line-height: 1.6;
}

.prose p + p { margin-top: 1.1em; }
.prose strong { font-weight: 500; }

.lead-in {
  font-size: clamp(20px, 1.35vw, 24px);
  line-height: 1.45;
}

/* Frase destacada */
.statement {
  max-width: 21em;
  font-size: clamp(32px, 3.5vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.statement em {
  font-style: normal;
  color: var(--coral);
}

/* Lista en línea de conceptos: texto con un punto coral delante,
   sin borde ni relleno para que no se confunda con botones */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin-top: 40px;
}

.chips li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 500;
}

.chips li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

/* Pareja de imágenes */
.media-duo {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(16px, 2.2vw, 42px);
  align-items: end;
  margin-top: clamp(56px, 6vw, 96px);
}

.media-duo figure { margin: 0; }

.media-duo img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.media-duo figure:first-child img { aspect-ratio: 4 / 5; }
.media-duo figure:last-child img { aspect-ratio: 16 / 10; }

/* Imagen panorámica */
.wide-media {
  width: min(100% - 2 * var(--gutter), var(--bar));
  margin: clamp(80px, 8vw, 140px) auto 0;
}

.wide-media img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Foto de grupo: formato menos panorámico para no cortar cabezas ni pies */
.wide-media--group img { aspect-ratio: 16 / 9; }

/* Lista numerada en tarjetas (criterios) */
.criteria {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
  counter-reset: criteria;
}

.criteria li {
  counter-increment: criteria;
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 240px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
}

.criteria li::before {
  content: counter(criteria, decimal-leading-zero);
  color: var(--coral);
  font-size: 16px;
  font-weight: 700;
}

.criteria h3 {
  margin-top: auto;
  font-size: clamp(20px, 1.3vw, 24px);
  font-weight: 500;
  line-height: 1.1;
}

.criteria p {
  font-size: 16px;
  line-height: 1.45;
}

/* Pilares: filas alternas imagen / texto */
.pillar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(48px, 6vw, 120px);
  align-items: center;
}


.pillar--reverse .pillar__media { order: 2; }

.pillar__media {
  margin: 0;
}

.pillar__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

.pillar__num {
  display: block;
  margin-bottom: 20px;
  color: var(--coral);
  font-size: 18px;
  font-weight: 700;
}

.pillar .title { max-width: 10em; margin-bottom: 28px; }

/* Bloque de llamada a la acción */
.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 64px;
  align-items: center;
  width: min(100% - 2 * var(--gutter), var(--bar));
  margin: clamp(110px, 10vw, 190px) auto 0;
  padding: clamp(40px, 5.5vw, 104px);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
}

.cta-band .eyebrow { color: rgb(255 255 255 / .6); }
.cta-band .title { max-width: 14em; }

/* Datos clave */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 64px;
}

.facts li {
  display: grid;
  align-content: space-between;
  gap: 40px;
  min-height: 200px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
}

.facts strong {
  font-size: clamp(36px, 3.2vw, 60px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.facts span { font-size: 16px; line-height: 1.4; }

/* Personas del patronato */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  margin-top: 56px;
}

.people__heading {
  margin-top: clamp(56px, 5vw, 88px);
  font-size: clamp(22px, 1.5vw, 28px);
  font-weight: 500;
  line-height: 1.15;
}

.people--sub { margin-top: 32px; }

.person {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--white);
}

.person__initials {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 20px;
  font-weight: 500;
}

.person__photo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.person__name {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
}

.person__role {
  margin-top: 6px;
  color: var(--coral);
  font-size: 16px;
}

/* Documento descargable */
.doc-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px 32px;
  align-items: center;
  margin-top: 56px;
  padding: clamp(28px, 3vw, 48px);
  border-radius: var(--radius);
  background: var(--white);
}

.doc-card__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.doc-card h3 { font-size: 24px; font-weight: 500; }
.doc-card p { margin-top: 6px; color: var(--muted); }

.btn[aria-disabled="true"] {
  background: #c4c7d1;
  pointer-events: none;
}

/* Botón con texto largo (p. ej. un email): no se sale de la pantalla en móvil */
.btn--wrap {
  max-width: 100%;
  height: auto;
  min-height: 70px;
  padding-block: 16px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .btn--wrap { padding-inline: 24px; font-size: 16px; }
}

/* Contacto: contenedor del formulario de HubSpot */
.contact-form {
  min-height: 320px;
  padding: clamp(28px, 3vw, 56px);
  border-radius: var(--radius);
  background: var(--white);
}

.contact-form__fallback { color: #59607a; font-size: 17px; line-height: 1.5; }

.contact-link[aria-current="page"] { color: var(--coral); }

/* Enlace dentro de un texto */
.text-link {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.text-link:hover { color: var(--coral-dark); }

/* Marcador de contenido pendiente (se retira al cargar el contenido real) */
.pending {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 20px 24px;
  border: 1.5px dashed rgb(10 31 78 / .3);
  border-radius: var(--radius-sm);
  color: #59607a;
  font-size: 16px;
}

.pending::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

/* Proyectos: listado de próximas iniciativas */
.rows { margin-top: 56px; border-top: 1px solid rgb(10 31 78 / .15); }

.rows li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid rgb(10 31 78 / .15);
}

.rows__num { color: var(--coral); font-weight: 700; }
.rows h3 { font-size: clamp(22px, 1.6vw, 30px); font-weight: 500; }
.rows__status { color: var(--muted); font-size: 16px; }

.card--placeholder .card__title,
.card--placeholder .card__text { color: #59607a; }

/* Interiores: adaptación a pantallas pequeñas */
@media (max-width: 1080px) {
  .page-hero__content,
  .split,
  .pillar,
  .cta-band { grid-template-columns: 1fr; }

  .pillar--reverse .pillar__media { order: 0; }

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

  .subnav { top: 96px; }
}

@media (max-width: 760px) {
  .page-hero__frame { min-height: 78vh; }
  .subnav { position: static; }
  .subnav ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .subnav a { white-space: nowrap; }

  .criteria,
  .facts { grid-template-columns: 1fr; }
  .criteria li,
  .facts li { min-height: 0; }

  .media-duo { grid-template-columns: 1fr; }

  .doc-card { grid-template-columns: 1fr; }

  .rows li { grid-template-columns: 48px minmax(0, 1fr); }
  .rows__status { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero__media { animation: none; }
}

/* ==========================================================================
   Actualidad: listado de noticias
   ========================================================================== */

.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: #59607a;
  font-size: 15px;
}

.news-card__media {
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.news-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

/* Toda la tarjeta es clicable a través del enlace del titular */
.news-card,
.news-feature { position: relative; }

.news-card__title a::after,
.news-feature__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.news-card:hover img,
.news-feature:hover img { transform: scale(1.04); }

.news-card:hover .news-card__title a,
.news-feature:hover .news-feature__title a { color: var(--coral); }

.news-card__title a,
.news-feature__title a { transition: color .2s ease; }

.news-card:focus-within,
.news-feature:focus-within {
  outline: 2px solid var(--coral);
  outline-offset: 8px;
  border-radius: var(--radius-sm);
}

.news-card__title a:focus-visible,
.news-feature__title a:focus-visible { outline: none; }

.news-card .news-meta { margin-top: 24px; }

.news-card__title {
  margin-top: 14px;
  font-size: clamp(20px, 1.3vw, 24px);
  font-weight: 500;
  line-height: 1.2;
}

.news-card__excerpt {
  margin-top: 12px;
  color: #3b4566;
  font-size: 16px;
  line-height: 1.5;
}

/* Noticia destacada */
.news-feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px clamp(32px, 4vw, 80px);
  align-items: center;
  margin-top: 40px;
}

.news-feature .news-card__media img { aspect-ratio: 16 / 10; }

.news-feature__title {
  margin-top: 20px;
  font-size: clamp(28px, 2.4vw, 44px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.news-feature .news-card__excerpt { font-size: 18px; }

.news-feature__more {
  display: inline-block;
  margin-top: 28px;
  font-weight: 500;
}

/* Enlace a la fuente en las tarjetas de noticia (mismo estilo que la destacada) */
.news-card__more {
  display: inline-block;
  margin-top: 20px;
  font-weight: 500;
}

.news-card:hover .news-card__more,
.news-feature:hover .news-feature__more { color: var(--coral); }

/* Filtros */
.filters { margin-top: clamp(72px, 7vw, 120px); }
.filters--first { margin-top: 40px; }

/* Cabecera de las páginas 2 y siguientes del listado (sin hero) */
.listing-header { margin-top: clamp(48px, 5vw, 96px); }

.listing-title {
  font-size: clamp(40px, 4.4vw, 80px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.listing-sub {
  margin-top: 14px;
  color: #59607a;
  font-size: 17px;
}

.filters ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters button {
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  font-size: 16px;
  transition: background-color .2s ease, color .2s ease;
}

.filters button:hover,
.filters button[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px 40px;
  margin-top: 48px;
}

.news-empty {
  margin-top: 48px;
  color: #59607a;
}

.pagination { margin-top: clamp(72px, 6vw, 110px); }

.pagination ul {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  transition: background-color .2s ease, color .2s ease;
}

.pagination a:hover,
.pagination a[aria-current="page"] {
  background: var(--navy);
  color: var(--white);
}

/* ==========================================================================
   Noticia: plantilla de lectura
   ========================================================================== */

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 3px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  background: var(--coral);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

.article-header {
  width: min(100% - 2 * var(--gutter), 860px);
  margin: clamp(56px, 6vw, 110px) auto 0;
}

.breadcrumb--dark {
  color: #59607a;
  margin-bottom: 32px;
}

.breadcrumb--dark a:hover { color: var(--coral); }

.article-title {
  margin-top: 24px;
  font-size: clamp(34px, 3.8vw, 64px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.article-lead {
  margin-top: 28px;
  color: #2b3657;
  font-size: clamp(19px, 1.3vw, 23px);
  line-height: 1.5;
}

.article-cover {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin: clamp(40px, 4.5vw, 80px) auto 0;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-cover figcaption,
.article-body figcaption {
  margin-top: 12px;
  color: #59607a;
  font-size: 15px;
  line-height: 1.45;
}

.article-layout {
  display: grid;
  grid-template-columns: 120px minmax(0, 700px) 120px;
  justify-content: center;
  gap: clamp(32px, 4vw, 72px);
  width: min(100% - 2 * var(--gutter), var(--container));
  margin: clamp(48px, 5vw, 88px) auto 0;
}

.article-aside {
  position: sticky;
  top: 140px;
  align-self: start;
}

.article-aside__label {
  margin-bottom: 14px;
  color: #59607a;
  font-size: 14px;
}

.share {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  transition: background-color .2s ease, color .2s ease;
}

.share__btn:hover {
  background: var(--navy);
  color: var(--white);
}

.share__status {
  min-height: 1.4em;
  margin-top: 10px;
  color: #59607a;
  font-size: 14px;
}

/* Cuerpo de texto: legibilidad ante todo */
.article-body {
  font-size: clamp(18px, 1.1vw, 20px);
  line-height: 1.75;
  color: #16264f;
  overflow-wrap: break-word;
}

.article-body > * + * { margin-top: 1.25em; }

.article-body h2 {
  margin-top: 2.2em;
  font-size: clamp(25px, 1.8vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.article-body h3 {
  margin-top: 2em;
  font-size: clamp(21px, 1.35vw, 25px);
  font-weight: 500;
  line-height: 1.25;
}

.article-body h2 + p,
.article-body h3 + p { margin-top: .7em; }

.article-body a {
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color .2s ease;
}

.article-body a:hover { color: var(--coral); }

.article-body ul,
.article-body ol { padding-left: 1.3em; }

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: .5em; }
.article-body li::marker { color: var(--coral); }

.article-body blockquote {
  margin: 2em 0;
  padding-left: 28px;
  border-left: 3px solid var(--coral);
}

.article-body blockquote p {
  font-size: clamp(22px, 1.6vw, 28px);
  font-weight: 500;
  line-height: 1.35;
}

.article-body cite {
  display: block;
  margin-top: 14px;
  color: #59607a;
  font-size: 16px;
  font-style: normal;
}

.article-body figure { margin: 2.2em 0; }

.article-body figure img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.article-footer {
  width: min(100% - 2 * var(--gutter), 700px);
  margin: clamp(56px, 5vw, 88px) auto 0;
  padding-top: 32px;
  border-top: 1px solid rgb(10 31 78 / .15);
}

.article-back {
  font-weight: 500;
  transition: color .2s ease;
}

.article-back:hover { color: var(--coral); }

.related-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.related-head .card__link { margin-top: 0; }

/* Noticias: adaptación a pantallas pequeñas */
@media (max-width: 1080px) {
  .news-feature { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* El bloque de compartir pasa debajo del texto, en horizontal */
  .article-layout { grid-template-columns: minmax(0, 700px); }
  .article-aside { position: static; order: 2; }
  .article-aside__label { margin-bottom: 10px; }
  .share { flex-direction: row; }
}

@media (max-width: 760px) {
  .news-list { grid-template-columns: 1fr; gap: 48px; }
  .filters ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filters button { white-space: nowrap; }
  .article-cover img { aspect-ratio: 4 / 3; }
  .article-body blockquote { padding-left: 20px; }
}

/* ==========================================================================
   Proyectos: grid
   ========================================================================== */

.listing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.filters--inline { margin-top: 0; }

.slide__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(56px, 6vw, 110px) clamp(24px, 3vw, 56px);
  margin-top: clamp(48px, 5vw, 88px);
}

/* Columna derecha desplazada para un ritmo editorial (se anula al filtrar) */
.project-grid:not(.is-filtered) > :nth-child(even) { margin-top: clamp(0px, 9vw, 180px); }

.project-card { position: relative; }

.project-card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.project-card__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.2, .7, .2, 1);
}

.project-card__status {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / .92);
  font-size: 14px;
  font-weight: 500;
}

.project-card__go {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  opacity: 0;
  transform: scale(.6) rotate(-45deg);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
}

.project-card:hover .project-card__media img { transform: scale(1.06); }

.project-card:hover .project-card__go {
  opacity: 1;
  transform: none;
}

.project-card__body { margin-top: 28px; }

.project-card__pillar {
  color: var(--coral);
  font-size: 15px;
  font-weight: 500;
}

.project-card__title {
  margin-top: 10px;
  font-size: clamp(26px, 2vw, 38px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.project-card__title a { transition: color .2s ease; }
.project-card:hover .project-card__title a { color: var(--coral); }

.project-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-card:focus-within {
  outline: 2px solid var(--coral);
  outline-offset: 8px;
  border-radius: var(--radius);
}

.project-card__title a:focus-visible { outline: none; }

.project-card__excerpt {
  max-width: 32em;
  margin-top: 14px;
  color: #3b4566;
  font-size: 17px;
  line-height: 1.5;
}

/* ==========================================================================
   Proyecto: plantilla individual
   ========================================================================== */

/* Botón de pausa para los vídeos que se reproducen solos */
.video-toggle {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: 50%;
  background: rgb(10 31 78 / .35);
  color: var(--white);
  backdrop-filter: blur(6px);
  transition: background-color .2s ease;
}

.video-toggle:hover { background: rgb(10 31 78 / .7); }
.video-toggle .icon-play { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }

/* Hero a sangre: ocupa toda la pantalla, la cabecera flota encima */
.project-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: max(640px, 100svh);
  margin-top: -116px;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}

.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(6 16 40 / .35) 0%, rgb(6 16 40 / .1) 35%, rgb(6 16 40 / .85) 100%);
}

.project-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 3s cubic-bezier(.2, .7, .2, 1) both;
}

.project-hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(56px, 7vw, 120px);
}

.project-hero__title {
  max-width: 11em;
  font-size: clamp(48px, 8.2vw, 168px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -0.03em;
}

.project-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.tag--ghost {
  background: transparent;
  border: 1px solid rgb(255 255 255 / .6);
  color: var(--white);
}

/* Indicador de scroll animado */
.project-hero__scroll {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(56px, 7vw, 120px);
  width: 2px;
  height: 96px;
  overflow: hidden;
  background: rgb(255 255 255 / .3);
}

.project-hero__scroll span {
  position: absolute;
  inset: 0;
  background: var(--white);
  animation: scroll-hint 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}

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

.video-toggle--hero {
  right: calc(var(--gutter) - 23px);
  top: 140px;
}

/* Introducción y datos */
.project-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 48px clamp(48px, 6vw, 120px);
  align-items: start;
  margin-top: clamp(40px, 4vw, 72px);
}

.project-intro__statement {
  font-size: clamp(28px, 2.9vw, 54px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.project-facts {
  display: grid;
  gap: 24px;
  margin: 0;
}

.project-facts div {
  padding-bottom: 20px;
  border-bottom: 1px solid rgb(10 31 78 / .15);
}

.project-facts dt {
  color: #59607a;
  font-size: 15px;
}

.project-facts dd {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 500;
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(72px, 7vw, 130px);
}

.counters li {
  display: grid;
  gap: 16px;
  padding: clamp(28px, 2.6vw, 48px);
  border-radius: var(--radius);
  background: var(--white);
}

.counters strong {
  color: var(--coral);
  font-size: clamp(56px, 6vw, 112px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.counters li > span { color: #59607a; font-size: 16px; }

/* Historia con medio fijo */
.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(48px, 6vw, 120px);
}

.story__step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80vh;
}

/* Los pasos inactivos se atenúan con color (no con opacidad) para mantener
   el contraste mínimo: título grande ≥ 3:1 y párrafo ≥ 4.5:1 sobre el fondo */
.story__step .story__title,
.story__step p { transition: color .6s ease; }

.story__step:not(.is-active) .story__title { color: #7d8399; }
.story__step:not(.is-active) p { color: #59607a; }

.story__num {
  color: var(--coral);
  font-size: 18px;
  font-weight: 700;
}

.story__title {
  margin: 16px 0 24px;
  font-size: clamp(36px, 3.6vw, 68px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.story__step p {
  max-width: 28em;
  font-size: clamp(18px, 1.15vw, 21px);
  line-height: 1.6;
}

.story__inline-media { display: none; }

.story__sticky {
  position: sticky;
  top: 130px;
  height: calc(100vh - 160px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
}

.story__media-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1);
}

.story__media-item.is-active {
  opacity: 1;
  transform: none;
}

.story__media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Franja de vídeo a sangre */
.video-band {
  position: relative;
  display: grid;
  place-items: center;
  min-height: max(560px, 90vh);
  margin-top: clamp(110px, 10vw, 190px);
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  text-align: center;
}

.video-band__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--navy);
}

.video-band__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(6 16 40 / .55);
}

.video-band__media {
  position: absolute;
  inset: -12% 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
}

.video-band__quote {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--gutter), 1100px);
  margin: 0;
}

.video-band__quote p {
  font-size: clamp(34px, 4.6vw, 88px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.video-band__quote cite {
  display: block;
  margin-top: 28px;
  font-size: 17px;
  font-style: normal;
  opacity: .85;
}

.video-toggle--band {
  right: var(--gutter);
  bottom: 32px;
}

/* Galería en mosaico */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(140px, 14vw, 260px);
  gap: clamp(12px, 1.6vw, 28px);
  margin-top: 56px;
}

.gallery__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dfe2ea;
}

/* La imagen sobresale arriba y abajo para que el parallax nunca deje huecos */
.gallery__item img {
  position: absolute;
  inset: -20% 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
}

/* Mosaico de 8 imágenes: grande + dos apiladas, dos medianas, tres iguales */
.gallery__item--1 { grid-column: 1 / 8; grid-row: span 2; }
.gallery__item--2 { grid-column: 8 / 13; grid-row: span 1; }
.gallery__item--3 { grid-column: 8 / 13; grid-row: span 1; }
.gallery__item--4 { grid-column: 1 / 6; grid-row: span 2; }
.gallery__item--5 { grid-column: 6 / 13; grid-row: span 2; }
.gallery__item--6 { grid-column: 1 / 5; grid-row: span 2; }
.gallery__item--7 { grid-column: 5 / 9; grid-row: span 2; }
.gallery__item--8 { grid-column: 9 / 13; grid-row: span 2; }

/* Entidades colaboradoras */
.partners {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.partners li {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 1.5px dashed rgb(10 31 78 / .25);
  border-radius: var(--radius);
  color: #59607a;
  font-size: 15px;
}

/* Proyectos desactivados temporalmente: en gris y sin enlace */
.project-card.is-disabled,
.slide.is-disabled {
  cursor: default;
  pointer-events: none;
}

.project-card.is-disabled .project-card__media img,
.project-card.is-disabled .project-card__status,
.project-card.is-disabled .project-card__body { opacity: .5; }
.project-card.is-disabled .project-card__media img,
.slide.is-disabled .slide__media { filter: grayscale(1); }
.project-card.is-disabled .project-card__pillar { color: #8a90a3; }
.slide.is-disabled .slide__body { opacity: .6; }

.carousel__more[hidden] { display: none; }

/* Insignia "Próximamente" en los proyectos inhabilitados (sin atenuar) */
.soon-badge {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
}

/* Variante para el proyecto activo (contraste AA con texto blanco) */
.soon-badge--live { background: #1d7f46; }

/* Medio fijo de la historia con imagen en lugar de vídeo */
.story__media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cronología de proyecto */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.timeline li {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(28px, 2.4vw, 40px);
  border-top: 3px solid var(--coral);
  border-radius: var(--radius);
  background: var(--white);
}

.timeline__date {
  color: var(--coral);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.timeline__title {
  color: var(--navy);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500;
  line-height: 1.2;
}

.timeline li p { color: #59607a; font-size: 16px; }

@media (max-width: 1080px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; }
}

/* Siguiente proyecto */
.next-project {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: min(100% - 2 * var(--gutter), var(--bar));
  min-height: clamp(360px, 46vw, 640px);
  margin: clamp(110px, 10vw, 190px) auto 0;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
}

.next-project img {
  position: absolute;
  inset: -20% 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.next-project::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgb(6 16 40 / .8) 100%);
}

.next-project__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 32px;
  width: 100%;
  padding: clamp(28px, 4vw, 72px);
}

.next-project__label { grid-column: 1; font-size: 17px; opacity: .85; }

.next-project__title {
  grid-column: 1;
  font-size: clamp(40px, 6vw, 112px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -0.025em;
}

.next-project__go {
  grid-column: 2;
  grid-row: 1 / 3;
  --size: clamp(64px, 6vw, 104px);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.next-project:hover .next-project__go { transform: translateX(10px); }

/* ==========================================================================
   Animaciones de la plantilla de proyecto
   ========================================================================== */

/* Texto dividido en palabras que suben desde una máscara */
html.js [data-reveal^="split"] {
  opacity: 1;
  transform: none;
}

.split-word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
  vertical-align: top;
}

.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(.2, .7, .2, 1) calc(var(--delay, 0s) + var(--i) * 45ms);
}

.is-visible .split-word > span { transform: none; }

/* Variante: las palabras se iluminan en lugar de subir */
/* Parte de un gris con contraste suficiente para texto grande (≥ 3:1), no de un texto casi invisible */
[data-reveal="split-fade"] .split-word > span {
  transform: none;
  color: #7d8399;
  transition: color .6s ease calc(var(--i) * 35ms);
}

[data-reveal="split-fade"].is-visible .split-word > span { color: inherit; }

/* Cortina: el contenido se descubre de abajo arriba.
   El recorte se aplica a los hijos y no al elemento observado: un elemento
   recortado por completo tiene área cero para IntersectionObserver y nunca
   llegaría a marcarse como visible. */
html.js [data-reveal="clip"] {
  opacity: 1;
  transform: none;
}

html.js [data-reveal="clip"] > * {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1) var(--delay, 0s);
}

html.js [data-reveal="clip"] img,
html.js [data-reveal="clip"] video {
  scale: 1.25;
  transition:
    clip-path 1.3s cubic-bezier(.7, 0, .2, 1) var(--delay, 0s),
    scale 1.8s cubic-bezier(.2, .7, .2, 1) var(--delay, 0s);
}

html.js [data-reveal="clip"].is-visible > * { clip-path: inset(0 0 0 0); }

html.js [data-reveal="clip"].is-visible img,
html.js [data-reveal="clip"].is-visible video { scale: 1; }

/* Proyectos: adaptación a pantallas pequeñas */
@media (max-width: 1080px) {
  .project-intro,
  .story { grid-template-columns: 1fr; }

  /* En móvil y tablet la historia se lee de forma lineal, con imagen en cada paso */
  .story__media { display: none; }
  .story__step { min-height: 0; }
  .story__step:not(.is-active) .story__title,
  .story__step:not(.is-active) p { color: inherit; }
  .story__step + .story__step { margin-top: 72px; }
  .story__inline-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 28px;
  }

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

@media (max-width: 760px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-grid:not(.is-filtered) > :nth-child(even) { margin-top: 0; }
  .project-card__go { opacity: 1; transform: none; width: 52px; height: 52px; }

  .project-hero { margin-top: -98px; }
  .project-hero__scroll { display: none; }
  .video-toggle--hero { top: 110px; right: var(--gutter); }

  .counters { grid-template-columns: 1fr; }

  .gallery { grid-auto-rows: 160px; }
  .gallery__item--1,
  .gallery__item--4,
  .gallery__item--5 { grid-column: 1 / -1; grid-row: span 2; }
  .gallery__item--2,
  .gallery__item--7 { grid-column: 1 / 7; }
  .gallery__item--3,
  .gallery__item--8 { grid-column: 7 / 13; }
  .gallery__item--6 { grid-column: 1 / -1; grid-row: span 2; }

  .next-project__body { grid-template-columns: 1fr; }
  .next-project__go { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .project-hero__media,
  .project-hero__scroll span { animation: none; }
  .split-word > span { transform: none !important; opacity: 1 !important; }
  html.js [data-reveal="clip"] > * { clip-path: none; }
  html.js [data-reveal="clip"] img,
  html.js [data-reveal="clip"] video { scale: 1; }
}

/* Animaciones de aparición al hacer scroll
   Solo se ocultan los elementos si hay JS (clase .js en <html>)
   ========================================================================== */
.featured__fig { margin: 0; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(48px);
  transition:
    opacity .9s ease var(--delay, 0s),
    transform 1s cubic-bezier(.2, .7, .2, 1) var(--delay, 0s);
}

.js [data-reveal="zoom"] {
  transform: translateY(32px) scale(.94);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .main-nav ul { gap: 20px; }
  .main-nav a { font-size: 15px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .contact-link { order: 3; }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 30px rgb(10 31 78 / .08);
  }

  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 10px 0; font-size: 18px; }

  .featured { grid-template-columns: 1fr; }
  .featured .lead { margin-bottom: 40px; }

  .news__grid { grid-template-columns: 1fr 1fr; }

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

@media (max-width: 760px) {
  .bar { padding: 0 20px; min-height: 68px; }
  .brand__pre { font-size: 16px; }
  .brand__name { font-size: 21px; }

  /* El hero se apila y se alinea a la izquierda */
  .hero { --h: 40px; justify-content: start; }
  .hero__row--2,
  .hero__row--3 { margin-left: 0; }
  .hero__row--3 { flex-wrap: wrap; }
  .hero__word { font-size: clamp(36px, 11vw, 52px); }
  .hero__row--1 .pill,
  .hero__row--2 .pill { display: none; }
  .hero__claim { flex-basis: 100%; }

  .featured__media { gap: 16px; }

  .slide { aspect-ratio: 4 / 5; }
  .slide::after { background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / .6) 100%); }
  .slide__body { top: auto; bottom: 24px; left: 24px; right: 24px; transform: none; }

  .news__grid { grid-template-columns: 1fr; }

  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { align-items: flex-start; }
  .legal { order: -1; flex-basis: 100%; margin-left: 0; gap: 8px 24px; }
  .to-top { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Páginas de error (404 y 500)
   ========================================================================== */
.error-hero .page-hero__frame { min-height: clamp(420px, 62vh, 680px); }

.error-hero__code {
  margin-bottom: 8px;
  color: var(--coral);
  font-size: clamp(64px, 9vw, 168px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.error-hero .page-hero__title { font-size: clamp(40px, 5.6vw, 104px); }

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.btn--ghost {
  border: 1.5px solid var(--navy);
  background: transparent;
  color: var(--navy);
}

.btn--ghost:hover { background: var(--navy); color: var(--white); }

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 40px;
  font-weight: 500;
}

.error-links a {
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color .2s ease;
}

.error-links a:hover { color: var(--coral); }
