/* Light follows the painted atmosphere, without drawn contours or moving strokes. */
#angels .angel-portrait {
  --light-rgb: 255 230 175;
  --ceremony-time: 6s;
  --ceremony-phase: -3s;
  border-color: #c3a368;
  box-shadow: 0 5px 22px #0003, 0 0 28px #e7c5750c;
}
#angel-michael .angel-portrait { --light-rgb: 255 244 214; }
#angel-raphael .angel-portrait { --light-rgb: 255 232 188; --ceremony-time: 7s; --ceremony-phase: -2s; }
#angel-uriel .angel-portrait { --light-rgb: 255 216 147; --ceremony-time: 6.5s; --ceremony-phase: -4s; }
#angels .angel-portrait::after {
  z-index: 4;
  border-color: #f0d79338;
  box-shadow: 0 0 0 6px #121d1420;
}
#angels .angel-radiance,
#angels .angel-radiance > i {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
#angels .angel-radiance {
  z-index: 3;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0;

}
#angels.angel-light-ready .angel-radiance { opacity: 1; }
#angel-uriel .angel-radiance {
  mask-image: radial-gradient(ellipse 20% 24% at 17% 52%, transparent 78%, #000 100%);
}
#angels .angel-radiance .angel-halo {
  inset: 0;
  background: radial-gradient(ellipse 28% 13% at 50% 6%, rgb(var(--light-rgb) / .36), rgb(var(--light-rgb) / .14) 42%, transparent 92%);
  mask-image: linear-gradient(#000 0%, #000 10%, transparent 20%);
  filter: blur(4px);
  transform-origin: 50% 6%;
  animation: angel-soft-halo var(--ceremony-time) ease-in-out var(--ceremony-phase) infinite;
}
#angels .angel-radiance .angel-wing-light {
  inset: 0;
  background:
    radial-gradient(ellipse 14% 34% at 10% 25%, rgb(var(--light-rgb) / .58), rgb(var(--light-rgb) / .18) 46%, transparent 95%),
    radial-gradient(ellipse 14% 34% at 91% 24%, rgb(var(--light-rgb) / .54), rgb(var(--light-rgb) / .16) 46%, transparent 95%);
  mask-image: linear-gradient(90deg, #000 0%, #000 16%, transparent 29%, transparent 71%, #000 84%, #000 100%);
  filter: blur(4px);
  transform-origin: 50% 20%;
  animation: angel-soft-wings var(--ceremony-time) ease-in-out var(--ceremony-phase) infinite;
}
#angels .angel-radiance .angel-wing-shimmer {
  inset: 20% auto auto 1%;
  width: 18%;
  height: 20%;
  background: radial-gradient(ellipse, #fff9e6 .5%, #fff1cbe6 9%, rgb(var(--light-rgb) / .54) 26%, transparent 70%);
  filter: blur(3px);
  opacity: 0;
  animation: angel-wing-shimmer 4.5s ease-in-out var(--ceremony-phase) infinite;
}
#angels .angel-radiance .angel-wing-shimmer.right {
  left: auto;
  right: 1%;
  animation-delay: calc(var(--ceremony-phase) - 2.5s);
  animation-duration: 5.5s;
}
#angels .angel-flame-canvas {
  position: absolute;
  display: block;
  left: 7.5%;
  top: 35%;
  width: 19%;
  height: 29%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: normal;
}
#angels .angel-radiance .angel-particle {
  position: absolute;
  inset: auto;
  left: var(--particle-x);
  top: var(--particle-y);
  width: var(--particle-size);
  height: var(--particle-size);
  border-radius: 50%;
  background: #fff9e5;
  box-shadow: 0 0 3px 1px #ffe8aacc, 0 0 9px 3px rgb(var(--light-rgb) / .42);
  opacity: 0;
  animation: angel-soft-dust var(--particle-time) linear var(--particle-delay) infinite;
}
#angels .angel-radiance .angel-particle.is-distant {
  background: rgb(var(--light-rgb) / .35);
  box-shadow: 0 0 6px 2px rgb(var(--light-rgb) / .1);
  filter: blur(1.2px);
}
#angels .angel-radiance .angel-glint {
  position: absolute;
  inset: auto;
  left: var(--glint-x);
  top: var(--glint-y);
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  background: radial-gradient(circle, #fff3cc80, rgb(var(--light-rgb) / .22) 28%, transparent 72%);
  filter: blur(2px);
  opacity: 0;
  animation: angel-soft-highlight var(--ceremony-time) ease-in-out var(--ceremony-phase) infinite;
}
#angels .angel-radiance .angel-ember {
  position: absolute;
  inset: auto;
  left: 17%;
  top: 58%;
  width: 1.5px;
  height: 1.5px;
  border-radius: 50%;
  background: #ffeac1;
  box-shadow: 0 0 4px 1px #ffda8590;
  opacity: 0;
  animation: angel-soft-ember var(--ember-time) ease-out var(--ember-delay) infinite;
}
#angels .angel-radiance * { animation-play-state: paused !important; }
#angels.angel-light-on .angel-light-in-view .angel-radiance * { animation-play-state: running !important; }

@keyframes angel-soft-halo {
  0%, 100% { opacity: .32; transform: scale(.96); }
  24% { opacity: .88; transform: scale(1.025); }
  61% { opacity: .43; transform: scale(1.06); }
}
@keyframes angel-soft-wings {
  0%, 100% { opacity: .27; transform: translate3d(0, 1%, 0) scale(.99); }
  44% { opacity: .74; transform: translate3d(0, -1.2%, 0) scale(1.015); }
  76% { opacity: .38; transform: translate3d(0, -2%, 0) scale(1.025); }
}
@keyframes angel-wing-shimmer {
  0% { opacity: 0; transform: translate3d(0, 75%, 0) scale(.7); }
  22% { opacity: .95; }
  56% { opacity: .8; }
  90%, 100% { opacity: 0; transform: translate3d(0, -120%, 0) scale(1.1); }
}

@keyframes angel-soft-dust {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.85); }
  12%, 42% { opacity: var(--particle-opacity); }
  28% { opacity: .35; }
  62% { opacity: var(--particle-opacity); }
  80% { opacity: .5; }
  100% { opacity: 0; transform: translate3d(var(--particle-drift), clamp(-170px, -23vw, -105px), 0) scale(.35); }
}
@keyframes angel-soft-highlight {
  0%, 100% { opacity: .08; transform: scale(.8); }
  36% { opacity: .64; transform: scale(1.18); }
  70% { opacity: .24; transform: scale(.96); }
}
@keyframes angel-soft-ember {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.5); }
  15% { opacity: .72; }
  65% { opacity: .4; }
  100% { opacity: 0; transform: translate3d(var(--ember-drift), -75px, 0) scale(.15); }
}

#angels .angel-light-controls {
  display: flex;
  justify-content: flex-end;
  max-width: 1320px;
  margin: -22px auto 18px;
}
#angels .angel-light-controls[hidden] { display: none; }
#angels .angel-light-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid #cbb16e66;
  background: #14271ed9;
  color: #ead6a2;
  font: 12px var(--serif);
  letter-spacing: .07em;
  cursor: pointer;
}
#angels .angel-light-toggle:hover { background: #33422b; border-color: #d7bc79; }
#angels .angel-light-toggle:focus-visible { outline: 2px solid #f0d58f; outline-offset: 4px; }
#angels .angel-light-icon { width: 10px; height: 11px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; box-sizing: border-box; }
#angels .angel-light-toggle[data-paused='true'] .angel-light-icon { width: 0; height: 0; border: 6px solid transparent; border-left: 9px solid currentColor; border-right: 0; }
#angels .angel-light-toggle:disabled { cursor: default; opacity: .75; background: transparent; }
#angels .angel-light-toggle:disabled .angel-light-icon { display: none; }
@media (max-width: 650px) {
  #angels .angel-light-controls { justify-content: center; margin: -12px auto 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #angels .angel-flame-canvas { display: none; }
  #angels .angel-radiance * { animation: none !important; transform: none !important; }
  #angels.angel-light-ready .angel-radiance { opacity: 0; }
}
