/* Modelo 3D de «Construimos de otra manera». Reemplaza la imagen del modelo explotado. */
/* el texto y el modelo se quedan fijos mientras la casa se separa */
.ce-pin { grid-column: 1 / -1; position: relative; height: 280vh; }
.ce-escena {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; gap: var(--s-7, 48px);
  padding: calc(var(--barra-alto, 56px) + 20px) 0 20px;
}
.cons .ce.cons__modelo { display: block; margin: 0; position: relative; }
.ce-caja { position: relative; width: 100%; height: min(calc(100svh - 190px), 64vw); }
.ce-caja canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }

/* rótulos al lado de cada capa */
.ce-rotulos { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.ce-rotulos button {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: none; cursor: pointer;
  font: 600 11px/1.2 var(--f-display, inherit); letter-spacing: .12em; text-transform: uppercase; color: rgb(248 247 243 / .62); white-space: nowrap;
  transition: color .25s ease;
}
.ce-rotulos button::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.ce-rotulos button.destacada { color: var(--marfil, #f8f7f3); }
.ce-rotulos button.destacada::after { content: '+'; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--acento, #6f8f3b); color: #fff; font-size: 13px; letter-spacing: 0; }
.ce-rotulos button:hover, .ce-rotulos button:focus-visible { color: var(--acento, #8fb55a); }

/* ficha de la capa elegida */
.ce-ficha {
  position: absolute; left: 0; bottom: 4%; z-index: 3; width: min(360px, 92%);
  padding: 20px 22px 22px; border-radius: var(--r-tarjeta, 10px); border: 1px solid rgb(248 247 243 / .12);
  background: rgb(10 18 27 / .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--marfil, #f8f7f3); box-shadow: 0 24px 60px rgb(0 0 0 / .4);
  animation: ce-entra .45s cubic-bezier(.22, .9, .28, 1);
}
.ce-ficha[hidden] { display: none; }
@keyframes ce-entra { from { opacity: 0; transform: translateY(12px); } }
.ce-ficha-r { margin: 0 0 8px; font: 600 11px/1.2 var(--f-display, inherit); letter-spacing: .16em; text-transform: uppercase; color: var(--acento, #8fb55a); }
.ce-ficha-t { margin: 0; font: 700 clamp(20px, 2vw, 26px)/1.1 var(--f-display, inherit); text-transform: uppercase; letter-spacing: .01em; }
.ce-ficha-d { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: rgb(248 247 243 / .78); }
.ce-ficha-l { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ce-ficha-l:empty { display: none; }
.ce-ficha-l li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.45; }
.ce-ficha-l li::before { content: ''; position: absolute; left: 2px; top: .3em; width: 14px; height: 14px; border-radius: 50%; background: var(--acento, #6f8f3b) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.ce-cerrar { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgb(248 247 243 / .2); background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.ce-cerrar:hover, .ce-cerrar:focus-visible { border-color: var(--acento, #6f8f3b); }

/* elegir desde botones (sirve también en celular) */
.ce-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 10px; }
.ce-pista { margin: 0 6px 0 0; font-size: 14px; color: rgb(248 247 243 / .62); }
.ce-pie button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgb(248 247 243 / .28); background: none; cursor: pointer;
  color: var(--marfil, #f8f7f3); font: 500 14px/1 var(--f-ui, inherit); transition: border-color .2s ease, background .2s ease;
}
.ce-pie button:hover, .ce-pie button:focus-visible { border-color: var(--acento, #6f8f3b); }
.ce-pie button[aria-pressed="true"] { background: var(--acento, #6f8f3b); border-color: var(--acento, #6f8f3b); }
.ce-ilus { margin: 10px 0 0; font-size: 12px; color: rgb(248 247 243 / .45); }

/* sin WebGL: se queda la imagen original */
.ce-respaldo { display: none; width: 100%; height: auto; }
.ce-sin3d .ce-respaldo { display: block; }
.ce-sin3d .ce-caja, .ce-sin3d .ce-pie { display: none; }

@media (max-width: 47.99em) {
  .ce-pin { height: 260vh; }
  .ce-escena { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 8px; padding-bottom: 12px; }
  .ce-escena .eco-bajada, .ce-escena .cons__accion { display: none; }
  .cons .ce.cons__modelo { display: flex; flex-direction: column; min-height: 0; }
  .ce-caja { flex: 1; height: auto; min-height: 0; }
  .ce-rotulos { display: none; }
  .ce-ficha { left: 0; right: 0; bottom: 0; width: 100%; padding: 16px 18px 18px; }
  .ce-ficha-l li { font-size: 14px; }
  .ce-ficha-l li:last-child { padding-right: 60px; }
  .ce-pista { width: 100%; font-size: 13px; }
  .ce-ilus { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ce-ficha { animation: none; } }
