/* ============================================================
   CRISTAL (trial, 2026-11-15) — the desktop app's thick-glass panels on
   the landing: bright hairline rims lit from the top-left, an iridescent
   green/violet sheen, a lavender glow under the pointer, the whole page
   swivelling in 3D as one plate pressed where the pointer is, and a fly-in
   the first time each panel is seen.
   To revert, remove the cristal.css <link> and cristal.js <script> from
   index.html.
   ============================================================ */
@property --luz { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --brillo { syntax: "<number>"; inherits: true; initial-value: .35; }

:root {
  --cr-arriba: rgba(255,255,255,.95);
  --cr-izq: rgba(255,255,255,.7);
  --cr-der: rgba(255,255,255,.35);
  --cr-abajo: rgba(20,20,40,.1);
  --cr-sombra:
    inset 0 1px 0 rgba(255,255,255,.85), inset 1px 0 0 rgba(255,255,255,.35),
    inset 0 -1px 0 rgba(20,20,40,.06), inset 0 -14px 20px -16px rgba(20,20,40,.18),
    0 2px 1px -1px rgba(20,20,40,.12), 0 28px 56px -30px rgba(20,20,40,.4);
  --cr-sombra-alta:
    inset 0 1px 0 rgba(255,255,255,.95), inset 1px 0 0 rgba(255,255,255,.45),
    inset 0 -1px 0 rgba(20,20,40,.06), inset 0 -14px 20px -16px rgba(20,20,40,.18),
    0 2px 1px -1px rgba(20,20,40,.12), 0 28px 56px -30px rgba(20,20,40,.4);
  --cr-luz: 118,98,220;
  --cr-verde: 70,220,160;
  --cr-violeta: 160,110,255;
}
/* dark glass: the dark theme, and the navy stages in either theme */
:root[data-theme="dark"], .hero2__panel, .final {
  --cr-arriba: rgba(255,255,255,.3);
  --cr-izq: rgba(255,255,255,.16);
  --cr-der: rgba(255,255,255,.07);
  --cr-abajo: rgba(0,0,0,.45);
  --cr-sombra:
    inset 0 1px 0 rgba(255,255,255,.14), inset 1px 0 0 rgba(255,255,255,.05),
    inset 0 -1px 0 rgba(0,0,0,.4), inset 0 -16px 22px -18px rgba(0,0,0,.6),
    0 2px 1px -1px rgba(0,4,16,.5), 0 30px 60px -30px rgba(0,4,16,.9);
  --cr-sombra-alta:
    inset 0 1px 0 rgba(255,255,255,.22), inset 1px 0 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.4), inset 0 -16px 22px -18px rgba(0,0,0,.6),
    0 2px 1px -1px rgba(0,4,16,.5), 0 30px 60px -30px rgba(0,4,16,.9);
  --cr-luz: 150,132,255;
}

.show, .price__card { position: relative; isolation: isolate; }
.show, .price__card, .hero2__panel, .final {
  --cr-sh: var(--cr-sombra);
  border: 1px solid;
  border-color: var(--cr-arriba) var(--cr-der) var(--cr-abajo) var(--cr-izq);
  box-shadow: var(--cr-sh);
  /* the page's swivel toward the pointer is eased in cristal.js (header, main and footer) */
  transition: box-shadow .5s ease, --luz .45s ease, --brillo .6s ease;
}
.cristal-sobre { --luz: 1; --brillo: 1; --cr-sh: var(--cr-sombra-alta); }

/* glow and sheen live on a layer under the content (added by cristal.js) */
.cristal-capa {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image:
    radial-gradient(340px circle at var(--mx, 50%) var(--my, -40%), rgba(var(--cr-luz), calc(.2 * var(--luz))), transparent 70%),
    linear-gradient(115deg, transparent 38%, rgba(var(--cr-verde), calc(.09 * var(--brillo))) 47%,
      rgba(var(--cr-violeta), calc(.11 * var(--brillo))) 55%, transparent 64%);
  background-size: 100% 100%, 260% 260%;
  background-position: 0 0, var(--sx, 30%) var(--sy, 30%);
  background-repeat: no-repeat;
  transition: background-position .9s cubic-bezier(.2,.8,.2,1);
}

@media (prefers-reduced-motion: no-preference) {
  /* first time a panel is seen it flies in from toward the viewer */
  .cristal-espera { opacity: 0; }
  .cristal-entra {
    animation: cristal-entra .72s cubic-bezier(.34,1.45,.55,1) backwards;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
}
@keyframes cristal-entra {
  from {
    opacity: 0;
    transform: perspective(1400px) translate3d(var(--fx, 0px), 46px, 140px)
      rotate3d(var(--fa, 1), var(--fb, 0), 0, var(--fr, 14deg)) scale(.94);
  }
}
