/* ============================================================
   RELEVANTE.IA — P11 · DOS CUBOS (según referencia)
   Fondo negro. Dos cubos pegados: el izquierdo (texto, blanco)
   gira HACIA ATRÁS con el scroll; el derecho (fotos b/n) gira
   HACIA DELANTE. Pin durante el giro; después la página sigue.
   ============================================================ */

.cubo-seccion {
  background: var(--ink);
  border-top: none;
  padding-block: 0;
  padding-top: 96px;
}
.cubo-cabecera {
  color: #FFFFFF;
  margin-bottom: 24px;
}
.cubo-cabecera .etiqueta { color: #D0D0D0; margin-bottom: 16px; }
.cubo-cabecera h2 { color: #FFFFFF; }
.cubo-pista { height: 420vh; position: relative; }
.cubo-escena {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: visible;      /* jamás se recorta un cuadrado en pleno giro */
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1700px;
}

/* --- geometría compartida --- */
:root {
  --cubo-w: min(360px, 33vw);
  --cubo-h: min(440px, 52vh);
}
.cubo {
  width: var(--cubo-w);
  height: var(--cubo-h);
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.cubo__cara {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* caja de sección cuadrada en el plano del giro: profundidad = alto */
.cubo__cara--frontal { transform: rotateX(0deg)   translateZ(calc(var(--cubo-h) / 2)); }
.cubo__cara--techo   { transform: rotateX(90deg)  translateZ(calc(var(--cubo-h) / 2)); }
.cubo__cara--suelo   { transform: rotateX(-90deg) translateZ(calc(var(--cubo-h) / 2)); }
.cubo__cara--dorso   { transform: rotateX(180deg) translateZ(calc(var(--cubo-h) / 2)); }

/* --- cubo de texto (izquierda) --- */
.cubo--texto .cubo__cara {
  background: #FFFFFF;
  color: var(--ink);
  padding: 26px 32px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;          /* blindaje: nada se pinta jamás fuera de la cara */
}
/* hairlines de referencia: línea horizontal + tick vertical sobre el número */
.cubo--texto .cubo__cara::before {
  content: "";
  position: absolute;
  top: 24px; left: 32px; right: 32px;
  height: 1px;
  background: var(--ink);
}
.cubo--texto .cubo__cara::after {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  width: 1px; height: 28px;
  background: var(--ink);
}
.cubo__num {
  font-size: calc(var(--cubo-h) * 0.22);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-top: 22px;
}
.cubo__titulo {
  font-size: calc(var(--cubo-h) * 0.048);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-align: center;
  max-width: 18ch;
  margin-top: 4px;
}
.cubo__filas { margin-top: auto; width: 100%; }
.cubo__fila {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 12px;
  font-size: 12.5px;
  padding-block: 6px;
  border-top: 1px solid var(--ink);
  align-items: baseline;
}
.cubo__fila:last-child { border-bottom: 1px solid var(--ink); }
.cubo__fila b { font-weight: 400; color: var(--muted); text-align: right; }
.cubo__fila i { background: var(--ink); height: 100%; }
.cubo__fila span { font-style: normal; text-align: left; }

/* --- cubo de foto (derecha) --- */
.cubo--foto .cubo__cara { padding: 0; background: #0F0F0F; }
.cubo--foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

/* canto lima: arista compartida entre las dos caras del cubo de texto */
.cubo__canto {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: rotateX(0deg) translateZ(calc(var(--cubo-h) / 2));
  transform-origin: bottom;
  opacity: 0.25;
}

.cubo-pie {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
}
.cubo-pie .boton--secundaria { color: #FFF; border-color: #FFF; }
.cubo-pie .boton--secundaria:hover { background: #FFF; color: var(--ink); }

/* ---------- Móvil / reduced-motion: paneles apilados ---------- */


/* --- móvil: UN cubo protagonista a todo el ancho (como la referencia) --- */
@media (max-width: 860px) {
  :root {
    --cubo-w: min(74vw, 340px);
    --cubo-h: min(86vw, 400px);    /* toda la tipografía y las caras escalan con estas variables */
  }
  .cubo-pie { bottom: 36px; }      /* el cubo más pequeño le deja aire por encima */
  .cubo--foto { display: none; }   /* en móvil manda un único cubo, grande */
  .cubo__canto { display: none; }  /* el canto era la costura entre los dos cubos */
  .cubo-escena { perspective: 1000px; }
}
