/* =====================================================================
   MODO 3D (prueba · 19/11/2026) — todo cuelga de body.fx3d.
   Sin esa clase (botón «3D» apagado) la presentación es la de siempre.
   ===================================================================== */

/* Escenario con perspectiva y un suelo de gradas doradas que se ve al alejarse la cámara */
body.fx3d .stage {
  perspective: 1200px; perspective-origin: 50% 50%; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 108%, rgba(201,164,108,.22), transparent 70%),
    repeating-radial-gradient(ellipse 75% 48% at 50% 112%, transparent 0 54px, rgba(201,164,108,.11) 55px 56px),
    radial-gradient(ellipse 90% 70% at 50% 0%, #26262a, #121214 75%);
}

/* Las láminas ya no se funden: se mueven en 3D */
body.fx3d .scene { opacity: 1; visibility: hidden; transition: border-radius .7s var(--ease), box-shadow .9s var(--ease); backface-visibility: hidden; transform-origin: 50% 50%; }
body.fx3d .scene.is-on, body.fx3d .scene.fx-vis { visibility: visible; }
body.fx3d.is-intro .scene { visibility: hidden; }

/* Mientras la cámara se mueve, las láminas son «pantallas» con bordes y sombra */
body.fx3d.fx-moving .scene.fx-vis {
  border-radius: 22px; overflow: hidden; will-change: transform;
  box-shadow: 0 60px 160px rgba(0,0,0,.65), 0 0 0 2px rgba(252,250,241,.10);
}

/* En el móvil no hay modo 3D ni vista general */
body.is-phone #btn3d, body.is-phone #btnOverview { display: none !important; }

/* Botón 3D del HUD */
.fx-btn { font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.fx-btn.is-on { background: var(--sand); border-color: var(--sand); color: var(--ink); }
.fx-btn.is-on:hover { background: #d8b47c; }
body.fx-overview #btnOverview { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ---- Vista general ---- */
.fx-shade, .fx-label { display: none; }
body.fx-overview .fx-shade { display: block; position: absolute; inset: 0; z-index: 40; background: rgba(18,18,20,.30); transition: background .4s; }
body.fx-overview .fx-label {
  display: block; position: absolute; left: 5%; bottom: 7%; z-index: 41; pointer-events: none;
  font-size: 78px; font-weight: 300; font-stretch: 110%; letter-spacing: .04em; text-transform: uppercase; color: var(--cream);
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
}
.fx-label b { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--sand); margin-right: .45em; text-transform: none; }
body.fx-overview .scene { cursor: pointer; }
body.fx-overview .scene * { pointer-events: none; }
body.fx-overview .scene:hover .fx-shade { background: rgba(18,18,20,0); }
body.fx3d.fx-overview.fx-moving .scene.is-on.fx-vis { box-shadow: 0 60px 160px rgba(0,0,0,.65), 0 0 0 10px var(--sand); }
body.fx-overview .keys-hint { opacity: 0; }
body.fx-overview .dock { opacity: .25; pointer-events: none; }

/* Rótulo de la vista general */
body.fx3d .stage::after {
  content: attr(data-ov); position: absolute; left: 0; right: 0; bottom: calc(var(--dock-h) + 6px); text-align: center; z-index: 9999;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--sand-2); opacity: 0; transition: opacity .6s; pointer-events: none;
}
body.fx-overview .stage::after { opacity: 1; }
