/* Peach pie recipe page (works with pie.css) */

.pie-recipe-sections {
  margin: 2rem auto 0;
  width: fit-content;
  max-width: 100%;
}

.pie-recipe-section + .pie-recipe-section {
  margin-top: 2rem;
}

.pie-recipe-section h2 {
  margin: 0 0 1rem;
  text-align: left;
}

.pie-recipe-section ul {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
}

.pie-recipe-section li + li {
  margin-top: 0.5rem;
}

.pie-recipe-section .pie-recipe-link {
  margin-top: 1.25rem;
}

.pie-peach-progress {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-family: system-ui, sans-serif;
  opacity: 0.75;
}

.pie-peach-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.pie-peach-nav {
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s ease;
}

.pie-peach-nav:hover {
  transform: scale(1.12);
}

.pie-peach-nav:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.pie-peach-nav-big {
  display: block;
  font-size: 4.5rem;
}

.pie-peach-orchard-show {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}

.pie-peach-orchard-tree {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  font-size: 18rem;
  line-height: 1;
  animation: pie-peach-orchard-shake 0.7s ease-in-out;
}

.pie-peach-orchard-peach {
  position: absolute;
  line-height: 1;
  animation: pie-peach-orchard-tumble var(--fall-duration, 2s) ease-in forwards;
}

@keyframes pie-peach-orchard-shake {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  20% {
    transform: translateX(calc(-50% - 10px)) rotate(-6deg);
  }

  40% {
    transform: translateX(calc(-50% + 12px)) rotate(7deg);
  }

  60% {
    transform: translateX(calc(-50% - 8px)) rotate(-5deg);
  }

  80% {
    transform: translateX(calc(-50% + 6px)) rotate(4deg);
  }
}

@keyframes pie-peach-orchard-tumble {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }

  85% {
    opacity: 1;
  }

  100% {
    transform: translate(var(--drift, 0), 75vh) rotate(var(--spin, 360deg));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pie-peach-nav {
    transition: none;
  }

  .pie-peach-nav:hover {
    transform: none;
  }

  .pie-peach-orchard-tree {
    animation-duration: 0.01s;
  }

  .pie-peach-orchard-peach {
    animation-duration: 0.01s;
  }
}
