@charset "utf-8";
/* ==========================================================================
   Urban Flora · capa «vida» (v2-vida)
   Firma de movimiento: BROTA. El tallo sale del cubo: de abajo arriba,
   abriéndose desde la boca del cubo (un círculo que crece desde abajo).
   Ritmo pausado con un pequeño asentamiento final (el tallo que se apoya en el agua).
   Textura: el anillo del cubo y el corte en bisel.
   ========================================================================== */
:root {
  --vida-dur: .7s;
  --vida-ease: cubic-bezier(.2, .9, .25, 1.08);
  --vida-dir: 0 1;            /* de abajo (x 0, y +1) hacia arriba */
  --vida-paso: 70ms;          /* escalonado entre tallos */
  --vida-salto: 28px;         /* lo que «sube» un tallo al brotar */
}
body[data-acc="despedidas"] { --vida-dur: 1.2s; --vida-ease: cubic-bezier(.25, .8, .3, 1); --vida-salto: 12px; }

/* --- Titulares que brotan línea a línea -------------------------------- */
.vida-tit .vw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.vida-tit .vwi { display: inline-block; transform: translateY(105%); }
.vida-tit.vida-in .vwi { transform: none; transition: transform var(--vida-dur) var(--vida-ease); transition-delay: calc(var(--l, 0) * 110ms); }

/* --- Cabeceras que se abren desde la boca del cubo --------------------- */
/* el recorte va en los hijos, nunca en la figura que observan los IntersectionObserver */
[data-vida-cab] > * { clip-path: circle(0% at 50% 100%); }
[data-vida-cab].vida-in > * { clip-path: circle(150% at 50% 100%); transition: clip-path calc(var(--vida-dur) * 1.9) cubic-bezier(.3, .7, .2, 1); }
.vida-cab-fig { margin: clamp(24px, 4vw, 48px) 0 0; border-radius: var(--r-tag); overflow: hidden; position: relative; }
/* Flor fija: el vídeo cenital dentro de una boca de cubo, junto al titular */
.fija-hero { position: relative; }
.vida-boca { width: min(64vw, 260px); margin: 8px 0 20px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 10px var(--zinc-2), 0 0 0 12px var(--zinc-3); }
@media (min-width: 960px) { .fija-hero .fija-hero-pie { grid-template-columns: 1fr; justify-items: start; max-width: calc(100% - clamp(240px, 26vw, 380px) - 24px); }
  .vida-boca { position: absolute; right: var(--pad, 48px); top: clamp(24px, 4vw, 56px); width: clamp(240px, 26vw, 380px); margin: 0; } .fija-hero .mega { max-width: calc(100% - clamp(240px, 26vw, 380px) - 24px); } }
.rm-cab-fig[data-vida-cab] { overflow: hidden; }
@media (min-width: 1000px) {
  .ev-hero-fig[data-vida-cab] { transform: scale(1.12); transform-origin: 50% 100%; }
}

/* --- Listas que brotan escalonadas ------------------------------------- */
.js .vida-lista:not(.vida-in) > * { opacity: 0; transform: translateY(var(--vida-salto)) scaleY(.97); transform-origin: 50% 100%; }
.vida-lista.vida-anima > * { transition: opacity calc(var(--vida-dur) * .8) ease, transform var(--vida-dur) var(--vida-ease); transition-delay: calc(min(var(--i, 0), 10) * var(--vida-paso)); }

/* --- La pared se ordena por color (portada) ---------------------------- */
.vida-ordena .cubo { transition: transform calc(var(--vida-dur) * 1.5) var(--vida-ease); transition-delay: var(--vd, 0s); }
.vida-ordena .cubo-etq, .vida-ordena .cubo-nom { opacity: 0; }
.cubo-etq { transition: opacity .35s ease; }

/* --- Respiro por capas: foto, etiqueta de cubo ------------------------- */
.vida-respiro { position: relative; overflow: hidden; height: clamp(260px, 42vw, 560px); background: var(--zinc-2); }
.vida-capa-fondo { position: absolute; inset: -12% 0; margin: 0; aspect-ratio: auto; height: 124%; max-width: none; will-change: transform; }
.vida-capa-fondo > img, .vida-capa-fondo > canvas, .vida-capa-fondo > video { width: 100%; height: 100%; object-fit: cover; }
.vida-capa-etq { position: absolute; left: max(16px, env(safe-area-inset-left, 0px), 6vw); bottom: clamp(20px, 5vw, 56px); z-index: 2; font-size: .8rem; will-change: transform; }

/* --- Piezas que se colocan al entrar: anillos de reparto, plano de empresas */
.vida-anillos .rp-pz-A, .vida-anillos .rp-pz-B { transform-box: view-box; transform-origin: 258px 262px; }
.vida-anillos:not(.vida-in) .rp-pz-A, .vida-anillos:not(.vida-in) .rp-pz-B, .vida-anillos:not(.vida-in) .rp-m30 { transform: scale(0); }
.vida-anillos:not(.vida-in) .rp-pz-C { opacity: 0; }
.vida-anillos.vida-in .rp-pz-A { transition: transform var(--vida-dur) var(--vida-ease) .1s; }
.vida-anillos.vida-in .rp-pz-B, .vida-anillos.vida-in .rp-m30 { transform-box: view-box; transform-origin: 258px 262px; transition: transform calc(var(--vida-dur) * 1.2) var(--vida-ease) .45s; }
.vida-anillos.vida-in .rp-pz-C { transition: opacity .6s ease .95s; }
@keyframes vida-brota { from { transform: translateY(var(--vida-salto)) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.vida-plano .ema-sala .ema-etq, .vida-plano .ema-sala .ema-cubo, .vida-plano .ema-sala .ema-uds { animation: vida-brota var(--vida-dur) var(--vida-ease) both; animation-delay: calc(var(--i, 0) * 90ms + .15s); transform-origin: 50% 100%; }

/* --- Pedido: pasos que brotan y confirmación con el ramo atado ---------- */
@keyframes vida-paso { from { transform: translateY(var(--vida-salto)); opacity: 0; } to { transform: none; opacity: 1; } }
.paso.vida-brota, .confirma.vida-brota { animation: vida-paso var(--vida-dur) var(--vida-ease) both; }
.vida-atado { display: block; width: 132px; height: auto; margin: 0 0 12px; overflow: visible; }
.vida-atado .t { fill: none; stroke: var(--helecho); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 140; stroke-dashoffset: 140; }
.vida-atado .f { transform-box: fill-box; transform-origin: 50% 50%; transform: scale(0); }
.vida-atado .c { fill: none; stroke: var(--kraft-d); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; }
.vida-atado.vida-in .t { stroke-dashoffset: 0; transition: stroke-dashoffset .8s cubic-bezier(.3, .7, .2, 1); transition-delay: calc(var(--i) * 70ms); }
.vida-atado.vida-in .f { transform: scale(1); transition: transform var(--vida-dur) var(--vida-ease); transition-delay: calc(.55s + var(--i) * 70ms); }
.vida-atado.vida-in .c { stroke-dashoffset: 0; transition: stroke-dashoffset .9s ease-in-out 1.15s; }

/* --- Lámina provisional de las piezas nuevas --------------------------- */
.vida-falta { position: absolute; right: 10px; top: 10px; z-index: 3; font-family: var(--f-mono); font-size: 11px; background: var(--blanco); color: var(--tinta); padding: .3em .6em; border-radius: 4px; box-shadow: 0 0 0 1px var(--zinc-3); }

/* --- Movimiento reducido: todo en su sitio, sin animar ----------------- */
@media (prefers-reduced-motion: reduce) {
  .vida-tit .vwi, [data-vida-cab] > *, .js .vida-lista:not(.vida-in) > *, .vida-atado .t, .vida-atado .f, .vida-atado .c { transform: none !important; clip-path: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; transition: none !important; }
  .vida-anillos:not(.vida-in) .rp-pz-A, .vida-anillos:not(.vida-in) .rp-pz-B, .vida-anillos:not(.vida-in) .rp-m30 { transform: none; }
  .vida-anillos:not(.vida-in) .rp-pz-C { opacity: 1; }
  .vida-plano .ema-sala *, .paso.vida-brota, .confirma.vida-brota { animation: none !important; }
  .vida-capa-fondo, .vida-capa-etq { transform: none !important; }
}
.confirma:has(.vida-atado) .confirma-sello { display: none; }

/* ---------- Plantas: cabecera con foto y vídeo; la ficha del hospital queda clavada encima ---------- */
.pl-hero { align-items: center; }
.pl-hero-vis { position: relative; display: grid; gap: 0; }
.pl-hero-fig { border-radius: 6px; box-shadow: 0 0 0 2px var(--tinta); }
.pl-hero-vis .ficha-hosp { position: relative; z-index: 4; width: min(100%, 340px); margin: -56px 0 0 -6px; }
.pl-hero-vis .ficha-hosp li { padding: 6px 0; }
.pl-hero-vis .ficha-hosp li b { font-size: 1.5rem; }
@media (min-width: 960px) {
  .pl-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .pl-hero-vis { padding-bottom: 8px; }
  .pl-hero-vis .ficha-hosp { margin: -110px 0 0 -20px; }
}

/* ---------- Flor fija: cada entrega del calendario lleva su foto de temporada ---------- */
.entrega .entrega-fig { width: 100%; aspect-ratio: 1; border-radius: 50%; margin: 0 0 10px; box-shadow: 0 0 0 3px rgba(255,255,255,.55); }
.entrega .entrega-fig .ph-img { transition: transform .9s var(--ease), opacity .9s var(--ease); }
.entrega:hover .entrega-fig .ph-img { transform: scale(1.06) rotate(-2deg); }
@media (prefers-reduced-motion: reduce) { .entrega:hover .entrega-fig .ph-img { transform: none; } }
.entrega .entrega-fig canvas { margin: 0; border-radius: 0; background: none; }

/* ---------- La pared con fotos reales: cada cubo visto desde arriba, recortado en círculo sobre el dibujo ---------- */
.ini-pared .cubo-img { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 50%; opacity: 0; z-index: 1; pointer-events: none;
  box-shadow: 0 0 0 2px #8C918D, 0 6px 6px -2px rgba(26,23,20,.3); transition: opacity .6s var(--ease), transform .4s var(--ease-b); }
.ini-pared .cubo.has-foto .cubo-img { opacity: 1; }
.ini-pared .cubo.has-foto canvas { visibility: hidden; }
.ini-pared .cubo:hover .cubo-img, .ini-pared .cubo:focus-visible .cubo-img { transform: translateY(-6px) rotate(-4deg) scale(1.05); }
.ini-pared .cubo.is-elegido .cubo-img { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--tinta), 0 6px 6px -2px rgba(26,23,20,.3); }
.ini-pared .cubo.is-pulso .cubo-img { animation: pulso .45s var(--ease-b); }
.ini-pared .cubo-etq, .ini-pared .cubo-n { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .ini-pared .cubo:hover .cubo-img, .ini-pared .cubo:focus-visible .cubo-img { transform: none; } }
.ini-tramo.is-foco .cubo .cubo-img { animation: ini-brilla 1.6s var(--ease); }
.ini-pared .cubo.is-vacio.has-foto .cubo-img { filter: grayscale(.6); opacity: .6; }
