/* The Crooked Cottage
   Colours below are the daytime defaults. script.js blends them towards dusk and night
   by setting the same variables, following the real time (sun position) at the cottage.
   --n is "how dark it is": 0 = full day, 1 = deep night. */
:root {
  --n: 0;
  --bg-top: #EDE3CF;
  --bg-bottom: #EDE3CF;
  --card: #F4EDE0;
  --text: #1E1B2E;
  --card-text: #1E1B2E;
  --accent-text: #5C2E4A;
  --kicker: #A4531C;
  --line: rgba(30, 27, 46, .35);
  --btn-bg: #5C2E4A;
  --btn-text: #F4EDE0;
  --btn-glow: rgba(92, 46, 74, .35);

  --ink: #1E1B2E;
  --parchment: #EDE3CF;
  --plum: #5C2E4A;
  --ember: #D9772B;
  --moss: #5B6B3A;

  --display: 'IM Fell English', Georgia, serif;
  --spooky: 'Pirata One', Georgia, serif;
  --body: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-bottom);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.25rem;
  line-height: 1.55;
  overflow-x: hidden;
  transition: color 1.2s ease;
}

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

h1, h2 { font-weight: 400; margin: 0; }
p { margin: 0; }

/* ---------- Sky layers ---------- */
.sky, .stars, .night-visitors {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.sky {
  z-index: -3;
  background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom) 75%);
  transition: background 1.2s ease;
}
.stars { z-index: -2; opacity: calc((var(--n) - .45) * 1.9); transition: opacity 1.2s ease; }
.star {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: #FFF6DE;
  box-shadow: 0 0 6px rgba(255, 240, 200, .8);
  animation: twinkle var(--d, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.shooting {
  position: absolute;
  width: 110px;
  height: 2px;
  background: linear-gradient(to left, rgba(255, 246, 222, .95), rgba(255, 246, 222, 0));
  border-radius: 2px;
  transform: rotate(-24deg);
  animation: shoot 1.1s ease-out forwards;
}
.night-visitors { z-index: 5; overflow: hidden; }

/* A bat flapping across the top of the page at night */
.bat {
  position: absolute;
  left: -60px;
  width: 44px;
  height: 22px;
  animation: fly var(--dur, 9s) linear forwards;
}
.bat svg { width: 100%; height: 100%; animation: flap .28s ease-in-out infinite alternate; transform-origin: center; }
.bat path { fill: #0E0B16; stroke: rgba(237, 227, 207, .35); stroke-width: 1; }

/* A little ghost drifting by */
.drift-ghost {
  position: absolute;
  left: -70px;
  width: 46px;
  animation: drift-across var(--dur, 22s) linear forwards;
  opacity: .85;
  filter: drop-shadow(0 0 10px rgba(255, 246, 222, .55));
}
.drift-ghost svg { width: 100%; height: auto; animation: bob 2.6s ease-in-out infinite; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 40px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scene {
  position: relative;
  width: min(330px, 78vw);
}
.cottage { width: 100%; height: auto; overflow: visible; display: block; }

.clouds {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 230%;
  transform: translateX(-50%);
  opacity: max(0, calc(.9 - var(--n) * 2.2));
  transition: opacity 1.2s ease;
}
.cloud { fill: #FFFFFF; opacity: .7; }
.cloud.c1 { animation: cloud-drift 60s linear infinite; }
.cloud.c2 { animation: cloud-drift 85s linear infinite reverse; }

/* Cottage parts (the house gains pale outlines after dark so it doesn't disappear) */
.house { fill: #1E1B2E; stroke: rgba(237, 227, 207, 0); stroke-width: 2.5; stroke-linejoin: round; transition: fill 1.2s, stroke 1.2s; }
.roof  { fill: #5C2E4A; stroke: rgba(237, 227, 207, 0); stroke-width: 2.5; stroke-linejoin: round; transition: stroke 1.2s; }
.door  { fill: #5C2E4A; stroke: rgba(237, 227, 207, 0); stroke-width: 2; transition: stroke 1.2s; }
.is-dark .house { fill: #2B2540; stroke: rgba(237, 227, 207, .9); }
.is-dark .roof, .is-dark .door { stroke: rgba(237, 227, 207, .9); }
.mullion { stroke: #1E1B2E; stroke-width: 3; }
.ground { fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; transition: stroke 1.2s; }
.grass { stroke: var(--moss); stroke-width: 3; stroke-linecap: round; }
.is-dark .grass { stroke: #7E9A4E; }

.moon { opacity: calc(.6 + var(--n) * .4); transition: opacity 1.2s; }
.moon-glow { opacity: var(--n); transition: opacity 1.2s; }

.window { fill: #D9772B; animation: flicker 5s ease-in-out infinite; }
.window-glow { fill: #F3A14B; opacity: calc(.12 + var(--n) * .8); transition: opacity 1.2s; animation: glow-pulse 4s ease-in-out infinite; }
.window-ghost { opacity: 0; transition: opacity 1.5s ease; }
.witching .window-ghost { animation: peek 9s ease-in-out infinite; }

/* Chimney smoke: puffs rise, swell, drift and fade, one after another */
.puff {
  fill: var(--smoke, rgba(30, 27, 46, .28));
  transform-box: fill-box;
  transform-origin: center;
  animation: smoke 7s ease-out infinite;
  opacity: 0;
}
.is-dark .puff { fill: rgba(237, 227, 207, .45); }
.puff:nth-child(2) { animation-delay: -1.4s; }
.puff:nth-child(3) { animation-delay: -2.8s; }
.puff:nth-child(4) { animation-delay: -4.2s; }
.puff:nth-child(5) { animation-delay: -5.6s; }

/* Fireflies / will-o'-the-wisps around the cottage at night */
.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFD27A;
  box-shadow: 0 0 10px 3px rgba(255, 196, 92, .7);
  opacity: calc((var(--n) - .55) * 2.2);
  animation: wander 9s ease-in-out infinite;
  pointer-events: none;
}
.f1 { left: 8%;  top: 62%; animation-duration: 11s; }
.f2 { left: 88%; top: 70%; animation-duration: 9s;  animation-delay: -3s; }
.f3 { left: 20%; top: 86%; animation-duration: 13s; animation-delay: -6s; }
.f4 { left: 74%; top: 52%; animation-duration: 10s; animation-delay: -2s; }
.f5 { left: 96%; top: 88%; animation-duration: 12s; animation-delay: -8s; }
.f6 { left: -2%; top: 80%; animation-duration: 14s; animation-delay: -4s; }

/* ---------- Visitors who pop up around the cottage ----------
   Each .peek-anim rests hidden (behind the house, below the ground, above the eaves or off-stage)
   and plays its little routine once when script.js adds .show. --out is the "seen" pose,
   used instead of the movement for anyone who prefers less motion. */
.peek-anim { opacity: 0; transform-origin: 0 0; pointer-events: none; }

/* Witch on a broomstick: a silhouette, like the bats */
.witch { --out: translate(150px, 0); }
.witch.show { animation: witch-fly 7s linear both; }
.w-body path, .w-body circle { fill: #0E0B16; stroke: rgba(237, 227, 207, .45); stroke-width: .7; stroke-linejoin: round; }
.w-bob { animation: bob 1.3s ease-in-out infinite; }

/* Ghost out of the chimney */
.ghost { --out: translate(0, -44px); }
.ghost.show { animation: ghost-rise 6s ease-in-out both; }
.g-body { fill: #FBF7EE; stroke: var(--text); stroke-width: 6; stroke-linejoin: round; transition: stroke 1.2s; }
.g-eyes, .g-mouth { fill: #1E1B2E; }
.g-eyes { transform-box: fill-box; transform-origin: center; animation: blink 3s infinite; }
.is-dark .ghost { filter: drop-shadow(0 0 6px rgba(255, 246, 222, .7)); }

/* Little Krampus round the right-hand corner */
.krampus { --out: translate(36px, 2px) rotate(14deg); }
.krampus.show { animation: krampus-peek 5.5s ease-in-out both; }
.k-horn { fill: #EDE3CF; stroke: var(--text); stroke-width: 5; stroke-linejoin: round; transition: stroke 1.2s; }
.k-head { fill: #5C2E4A; stroke: var(--text); stroke-width: 5; transition: stroke 1.2s; }
.k-tongue { fill: #B0423A; transform-box: fill-box; transform-origin: 50% 0; animation: wag .35s ease-in-out infinite alternate; }
.k-eye { fill: #D9772B; }
.is-dark .k-eye { fill: #F3A14B; filter: drop-shadow(0 0 4px rgba(243, 161, 75, .9)); }
.k-mouth { fill: none; stroke: #EDE3CF; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* The witch's cat round the left-hand corner */
.cat { --out: translate(-46px, 0) rotate(-12deg); }
.cat.show { animation: cat-peek 5.5s ease-in-out both; }
.c-fur { fill: #0E0C17; stroke: var(--text); stroke-width: 5; stroke-linejoin: round; transition: stroke 1.2s; }
.c-hat { fill: #5C2E4A; stroke: var(--text); stroke-width: 5; stroke-linejoin: round; transition: stroke 1.2s; }
.c-band { fill: #D9772B; }
.c-whisker { fill: none; stroke: #EDE3CF; stroke-width: 3; stroke-linecap: round; opacity: .7; }
.c-eyes ellipse { fill: #D9772B; }
.is-dark .c-eyes ellipse { fill: #F3C26B; }
.c-pupil { fill: #0E0C17; }
.c-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4s infinite; }
.c-nose { fill: #B0628F; }

/* Spider from the eaves */
.spider { --out: translate(0, 40px); transform: translateY(-24px); }
.spider.show { animation: spider-drop 6.5s ease-in-out both; }
.s-thread { stroke: var(--text); stroke-width: 1; opacity: .6; transition: stroke 1.2s; }
.s-legs { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; transition: stroke 1.2s; }
.s-body { fill: #1E1B2E; stroke: var(--text); stroke-width: 1; transition: stroke 1.2s; }
.s-eye { fill: #F3A14B; }
.s-wiggle { transform-box: fill-box; transform-origin: 50% 0; animation: dangle 1.8s ease-in-out infinite; }

/* Jack-o'-lantern out of the garden */
.pumpkin { --out: translate(0, 0); transform: translateY(34px); }
.pumpkin.show { animation: pumpkin-pop 5s ease-in-out both; }
.p-body { fill: #D9772B; stroke: var(--text); stroke-width: 2; transition: stroke 1.2s; }
.p-rib { fill: none; stroke: #1E1B2E; stroke-width: 1.5; opacity: .3; }
.p-stem { fill: none; stroke: #5B6B3A; stroke-width: 3; stroke-linecap: round; }
.is-dark .p-stem { stroke: #7E9A4E; }
.p-face { fill: #F3C26B; animation: flicker 3s ease-in-out infinite; }
.is-dark .p-face { filter: drop-shadow(0 0 4px rgba(255, 196, 92, .95)); }

/* Knock on the door to summon someone */
.door-wrap { transform-box: fill-box; transform-origin: 0 100%; }
.door-wrap.knocked { animation: knock .5s ease-in-out; }
.knock {
  position: absolute;
  left: 54%;
  top: 77%;
  width: 14%;
  height: 16.5%;
  padding: 0;
  border: 0;
  border-radius: 50% 50% 4px 4px / 35% 35% 4px 4px;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  transition: background .3s;
}
.knock:hover { background: rgba(243, 161, 75, .18); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.the { font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 4vw, 2.1rem); margin-top: 4px; }
h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 11vw, 6.2rem);
  line-height: 1;
  transform: rotate(-2deg);
  animation: settle 1.6s cubic-bezier(.2, 1.4, .4, 1) both;
}
.tagline { font-style: italic; font-size: clamp(1.3rem, 3.5vw, 1.8rem); color: var(--accent-text); margin-top: 18px; transition: color 1.2s; }
.maker {
  margin-top: 18px;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  opacity: .8;
}
.sky-note {
  margin-top: 14px;
  font-style: italic;
  font-size: 1.05rem;
  opacity: .8;
  min-height: 1.6em;
  transition: opacity .6s;
}

/* ---------- Sections ---------- */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
section h2 { font-family: var(--display); font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; margin-bottom: 12px; }

.notice {
  background: var(--card);
  color: var(--card-text);
  border: 2px solid var(--card-text);
  border-radius: 10px;
  outline: 1px solid var(--card-text);
  outline-offset: -8px;
  padding: 36px 32px;
  text-align: center;
  transition: background 1.2s, color 1.2s, border-color 1.2s;
}
.notice p { margin-bottom: 22px; }

.about { text-align: center; padding: 0 8px; }

.divider { display: flex; justify-content: center; color: var(--text); opacity: .55; transition: color 1.2s; }
.divider svg { width: 220px; height: 22px; }
.divider path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.divider path.fill { fill: currentColor; stroke: none; }

/* Specimen card for Tiny Hauntings */
.specimen {
  position: relative;
  background: var(--card);
  color: var(--card-text);
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  gap: 28px;
  align-items: center;
  transition: background 1.2s, color 1.2s, transform .4s ease;
}
.specimen:hover { transform: rotate(-.6deg) translateY(-3px); }
.hole {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--card-text);
  background: var(--bg-bottom);
}
.jar { width: 150px; flex: 0 0 150px; height: auto; color: var(--card-text); overflow: visible; }
.jar-ghost { animation: bob 3.6s ease-in-out infinite; }
.is-dark .jar-ghost { filter: drop-shadow(0 0 12px rgba(255, 246, 222, .7)); }
.eyes { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
.glint { opacity: .5; transform-box: view-box; animation: glint 7s ease-in-out infinite; }
.specimen:hover .glint { animation-duration: 1.6s; }
.kicker {
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--kicker);
  margin-bottom: 4px;
  transition: color 1.2s;
}
.specimen h2 { font-family: var(--spooky); font-size: clamp(2.4rem, 7vw, 3.2rem); }

.commissions { text-align: center; }
.commissions p { margin-bottom: 22px; }
.commissions .small { margin: 14px 0 0; font-size: 1.05rem; }

/* Buttons: a lantern-like glow on hover */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 0 0 0 var(--btn-glow);
  transition: background 1.2s, color 1.2s, box-shadow .35s ease, transform .35s ease;
}
.button:hover { color: var(--btn-text); box-shadow: 0 0 22px 6px var(--btn-glow); transform: translateY(-2px) rotate(-1deg); }

/* ---------- Footer ---------- */
footer { text-align: center; padding: 24px 16px 40px; font-size: 1rem; opacity: .75; }

/* ---------- Sky preview switch ---------- */
.sky-switch {
  position: absolute;          /* sits in the top corner and scrolls away, so it never covers text */
  right: 16px;
  top: 16px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--card-text);
  background: var(--card);
  color: var(--card-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 1.2s, color 1.2s, border-color 1.2s, transform .3s;
}
.sky-switch:hover { transform: rotate(-12deg) scale(1.06); }
.sky-switch svg { width: 24px; height: 24px; }
.sky-switch svg * { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sky-switch svg .fill { fill: currentColor; }
.sky-switch g { display: none; }
.sky-switch[data-mode="auto"] .ico-auto,
.sky-switch[data-mode="day"] .ico-day,
.sky-switch[data-mode="dusk"] .ico-dusk,
.sky-switch[data-mode="night"] .ico-night { display: inline; }
.sky-toast {
  position: absolute;
  right: 74px;
  top: 26px;
  z-index: 10;
  background: var(--card);
  color: var(--card-text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 14px;
  font-size: 1rem;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.sky-toast.show { opacity: 1; transform: none; }

/* ---------- Gentle reveal on scroll (only when JavaScript is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.seen { opacity: 1; transform: none; }

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .specimen { flex-direction: column; text-align: center; padding: 40px 20px 28px; }
  .jar { width: 120px; flex-basis: auto; }
  .notice { padding: 32px 20px; }
}

/* ---------- Animations ---------- */
@keyframes smoke {
  0%   { transform: translate(0, 0) scale(.35); opacity: 0; }
  12%  { opacity: 1; }
  50%  { transform: translate(9px, -42px) scale(1.25); }
  100% { transform: translate(-4px, -92px) scale(2.3); opacity: 0; }
}
@keyframes flicker {
  0%, 100% { opacity: 1; } 42% { opacity: .9; } 47% { opacity: .62; } 52% { opacity: .95; } 70% { opacity: .82; }
}
@keyframes glow-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes peek {
  0%, 55%, 100% { opacity: 0; transform: translateY(6px); }
  65%, 85% { opacity: 1; transform: translateY(0); }
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes shoot { from { transform: translate(0, 0) rotate(-24deg); opacity: 1; } to { transform: translate(-260px, 116px) rotate(-24deg); opacity: 0; } }
@keyframes fly {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(28vw, -24px); }
  50%  { transform: translate(55vw, 18px); }
  75%  { transform: translate(82vw, -14px); }
  100% { transform: translate(calc(100vw + 120px), 10px); }
}
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
@keyframes drift-across { to { transform: translateX(calc(100vw + 160px)); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes glint { 0%, 70% { transform: translateX(-60px) rotate(20deg); } 100% { transform: translateX(300px) rotate(20deg); } }
@keyframes wander {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(14px, -18px); }
  50% { transform: translate(-6px, -30px); }
  75% { transform: translate(-16px, -10px); }
}
@keyframes cloud-drift { from { transform: translateX(-40px); } to { transform: translateX(40px); } }
@keyframes settle {
  0% { transform: rotate(-7deg) translateY(10px); opacity: 0; }
  100% { transform: rotate(-2deg); opacity: 1; }
}

/* Visitors */
@keyframes witch-fly {
  0%   { transform: translate(-90px, 12px); opacity: 0; }
  8%   { opacity: 1; }
  30%  { transform: translate(20px, -6px); }
  50%  { transform: translate(130px, 6px); }
  72%  { transform: translate(250px, -10px); }
  92%  { opacity: 1; }
  100% { transform: translate(400px, -2px); opacity: 0; }
}
@keyframes ghost-rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 1; }
  24%  { transform: translate(0, -48px); }
  30%  { transform: translate(0, -42px); }
  42%  { transform: translate(-6px, -46px) rotate(-6deg); }
  56%  { transform: translate(6px, -44px) rotate(6deg); }
  70%  { transform: translate(0, -46px); }
  88%  { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes krampus-peek {
  0%   { transform: translate(0, 0); opacity: 0; }
  8%   { opacity: 1; }
  22%  { transform: translate(36px, 2px) rotate(14deg); }
  30%  { transform: translate(33px, 2px) rotate(6deg); }
  38%  { transform: translate(37px, 2px) rotate(17deg); }
  46%  { transform: translate(34px, 2px) rotate(9deg); }
  64%  { transform: translate(36px, 2px) rotate(14deg); }
  70%  { transform: translate(28px, 4px) rotate(8deg); }
  84%  { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes cat-peek {
  0%   { transform: translate(0, 0); opacity: 0; }
  8%   { opacity: 1; }
  24%  { transform: translate(-46px, 0) rotate(-12deg); }
  40%  { transform: translate(-43px, 0) rotate(-4deg); }
  52%  { transform: translate(-48px, 0) rotate(-16deg); }
  66%  { transform: translate(-46px, 0) rotate(-12deg); }
  84%  { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes spider-drop {
  0%   { transform: translateY(-24px); opacity: 1; }
  22%  { transform: translateY(44px); }
  28%  { transform: translateY(36px); }
  34%  { transform: translateY(41px); }
  66%  { transform: translateY(40px); }
  72%  { transform: translateY(34px); }
  78%  { transform: translateY(38px); }
  100% { transform: translateY(-24px); opacity: 1; }
}
@keyframes pumpkin-pop {
  0%   { transform: translateY(34px); opacity: 1; }
  14%  { transform: translateY(-5px) scale(.94, 1.06); }
  20%  { transform: translateY(0) scale(1.06, .94); }
  26%  { transform: translateY(0) scale(1); }
  48%  { transform: translateY(0) rotate(-6deg); }
  58%  { transform: translateY(0) rotate(5deg); }
  68%  { transform: translateY(0) rotate(0); }
  82%  { transform: translateY(0); }
  100% { transform: translateY(34px); opacity: 1; }
}
@keyframes wag { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
@keyframes dangle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes knock {
  0%, 100% { transform: none; }
  20% { transform: rotate(-2deg); }
  40% { transform: rotate(1.5deg); }
  60% { transform: rotate(-1.5deg); }
  80% { transform: rotate(1deg); }
}

/* Anyone who prefers less motion still gets the changing sky, just without the movement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .puff:nth-child(1) { opacity: .7; transform: translate(4px, -20px) scale(1); }
  .puff:nth-child(2) { opacity: .4; transform: translate(-2px, -48px) scale(1.6); }
  .js .reveal { opacity: 1; transform: none; }
  .witching .window-ghost { opacity: 1; }
  .peek-anim.show { opacity: 1; transform: var(--out); }
}
