/* Galeria en carpetas: "Glass Folder Cards" de 21st.dev (MIT), estilos del original casi sin cambios.
   8 carpetas: 4 columnas en compu, 2 en tableta y telefono. */
.escritorio {
  position: relative;
  width: min(1320px, 100% - 2 * var(--margen));
  margin: clamp(28px, 5vh, 56px) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; justify-items: center;
  gap: clamp(28px, 4vw, 48px) clamp(18px, 3vw, 48px);
  padding: clamp(36px, 5vw, 64px) clamp(8px, 2vw, 28px);
}
.escritorio::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14; color: #9db8de;
  background-image: none; border-radius: 28px; }
@media (max-width: 999px) { .escritorio { grid-template-columns: repeat(2, 1fr); } }
.carpeta-celda { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gf-ver { appearance: none; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); cursor: pointer; font-size: .86rem; font-weight: 650; color: #fff; padding: 7px 16px; border-radius: 999px; transition: background-color .2s ease, transform .16s var(--ease-out); }
.gf-ver:active { transform: scale(.97); }
.gf-ver::after { content: " →"; }
@media (hover: hover) and (pointer: fine) { .gf-ver:hover { background: rgba(255, 255, 255, .18); } }

.gf-root {
  --gf-px: 0; --gf-py: 0;
  --gf-ease: cubic-bezier(.2, .8, .2, 1); --gf-spring: cubic-bezier(.34, 1.36, .5, 1);
  --gf-hinge: 0deg; --gf-lift: 42px; --gf-spread: 0px; --gf-fan: 0deg; --gf-stack: 15px;
  --gf-ink: #0b1b3a; --gf-ink-soft: rgba(11, 27, 58, .58);
  position: relative; display: inline-block; flex: none; vertical-align: top;
  font-family: var(--f); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; isolation: isolate;
}
.gf-root:hover, .gf-root:focus-within { --gf-hinge: -11deg; --gf-lift: -34px; --gf-spread: 8px; --gf-fan: 1.4deg; --gf-stack: 10px; }
.gf-root[data-open] { --gf-hinge: -24deg; --gf-lift: -96px; --gf-spread: 40px; --gf-fan: 5deg; --gf-stack: 30px; z-index: 5; }

.gf-stage { position: absolute; left: 0; top: 0; width: 340px; height: 272px; transform-origin: 0 0; }
.gf-tilt { position: absolute; inset: 0; transform: perspective(1400px) rotateX(calc(var(--gf-py) * -3deg)) rotateY(calc(var(--gf-px) * 4deg)); transition: transform .9s var(--gf-ease); }
.gf-shadow { position: absolute; left: 18px; right: 18px; bottom: -6px; height: 60px; border-radius: 40px; background: rgba(8, 20, 50, .34); filter: blur(22px);
  transform: translateX(calc(var(--gf-px) * -8px)); transition: transform .9s var(--gf-ease), opacity .9s var(--gf-ease); }
.gf-back { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #eef3fa 0%, #d9e3f1 100%); }
.gf-art { position: absolute; left: -12px; top: -12px; max-width: none; object-fit: cover;
  transform: translate(calc(var(--gf-px) * -7px), calc(var(--gf-py) * -6px)) scale(1.02);
  transition: transform 1.1s var(--gf-ease), opacity 1.2s var(--gf-ease), filter 1.2s var(--gf-ease); }
canvas.gf-art { opacity: 0; filter: blur(14px) saturate(.6); }
canvas.gf-art[data-ready] { opacity: 1; filter: none; }
.gf-back-sheen { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 22%), radial-gradient(120% 80% at 80% 0%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%); }
.gf-rim { position: absolute; left: 0; top: 0; max-width: none; overflow: visible; pointer-events: none; fill: none; }
.gf-back-rim { width: 340px; height: 272px; }
.gf-back-rim path { stroke: rgba(255, 255, 255, .45); stroke-width: 1; }

.gf-files { position: absolute; inset: 0; z-index: 5; pointer-events: none; clip-path: inset(-400px -400px 10px -400px); }
.gf-sheet-slot { display: contents; }
.gf-sheet {
  all: unset; box-sizing: border-box; position: absolute; left: 34px; top: 96px; width: 272px; height: 184px; border-radius: 16px; overflow: hidden;
  cursor: zoom-in; pointer-events: auto; background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 .5px rgba(0, 0, 0, .1), 0 10px 26px -8px rgba(10, 12, 20, .28);
  transform-origin: 50% 100%;
  transform: translate(calc(var(--gf-jx) + var(--gf-slot) * var(--gf-spread)), calc(var(--gf-lift) + var(--gf-depth) * var(--gf-stack) * -1)) rotate(calc(var(--gf-jr) + var(--gf-slot) * var(--gf-fan)));
  transition: transform .75s var(--gf-spring) calc(var(--gf-depth) * 40ms), box-shadow .4s var(--gf-ease), translate .9s var(--gf-ease), opacity .9s var(--gf-ease);
}
.gf-root[data-open] .gf-sheet:hover, .gf-root[data-open] .gf-sheet:focus-visible {
  transform: translate(calc(var(--gf-jx) + var(--gf-slot) * var(--gf-spread)), calc(var(--gf-lift) + var(--gf-depth) * var(--gf-stack) * -1 - 18px)) rotate(calc(var(--gf-slot) * var(--gf-fan) * .6));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 .5px rgba(0, 0, 0, .1), 0 22px 40px -12px rgba(10, 12, 20, .42); transition-delay: 0s;
}
.gf-sheet:focus-visible { outline: 2px solid var(--azul-4); outline-offset: 2px; }
.gf-sheet-art { position: absolute; left: 0; top: 0; width: 272px; height: 184px; max-width: none; object-fit: cover; background: #fff; }
.gf-sheet--art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 21, 54, .5) 0%, rgba(6, 21, 54, 0) 34%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.gf-sheet-head { position: absolute; left: 14px; right: 14px; top: 11px; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; white-space: nowrap; }
.gf-sheet-name { overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; color: #fafafa; }

.gf-front { position: absolute; left: 0; top: 74px; width: 340px; height: 198px; z-index: 10;
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  transform-origin: 50% 100%; transform: perspective(760px) rotateX(var(--gf-hinge));
  transition: transform .8s var(--gf-spring), translate 1s var(--gf-ease), opacity 1s var(--gf-ease); }
.gf-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .5) 42%, rgba(250, 252, 255, .93) 100%); }
.gf-spec { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .9;
  background: radial-gradient(260px 200px at calc(50% + var(--gf-px) * 46%) calc(30% + var(--gf-py) * 40%), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 70%); }
.gf-front-rim { width: 340px; height: 198px; }
.gf-front-rim path { stroke-width: 2.4; transition: stroke-width .3s var(--gf-ease); }
.gf-hit { all: unset; position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.gf-hit:focus-visible ~ .gf-label .gf-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.gf-front:has(.gf-hit:focus-visible) .gf-front-rim path { stroke-width: 5; }
.gf-label { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 4px; max-width: 260px; pointer-events: none; color: var(--gf-ink); }
.gf-root[data-place="bottom-left"] .gf-label { left: 28px; bottom: 32px; }
.gf-title { font-size: 21px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-meta { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--gf-ink-soft); white-space: nowrap; }

/* telefono: la carpeta se escala a ~0.45, asi que el rotulo crece para leerse */
@media (max-width: 600px) {
  .gf-title { font-size: 32px; }
  .gf-meta { font-size: 21px; }
  .gf-root[data-place="bottom-left"] .gf-label { left: 26px; bottom: 26px; max-width: 290px; }
}

/* entrada: la carpeta se arma sola */
.gf-root:not([data-entered]) .gf-back, .gf-root:not([data-entered]) .gf-back-rim { translate: 0 22px; opacity: 0; }
.gf-root:not([data-entered]) .gf-sheet { translate: 0 -120px; opacity: 0; }
.gf-root:not([data-entered]) .gf-front { translate: 0 46px; opacity: 0; }
.gf-root:not([data-entered]) .gf-shadow { opacity: 0; }
.gf-back, .gf-back-rim { transition: translate 1s var(--gf-ease), opacity .9s var(--gf-ease); }
.gf-root[data-entered] .gf-sheet { transition-delay: calc(var(--gf-depth) * 40ms), 0s, calc(.18s + var(--gf-depth) * 90ms), calc(.18s + var(--gf-depth) * 90ms); }
.gf-root[data-entered] .gf-front { transition-delay: 0s, .42s, .42s; }
@media (prefers-reduced-motion: reduce) {
  .gf-root *, .gf-root *::before, .gf-root *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .gf-tilt { transform: none; }
}

/* ---------------------------------------------------------------- galeria circular (circular.js) */
.circ { position: fixed; inset: 0; z-index: 450; display: grid; grid-template-rows: auto 1fr auto; color: #e8eefa;
  background: radial-gradient(120% 90% at 50% 45%, #0b1630 0%, #03060d 70%); opacity: 0; transition: opacity .38s var(--sal); }
.circ.abierta { opacity: 1; }
.circ[hidden] { display: none; }
.circ-cab { display: flex; align-items: baseline; justify-content: center; gap: 14px; padding: 22px 70px 0; }
.circ-tema { font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.circ-cuenta { font-family: var(--mono); font-size: .85rem; color: var(--azul-5); }
.circ-lienzo { position: relative; min-height: 0; cursor: grab; touch-action: pan-y; transform: translateY(24px) scale(.97); transition: transform .6s var(--sal); outline: none; }
.circ.abierta .circ-lienzo { transform: none; }
.circ-lienzo:active { cursor: grabbing; }
.circ-lienzo canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.circ-pie { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 16px 26px; text-align: center; }
.circ-nombre { font-size: 1.05rem; font-weight: 700; min-height: 1.4em; }
.circ-ayuda { font-size: .8rem; color: #8597b8; }
.circ-cerrar { top: 14px; right: 14px; }
.circ-ant { left: 14px; top: 50%; translate: 0 -50%; } .circ-sig { right: 14px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) { .circ-ant, .circ-sig { top: auto; bottom: 18px; translate: none; } .circ-pie { padding: 0 64px 22px; } .circ-ayuda { display: none; } }

/* ---------------------------------------------------------------- planos: vidrio tenue y acercamiento al pasar */
.g-reticula.planos .g-celda { background: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.g-reticula.planos .g-celda img { padding: 0; object-fit: cover; transition: transform .8s var(--sal); }
.g-vidrio { position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(155deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(157, 184, 222, .16) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 0 0 1px rgba(255, 255, 255, .35);
  transition: opacity .5s var(--sal); }
.g-reticula.planos .g-celda figcaption { z-index: 1; background: rgba(6, 21, 54, .72); color: #fff; transition: transform .5s var(--sal), opacity .4s ease; }
@media (hover: hover) and (pointer: fine) {
  .g-reticula.planos .g-celda:hover img { transform: scale(1.6); }
  .g-reticula.planos .g-celda:hover .g-vidrio { opacity: 0; }
  .g-reticula.planos .g-celda:hover figcaption { transform: translateY(6px); opacity: .9; }
}
.circ-nombre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }


/* ================================================================ muestra de una carpeta */
.muestra { position: fixed; inset: 0; z-index: 420; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px);
  background: rgba(4, 12, 30, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .26s ease; }
.muestra.abierta { opacity: 1; }
.muestra-panel { width: min(1100px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px; background: rgba(240, 245, 252, .82); border: 1px solid rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 1px 0 #fff, 0 40px 90px -30px rgba(2, 8, 24, .7);
  transform: translateY(18px) scale(.97); transition: transform .42s cubic-bezier(.2, .8, .2, 1); }
.muestra.abierta .muestra-panel { transform: none; }
.muestra-cab { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(13, 36, 89, .1); }
.muestra-cab > div { flex: 1; min-width: 0; }
.muestra-cab h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; color: #0b1b3a; }
.muestra-n { font-size: .85rem; color: #3b5078; }
.muestra-rec { appearance: none; border: 0; cursor: pointer; font: 650 .88rem var(--f); color: #fff; background: #0d2459; padding: 10px 16px; border-radius: 999px; transition: transform .16s ease, background-color .2s ease; }
.muestra-rec:active, .muestra-x:active { transform: scale(.96); }
.muestra-x { appearance: none; border: 0; cursor: pointer; width: 40px; height: 40px; flex: none; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: #0b1b3a; background: rgba(13, 36, 89, .08); transition: transform .16s ease, background-color .2s ease; }
.muestra-red { overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.muestra-it { appearance: none; border: 1px solid rgba(255, 255, 255, .8); cursor: pointer; padding: 0; text-align: left; font: inherit; position: relative;
  border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 10px 24px -16px rgba(6, 21, 54, .5);
  opacity: 0; transform: translateY(10px); transition: opacity .35s ease var(--d), transform .45s cubic-bezier(.2, .8, .2, 1) var(--d), box-shadow .25s ease; }
.muestra.abierta .muestra-it { opacity: 1; transform: none; }
.muestra-it img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: linear-gradient(160deg, #f4f7fc, #d3dff0); padding: 6px; }
.muestra-pie { display: block; padding: 9px 12px 11px; font-size: .86rem; font-weight: 650; line-height: 1.25; color: #0b1b3a; }
.muestra-pags { position: absolute; top: 8px; right: 8px; font: 600 .72rem var(--mono); color: #fff; background: rgba(13, 36, 89, .82); padding: 3px 8px; border-radius: 999px; }
.muestra-it:focus-visible, .muestra-rec:focus-visible, .muestra-x:focus-visible { outline: 3px solid #2f5ba8; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .muestra-it:hover { box-shadow: 0 18px 36px -18px rgba(6, 21, 54, .65); transform: translateY(-3px); transition-delay: 0s; }
  .muestra-rec:hover { background: #2f5ba8; } .muestra-x:hover { background: rgba(13, 36, 89, .15); }
}
@media (max-width: 640px) {
  .muestra { padding: 0; place-items: end stretch; }
  .muestra-panel { max-height: 88vh; border-radius: 24px 24px 0 0; width: 100%; }
  .muestra-cab { flex-wrap: wrap; padding: 16px 16px 12px; }
  .muestra-rec { order: 3; width: 100%; }
  .muestra-red { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 14px calc(18px + env(safe-area-inset-bottom)); }
  .muestra-pie { font-size: .8rem; padding: 7px 9px 9px; }
}
@media (prefers-reduced-motion: reduce) { .muestra, .muestra-panel, .muestra-it { transition: none; } }

.muestra[hidden] { display: none !important; }


/* un solo arco con todos los albumes */
.circ-tema.cambia { animation: circ-tema .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes circ-tema { from { opacity: 0; transform: translateY(8px); } }
.circ-albumes { position: absolute; top: 64px; left: 0; right: 0; z-index: 2; display: flex; justify-content: safe center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 16px; }
.circ-albumes::-webkit-scrollbar { display: none; }
.circ-albumes button { appearance: none; flex: none; cursor: pointer; font: 600 .8rem var(--f); color: rgba(232, 238, 250, .7); padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.circ-albumes button.on { color: #0b1b3a; background: #fff; border-color: #fff; }
@media (hover: hover) and (pointer: fine) { .circ-albumes button:not(.on):hover { background: rgba(255, 255, 255, .14); color: #fff; } }
@media (max-width: 640px) { .circ-albumes { top: 56px; justify-content: flex-start; } }
.circ-tema { display: inline-block; }
@media (hover: none), (pointer: coarse) { .gf-front { -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); } }
