/* Maison Zera · El viaje de la semilla (módulo compartido de las tres propuestas v2, 27-nov-2026).
   Escenario fijo dentro de una sección de 600vh: semilla, raíces, brote, hojas con fotos reales y flor.
   La semilla como hilo: separadores que germinan, cursor semilla, esquinas que brotan y pie que germina. */
.vj {
  --vj-crema: #F4F1E9; --vj-crema-2: #ECE7DB; --vj-taupe: #C9BFAD; --vj-terra: #BC7551; --vj-oliva: #4B4737;
  --vj-carbon: #37352E; --vj-gris: #6E6A5E; --vj-top: 76px;
  position: relative; height: 600vh; background: var(--vj-crema); color: var(--vj-carbon);
}
.vj-esc {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr);
  align-items: center; gap: clamp(20px, 4vw, 64px);
  padding: calc(var(--vj-top) + 12px) max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px));
  background: radial-gradient(120% 80% at 70% 70%, #EFE9DC 0%, var(--vj-crema) 60%);
}
.vj-izq { min-width: 0; max-width: 520px; justify-self: end; width: 100%; display: grid; gap: 22px; }
.vj-rot { font-family: "Jost", system-ui, sans-serif; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--vj-gris); }
.vj-caps { position: relative; height: 300px; }
.vj-cap { position: absolute; inset: 0 0 auto 0; display: grid; gap: 14px; align-content: start; opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.vj-cap.on { opacity: 1; transform: none; pointer-events: auto; }
.vj-n { font-family: "Jost", system-ui, sans-serif; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--vj-terra); }
.vj-cap h3 { margin: 0; font-family: "Jost", system-ui, sans-serif; font-weight: 300; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(28px, 3.4vw, 52px); line-height: 1.04; text-wrap: balance; }
.vj-cap h3 em, .vj-fin em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; text-transform: none; letter-spacing: 0; color: var(--vj-terra); font-weight: 400; }
.vj-cap p { margin: 0; max-width: 42ch; color: var(--vj-oliva); font-size: 16.5px; line-height: 1.6; }
.vj-cap .vj-fin { font-size: clamp(26px, 3vw, 44px); }
.vj-btn { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-family: "Jost", system-ui, sans-serif; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding: 13px 22px; border-radius: 999px; background: var(--vj-carbon); color: var(--vj-crema); transition: background .25s; }
.vj-btn:hover { background: var(--vj-terra); }
.vj-btn:focus-visible, .vj-ind button:focus-visible { outline: 2px solid var(--vj-terra); outline-offset: 3px; }
.vj-der { min-width: 0; min-height: 0; align-self: stretch; width: 100%; position: relative; }
.vj-der svg { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; max-width: 640px; max-height: 720px; overflow: visible; }
/* La planta de papel de Lily: un lienzo sobre el dibujo; viaje.js lo coloca y lo mueve */
.vj-planta { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.vj-ind { position: absolute; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; z-index: 2; }
.vj-ind button { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; background: none; border: 0; padding: 4px 0; cursor: pointer; font-family: "Jost", system-ui, sans-serif; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--vj-gris); }
.vj-ind i { width: 8px; height: 8px; border-radius: 50%; background: var(--vj-taupe); transition: background .3s, transform .3s; }
.vj-ind button.on { color: var(--vj-carbon); }
.vj-ind button.on i { background: var(--vj-terra); transform: scale(1.35); }
.vj-ind span { opacity: 0; transition: opacity .3s; }
.vj-ind button.on span, .vj-ind button:hover span { opacity: 1; }
.vj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Movimiento ambiente: la semilla respira en reposo y los pétalos se mecen al final */
.vj-flota { animation: vj-flota 4.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes vj-flota { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
.vj-mece { animation: vj-mece 6s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 300px 150px; }
@keyframes vj-mece { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.vj.fuera *, .vj-sep.fuera *, .vj-pie.fuera * { animation-play-state: paused !important; }
/* Sin movimiento: planta completa y todo el texto, sin escenario fijo */
.vj.quieto { height: auto; }
.vj.quieto .vj-esc { position: relative; height: auto; min-height: 100svh; }
.vj.quieto .vj-caps { height: auto; display: grid; gap: 30px; }
.vj.quieto .vj-cap { position: static; opacity: 1; transform: none; pointer-events: auto; }
.vj.quieto .vj-ind { display: none; }
.vj.quieto .vj-flota, .vj.quieto .vj-mece { animation: none; }

/* Separador: una semilla que echa brote al entrar en pantalla */
.vj-sep { height: 64px; display: grid; place-items: center; pointer-events: none; }
.vj-sep svg { width: 64px; height: 64px; overflow: visible; }
.vj-sep .tallo, .vj-pie .tallo { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.7,.2,1) .2s; }
.vj-sep .hoja, .vj-pie .hoja { transform: scale(0); transform-box: fill-box; transform-origin: bottom left; transition: transform .8s cubic-bezier(.2,.7,.2,1) 1.1s; }
.vj-sep .hoja.d, .vj-pie .hoja.d { transform-origin: bottom right; transition-delay: 1.3s; }
.vj-sep.vivo .tallo, .vj-pie.vivo .tallo { stroke-dashoffset: 0; }
.vj-sep.vivo .hoja, .vj-pie.vivo .hoja { transform: scale(1); }
.vj-pie { height: 96px; display: grid; place-items: center; pointer-events: none; }
.vj-pie svg { width: 90px; height: 96px; overflow: visible; }
.vj-pie .boton { transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .7s cubic-bezier(.2,.7,.2,1) 1.6s; }
.vj-pie.vivo .boton { transform: scale(1); }

/* Esquina que se dobla como hoja y asoma un brote en las fotos de los casos */
.vj-card-f { position: relative; }
.vj-brote { position: absolute; right: 0; bottom: 0; width: 26%; max-width: 92px; aspect-ratio: 1; pointer-events: none; z-index: 3; }
.vj-brote .esq { position: absolute; right: 0; bottom: 0; width: 0; aspect-ratio: 1; background: linear-gradient(135deg, transparent 50%, rgba(244,241,233,.97) 50%, #E3DCCD 78%); clip-path: polygon(100% 0, 0 100%, 100% 100%); box-shadow: -4px -4px 10px -6px rgba(0,0,0,.35); transition: width .45s cubic-bezier(.2,.7,.2,1); }
.vj-brote svg { position: absolute; right: 8%; bottom: 8%; width: 46%; height: 46%; overflow: visible; }
.vj-brote .tallo { stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .5s cubic-bezier(.2,.7,.2,1) .2s; }
.vj-brote .hoja { transform: scale(0); transform-box: fill-box; transform-origin: bottom left; transition: transform .4s cubic-bezier(.2,.7,.2,1) .55s; }
.vj-card:hover .vj-brote .esq, .vj-card:focus-visible .vj-brote .esq { width: 100%; }
.vj-card:hover .vj-brote .tallo, .vj-card:focus-visible .vj-brote .tallo { stroke-dashoffset: 0; }
.vj-card:hover .vj-brote .hoja, .vj-card:focus-visible .vj-brote .hoja { transform: scale(1); }

/* Cursor semilla (solo puntero fino) */
.vj-cursor { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 70; opacity: 0; transition: opacity .25s; }
.vj-cursor.on { opacity: 1; }
.vj-cursor i { position: absolute; left: 0; top: 0; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; box-sizing: border-box;
  background: #F4F1E9; border: 1.2px solid #BC7551; display: grid; place-items: center;
  transition: width .375s cubic-bezier(.625,.05,0,1), height .375s cubic-bezier(.625,.05,0,1), background-color .375s cubic-bezier(.625,.05,0,1), border-color .375s; }
.vj-cursor svg { width: 13px; height: 13px; transition: opacity .25s; }
.vj-cursor.sobre i { width: 64px; height: 64px; background: rgba(188, 117, 81, .18); border-color: rgba(188, 117, 81, .55); }
.vj-cursor.sobre svg { opacity: 0; }

@media (max-width: 820px) {
  .vj { --vj-top: 64px; }
  .vj-esc { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding-bottom: 20px; align-items: stretch; }
  .vj-der { order: -1; max-height: none; }
  .vj-izq { justify-self: stretch; max-width: none; gap: 10px; }
  .vj-caps { height: 214px; }
  .vj-cap h3 { font-size: clamp(24px, 7vw, 34px); }
  .vj-cap p { font-size: 15px; }
  .vj-cap .vj-fin { font-size: clamp(22px, 6.4vw, 30px); }
  .vj-der svg { top: 30px; height: calc(100% - 30px); }
  .vj-ind { top: calc(var(--vj-top) + 14px); left: 50%; right: auto; transform: translateX(-50%); display: flex; gap: 14px; }
  .vj-ind span { display: none; }
  .vj.quieto .vj-caps { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .vj-flota, .vj-mece { animation: none !important; }
  .vj-cap { transition: none; }
}

/* Ramas del viaje: etiquetas de papel que abren cada servicio */
.vj-rama { cursor: pointer; }
.vj-rama rect { transition: fill .3s, stroke .3s; }
.vj-rama:hover rect { fill: #BC7551; stroke: #BC7551; }
.vj-rama:hover text { fill: #F4F1E9; }
