/* Apple 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-orchard-link {
  padding: 0;
  margin: 0 0.2rem 0 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: inherit;
  vertical-align: baseline;
  transition: transform 0.2s ease;
}

.pie-orchard-link:hover {
  transform: scale(1.15);
}

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

.pie-orchard-big {
  display: block;
  margin: 1rem auto 0;
  font-size: 8rem;
  line-height: 1;
}

.pie-orchard-big:hover {
  transform: scale(1.1);
}

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

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

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

@keyframes pie-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-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-orchard-tree {
    animation-duration: 0.01s;
  }

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