/* ============================================================================
   FOTOGRAFÍA · «EL REVELADO» (LAB, 2026-10-09 · v2)
   Una foto real se construye ante el usuario. La luz no se agrega: la emite el
   propio trabajo (el arco de soldadura). Oscuridad → el arco enciende la escena
   → el encuadre deja fuera lo que sobra → el foco cae en la mano y el arco →
   la toma se ramifica en los tres formatos donde trabaja.
   Sin JS / reduced-motion: estado final.
   ========================================================================== */

[data-rh-ft="escena"] .ft-rev {
  --ls: 14;        /* pozo de luz */
  --fr: 1;         /* encuadre: 0 abierto → 1 cerrado */
  --fo: 1;         /* foco: profundidad de campo */
  --ds: 1;         /* destino: 0 foto completa → 1 ramificada */
  position: relative;
  padding: clamp(56px, 7vw, 96px) 0;
  background: radial-gradient(60% 55% at 70% 55%, rgba(40, 110, 200, 0.10), transparent 70%), #05080d;
  color: #f4f7fa;
}
[data-rh-ft="escena"] .ft-rev.ft-ready { height: calc(100svh + 200vh); padding: 0; }
[data-rh-ft="escena"] .ft-pin { position: relative; }
[data-rh-ft="escena"] .ft-ready .ft-pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding-top: 56px; overflow: hidden; }

[data-rh-ft="escena"] .ft-grid {
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 3vw, 32px);
  display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.4fr; grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 72px); row-gap: 28px; align-items: start;
}
[data-rh-ft="escena"] .ft-copy { grid-column: 1; grid-row: 1; align-self: end; }
[data-rh-ft="escena"] .ft-copy .rh-h2 { margin-bottom: 0; font-size: clamp(24px, 2.5vw, 36px); }
[data-rh-ft="escena"] .ft-stage { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: center; }
[data-rh-ft="escena"] .ft-steps { grid-column: 1; grid-row: 2; }

/* --- Pasos ----------------------------------------------------------------- */
[data-rh-ft="escena"] .ft-steps { margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 1px solid rgba(243, 234, 216, 0.14); position: relative; }
[data-rh-ft="escena"] .ft-step { padding: 9px 0; }
[data-rh-ft="escena"] .ft-step b { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #f2a56b; }
[data-rh-ft="escena"] .ft-step span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.45; color: rgba(244, 247, 250, 0.82); }
[data-rh-ft="escena"] .ft-ready .ft-step { opacity: 0.34; transition: opacity 0.35s ease; }
[data-rh-ft="escena"] .ft-ready .ft-step.is-current { opacity: 1; }
[data-rh-ft="escena"] .ft-ready .ft-step.is-done { opacity: 0.55; }
[data-rh-ft="escena"] .ft-ready .ft-step span { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
[data-rh-ft="escena"] .ft-ready .ft-step.is-current span { max-height: 4.5em; }
[data-rh-ft="escena"] .ft-steps::before {
  content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: 100%; background: #f26a1b;
  transform-origin: 0 0; transform: scaleY(var(--ft-p, 1));
}

/* --- Escenario (escritorio): cuadro vertical; en destino cede espacio a la derecha --- */
[data-rh-ft="escena"] .ft-stage {
  --ft-branch: side; --shrink: 0.74;
  position: relative; margin: 0; aspect-ratio: 1 / 1; height: min(74svh, 720px); max-width: 100%;
}
[data-rh-ft="escena"] .ft-photo {
  position: absolute; top: 0; bottom: 0; left: 10%; width: 80%; overflow: hidden; border-radius: 4px; background: #020305;
  transform-origin: 0 50%;
  transform: translateX(calc(var(--ds) * -12.5%)) scale(calc(1 - var(--ds) * (1 - var(--shrink))));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
}
[data-rh-ft="escena"] .ft-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

/* profundidad de campo: el fondo se desenfoca, la mano y el arco quedan nítidos (máscara estática) */
[data-rh-ft="escena"] .ft-img--sharp { z-index: 0; }
[data-rh-ft="escena"] .ft-img--soft {
  z-index: 1; filter: blur(5px); transform: scale(1.03); opacity: calc(var(--fo) * (1 - var(--ds)) * 0.9);
  -webkit-mask-image: radial-gradient(circle at var(--af-x, 57%) var(--af-y, 67%), transparent 0 17%, #000 40%);
  mask-image: radial-gradient(circle at var(--af-x, 57%) var(--af-y, 67%), transparent 0 17%, #000 40%);
}
[data-rh-ft="escena"] .ft-dark, [data-rh-ft="escena"] .ft-frame, [data-rh-ft="escena"] .ft-af, [data-rh-ft="escena"] .ft-tag { z-index: 2; }

/* oscuridad con un pozo de luz que nace en el arco: solo transform */
[data-rh-ft="escena"] .ft-dark {
  position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; margin: -50% 0 0 -50%; pointer-events: none;
  background: radial-gradient(circle closest-side, rgba(2, 3, 5, 0) 0%, rgba(2, 3, 5, 0) 10%, rgba(2, 3, 5, 0.6) 18%, rgba(2, 3, 5, 0.98) 30%);
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--ls)); will-change: transform;
}
[data-rh-ft="escena"] .ft-rev:not(.ft-ready) .ft-dark { display: none; }

/* encuadre */
[data-rh-ft="escena"] .ft-frame {
  position: absolute; inset: 9% 9% 7%; pointer-events: none; opacity: var(--fr);
  box-shadow: 0 0 0 100vmax rgba(2, 3, 5, 0.5);
  transform: scale(calc(1.3 - 0.3 * var(--fr)));
}
[data-rh-ft="escena"] .ft-frame i { position: absolute; width: 22px; height: 22px; border: 0 solid #f26a1b; }
[data-rh-ft="escena"] .ft-frame i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
[data-rh-ft="escena"] .ft-frame i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
[data-rh-ft="escena"] .ft-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
[data-rh-ft="escena"] .ft-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }

/* punto de foco: la mano y el arco */
[data-rh-ft="escena"] .ft-af {
  position: absolute; left: var(--af-x, 57%); top: var(--af-y, 67%); width: 18%; aspect-ratio: 1; margin: -9% 0 0 -9%;
  border: 1.5px solid rgba(243, 234, 216, 0.9); border-radius: 3px; pointer-events: none;
  opacity: 0; transform: scale(1.4); transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease;
}
[data-rh-ft="escena"] .ft-rev.is-focusing .ft-af { opacity: 1; transform: scale(1); }
[data-rh-ft="escena"] .ft-rev.is-focused .ft-af { border-color: #f26a1b; box-shadow: 0 0 0 4px rgba(242, 106, 27, 0.18); }
[data-rh-ft="escena"] .ft-rev.is-dest .ft-af { opacity: 0; }

[data-rh-ft="escena"] .ft-tag {
  position: absolute; left: 12px; top: 12px; display: flex; gap: 10px; align-items: baseline;
  padding: 6px 10px; border-radius: 3px; background: rgba(2, 3, 5, 0.66); font-size: 12px; pointer-events: none;
}
[data-rh-ft="escena"] .ft-tag b { font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #f2a56b; }
[data-rh-ft="escena"] .ft-tag em { font-style: normal; color: rgba(244, 247, 250, 0.82); }
[data-rh-ft="escena"] .ft-rev.is-dest .ft-tag, [data-rh-ft="escena"] .ft-rev:not(.ft-ready) .ft-tag { display: none; }

/* --- Destino: la toma se ramifica en sus formatos -------------------------- */
[data-rh-ft="escena"] .ft-branches { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
[data-rh-ft="escena"] .ft-branches path { fill: none; stroke: rgba(242, 106, 27, 0.75); stroke-width: 1.5; stroke-linecap: round; }
[data-rh-ft="escena"] .ft-uses {
  position: absolute; right: 0; top: 0; bottom: 0; width: 28%; margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
}
[data-rh-ft="escena"] .ft-use { width: 100%; display: flex; flex-direction: column; align-items: flex-start; opacity: var(--u, 1); transform: translateX(calc((1 - var(--u, 1)) * 14px)); }
[data-rh-ft="escena"] .ft-use__img { display: block; width: var(--w); aspect-ratio: var(--ar); overflow: hidden; border-radius: 3px; outline: 1px solid rgba(243, 234, 216, 0.22); background: #0b1118; }
[data-rh-ft="escena"] .ft-use__img img { width: 100%; height: 100%; object-fit: cover; object-position: var(--op); display: block; }
[data-rh-ft="escena"] .ft-use b { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; line-height: 1.1; }
[data-rh-ft="escena"] .ft-use i { font-style: normal; font-size: 12px; color: rgba(244, 247, 250, 0.66); line-height: 1.3; }

/* --- Móvil: foto vertical a todo el cuadro; los formatos nacen debajo ------ */
@media (max-width: 860px) {
  [data-rh-ft="escena"] .ft-grid { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 14px; }
  [data-rh-ft="escena"] .ft-copy, [data-rh-ft="escena"] .ft-stage, [data-rh-ft="escena"] .ft-steps { grid-column: 1; grid-row: auto; }
  [data-rh-ft="escena"] .ft-stage { --ft-branch: below; --shrink: 0.66; aspect-ratio: 4 / 5; height: auto; width: 100%; max-height: 56svh; max-width: calc(56svh * 0.8); }
  [data-rh-ft="escena"] .ft-photo { left: 0; width: 100%; transform-origin: 50% 0; transform: scale(calc(1 - var(--ds) * (1 - var(--shrink)))); }
  [data-rh-ft="escena"] .ft-uses { top: auto; left: 0; width: auto; height: 27%; flex-direction: row; justify-content: center; align-items: flex-end; gap: 8px; }
  [data-rh-ft="escena"] .ft-use { width: auto; height: 100%; transform: translateY(calc((1 - var(--u, 1)) * 14px)); }
  [data-rh-ft="escena"] .ft-use__img { width: auto; height: calc(100% - 32px); }
  [data-rh-ft="escena"] .ft-use b, [data-rh-ft="escena"] .ft-use i { font-size: 10.5px; }
  [data-rh-ft="escena"] .ft-frame { inset: 7% 8%; }
  [data-rh-ft="escena"] .ft-ready .ft-pin { align-items: flex-start; padding-top: 76px; }
  [data-rh-ft="escena"] .ft-copy .rh-eyebrow { margin-bottom: 6px; }
  [data-rh-ft="escena"] .ft-copy .rh-h2 { font-size: 20px; }
  [data-rh-ft="escena"] .ft-ready .ft-steps { border-left: 0; padding: 0; min-height: 4.6em; }
  [data-rh-ft="escena"] .ft-ready .ft-steps::before { display: none; }
  [data-rh-ft="escena"] .ft-ready .ft-step { display: none; padding: 0; }
  [data-rh-ft="escena"] .ft-ready .ft-step.is-current { display: block; }
  [data-rh-ft="escena"] .ft-ready .ft-step span { max-height: none; }
  [data-rh-ft="escena"] .ft-tag { left: 8px; top: 8px; font-size: 11px; }
}
@media (max-width: 720px) and (max-height: 740px) {
  [data-rh-ft="escena"] .ft-ready .ft-copy .rh-eyebrow { display: none; }
  [data-rh-ft="escena"] .ft-copy .rh-h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-rh-ft="escena"] .ft-rev *, [data-rh-ft="escena"] .ft-rev *::before { transition: none !important; animation: none !important; }
}
