/* Glass material of the animated persona cases (desktop orbit). css/indigo/persona-cube.css
   owns their geometry and the flat cards of the static fallback; this file only replaces the
   look of the six faces while they turn: a clear block with bright bevelled edges, a denser
   tint where one looks through more glass, a specular streak that slides as the case turns
   (--cube-glint from js/indigo/persona-cubes.mjs) and the print on a frosted pane set inside
   the block, so it shifts against the front surface like a real object.
   No clipping and no mask: the case's corners must stay measurable. */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) {
  --glass-edge: rgb(255 255 255 / 82%);
  --glass-deep: rgb(96 106 196 / 22%);
}
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-face {
  padding: 14px;
  border: 0;
  border-radius: 4px;
  /* Almost no body colour: light catches the upper-left, density gathers toward the rim. */
  background:
    linear-gradient(118deg, rgb(255 255 255 / 26%) 0%, rgb(255 255 255 / 3%) 30%, rgb(255 255 255 / 0%) 62%, rgb(255 255 255 / 12%) 100%),
    radial-gradient(130% 150% at 50% 45%, rgb(255 255 255 / 0%) 52%, var(--glass-deep) 100%);
  background-color: color-mix(in srgb, var(--glass-tint, #e3e5f4) 8%, transparent);
  /* Bevel: a crisp edge, the thin dark line refraction draws inside it, then the inner edge. */
  box-shadow:
    inset 0 0 0 1px var(--glass-edge),
    inset 0 0 0 2.5px rgb(104 114 200 / 16%),
    inset 0 0 0 3.5px rgb(255 255 255 / 34%),
    inset 0 12px 22px -10px rgb(255 255 255 / 58%),
    inset 0 -16px 26px -16px rgb(78 88 178 / 30%);
  -webkit-backdrop-filter: blur(1.5px) saturate(1.3) brightness(1.03);
  backdrop-filter: blur(1.5px) saturate(1.3) brightness(1.03);
}
/* The streak of light on each plane; it travels with the yaw instead of sitting still. */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-face::before {
  background: linear-gradient(112deg, transparent 32%, rgb(255 255 255 / 46%) 44%, rgb(255 255 255 / 7%) 51%, transparent 60%) no-repeat;
  background-size: 260% 100%;
  background-position: calc(50% + var(--cube-glint, 0) * 36%) 0;
}
/* The front surface stays clear and unblurred so the pane inside it keeps real depth:
   a backdrop filter on this plane would flatten its children. */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-face-front {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform-style: preserve-3d;
}
/* The print: a frosted pane a fifth of the way into the block. Pale enough for the ink when
   the case crosses the figure's dark clothing (qa/persona-cubes3d.test.mjs measures it). */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-plate {
  padding: 6px 8px;
  border-radius: 2px;
  background: rgb(246 246 255 / 60%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 60%), 0 8px 18px -10px rgb(40 46 120 / 40%);
  -webkit-backdrop-filter: blur(9px) saturate(1.25) brightness(1.1);
  backdrop-filter: blur(9px) saturate(1.25) brightness(1.1);
}
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-face-front .cube-plate {
  transform: translateZ(calc(var(--cube-depth) * -.2));
}
/* The case never turns past a reading angle any more, so its rear print is never the one
   facing the viewer. WebKit composites a backdrop-filtered pane on its own and showed that
   rear print mirrored through the front one; it stays out of the picture. */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-face-back .cube-plate {
  visibility: hidden;
}
/* Narrow planes are seen at a slant, through more glass: denser, with both edges lit. */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) :is(.cube-face-left, .cube-face-right) {
  background: linear-gradient(90deg, rgb(255 255 255 / 40%), rgb(142 152 226 / 22%) 42%, rgb(110 120 206 / 16%) 70%, rgb(255 255 255 / 30%));
}
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-face-top {
  background: linear-gradient(180deg, rgb(255 255 255 / 62%), rgb(255 255 255 / 18%) 60%, rgb(150 160 228 / 20%));
}
/* On the floor glass leaves a faint shadow with light gathered in its middle. */
.persona-orbit:not([data-cubes-static="true"]) :is(.persona-cubes-back, .persona-cubes-front) .cube-shadow {
  width: 86%;
  height: 16px;
  background: radial-gradient(closest-side, rgb(255 255 255 / 62%) 0, rgb(255 255 255 / 30%) 22%, rgb(58 64 150 / 22%) 52%, rgb(58 64 150 / 0%) 100%);
  filter: blur(4px);
}
