/* Separate directional plates catch the moving light along raised ink and cut-paper edges. */
.emboss,
.petal-field,
.petal-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.surface-finish {
  /* Let each directional plate blend with the cover below it, with no intermediate isolated group. */
  display: contents;
}
.surface-lighting {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  visibility: hidden;
  pointer-events: none;
}
.surface-lit .surface-lighting { visibility: visible; }
.surface-lit > .foil,
.surface-lit > .surface-finish > .emboss,
.cover-face.surface-lit::before { visibility: hidden; }
.emboss {
  z-index: 3;
  background-size: var(--relief-fit, cover);
  background-position: var(--relief-position, center);
  background-repeat: no-repeat;
  mix-blend-mode: hard-light;
  opacity: 0.62;
}
.emboss-x {
  filter: invert(clamp(0, calc(0.65 + var(--light-x, 0) * 0.65), 1));
}
.emboss-y {
  filter: invert(clamp(0, calc(0.70 + var(--light-y, 0) * 0.58), 1));
}

.petal-field {
  z-index: 4;
  overflow: hidden;
}
.petal-track {
  --start: 12%;
  --wind: 13%;
  --time: 8.2s;
  --delay: -2.3s;
  --size: 2.5%;
  --petal-hi: #fff1dd;
  --petal-mid: #eda98e;
  --petal-tip: #ba7370;
  animation: petal-descent var(--time) linear var(--delay) infinite;
}
.petal-track:nth-child(2) {
  --start: 84%; --wind: -10%; --time: 10.6s; --delay: -7.1s; --size: 2.05%;
  --petal-mid: #f1caab; --petal-tip: #ca8c7a;
}
.petal-track:nth-child(3) {
  --start: 33%; --wind: 9%; --time: 9.5s; --delay: -8.3s; --size: 2.75%;
}
.petal-track:nth-child(4) {
  --start: 66%; --wind: -12%; --time: 8.7s; --delay: -4.4s; --size: 1.9%;
  --petal-mid: #f4dab0; --petal-tip: #bf936b;
}
.petal-track:nth-child(5) {
  --start: 6%; --wind: 8%; --time: 11.3s; --delay: -8.7s; --size: 1.8%;
}
.petal-track:nth-child(6) {
  --start: 92%; --wind: -15%; --time: 9.8s; --delay: -1.7s; --size: 2.65%;
}
.paper-petal {
  position: absolute;
  left: var(--start);
  top: 0;
  display: block;
  width: clamp(4px, var(--size), 13px);
  aspect-ratio: 1 / 0.73;
  border-radius: 92% 60% 76% 12%;
  background: radial-gradient(ellipse at 76% 22%, var(--petal-hi), transparent 53%),
    linear-gradient(27deg, var(--petal-tip), var(--petal-mid) 47%, var(--petal-hi));
  box-shadow: inset 0 -0.45px 0 #94595994, 0.7px 1.4px 1.5px #4f352d41;
  animation: petal-tumble calc(var(--time) * 0.39) ease-in-out var(--delay) infinite alternate;
}
@keyframes petal-descent {
  0% { transform: translate(0, -7%); opacity: 0; }
  7% { opacity: 0.95; }
  25% { transform: translate(calc(var(--wind) * 0.76), 21%); }
  51% { transform: translate(calc(var(--wind) * 0.28), 47%); }
  74% { transform: translate(calc(var(--wind) * 1.12), 72%); }
  94% { opacity: 0.8; }
  100% { transform: translate(var(--wind), 105%); opacity: 0; }
}
@keyframes petal-tumble {
  0% { transform: rotate(-34deg) scaleX(0.57); }
  30% { transform: rotate(5deg) scaleX(0.95); }
  70% { transform: rotate(63deg) scaleX(0.41); }
  100% { transform: rotate(110deg) scaleX(0.82); }
}
:is(.paper-asleep, [hidden], [inert], .is-open .leaf-front, .fan-area.focused .fan-item, .sealed .insert) :is(.petal-track, .paper-petal) {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .petal-field { display: none; }
  .petal-track, .paper-petal { animation: none; }
}
