/* What else? — the off-the-clock world. Pink, polished, a little extra. */

:root {
  color-scheme: light;
  --blush: #fdf0f3;
  --petal: #f8d7e0;
  --rose: #e25c8a;       /* decorative only, not for text */
  --raspberry: #a3164c;  /* accent text and buttons */
  --champagne: #d9b877;  /* decorative only */
  --gold-ink: #85601c;   /* gold for text */
  --cream: #fffaf6;
  --ink: #3b1f2b;
  --ink-soft: #6f4a59;
  --sage: #a9c4a1;
  --shadow: 0 10px 30px rgba(163, 22, 76, 0.1);

  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--blush);
  /* Sharpay-wallpaper pinstripes, barely there */
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 26px,
    rgba(226, 92, 138, 0.05) 26px 27px
  );
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--raspberry);
}

:focus-visible {
  outline: 2px solid var(--raspberry);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--raspberry);
  color: var(--cream);
  border-radius: 999px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* ── hero ── */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  text-align: center;
}

.back {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--champagne);
  margin-bottom: 48px;
}

.back:hover {
  color: var(--raspberry);
  border-bottom-color: var(--raspberry);
}

.monogram {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--champagne);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--cream), inset 0 0 0 5px var(--champagne);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--gold-ink);
  background: var(--cream);
}

.kicker {
  font-family: var(--script);
  font-size: clamp(34px, 8vw, 46px);
  line-height: 1;
  color: var(--raspberry);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 6px 0 20px;
  text-wrap: balance;
}

.hero h1 em {
  font-weight: 500;
  color: var(--raspberry);
}

.lede {
  max-width: 52ch;
  margin: 0 auto;
  font-size: 17px;
  color: var(--ink-soft);
}

/* ── sections ── */
main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

.fun-section {
  padding: 56px 0 8px;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-head .eyebrow {
  font-family: var(--script);
  font-size: 30px;
  line-height: 1;
  color: var(--raspberry);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
}

.section-head h2::after {
  content: "✦";
  display: block;
  font-size: 12px;
  color: var(--champagne);
  margin-top: 10px;
}

.section-head .blurb {
  max-width: 48ch;
  margin: 8px auto 0;
  color: var(--ink-soft);
}

.card {
  background: var(--cream);
  border: 1px solid rgba(217, 184, 119, 0.55);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--raspberry);
  background: var(--raspberry);
  color: var(--cream);
  font: 500 14px/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.pill:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.pill.ghost {
  background: transparent;
  color: var(--raspberry);
}

.pill.ghost:hover {
  background: var(--raspberry);
  color: var(--cream);
}

.empty {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── steal my spreadsheets ── */
.sheet-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px 22px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.sheet:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(163, 22, 76, 0.16);
}

.sheet-emoji {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--petal);
  border-radius: 50%;
}

.sheet h3 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
}

.sheet p {
  color: var(--ink-soft);
  font-size: 15px;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags li {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gold-ink);
  border: 1px solid var(--champagne);
  border-radius: 999px;
  padding: 2px 10px;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.soon {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

/* ── sneak peek: a card peeking out of an envelope ── */
.peek-callout {
  position: relative;
  width: fit-content;
  margin: 0 auto 4px;
  padding-right: 64px;
  font-family: var(--script);
  font-size: clamp(32px, 7vw, 42px);
  line-height: 1;
  color: var(--raspberry);
}

.peek-arrow {
  position: absolute;
  right: 0;
  top: 18px;
  width: 58px;
  height: 52px;
  fill: none;
  stroke: var(--raspberry);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 1.3s ease-in-out infinite alternate;
}

.peek-stage {
  /* --card-h comes from JS. Peeking shows only the top strip of the card;
     open lifts it so the envelope just holds its bottom edge. */
  --sink: calc(var(--card-h) - 190px);
  position: relative;
  height: 250px;
  overflow: hidden;
  transition: height 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.peek-stage.open {
  --sink: -70px;
  height: calc(var(--card-h) + 140px);
}

.peek-card {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  width: min(100% - 40px, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 26px 52px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.7), transparent 55%),
    #fde3ea;
  border: 1.5px solid var(--champagne);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(163, 22, 76, 0.16), inset 0 0 0 6px #fde3ea, inset 0 0 0 7px rgba(217, 184, 119, 0.6);
  transform: translate(-50%, var(--sink));
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
}

.peek-stage:not(.open) .peek-card {
  animation: peekaboo 2.6s ease-in-out infinite;
}

.peek-stage.open .peek-card:hover {
  box-shadow: 0 18px 40px rgba(163, 22, 76, 0.24), inset 0 0 0 6px #fde3ea, inset 0 0 0 7px rgba(217, 184, 119, 0.6);
}

.peek-card:focus-visible {
  outline-offset: 4px;
}

.peek-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.peek-card h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.05;
}

.peek-hook {
  max-width: 42ch;
  color: var(--ink-soft);
}

.peek-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.peek-pillar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  background: var(--cream);
  border: 1px solid rgba(217, 184, 119, 0.55);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.peek-pillar strong {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
}

.peek-pillar .numeral {
  font-family: var(--serif);
  font-style: italic;
  color: var(--raspberry);
}

.peek-quote {
  font-family: var(--serif);
  color: var(--raspberry);
}

@media (max-width: 480px) {
  .peek-pillars {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .peek-pillar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    padding: 8px 12px;
    text-align: left;
  }
}

.envelope-back,
.envelope-front {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100% - 8px, 568px);
  transform: translateX(-50%);
}

.envelope-back {
  height: 150px;
  background: #eeb0c3;
  border-radius: 6px 6px 10px 10px;
}

/* the open flap, folded back behind the card */
.envelope-back::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 80px;
  background: #f2bfcf;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.envelope-front {
  z-index: 2;
  height: 120px;
  filter: drop-shadow(0 -4px 8px rgba(163, 22, 76, 0.12));
}

.envelope-front svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0 0 10px 10px;
}

.seal {
  position: absolute;
  left: 50%;
  top: 44px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3dca8, #c9a15b 70%);
  box-shadow: 0 2px 6px rgba(133, 96, 28, 0.35), inset 0 0 0 3px rgba(255, 250, 240, 0.35);
  font: italic 500 17px var(--serif);
  color: #fffaf6;
}

@keyframes peekaboo {
  0%, 55%, 100% { transform: translate(-50%, var(--sink)) rotate(0deg); }
  68% { transform: translate(-50%, calc(var(--sink) - 26px)) rotate(-3deg); }
  80% { transform: translate(-50%, calc(var(--sink) - 18px)) rotate(2.5deg); }
}

@keyframes nudge {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(4px, 5px) rotate(4deg); }
}

/* ── spotify: a turntable and a dance floor ── */
.spotify-tile {
  --tempo: 1;
  position: relative;
  display: grid;
  gap: 8px 36px;
  padding: 28px 22px 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream) 0%, #fde6ee 100%);
  transition: box-shadow 0.3s, transform 0.3s;
}

/* party mode: everything speeds up while you're hovering or focused here */
.spotify-tile:hover,
.spotify-tile:focus-within {
  --tempo: 0.55;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(163, 22, 76, 0.18);
}

.spotify-tile:focus-within {
  outline: 2px solid var(--raspberry);
  outline-offset: 4px;
}

@media (min-width: 760px) {
  .spotify-tile {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    align-items: center;
    padding: 36px 44px 0;
  }
}

.turntable {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(59, 31, 43, 0.18));
}

.turntable .label-mono {
  font: italic 500 22px var(--serif);
  fill: var(--cream);
}

.turntable .label-small {
  font: 500 7px var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: var(--petal);
}

.turntable .note {
  font-size: 20px;
  fill: var(--raspberry);
  opacity: 0;
}

.spotify-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 8px;
}

.now-spinning {
  font-family: var(--script);
  font-size: 28px;
  line-height: 1;
  color: var(--raspberry);
}

.spotify-text h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.15;
  text-wrap: balance;
}

.spotify-text p:not(.now-spinning) {
  color: var(--ink-soft);
}

.spotify-cta {
  margin-top: 6px;
}

/* the whole tile is the link */
.spotify-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px; /* the card's corners, not the pill's */
}

.dance-floor {
  grid-column: 1 / -1;
  display: block;
  width: calc(100% + 44px);
  height: clamp(120px, 16vw, 170px);
  margin: 4px -22px 0;
  stroke-width: 3;
  stroke-linecap: round;
}

@media (min-width: 760px) {
  .dance-floor {
    width: calc(100% + 88px);
    margin: 4px -44px 0;
  }
}

.dance-floor .limb {
  stroke: var(--ink);
}

.dance-floor .limb.thin {
  stroke-width: 2;
}

/* SVG groups spin and swing around their own origin: the record's centre,
   the tonearm's pivot, each dancer's feet and shoulders */
.spotify-tile .vinyl { animation: spin calc(1.8s * var(--tempo)) linear infinite; }
.spotify-tile .tonearm { animation: arm-wobble 3s ease-in-out infinite alternate; }
.spotify-tile .power { animation: power 1.6s ease-in-out infinite alternate; }
.spotify-tile .note { animation: rise calc(2.4s * var(--tempo)) ease-out infinite; }
.spotify-tile .note.n2 { animation-delay: -0.8s; }
.spotify-tile .note.n3 { animation-delay: -1.6s; }

.spotify-tile .sway { animation: sway-hips calc(0.9s * var(--tempo)) ease-in-out infinite alternate; }
.spotify-tile .sway .arm-l { animation: arm-wave calc(0.9s * var(--tempo)) ease-in-out infinite alternate; }
.spotify-tile .sway .arm-r { animation: arm-wave calc(0.9s * var(--tempo)) ease-in-out infinite alternate-reverse; }

.spotify-tile .bounce { animation: bounce calc(0.45s * var(--tempo)) ease-in-out infinite alternate; }
.spotify-tile .bounce .arm { animation: pump calc(0.45s * var(--tempo)) ease-in-out infinite alternate; }
.spotify-tile .bounce .arm-r { animation-direction: alternate-reverse; }

.spotify-tile .disco { animation: sway-hips calc(1.2s * var(--tempo)) ease-in-out infinite alternate; }
.spotify-tile .disco .arm-l { transform: rotate(70deg); }
.spotify-tile .disco .arm-r { animation: point calc(0.6s * var(--tempo)) ease-in-out infinite alternate; }

.spotify-tile .twirl { animation: twirl calc(1.4s * var(--tempo)) ease-in-out infinite; }
.spotify-tile .twirl .arm { transform: rotate(-50deg); }
.spotify-tile .twirl .arm-r { transform: rotate(50deg); }

.spotify-tile .hop { animation: hop calc(0.35s * var(--tempo)) ease-out infinite alternate; }

.spotify-tile .disco-ball { transform-origin: 0 -34px; animation: ball-swing 2.4s ease-in-out infinite alternate; }
.spotify-tile .glint { animation: glint calc(1.2s * var(--tempo)) ease-in-out infinite; }
.spotify-tile .light { opacity: 0.45; animation: sweep calc(2.2s * var(--tempo)) ease-in-out infinite alternate; }
.spotify-tile .light.l2 { animation-direction: alternate-reverse; }
.spotify-tile .light.l3 { animation-delay: -1.1s; }

.spotify-tile.paused * {
  animation-play-state: paused !important;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arm-wobble { from { transform: rotate(-1.5deg); } to { transform: rotate(1deg); } }
@keyframes power { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(14px, -34px); opacity: 0; }
}
@keyframes sway-hips { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes arm-wave { from { transform: rotate(-60deg); } to { transform: rotate(20deg); } }
@keyframes bounce { to { transform: translateY(-6px); } }
@keyframes pump { from { transform: rotate(-40deg); } to { transform: rotate(30deg); } }
@keyframes point { from { transform: rotate(-80deg); } to { transform: rotate(40deg); } }
@keyframes twirl {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(-1); }
}
@keyframes hop { to { transform: translateY(-9px) rotate(-10deg); } }
@keyframes ball-swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes glint {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes sweep { from { transform: translateX(-70px); } to { transform: translateX(70px); } }

/* ── coffee carousel ── */
.carousel-track {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 300px);
  column-gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  overscroll-behavior-x: contain;
  padding: 14px 4px 26px;
  scrollbar-width: thin;
  scrollbar-color: var(--champagne) transparent;
}

.slide {
  scroll-snap-align: start;
}

/* when every photo fits, centre the row instead of hugging the left */
.carousel.fits .carousel-track {
  justify-content: center;
}

.polaroid {
  background: var(--cream);
  padding: 12px 12px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  transition: transform 0.3s;
}

.slide:nth-child(even) .polaroid {
  transform: rotate(1.4deg);
}

.slide:nth-child(3n) .polaroid {
  transform: rotate(-0.4deg);
}

.slide .polaroid:hover {
  transform: rotate(0) translateY(-4px);
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  background: var(--petal);
}

.polaroid figcaption {
  padding-top: 12px;
  text-align: center;
  font-family: var(--script);
  font-size: 26px;
  line-height: 1.1;
  color: var(--raspberry);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--raspberry);
  background: var(--cream);
  color: var(--raspberry);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.round:hover:not(:disabled) {
  background: var(--raspberry);
  color: var(--cream);
}

.round:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-count {
  min-width: 4ch;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

/* ── footer and the village ── */
.fun-footer {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.fun-footer p {
  padding: 14px 16px 24px;
  background: #a9c4a1;
  color: var(--ink);
}

.fun-footer p a {
  color: var(--ink);
}

.village {
  display: block;
  width: 100%;
  height: clamp(150px, 19vw, 230px);
  margin-top: 32px;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.village .leg,
.village .limb {
  stroke: var(--ink);
}

.village .bird path {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.6;
}

/* Each mover's plain transform is where it rests when motion is reduced;
   the animation takes over otherwise. Sizes are in SVG units. */
.village .jogger { transform: translate(300px, 201px); animation: jog 15s linear -4s infinite; }
.village .dog    { transform: translate(880px, 202px) scale(-1, 1); animation: fetch 19s linear -11s infinite; }
.village .lady   { transform: translate(560px, 201px); animation: stroll 50s linear -30s infinite; }
.village .mower  { transform: translate(400px, 194px); animation: mow 14s linear infinite; }
.village .water  { transform: translate(700px, 196px); animation: fetch-water 16s linear infinite; }
.village .b1     { transform: translate(300px, 42px); animation: fly 34s linear -8s infinite; }
.village .b2     { transform: translate(340px, 56px); animation: fly 30s linear -20s infinite; }

@keyframes jog {
  from { transform: translate(-60px, 201px); }
  to { transform: translate(1260px, 201px); }
}

@keyframes fetch {
  from { transform: translate(1300px, 202px) scale(-1, 1); }
  to { transform: translate(-120px, 202px) scale(-1, 1); }
}

@keyframes stroll {
  from { transform: translate(-80px, 201px); }
  to { transform: translate(1280px, 201px); }
}

/* turn around by squishing through scaleX(0), like a little pivot */
@keyframes mow {
  0%, 100% { transform: translate(400px, 194px); }
  45% { transform: translate(510px, 194px); }
  50% { transform: translate(510px, 194px) scale(-1, 1); }
  95% { transform: translate(400px, 194px) scale(-1, 1); }
}

@keyframes fetch-water {
  0%, 100% { transform: translate(655px, 196px); }
  35%, 48% { transform: translate(722px, 196px); }
  52% { transform: translate(722px, 196px) scale(-1, 1); }
  87%, 96% { transform: translate(655px, 196px) scale(-1, 1); }
}

@keyframes fly {
  from { transform: translate(-40px, 50px); }
  50% { transform: translate(600px, 36px); }
  to { transform: translate(1240px, 46px); }
}

/* limbs swing from the hip or shoulder, which is each group's origin */
.village .leg { animation: stride 0.5s ease-in-out infinite alternate; }
.village .leg.b { animation-delay: -0.5s; }
.village .leg.run { animation-duration: 0.28s; }
.village .leg.run.b { animation-delay: -0.28s; }
.village .leg.fast { animation-duration: 0.18s; }
.village .leg.fast.b { animation-delay: -0.18s; }
.village .leg.slow { animation-duration: 0.7s; }
.village .leg.slow.b { animation-delay: -0.7s; }

@keyframes stride {
  from { transform: rotate(24deg); }
  to { transform: rotate(-24deg); }
}

.village .gallop { animation: hop 0.28s ease-in-out infinite alternate; }
.village .dog .gallop { animation-duration: 0.18s; }
.village .bounce { animation: ball 0.7s infinite; }
.village .tail-wag { animation: wag 0.25s ease-in-out infinite alternate; }
.village .tail-swish { animation: swish 2.4s ease-in-out infinite alternate; }
.village .sway { animation: sway 2.6s ease-in-out infinite alternate; }
.village .sway.s2 { animation-delay: -1s; }
.village .sway.s3 { animation-delay: -1.8s; }
.village .flap { animation: flap 0.35s ease-in-out infinite alternate; }
.village .drop { animation: drip 0.9s ease-in infinite; }
.village .drop.d2 { animation-delay: -0.3s; }
.village .drop.d3 { animation-delay: -0.6s; }
.village .note { animation: note 1.6s ease-out infinite; }

@keyframes hop { to { transform: translateY(-2.5px); } }
@keyframes ball {
  0%, 100% { transform: translateY(0); animation-timing-function: ease-out; }
  50% { transform: translateY(-16px); animation-timing-function: ease-in; }
}
@keyframes wag { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes swish { from { transform: rotate(-6deg); } to { transform: rotate(22deg); } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes flap { to { transform: scaleY(0.35); } }
@keyframes drip {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(16px); opacity: 0; }
}
@keyframes note {
  from { transform: translate(0, 0); opacity: 1; }
  to { transform: translate(5px, -12px); opacity: 0; }
}

/* no point animating a village nobody can see */
.village.paused * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
