/* Coronel Truman · portada: una sola composición a pantalla completa */

/* Vídeo de la web actual, en gris y velado (mismos valores que public/index.html) */
.escena { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--gris) url(/img/poster.jpg) center / cover; }
.pelicula { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.velo { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.72); }

/* Composición */
.portada { position: relative; z-index: 10; height: 100svh; min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(8vh + var(--logo) * 1.11 + 2vh) calc(var(--nav-dcha) + var(--punto-t) + 2rem) calc(2.4vh + 3.2rem); }

/* Titular: hueco de altura fija para que la definición y el botón no se muevan nunca */
.titular { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: inherit; }
.titular .mensaje { position: absolute; visibility: hidden; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.titular .mensaje > span, .titular .linea { display: block; white-space: nowrap; }
.escribe { display: flex; flex-direction: column; align-items: center; }
.linea { min-height: 1em; }
.cursor { display: inline-block; width: 0.05em; height: 0.74em; background: currentColor; margin-left: 0.06em; vertical-align: -0.02em; animation: parpadeo 1s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }

/* Tipografías originales de la web: cada mensaje en una */
.f-playfair { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-style: italic; letter-spacing: -0.015em; line-height: 1.04; }
.f-oswald { font-family: "Oswald", sans-serif; font-weight: 600; text-transform: uppercase; line-height: 0.94; letter-spacing: -0.005em; }
.f-barlow { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; text-transform: uppercase; line-height: 0.92; }
.titular .mensaje, .escribe { font-size: clamp(3rem, min(10.5vw, 17vh), 12rem); }

/* Definición fija y llamada */
.definicion { font-family: "Oswald", sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: 0.24em; font-size: clamp(0.82rem, min(1.05vw, 1.9vh), 1.15rem); margin-top: clamp(1.4rem, 4.2vh, 3rem); }
.definicion::before, .definicion::after { content: ""; display: inline-block; width: 2.2em; height: 1px; background: currentColor; vertical-align: 0.32em; margin: 0 1.1em; opacity: 0.5; }
.entradilla { font-size: clamp(1rem, min(1.42vw, 2.5vh), 1.4rem); line-height: 1.5; max-width: 54ch; margin-top: clamp(0.8rem, 2vh, 1.3rem); text-wrap: balance; }
.cta { margin-top: clamp(1.4rem, 4vh, 2.6rem); font-size: clamp(0.82rem, min(0.95vw, 1.8vh), 1.05rem); }

/* Entrada de la portada */
.definicion, .entradilla, .cta { opacity: 0; transform: translateY(10px); animation: llegar 0.8s var(--ease) forwards; }
.definicion { animation-delay: 0.2s; }
.entradilla { animation-delay: 0.35s; }
.cta { animation-delay: 0.5s; }
@keyframes llegar { to { opacity: 1; transform: none; } }

/* Ventanas bajas */
@media (max-height: 700px) and (min-width: 768px) {
  .entradilla { max-width: 70ch; }
  .definicion::before, .definicion::after { display: none; }
}

/* Móvil: la portada cabe en una pantalla y deja sitio a la barra de puntos */
@media (max-width: 767px) {
  body.inicio { overflow: auto; }
  .portada { padding: calc(5vh + var(--logo) * 1.11 + 3vh) 1.5rem calc(92px + env(safe-area-inset-bottom)); justify-content: center; }
  .titular .mensaje, .escribe { font-size: clamp(2.4rem, 13vw, 4rem); }
  .definicion { letter-spacing: 0.18em; }
  .definicion::before, .definicion::after { width: 1.2em; margin: 0 0.7em; }
}

@media (prefers-reduced-motion: reduce) {
  .definicion, .entradilla, .cta { animation: none; opacity: 1; transform: none; }
  .cursor { display: none; }
}

/* Los mensajes ocultos que sirven para medir no deben ensanchar la página */
.titular { overflow-x: clip; overflow-clip-margin: 0.3em; }
.titular .mensaje { left: 0; top: 0; }

/* ── Portada editorial: la foto entera manda, su verde llena la pantalla y el titular se entrelaza con la modelo ──
   Lámina con las proporciones de la foto. Dentro, tres capas: foto · titular · silueta recortada de la misma foto.
   El titular se coloca en porcentajes de la foto (cqw), así el cruce con las manos es igual en cualquier pantalla. */
body.inicio { background: var(--verde, #fdceb9); transition: background-color 1.8s ease; }
.escena { background: var(--verde, #fdceb9); transition: background-color 1.8s ease; }
.lamina { position: absolute; top: calc(50% + 9vh); right: calc(var(--nav-dcha) + var(--punto-t) + 0.8rem); width: min(70vw, 126vh); aspect-ratio: 1672 / 941; transform: translateY(-53%); container-type: inline-size; }
/* La foto nueva tiene fondo liso y más aire: se amplía y desplaza para que la figura quede donde estaba */
.foto, .delante { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--w); pointer-events: none; opacity: 0; transition: opacity 1.8s ease; }
.foto.activa, .delante.activa { opacity: 1; }
/* Fotos que no flotan sino que suben despacio mientras están en pantalla (data-mov="sube") */
.foto[data-mov="sube"] img { animation: none; opacity: 1; }
.foto[data-mov="sube"].sube img { animation: subir 12s cubic-bezier(0.3, 0.45, 0.4, 1) forwards; }
@keyframes subir { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -11%, 0); } }
.delante { z-index: 3; }
.foto { --m-h: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  --m-v: linear-gradient(to bottom, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: var(--m-h), var(--m-v); -webkit-mask-composite: source-in; mask-image: var(--m-h), var(--m-v); mask-composite: intersect; }
.foto img, .delante img { width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: asomar 1.6s var(--ease) 0.1s forwards, mecer 8s ease-in-out 1.7s infinite; }
@keyframes asomar { from { opacity: 0; transform: translate3d(0, 2.5vh, 0); } to { opacity: 1; transform: none; } }
/* Flotar: sube y baja con una leve deriva y un giro mínimo, sin llegar a un punto fijo */
@keyframes mecer {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.4deg); }
  25% { transform: translate3d(0.35vw, -1.6vh, 0) rotate(0.2deg); }
  50% { transform: translate3d(0, -2.8vh, 0) rotate(0.8deg); }
  75% { transform: translate3d(-0.35vw, -1.3vh, 0) rotate(0.3deg); }
}

/* Bloque editorial: titular en dos líneas seguidas, entradilla y llamada juntos, por encima de la ropa.
   Guiño: solo la mano de abajo de la modelo (capa .delante) pasa por delante del final de «llegar?» */
/* Arriba a la izquierda, en el verde libre entre el logo y los pies */
.bloque { position: absolute; z-index: 2; left: -16%; top: 16%; width: 54%; }
.bloque .titular { position: relative; width: 100%; align-items: stretch; overflow: visible; height: auto !important; }
.bloque .titular .mensaje, .bloque .escribe { font-size: 14cqw; align-items: flex-start; }
.f-playfair { line-height: 0.96; }
.bloque .entradilla { position: static; margin: 1.8cqw 0 0; max-width: 58ch; font-size: clamp(0.95rem, 1.6cqw, 1.2rem); line-height: 1.5; text-wrap: pretty; text-align: left; padding: 0; border: 0; }
.bloque .cta { position: static; display: inline-flex; margin-top: 1.6cqw; font-size: clamp(0.8rem, 1.2cqw, 1rem); }
body.inicio .pie { color: rgba(0, 0, 0, 0.72); }

@media (min-width: 768px) {
  .portada { display: block; padding: 0; height: 100svh; min-height: 560px; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .foto img, .delante img, .foto[data-mov="sube"].sube img { animation: none; opacity: 1; } }

/* ── Bajo la portada: cuatro apartados; manda el mensaje ──
   Cada apartado entra sobre el anterior con un corte recto ligeramente inclinado, alternando el sentido. */
.portada { position: relative; z-index: 10; overflow: clip; }
html:has(body.inicio) { overflow-x: clip; }
body.largo .logo { position: absolute; }

body.inicio .pie { background: var(--t-fuerte); }

/* Indicador de scroll: solo el icono; desaparece en cuanto se baja */
.raton { position: absolute; z-index: 20; left: 50%; bottom: calc(clamp(2.2rem, 4vw, 4.5rem) + 2.2vh); width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid rgba(0, 0, 0, 0.7); border-radius: 12px; transition: opacity 0.4s ease, transform 0.4s ease; }
.raton span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: rgba(0, 0, 0, 0.7); animation: rueda 1.8s ease-in-out infinite; }
@keyframes rueda { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 70% { opacity: 1; transform: translateY(8px); } 100% { opacity: 0; transform: translateY(10px); } }
.desplazado .raton { opacity: 0; transform: translateY(8px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .raton span { animation: none; } }

/* Portada en melocotón (el chico de camisa oliva); el verde pasa a Proyectos */
body.inicio { --t-claro: #feebe2; --t-medio: #f4d3c3; --t-oscuro: #3a3b2a; --t-fuerte: #fdceb9; }
/* Las fotos que suben no llevan fundido de bordes: al moverse, el pelo entraría en la zona fundida y se perdería.
   Su fondo liso es el mismo que el de la página, así que el borde no se nota. */
.foto[data-mov="sube"] { -webkit-mask-image: none; mask-image: none; }
/* Lenguaje editorial menos rígido: el titular sale un poco a la izquierda del texto */
.bloque .titular { margin-left: -0.32em; font-size: 14cqw; }

/* Entradilla corta, en dos líneas compensadas */
.bloque .entradilla.corta { max-width: none; width: calc(100% + 12cqw); text-wrap: balance; }

/* El cambio entre fotos es un parpadeo, no un fundido */
.lamina .foto { transition: none; }
body.inicio, .escena { transition: none; }
