/* ============================================================
   Estudio 3D · del modelo al render final (portado de Vantus Academy).
   Línea visual Vantus: azul #00337E / #001F4D, dorado #FFB300.
   26/11/2026 · Ing. Víctor Marín · ing.victorjm@gmail.com
   ============================================================ */
.e3 {
  --e3-azul: #00337E;
  --e3-noche: #001F4D;
  --e3-dorado: #FFB300;
  --e3-dorado-claro: #FFC94D;
  --e3-dorado-oscuro: #8a5f00; /* dorado legible sobre fondo claro */
  --e3-fondo: #f5f3ee;
  --e3-tarjeta: #ffffff;
  --e3-borde: #dcd8cf;
  --e3-texto: #0d1b33;
  --e3-suave: #4a5568;
  --e3-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --e3-serif: "Playfair Display", Georgia, serif;
  --e3-cursiva: "Cormorant Garamond", Georgia, serif;
  --e3-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: block;
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  background: var(--e3-fondo);
  color: var(--e3-texto);
  font-family: var(--e3-sans);
  overflow: hidden;
}
.e3 *, .e3 *::before, .e3 *::after { box-sizing: border-box; }
.e3 p, .e3 h2, .e3 dl, .e3 dd, .e3 figure, .e3 ul { margin: 0; }
.e3 button { font: inherit; color: inherit; cursor: pointer; }
.e3 :focus-visible { outline: 3px solid var(--e3-azul); outline-offset: 2px; }
.e3-contenedor { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Cabecera */
.e3-cab { display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 1024px) { .e3-cab { grid-template-columns: minmax(0, 1fr) auto; } }
.e3-ceja { display: flex; align-items: center; gap: .55rem; font: 600 .72rem/1.3 var(--e3-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--e3-suave); }
.e3-ceja span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--e3-dorado); box-shadow: 0 0 0 4px rgba(255, 179, 0, .2); }
.e3-titulo { margin-top: .8rem; font: 400 clamp(2rem, 4.4vw, 3.4rem)/1.05 var(--e3-serif); letter-spacing: -.015em; color: var(--e3-noche); }
.e3-titulo em { white-space: nowrap; font: italic 500 1.08em/1.05 var(--e3-cursiva); color: var(--e3-azul); background: linear-gradient(transparent 72%, rgba(255, 179, 0, .45) 72%); }
.e3-intro { margin-top: 1rem; max-width: 42rem; font-size: 1rem; line-height: 1.65; color: var(--e3-suave); }
.e3-sello { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; border: 1px solid var(--e3-borde); border-radius: 14px; background: var(--e3-tarjeta); }
.e3-sello img { width: 44px; height: 44px; }
.e3-sello p { font-size: .9rem; font-weight: 600; }
.e3-sello small { display: block; margin-top: .15rem; font: 500 .7rem/1.2 var(--e3-mono); color: var(--e3-suave); }

/* Pestañas */
.e3-tabs { margin-top: 2.4rem; display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.e3-tabs::-webkit-scrollbar { display: none; }
.e3-tabs button {
  flex: none; min-height: 2.75rem; padding: .55rem 1.1rem; border: 1px solid var(--e3-borde); border-radius: 999px;
  background: var(--e3-tarjeta); font-size: .9rem; font-weight: 600; color: var(--e3-suave);
  transition: background-color .3s, border-color .3s, color .3s;
}
.e3-tabs button:hover { border-color: var(--e3-azul); color: var(--e3-texto); }
.e3-tabs button[aria-selected="true"] { background: var(--e3-noche); border-color: var(--e3-noche); color: #fff; box-shadow: inset 0 -3px 0 var(--e3-dorado); }

/* Panel */
.e3-panel { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .e3-panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.e3-entra > * { animation: e3-entra .6s cubic-bezier(.16, 1, .3, 1) both; }
.e3-entra > * + * { animation-delay: .08s; }
@keyframes e3-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.e3-modos { margin-bottom: .75rem; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; border: 1px solid var(--e3-borde); border-radius: 12px; background: var(--e3-tarjeta); }
.e3-modos button { min-height: 2.5rem; padding: .5rem .75rem; border: 0; border-radius: 9px; background: transparent; font-size: .84rem; font-weight: 600; color: var(--e3-suave); transition: background-color .3s, color .3s; }
.e3-modos button:hover { color: var(--e3-texto); }
.e3-modos button[aria-pressed="true"] { background: var(--e3-azul); color: #fff; }

/* Comparador arrastrable */
.e3-comp {
  position: relative; aspect-ratio: 4 / 5; width: 100%; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--e3-borde); background: #0f1a2e; cursor: ew-resize; touch-action: pan-y;
}
.e3-comp img, .e3-portada img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.e3-comp-der { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.e3-rot {
  position: absolute; top: .8rem; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .65rem; border-radius: 8px;
  font: 600 .7rem/1 var(--e3-mono); letter-spacing: .08em; text-transform: uppercase; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.e3-rot-izq { left: .8rem; background: #fff; color: #0d1b33; }
.e3-rot-der { right: .8rem; background: var(--e3-noche); color: #fff; }
.e3-linea { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; transform: translateX(-50%); background: var(--e3-dorado); pointer-events: none; }
.e3-linea span {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; transform: translate(-50%, -50%);
  border: 2px solid var(--e3-dorado); border-radius: 50%; background: var(--e3-noche); color: var(--e3-dorado); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .3s;
}
.e3-comp:active .e3-linea span { transform: translate(-50%, -50%) scale(1.1); }
.e3-rango { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.e3-comp:has(.e3-rango:focus-visible) { box-shadow: 0 0 0 4px rgba(0, 51, 126, .55); }
.e3-portada { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--e3-borde); background: #0f1a2e; }
.e3-portada img { transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.e3-portada:hover img { transform: scale(1.03); }

/* Ficha y mosaico */
.e3-lado { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.e3-ficha { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--e3-borde); border-radius: 12px; background: var(--e3-borde); }
.e3-ficha > div { padding: .75rem .9rem; background: var(--e3-tarjeta); }
.e3-ficha dt { font: 600 .64rem/1.2 var(--e3-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--e3-suave); }
.e3-ficha dd { margin-top: .3rem; font-size: .86rem; font-weight: 600; line-height: 1.3; }
.e3-mosaico { list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .e3-mosaico { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .e3-mosaico { flex: 1; grid-template-rows: repeat(2, minmax(0, 1fr)); } }
.e3-mosaico--pocas { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-template-rows: none !important; }
.e3-mosaico li { min-height: 0; }
.e3-vista {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--e3-borde); border-radius: 12px; background: var(--e3-tarjeta); transition: border-color .3s, box-shadow .3s;
}
.e3-vista:hover { border-color: var(--e3-azul); box-shadow: 0 10px 24px rgba(0, 31, 77, .12); }
.e3-vista-img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #0f1a2e; }
.e3-mosaico--pocas .e3-vista-img { aspect-ratio: 3 / 4; }
@media (min-width: 1024px) { .e3-mosaico:not(.e3-mosaico--pocas) .e3-vista-img { aspect-ratio: auto; flex: 1; min-height: 0; } }
.e3-vista-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.e3-vista:hover .e3-vista-img img { transform: scale(1.05); }
.e3-mas { position: absolute; right: .5rem; bottom: .5rem; padding: .3rem .55rem; border-radius: 6px; background: var(--e3-noche); font: 600 .7rem/1 var(--e3-mono); color: var(--e3-dorado-claro); }
.e3-vista-pie { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .75rem; border-top: 1px solid var(--e3-borde); }
.e3-vista-pie span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 600; }
.e3-vista-pie small { flex: none; font: 600 .62rem/1 var(--e3-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--e3-azul); }
@media (max-width: 1279px) { .e3-vista-pie small { display: none; } }
.e3-pie { margin-top: 1.5rem; font-size: .8rem; line-height: 1.6; color: var(--e3-suave); }

/* Visor */
.e3-visor { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.e3-visor::backdrop { background: rgba(2, 10, 26, .95); }
.e3-visor-cuerpo { display: grid; place-items: center; width: 100%; height: 100%; padding: 1.5rem 1rem; }
@media (min-width: 640px) { .e3-visor-cuerpo { padding: 1.5rem 4.5rem; } }
.e3-visor figure { display: flex; flex-direction: column; align-items: center; gap: .9rem; max-width: 100%; }
.e3-visor-img { position: relative; }
.e3-visor-img img { display: block; width: auto; height: auto; max-width: 100%; max-height: 78dvh; border-radius: 10px; animation: e3-entra .5s cubic-bezier(.16, 1, .3, 1) both; }
.e3-visor figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: min(48rem, 100%); padding-top: .7rem; border-top: 2px solid rgba(255, 179, 0, .75); }
.e3-visor-t { font: 400 1.05rem/1.2 var(--e3-serif); }
.e3-visor-p { margin-top: .15rem; font-size: .75rem; color: rgba(255, 255, 255, .7); }
.e3-visor-n { flex: none; font: 600 .75rem/1 var(--e3-mono); letter-spacing: .1em; color: var(--e3-dorado-claro); }
.e3-cerrar, .e3-ant, .e3-sig { position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s; }
.e3-cerrar { right: 1rem; top: 1rem; border: 0; background: #fff; color: #0d1b33 !important; }
.e3-cerrar:hover { background: var(--e3-dorado); }
.e3-ant, .e3-sig { top: 50%; transform: translateY(-50%); border: 1px solid rgba(255, 255, 255, .25); background: #0d1b33; color: #fff; }
.e3-ant { left: .75rem; }
.e3-sig { right: .75rem; }
.e3-ant:hover, .e3-sig:hover { border-color: var(--e3-dorado); color: var(--e3-dorado); }
.e3 .e3-visor :focus-visible { outline-color: var(--e3-dorado); }
@media (max-width: 639px) { .e3-ant, .e3-sig { top: auto; bottom: 1rem; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .e3 *, .e3 *::before, .e3 *::after { animation: none !important; transition: none !important; }
}
