/* Fondos de vídeo (portada y cierre) */
.bgv{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none}
.hero{height:100svh;min-height:560px;max-height:none}
.hero .hero__veil,.cta .hero__veil{background:linear-gradient(to top right,rgba(15,45,80,.84) 0%,rgba(15,45,80,.54) 100%)}
.hero .hero__wm,.cta .hero__wm{display:none}
/* Cierre: mismo tratamiento, altura mínima 70svh */
.cta{min-height:70svh;display:flex;align-items:center}
.cta>.container{width:100%}
.bgv--fade{opacity:0;transition:opacity 2.2s cubic-bezier(.33,0,.2,1)}
.bgv--fade.is-on{opacity:1}
.hero__bg{background-color:#0F2D50}
@keyframes heroBgIn{from{opacity:0}to{opacity:1}}
@keyframes heroUpSoft{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.js .hw{transform:translateY(14px);transition:opacity 1.1s cubic-bezier(.22,.61,.36,1),transform 1.3s cubic-bezier(.22,.61,.36,1)}
.js [data-hero-words].is-in .hw:nth-child(1){transition-delay:700ms}
.js [data-hero-words].is-in .hw:nth-child(2){transition-delay:810ms}
.js [data-hero-words].is-in .hw:nth-child(3){transition-delay:920ms}
.js [data-hero-words].is-in .hw:nth-child(4){transition-delay:1030ms}
.js [data-hero-words].is-in .hw:nth-child(5){transition-delay:1140ms}
.js [data-hero-words].is-in .hw:nth-child(6){transition-delay:1250ms}
.js [data-hero-words].is-in .hw:nth-child(7){transition-delay:1360ms}
.js [data-hero-words].is-in .hw:nth-child(8){transition-delay:1470ms}
.js [data-hero-words].is-in .hw:nth-child(9){transition-delay:1580ms}
.js [data-hero-words].is-in .hw:nth-child(n+10){transition-delay:1690ms}
.js .hero__lead{animation:heroUpSoft 1.3s cubic-bezier(.22,.61,.36,1) 1.6s both}
.js .hero__act{animation:heroUpSoft 1.3s cubic-bezier(.22,.61,.36,1) 1.9s both}
.js .hero__tool{animation:heroUpSoft 1.3s cubic-bezier(.22,.61,.36,1) 2.1s both}
.js .hero__scroll{animation:heroBgIn 1.4s ease 2.6s both}
@media (prefers-reduced-motion:reduce) and (min-width:100000px){.hero__bg,.js .hero__lead,.js .hero__act,.js .hero__tool,.js .hero__scroll{animation:none}}
/* Portada: la foto es el primer fotograma exacto del vídeo; el vídeo se funde encima ya reproduciéndose, sin salto */
.hero__photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;animation:heroPhotoIn 1.6s cubic-bezier(.33,0,.2,1) both}
@keyframes heroPhotoIn{from{opacity:0}to{opacity:1}}
.bgv--hero{opacity:0;transition:opacity .6s linear}
.bgv--hero.is-on{opacity:1}
@media (prefers-reduced-motion:reduce) and (min-width:100000px){.hero__photo{animation:none}}

/* Velo igual que la cabecera de Proyectos (deja ver la foto/vídeo) */
.hero .hero__veil,.cta .hero__veil{background:linear-gradient(115deg,rgba(0,0,0,.62) 0%,rgba(0,0,0,.4) 32%,rgba(0,0,0,.05) 62%,rgba(0,0,0,0) 80%),linear-gradient(0deg,rgba(0,0,0,.55) 0%,rgba(0,0,0,.15) 45%,rgba(0,0,0,0) 75%)}

/* Portada: velo más opaco */
.hero .hero__veil{background:linear-gradient(115deg,rgba(0,0,0,.74) 0%,rgba(0,0,0,.58) 32%,rgba(0,0,0,.34) 62%,rgba(0,0,0,.28) 80%),linear-gradient(0deg,rgba(0,0,0,.6) 0%,rgba(0,0,0,.22) 45%,rgba(0,0,0,.12) 75%)}
.hero .hero__veil{background:linear-gradient(115deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.7) 32%,rgba(0,0,0,.52) 62%,rgba(0,0,0,.46) 80%),linear-gradient(0deg,rgba(0,0,0,.6) 0%,rgba(0,0,0,.25) 45%,rgba(0,0,0,.15) 75%)}

/* Cierre: mismo velo que la portada y Servicios */
.cta .hero__veil{background:linear-gradient(115deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.7) 32%,rgba(0,0,0,.52) 62%,rgba(0,0,0,.46) 80%),linear-gradient(0deg,rgba(0,0,0,.6) 0%,rgba(0,0,0,.25) 45%,rgba(0,0,0,.15) 75%)}

/* Titular de portada en ordenador: más ancho y menos líneas */
@media (min-width:861px){.hero .hero__t2{max-width:100%;font-size:clamp(2.2rem,.9rem + 2.6vw,3.8rem);line-height:1.08;text-wrap:balance}.hero .hero__lead{max-width:62ch}}
