/* Fujisan theme: page tint, crane motion, and the sea-of-clouds cover. */

/* page tint: faint bands of mist lying across the paper */
.view[data-theme="fujisan"] {
  --th: #6f86b8;
  background-image:
    radial-gradient(62% 30px at 24% 70px, rgba(111, 134, 184, .07), transparent 100%),
    radial-gradient(54% 22px at 78% 178px, rgba(196, 160, 200, .06), transparent 100%),
    radial-gradient(70% 36px at 58% 300px, rgba(111, 134, 184, .05), transparent 100%),
    radial-gradient(46% 20px at 12% 404px, rgba(240, 190, 170, .07), transparent 100%);
  background-size: 100% 480px;
}

/* ---- painting: cranes glide across once and come round again */
.fx-a.fx-fujisan-glide {
  animation-name: fx-fujisan-glide;
  animation-direction: normal;
  animation-timing-function: linear;
}
.fx-a.fx-fujisan-flap { animation-name: fx-fujisan-flap; }
/* a plum petal lets go of the bough, drifts and fades */
.fx-a.fx-fujisan-shed {
  animation-name: fx-fujisan-shed;
  animation-direction: normal;
  animation-timing-function: linear;
}
@keyframes fx-fujisan-shed {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  9% { opacity: 1; }
  74% { opacity: 1; }
  100% { transform: translate(var(--dx, -120px), var(--dy, 140px)) rotate(var(--rot, 240deg)); opacity: 0; }
}
@keyframes fx-fujisan-glide {
  0% { transform: translate(var(--x0, 0px), var(--y0, 0px)); opacity: 0; }
  7% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translate(var(--x1, 600px), var(--y1, 0px)); opacity: 0; }
}
@keyframes fx-fujisan-flap {
  from { transform: scaleY(1); }
  to { transform: scaleY(.34); }
}

/* ---- transition */
.fx-fujisan-sky {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-color: #f6e2e2;
  background-image: linear-gradient(180deg, #c8d1ee 0%, #dcd6ee 7%, #f3dbe3 14%, #fde6d8 19%, #fff1dc 22%, #f9e4dc 40%, #eddcea 70%, #d9d3ee 100%);
}
.fx-fujisan-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--fx-u-grain), var(--fx-u-fibre);
  opacity: .4;
  mix-blend-mode: multiply;
}
.fx-fujisan-sky svg { display: block; width: 100%; height: 100%; }
.fx-fujisan-rays {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: fx-fujisan-turn 90s linear infinite;
}
@keyframes fx-fujisan-turn {
  to { transform: rotate(360deg); }
}
.fx-fujisan-bank {
  position: absolute;
  will-change: transform;
  pointer-events: none;
}
.fx-fujisan-bank svg { display: block; }
/* a pool of light in the middle for the caption */
.fx-fujisan-veil {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    radial-gradient(46% 38% at 50% 50%, rgba(255, 250, 244, .9), rgba(255, 248, 242, .55) 55%, rgba(255, 248, 242, 0) 100%),
    radial-gradient(90% 60% at 50% 110%, rgba(176, 178, 226, .28), rgba(176, 178, 226, 0) 70%);
}

/* caption: deep blue-violet brush glyph on pale cloud */
.fx-cap--fujisan .fx-cap-glyph {
  color: #4a5592;
  text-shadow:
    0 0 .05em rgba(255, 253, 248, .95),
    0 0 .24em rgba(255, 250, 244, .9),
    0 0 .7em rgba(255, 244, 232, .8),
    0 .05em .14em rgba(84, 92, 150, .18);
}
.fx-cap--fujisan .fx-cap-label {
  border-radius: 4px;
  color: #fffaf3;
  background: linear-gradient(135deg, #8a9cc8, #6f86b8 58%, #6478ae);
  box-shadow:
    inset 0 0 0 1px rgba(255, 250, 240, .62),
    inset 0 0 0 3px #6f86b8,
    0 0 0 1px rgba(207, 174, 120, .6),
    0 12px 26px -14px rgba(70, 84, 140, .7);
}

@media (prefers-reduced-motion: reduce) {
  .fx-a.fx-fujisan-glide,
  .fx-a.fx-fujisan-flap,
  .fx-a.fx-fujisan-shed,
  .fx-fujisan-rays { animation: none; }
  .fx-a.fx-fujisan-shed {
    transform: translate(calc(var(--dx, 0px) * .4), calc(var(--dy, 0px) * .4)) rotate(40deg);
  }
  /* the flock rests where it would be mid-crossing */
  .fx-a.fx-fujisan-glide {
    transform: translate(calc(var(--x0, 0px) * .55 + var(--x1, 0px) * .45), calc(var(--y0, 0px) * .55 + var(--y1, 0px) * .45));
  }
}
