/* Dogs: grass, polaroids, one tennis ball */

.dogs-intro {
  max-width: 44ch;
}

.yard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 64rem;
  margin: 0 auto;
}
.polaroid {
  margin: 0;
  padding: 0.9rem 0.9rem 1.2rem;
  background: #fbfbf6;
  color: #1d2a1f;
  border-radius: 3px;
  box-shadow: 0 26px 40px -22px rgb(0 0 0 / 0.65);
  transform: rotate(-3deg);
  transition: transform 0.4s var(--ease-out);
}
.polaroid:last-child {
  transform: rotate(2.5deg);
}
.polaroid:hover {
  transform: rotate(0deg) scale(1.02);
}
.photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 1rem;
  background:
    repeating-linear-gradient(135deg, rgb(31 122 58 / 0.06) 0 12px, transparent 12px 24px),
    #e9eee4;
  outline: 2px dashed rgb(31 122 58 / 0.4);
  outline-offset: -8px;
  text-align: center;
  font-weight: 700;
  color: #4b6650;
}
.photo.is-filled {
  padding: 0;
  outline: 0;
}
.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid figcaption {
  margin-top: 0.9rem;
  font-size: 1.02rem;
}
.polaroid figcaption b {
  font-size: 1.15rem;
}

.ball-spot {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  text-align: center;
}
.ball {
  width: 5.5rem;
  height: 5.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 12px 10px rgb(0 0 0 / 0.35));
}
.ball svg {
  width: 100%;
  height: 100%;
}
.ball:hover {
  transform: rotate(-12deg);
}
.ball.is-thrown {
  animation: throw 1.1s cubic-bezier(0.3, 0.7, 0.4, 1);
}
@keyframes throw {
  0% {
    transform: none;
  }
  45% {
    transform: translate(0, -11rem) rotate(400deg) scale(0.8);
  }
  75% {
    transform: translate(0, 0.6rem) rotate(680deg) scale(1.05, 0.9);
  }
  88% {
    transform: translate(0, -1.4rem) rotate(710deg);
  }
  100% {
    transform: rotate(720deg);
  }
}
.ball-count {
  min-height: 3em;
  max-width: 13ch;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.dogs-story {
  position: relative;
  z-index: 2;
  max-width: 52ch;
  margin: clamp(3rem, 8vh, 4.5rem) auto 0;
  font-size: 1.1rem;
  text-align: center;
}

.offclock {
  position: relative;
  z-index: 2;
  max-width: 72rem;
  margin-top: clamp(4rem, 12vh, 7rem);
}
.offclock h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}
.pastimes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.pastimes li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--ball);
  border-radius: 999px;
  font-weight: 700;
}
.pastimes svg {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
}
.offclock > p {
  margin-top: 1.5rem;
}

@media (max-width: 820px) {
  .yard {
    grid-template-columns: 1fr;
    max-width: 26rem;
  }
  .ball-spot {
    order: 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .polaroid,
  .polaroid:last-child,
  .polaroid:hover {
    transform: none;
  }
  .ball:hover {
    transform: none;
  }
}
