/* Experiencias Visuales — réplica de la web WordPress (tema Bridge) en HTML/CSS propio.
   Medidas tomadas de la web actual a 1024 px de ancho. */

:root {
  --rojo: #e4002b;
  --rojo-titulo: #e52d2d;
  --negro: #000;
  --blanco: #fff;
  --gris: #9c9c9c;
  --paspartu: 20px;
  --grid: min(1300px, calc(100% - 124px));
  --fuente: "Oswald", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--negro);
  color: var(--blanco);
  font-family: var(--fuente);
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
p { margin: 0; line-height: 30px; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 300; }
h1 { font-size: 40px; line-height: 42px; letter-spacing: -0.6px; }
h4 { font-size: 85px; line-height: 1.375; font-weight: 400; color: var(--rojo); }
h5 { font-size: 25px; line-height: 52px; letter-spacing: .5px; text-transform: uppercase; color: var(--rojo); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.contenido { padding: 0 var(--paspartu); }
.contenedor { width: var(--grid); margin: 0 auto; }

/* ---------------------------------------------------------------- cabecera */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 300;
  height: 120px;
  padding: 25px calc(var(--paspartu) + 21px) 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  transition: height .35s ease, padding .35s ease, background-color .35s ease;
}
.cabecera .logo img { height: 90px; width: auto; transition: height .35s ease; }
.cabecera.pegada { height: 80px; padding-top: 15px; background: rgba(0, 0, 0, .96); }
.cabecera.pegada .logo img { height: 50px; }

.hamburguesa {
  width: 26px; height: 50px; margin-top: 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  transition: opacity .2s, margin .35s ease;
}
.cabecera.pegada .hamburguesa { margin-top: 0; }
/* sello de versión + fecha/hora de la última actualización, a la izquierda de la hamburguesa */
.cabecera-der { display: flex; align-items: flex-start; gap: 18px; }
.sello-version {
  margin-top: 20px; height: 50px; display: flex; align-items: center; white-space: nowrap;
  font-size: 11px; letter-spacing: 1.5px; color: var(--gris); font-variant-numeric: tabular-nums;
  transition: margin .35s ease, opacity .2s;
}
.cabecera.pegada .sello-version { margin-top: 0; }
body.menu-abierto .sello-version { opacity: 0; }
.hamburguesa span { display: block; height: 2px; background: var(--blanco); transition: transform .35s ease, opacity .25s, background-color .2s; }
.hamburguesa:hover span { background: #e4e4e4; }
body.menu-abierto .hamburguesa span { background: var(--rojo); }
body.menu-abierto .hamburguesa span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-abierto .hamburguesa span:nth-child(2) { opacity: 0; }
body.menu-abierto .hamburguesa span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
body.menu-abierto .cabecera { background: transparent; }
body.menu-abierto { overflow: hidden; }

/* ---------------------------------------------------------------- menú a pantalla completa */
.menu-total {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(1, 1, 1, .95) url("img/fondo-menu.jpg") center / cover no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
body.menu-abierto .menu-total { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.menu-nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.menu-nav a {
  display: inline-block;
  font-size: 85px; line-height: 90px; letter-spacing: -1px; font-weight: 300; color: var(--rojo);
  opacity: 0; transform: translateY(24px);
  transition: color .2s ease, opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.menu-nav a:hover { color: var(--blanco); }
body.menu-abierto .menu-nav a { opacity: 1; transform: none; }
body.menu-abierto .menu-nav li:nth-child(1) a { transition-delay: .10s; }
body.menu-abierto .menu-nav li:nth-child(2) a { transition-delay: .17s; }
body.menu-abierto .menu-nav li:nth-child(3) a { transition-delay: .24s; }
body.menu-abierto .menu-nav li:nth-child(4) a { transition-delay: .31s; }
.redes-menu { position: absolute; bottom: 40px; left: 0; right: 0; }

/* ---------------------------------------------------------------- iconos sociales */
.redes { display: flex; justify-content: center; gap: 14px; }
.redes a {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.redes svg { width: 22px; height: 22px; fill: currentColor; }
.redes-pie a { border: 2px solid var(--rojo); color: var(--rojo); }
.redes-pie a:hover { background: var(--blanco); border-color: var(--blanco); color: #010101; }
.redes-menu a { border: 1px solid var(--blanco); color: var(--blanco); width: 44px; height: 44px; }
.redes-menu svg { width: 18px; height: 18px; }
.redes-menu a:hover { background: var(--blanco); color: #010101; }

/* ---------------------------------------------------------------- selector de idioma ES / EN */
.idiomas { display: flex; justify-content: center; align-items: baseline; gap: 10px; font-size: 16px; letter-spacing: 1.5px; }
.idiomas a { color: #818181; padding: 6px 2px; transition: color .2s ease; }
.idiomas a:hover, .idiomas a.activo { color: var(--blanco); }
.idiomas span { color: #4a4a4a; }
.idiomas-menu { margin-top: 44px; font-size: 18px; opacity: 0; transition: opacity .5s ease .38s; }
.idiomas-menu a.activo { color: var(--rojo); }
body.menu-abierto .idiomas-menu { opacity: 1; }
.idiomas-pie { margin-top: 22px; }

/* ---------------------------------------------------------------- pie */
.pie { padding: 98px var(--paspartu); text-align: center; }
.legales { list-style: none; margin: 38px 0 0; padding: 0; font-size: 16px; line-height: 32px; letter-spacing: .5px; }
.legales a { color: #818181; }
.legales a:hover { color: var(--blanco); }

.arriba {
  position: fixed; right: 33px; bottom: 33px; z-index: 200;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid #cdcdcd; color: #cdcdcd;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility 0s linear .3s, background-color .2s, color .2s;
}
.arriba svg { width: 18px; height: 18px; }
.arriba.visible { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s, background-color .2s, color .2s; }
.arriba:hover { background: var(--blanco); color: var(--negro); }

/* ---------------------------------------------------------------- animación de aparición */
.revela { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.revela.visto { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .revela, .menu-nav a { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- HOME */
.hero {
  position: relative; height: 100vh; min-height: 520px;
  margin: 0 calc(-1 * var(--paspartu));
  overflow: hidden; background: #000;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video.en-espera { visibility: hidden; }

/* ---------------------------------------------------------------- rueda «Experiencias a través de…»
   La frase se queda fija en el centro mientras se hace scroll y la rueda del ratón mueve los corchetes < />:
   la palabra se borra, los corchetes se ajustan al ancho de la siguiente y la siguiente se escribe dentro. */
.rueda { position: relative; }
.rueda-fija {
  position: sticky; top: 25vh; padding-block: 64px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
}
.rueda-pista { height: calc((var(--n) - 1) * 50vh); }
.rueda h1 { font-weight: 300; }
.rueda-marco {
  display: flex; align-items: center; justify-content: center; max-width: 100%;
  font-size: clamp(72px, 12vw, 200px); line-height: 1.375; color: var(--rojo);  /* V1.29: ~20% más pequeña (antes 90px/15vw/250px) */
}
.rueda-corchete {
  flex: none; font-family: "Source Code Pro", ui-monospace, Menlo, Consolas, monospace; font-weight: 300;
  font-size: .62em; line-height: 1; letter-spacing: -.04em; transform: translateY(-.04em);
}
.rueda-corchete:first-child { margin-right: .16em; }
.rueda-corchete:last-child { margin-left: .16em; }
.rueda-palabras { position: relative; flex: none; height: 1.15em; overflow: hidden; }
.rueda-palabra { display: none; margin: 0; font-size: inherit; line-height: inherit; white-space: nowrap; }
.rueda-palabra.activa { display: block; }
.rueda-palabra { line-height: 1.15; }
/* con JS cada palabra lleva su propio tamaño (web.js): la larga cabe en el ancho y las cortas salen enormes */
.rueda.con-js .rueda-palabra { display: block; position: absolute; left: 0; top: 50%; transform: translateY(-50%); clip-path: inset(0 100% 0 0); }

/* categorías por tipo de trabajo: 8 bandas a todo el ancho, una debajo de otra, con la foto grande */
.categorias { margin: 0 calc(-1 * var(--paspartu)); padding-bottom: 6px; display: grid; gap: 6px; }
.cat { position: relative; display: block; height: max(420px, 78vh); overflow: hidden; background: #0b0b0b; }
.cat-img, .cat-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.cat-img img { object-fit: cover; transform: scale(1.04); filter: grayscale(1) contrast(.7) brightness(1.18);  /* b/n suave y lavado; en hover vuelve el color */ transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), filter .7s ease; }
/* en blanco y negro para que no se junte tanto color; a color al pasar el ratón (o, en móvil, al llegar al centro de la pantalla) */
.cat:hover .cat-img img, .cat:focus-visible .cat-img img, .cat.en-color .cat-img img { filter: none; }
.cat:focus-visible .cat-img img { transform: scale(1.1); }
/* con ratón: zoom y la foto se desplaza arriba/abajo siguiendo el cursor (--py lo pone web.js) para ver todo el escenario */
@media (hover: hover) {
  .cat-img img { transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), object-position 1.4s cubic-bezier(.2, .7, .2, 1), filter .7s ease; }
  .cat:hover .cat-img img {
    transform: scale(1.14) translateY(calc((.5 - var(--py, .5)) * 9%));
    object-position: 50% calc(var(--py, .5) * 100%);
    transition: transform .9s cubic-bezier(.2, .7, .2, 1), object-position .9s cubic-bezier(.2, .7, .2, 1), filter .6s ease;
  }
}
@media (prefers-reduced-motion: reduce) { .cat:hover .cat-img img { transform: none; transition: none; } }
.cat-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 75%), linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0) 40%); }
.cat-txt { position: absolute; left: max(40px, calc((100% - 1300px) / 2)); right: 40px; bottom: 9vh; max-width: 760px; }
.cat-num { display: block; font-size: 15px; letter-spacing: 3px; color: var(--rojo); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.cat h3 { font-size: clamp(40px, 5.6vw, 85px); line-height: 1.02; letter-spacing: -.5px; text-transform: uppercase; font-weight: 400; text-wrap: balance; transition: color .3s; }
.cat:hover h3, .cat:focus-visible h3 { color: var(--rojo); }
.cat-proy { display: block; margin-top: 18px; font-size: 20px; line-height: 26px; color: var(--blanco); opacity: .85; }
.cat-proy::before { content: ""; display: block; width: 40px; height: 2px; background: var(--rojo); margin-bottom: 14px; }
.cat:focus-visible { outline: 2px solid var(--rojo); outline-offset: -2px; }

/* home: después de las 8 bandas va entera la página de Sobre nosotros */
.home-sobre { padding-top: 120px; }

.grid-proyectos { display: grid; grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #0b0b0b; }
.tile-link, .tile-link img { display: block; width: 100%; height: 100%; }
.tile img { object-fit: cover; transition: transform .4s ease; }
.tile:hover img { transform: scale(1.1); }
.tile-hover {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
  background: rgba(21, 21, 21, .78);
  opacity: 0; transition: opacity .4s ease-in-out;
}
.tile:hover .tile-hover, .tile:focus-within .tile-hover { opacity: 1; }
.tile-hover h3 { font-size: 33px; line-height: 52px; letter-spacing: .5px; text-transform: uppercase; color: var(--rojo); margin-bottom: 7px; }
.tile-hover a { pointer-events: auto; }
.tile-hover h3 a:hover { color: var(--blanco); }
.zoom {
  display: inline-block; font-size: 13px; line-height: 30px; padding: 0 18px;
  text-transform: uppercase; letter-spacing: 1px; font-weight: 500;
  color: var(--blanco); border: 2px solid var(--blanco);
  transition: background-color .2s, color .2s;
}
.zoom:hover { background: var(--blanco); color: var(--negro); }

/* ---------------------------------------------------------------- FICHA DE PROYECTO */
.ficha { width: var(--grid); margin: 0 auto; padding: 96px 0 0; }
.ficha-titulo {
  font-size: 33px; line-height: 42px; letter-spacing: -.3px; text-transform: uppercase;
  color: var(--rojo-titulo); text-align: center; margin: 0 60px 92px;
}
.ficha-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ficha-fotos { display: flex; flex-direction: column; gap: 22px; }
.ficha-fotos .foto { display: block; overflow: hidden; cursor: zoom-in; }
.ficha-fotos img { width: 100%; height: auto; transition: transform .6s ease; }
.ficha-fotos .foto:hover img { transform: scale(1.03); }
.ficha-fotos video { width: 100%; height: auto; }
.ficha-info { position: sticky; top: 100px; padding-left: 0; }
.ficha-info p { font-size: 20px; line-height: 30px; }
.ficha-info ul { margin: 0; padding-left: 22px; line-height: 30px; }
.ficha-nav { position: relative; height: 42px; margin: 50px 0 50px; }
.ficha-nav a {
  position: absolute; top: 0; width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 30px; line-height: 1; padding-bottom: 4px; color: #b4b4b4;
  border: 2px solid #e5e5e5; border-radius: 4px;
  transition: color .2s, background-color .2s, border-color .2s;
}
.ficha-nav .nav-prev { left: 0; }
.ficha-nav .nav-next { right: 0; }
.ficha-nav a:hover { color: var(--negro); background: var(--blanco); border-color: var(--blanco); }

/* ---------------------------------------------------------------- PROYECTOS (carrusel) */
/* el scroll vertical de la página mueve los proyectos en horizontal: la sección es alta (--n tramos)
   y el carrusel se queda fijo en pantalla mientras tanto; además avanza solo y con las flechas */
.pps { position: relative; height: calc(100vh + (var(--n) - 1) * 35vh); }
.pps-fija { position: sticky; top: 0; height: 100vh; padding-top: clamp(160px, 22vh, 220px); overflow: hidden; }
.pps-pista { display: flex; will-change: transform; }
.pps-pista.anima { transition: transform .9s cubic-bezier(.6, .05, .25, 1); }
/* filtro por años: encima del carrusel, alineado con la foto */
.pps-filtros { display: flex; flex-wrap: wrap; gap: 6px 26px; height: 34px; margin: -50px 0 16px; padding: 0 30px; }
.pps-filtros button {
  padding: 4px 0; font-size: 13px; line-height: 20px; letter-spacing: 2px; text-transform: uppercase; color: var(--gris);
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.pps-filtros button:hover { color: var(--blanco); }
.pps-filtros button.activo { color: var(--blanco); border-bottom-color: var(--rojo); }
.pps-slide[hidden] { display: none; }
.pps-slide { --iw: min(78%, calc((100vh - clamp(160px, 22vh, 220px) - 90px) * 1.5)); position: relative; flex: 0 0 78%; padding: 0 0 40px 30px; }
.pps-imagen { display: block; width: var(--iw); aspect-ratio: 3 / 2; overflow: hidden; cursor: pointer; }
.pps-imagen img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.pps-slide:hover .pps-imagen img { transform: scale(1.04); }
.pps-titulo {
  position: absolute; top: 3px; left: calc(30px + var(--iw) - 85px); width: 36%; z-index: 2; text-shadow: 0 1px 14px rgba(0, 0, 0, .55);  /* por encima de la foto siguiente, no debajo */
  font-size: 33px; line-height: 52px; letter-spacing: .5px; text-transform: uppercase; color: var(--blanco);
  font-size: clamp(33px, 4.6vw, 64px); line-height: 1.1;
}
.pps-titulo a:hover { color: var(--rojo); }
.pps-mas {
  position: absolute; bottom: 40px; left: calc(30px + var(--iw) + 10px);
  font-size: 14px; line-height: 14px; font-weight: 500; color: #303030;
}
.pps-mas:hover { color: var(--blanco); }
.pps-flecha {
  position: absolute; top: var(--flecha-y, 45%); margin-top: -23px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5);
  font-size: 30px; line-height: 40px; color: var(--blanco); background: rgba(0, 0, 0, .35); opacity: .7; transition: opacity .3s, background-color .2s;
}
.pps:hover .pps-flecha { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .pps { height: auto; }
  .pps-fija { position: static; height: auto; padding-bottom: 120px; }
}
.pps-flecha:hover { background: rgba(255, 255, 255, .15); }
.pps-flecha.prev { left: 10px; }
.pps-flecha.next { right: 10px; }

/* ---------------------------------------------------------------- SOBRE NOSOTROS */
.rev { position: relative; aspect-ratio: 1240 / 700; container-type: inline-size; overflow: hidden; margin-bottom: 80px; }
.rev span {
  position: absolute; white-space: nowrap;
  font-size: calc(var(--s) * 100cqw / 1240); line-height: calc(84 * 100cqw / 1240);
  letter-spacing: calc(-5 * 100cqw / 1240);
  left: calc(var(--x) * 100cqw / 1240); top: calc(var(--y) * 100cqw / 1240);
  font-weight: var(--w, 300);
  opacity: 0; transform: translateY(.35em);
  transition: opacity .7s ease, transform .9s cubic-bezier(.65, 0, .35, 1);
}
.rev span.on { opacity: 1; transform: none; }
/* sin JS, el titular entra solo como antes */
html:not(.js) .rev span { animation: capa 1.1s cubic-bezier(.65, 0, .35, 1) forwards; animation-delay: var(--d); }
.rev .blanco { color: var(--blanco); }
.rev .rojo { color: var(--rojo); }
@keyframes capa { to { opacity: 1; transform: none; } }

/* titular: se queda fijo y se va montando frase a frase con el scroll */
.rev-pista { position: relative; height: calc(100vh + 5 * 32vh); }
.rev-pista .rev {
  position: sticky; margin: 0 auto;
  /* que el titular entero quepa en pantalla aunque la ventana sea baja */
  width: min(100%, calc((100vh - 110px) * 1240 / 700));
  /* - 104px: el titular sube algo más de un renglón (Elena, V1.12–V1.13) */
  top: max(70px, calc(50vh - min(100%, calc((100vh - 110px) * 1240 / 700)) * 350 / 1240 - 104px));
}

/* vídeo de escenarios (V1.14, sustituye a las 4 parejas plano/real): se queda fijo y la rueda del ratón lo avanza */
.peli-pista { position: relative; height: 420vh; margin: 40px calc(-1 * var(--paspartu)) 57px; }  /* a sangre: sin el paspartú lateral */
.peli-fija { position: sticky; top: 0; height: 100vh; padding-top: 60px; display: grid; place-items: center; }
.peli-marco { position: relative; width: 100%; aspect-ratio: 21 / 9; max-height: calc(100vh - 80px); overflow: hidden; background: #000; }  /* todo el ancho, recortado arriba y abajo */
.peli-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.peli-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .15); }
.peli-barra i { display: block; height: 100%; width: 100%; background: var(--rojo); transform-origin: left; transform: scaleX(var(--p, 0)); }
/* iPhone: 100vh no cuenta la barra del navegador; 100svh es la pantalla visible de verdad (V1.16) */
@supports (height: 100svh) { .peli-fija { height: 100svh; } .peli-marco { max-height: calc(100svh - 80px); } }
@media (max-width: 768px) { .peli-pista { height: 320vh; } .peli-marco { aspect-ratio: 16 / 9; } }
@media (prefers-reduced-motion: reduce) {
  .peli-pista { height: auto; }
  .peli-fija { position: static; height: auto; }
}

/* del plano a la realidad: cada foto entra en plano y se descubre la real con una raya roja */
.planos-pista { position: relative; height: calc(100vh + var(--n) * 90vh); margin: 40px 0 57px; }
.planos-fija { position: sticky; top: 0; height: 100vh; padding-top: 60px; display: grid; place-items: center; }
.plano {
  grid-area: 1 / 1; position: relative; width: min(100%, calc((100vh - 150px) * 1600 / 700)); aspect-ratio: 1600 / 700; margin: 0; overflow: hidden;
  clip-path: inset(calc((1 - var(--e, 0)) * 100%) 0 0 0);
}
.plano:first-child { --e: 1; }
.plano img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plano-bp { transform: scale(calc(1.06 - var(--e, 0) * .06)); }
.plano-real { clip-path: inset(0 calc((1 - var(--r, 0)) * 100%) 0 0); }
.plano-scan {
  position: absolute; top: 0; bottom: 0; left: calc(var(--r, 0) * 100%); width: 2px; margin-left: -1px;
  background: var(--rojo); box-shadow: 0 0 18px 2px rgba(228, 0, 43, .55);
  opacity: calc(min(var(--r, 0) * 20, (1 - var(--r, 0)) * 20, 1));
}
.plano figcaption {
  position: absolute; left: 24px; bottom: 18px; font-size: 15px; line-height: 22px; letter-spacing: 1.5px; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.plano-estado { display: inline-grid; margin-right: 14px; padding: 0 10px; border: 1px solid currentColor; font-size: 12px; letter-spacing: 2px; }
.plano-estado b { grid-area: 1 / 1; font-weight: 400; transition: opacity .3s; }
.plano-estado b:last-child { opacity: 0; color: var(--rojo); }
.plano.es-real .plano-estado b:first-child { opacity: 0; }
.plano.es-real .plano-estado b:last-child { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .rev-pista, .planos-pista { height: auto; }
  .rev-pista .rev, .planos-fija { position: static; height: auto; }
  .planos-fija { display: grid; gap: 20px; }
  .plano { grid-area: auto; clip-path: none; }
  .plano-bp, .plano-scan { display: none; }
  .plano-real { clip-path: none; }
  .rev span { opacity: 1; transform: none; }
}

.cols4 { width: var(--grid); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 30px; }
.que { padding: 80px 0; }
.que h4 { text-align: right; }
.que h4 strong { font-weight: 400; }
.texto-centro { display: grid; grid-template-columns: 1fr 2fr 1fr; padding: 57px 0 150px; }
.texto-centro > div { grid-column: 2; padding: 0 15px; }
.banda-equipo { height: 161px; background: url("img/pon-cara-al-equipo.jpg") center / cover no-repeat; }
.areas { padding: 150px 0 120px; }
.areas .corchete { display: block; width: 100px; height: 100px; margin-bottom: 32px; }
.areas h1 { margin-bottom: 30px; }

/* ---------------------------------------------------------------- CONTACTO */
.contacto { width: var(--grid); margin: 0 auto; padding-top: 160px; }
.contacto-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 32px; }
.contacto h5 { margin-top: 32px; }
.boton {
  display: inline-block; margin-top: 32px;
  height: 40px; line-height: 38px; padding: 0 14px;
  font-size: 16px; font-weight: 500; letter-spacing: 2px;
  color: var(--blanco); background: var(--negro); border: 1px solid var(--rojo);
  transition: background-color .2s, color .2s, border-color .2s;
}
.boton:hover { background: var(--blanco); color: var(--rojo); border-color: var(--blanco); }
.formulario { display: flex; flex-direction: column; gap: 20px; }
.formulario input, .formulario textarea {
  width: 100%; font-family: Tahoma, Geneva, sans-serif; font-size: 18px; line-height: 28.8px; color: var(--blanco);
  background: var(--negro); border: 0; border-bottom: 1px solid var(--blanco); border-radius: 0; padding: 15px; outline: none;
  transition: border-color .2s;
}
.formulario textarea { resize: vertical; min-height: 146px; }
.formulario input:focus, .formulario textarea:focus { border-color: var(--rojo); }
.formulario ::placeholder { color: #8a8a8a; }
.formulario .enviar {
  align-self: flex-start; cursor: pointer;
  font-family: Tahoma, Geneva, sans-serif; font-size: 16px; font-weight: 500; letter-spacing: 2px;
  color: var(--rojo); background: var(--negro); padding: 11px 30px; border-radius: 10px;
  transition: background-color .2s, color .2s;
}
.formulario .enviar:hover { background: var(--rojo); color: var(--blanco); }
.formulario .trampa { position: absolute; left: -9999px; }
.form-estado { font-size: 16px; min-height: 26px; }
.form-estado.ok { color: #6fcf7a; }
.form-estado.error { color: var(--rojo); }
.unete { padding: 64px 0 40px; }
.unete a { color: var(--rojo); }
.unete a:hover { color: var(--blanco); }

/* ---------------------------------------------------------------- LEGALES */
.titulo-pagina { height: 250px; display: grid; place-items: center; padding-top: 30px; background: #010101; }
.titulo-pagina h1 { font-size: 33px; line-height: 42px; letter-spacing: -.3px; text-transform: uppercase; }
.texto-legal { padding: 60px 0 40px; }
.texto-legal h4 { font-weight: 400; }
.texto-legal p, .texto-legal li { line-height: 30px; }
.texto-legal a { color: var(--rojo); }

/* ---------------------------------------------------------------- LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.abierto { opacity: 1; }
.lightbox figure { margin: 0; max-width: calc(100vw - 160px); max-height: calc(100vh - 100px); text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; object-fit: contain; transition: opacity .25s; }
.lightbox figcaption { margin-top: 12px; font-size: 16px; color: #ccc; text-transform: uppercase; letter-spacing: .5px; }
.lightbox button { position: absolute; color: var(--blanco); font-size: 48px; line-height: 1; padding: 10px 16px; opacity: .75; transition: opacity .2s, color .2s; }
.lightbox button:hover { opacity: 1; color: var(--rojo); }
.lb-cerrar { top: 20px; right: 24px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- RESPONSIVE */
@media (max-width: 1000px) {
  :root { --grid: calc(100% - 60px); }
  h4 { font-size: 64px; }
  .grid-proyectos { grid-template-columns: repeat(2, 1fr); }
  .menu-nav a { font-size: 64px; line-height: 72px; }
  .cols4 { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .texto-centro { grid-template-columns: 1fr 4fr 1fr; }
  .pps-slide { flex-basis: 88%; }
}
@media (max-width: 768px) {
  :root { --paspartu: 10px; --grid: calc(100% - 40px); }
  .cabecera { height: 90px; padding: 15px 22px 0; }
  .cabecera .logo img { height: 60px; }
  .cabecera.pegada { height: 64px; padding-top: 10px; }
  .cabecera.pegada .logo img { height: 44px; }
  .hamburguesa { margin-top: 5px; height: 50px; }
  .cabecera.pegada .hamburguesa { margin-top: -3px; }
  .cabecera-der { gap: 12px; }
  .sello-version { margin-top: 5px; font-size: 9px; letter-spacing: 1px; }
  .cabecera.pegada .sello-version { margin-top: -3px; }
  .hero { height: 62vh; min-height: 0; }
  .rueda-fija { padding-block: 40px; }
  .rueda-pista { height: calc((var(--n) - 1) * 40vh); }
  .rueda h1 { font-size: 28px; line-height: 34px; }
  .rueda-marco { font-size: min(90px, 20vw); }
  h4 { font-size: 44px; }
  .ficha { padding-top: 110px; }
  .ficha-titulo { margin: 0 0 40px; font-size: 28px; line-height: 36px; }
  .ficha-cols { grid-template-columns: 1fr; gap: 40px; }
  .ficha-info { position: static; order: -1; }
  .menu-nav a { font-size: 48px; line-height: 58px; }
  .pps { height: calc(100vh + (var(--n) - 1) * 28vh); }
  .pps-fija { padding-top: 120px; }
  .pps-filtros { height: auto; margin: -12px 0 18px; padding: 0 10px; gap: 4px 14px; }
  .pps-filtros button { font-size: 11px; letter-spacing: 1px; }
  .pps-slide { --iw: 100%; flex-basis: 100%; padding: 0 10px 20px; }
  .pps-imagen { width: 100%; }
  .pps-titulo { position: static; width: auto; margin-top: 14px; font-size: 30px; line-height: 38px; }
  .pps-mas { position: static; display: inline-block; margin-top: 8px; color: #666; }
  .rev { margin-bottom: 40px; }
  .rev-pista { height: calc(100vh + 5 * 22vh); }
  .planos-pista { height: calc(100vh + var(--n) * 70vh); }
  .plano { width: 100%; aspect-ratio: 4 / 3; }
  .plano figcaption { left: 14px; bottom: 10px; font-size: 13px; }
  .cols4 { grid-template-columns: 1fr; }
  .que h4 { text-align: left; }
  .texto-centro { grid-template-columns: 1fr; padding: 40px 0 80px; }
  .texto-centro > div { grid-column: 1; padding: 0 20px; }
  .areas { padding: 80px 0 60px; }
  .contacto { padding-top: 120px; }
  .contacto-cols { grid-template-columns: 1fr; gap: 50px; }
  .lightbox figure { max-width: 100vw; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .arriba { right: 16px; bottom: 16px; }
}
@media (max-width: 600px) {
  .cat { height: max(380px, 70vh); }
  .cat-txt { left: 20px; right: 20px; bottom: 36px; }
  .cat h3 { font-size: min(40px, 9.5vw); }
  .cat-proy { font-size: 16px; line-height: 22px; margin-top: 12px; }
  .cat-img::after { background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,0) 80%); }
  .grid-proyectos { grid-template-columns: 1fr; }
  h4 { font-size: 38px; }
  .tile-hover { opacity: 0; }
}
@media (hover: none) {
  .tile-hover { display: none; }
}
.version { margin-top: 24px; font-size: 11px; line-height: 16px; letter-spacing: 1px; color: #3a3a3a; }

/* ---------------------------------------------------------------- PREROLL de la portada
   Logo + línea de carga mientras llega el vídeo; el reel entra con fundido cuando de verdad reproduce. */
.hero-video { opacity: 0; transition: opacity 1s ease; }
.hero.listo .hero-video, .hero.sin-video .hero-video { opacity: 1; }
.hero-preroll {
  position: absolute; inset: 0; z-index: 1; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.hero.listo .hero-preroll, .hero.sin-video .hero-preroll { opacity: 0; visibility: hidden; }
.hero-preroll img { height: 110px; width: auto; animation: latido 1.6s ease-in-out infinite; }
.hero-carga { position: relative; width: 120px; height: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.hero-carga::after {
  content: ""; position: absolute; inset: 0; width: 40%; background: var(--rojo);
  animation: carga 1.2s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes latido { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: none; } }
@keyframes carga { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .hero-preroll img, .hero-carga::after { animation: none; } }

/* texto solo para buscadores y lectores de pantalla (titulares H1 sin presencia visual) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
