@keyframes arrive { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes atmosphere { from { opacity: .22; } to { opacity: 1; } }
@keyframes rise { from { opacity: .24; transform: translateY(70px) scale(.945); } to { opacity: 1; transform: none; } }
@keyframes drift { from { translate: -18px 0; } to { translate: 30px 0; } }
@keyframes flight { from { opacity: 0; translate: 45px 9px; } 22%, 70% { opacity: .88; } to { opacity: 0; translate: -110px -19px; } }
@keyframes dog-arrival { from { opacity: 0; transform: translate(-85px, -4px); } 45% { opacity: 1; transform: translate(-35px, 0); } 65% { transform: translate(-13px, -6px); } 85% { transform: translate(-2px, 0); } to { transform: none; } }
@keyframes deliver { 0% { opacity: 0; transform: translate(-85px, -4px) rotate(-7deg); } 62% { opacity: 1; transform: translate(-10px, -5px) rotate(-8deg); } 75% { transform: translate(1px, 0) rotate(0); } 100% { transform: translate(-55px, 37px) rotate(9deg); } }
@keyframes wag { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
@keyframes blink { 0%, 46%, 52%, 100% { transform: scaleY(1); } 49% { transform: scaleY(.14); } }
@keyframes flap { from { transform: none; } to { transform: scaleY(-.7); } }
@keyframes paper-open { from { opacity: 0; transform: translateY(-11px) scaleY(.92); } to { opacity: 1; transform: none; } }
@keyframes sunset { from { opacity: .86; } to { opacity: 0; } }
@keyframes fall { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(75px); } }
@keyframes lights-on { to { opacity: var(--alpha, 1); } }
@keyframes sway-tree { from { transform: skewX(-2deg); } to { transform: skewX(2deg); } }
@keyframes twinkle { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

.js .hero.is-active .hero-copy { animation: arrive .73s .12s both; }
.js .hero.is-active .sun-button, .js .hero.is-active .sun-halo { animation: rise 1.65s cubic-bezier(.22,.58,.28,1) both; }
.js .hero.is-active .city-ranges { animation: atmosphere 1.1s .13s both; }
.js .hero.is-active .city-distance { animation: atmosphere 1s .2s both; }
.js .hero.is-active .city-blocks { animation: atmosphere .95s .31s both; }
.hero.is-active .cloud { animation: drift 26s ease-in-out infinite alternate; }
.hero.is-active .cloud-alt { animation-direction: alternate-reverse; animation-duration: 34s; }
.hero.is-active .birds { opacity: 0; animation: flight 12s 1.1s ease-in-out infinite; }

.delivery.is-active .dog-run { animation: dog-arrival 1s cubic-bezier(.22,.56,.37,1) both; }
.dog-mail { transform-origin: 317px 212px; transform: translate(-55px, 37px) rotate(9deg); }
.delivery.is-active .dog-mail { animation: deliver 1.45s ease-out both; }
.dog-tail { transform-origin: 154px 197px; }
.dog-eyes { transform-box: fill-box; transform-origin: center; }
.delivery.is-active .dog-tail { animation: wag .8s ease-in-out 1s infinite; }
.delivery.is-active .dog-eyes { animation: blink 4.8s 1s infinite; }
.envelope.opening .envelope-art::before { animation: flap .26s ease-in-out both; }
.greeting-card, .paper { animation: paper-open .43s cubic-bezier(.2,.64,.34,1) both; transform-origin: top; }
.paper #letter-paragraphs p { animation: arrive .35s calc(.07s + var(--line-order) * 32ms) both; }

.night-sky::after, .setting-sun { opacity: 0; }
.night.is-active .night-sky::after { animation: sunset 1.85s ease-out both; }
.night.is-active .setting-sun { animation: fall 1.45s ease-in both; }
.night.is-active .moon { animation: rise 1.85s .15s ease-out both; }
.night.is-active .night-content { animation: arrive 1.05s .22s both; }
.city-window { opacity: var(--alpha); }
.js .night.is-active .city-window, .js .night.is-active .lamp-glow, .js .night.is-active .lamp-bulb { opacity: 0; animation: lights-on .66s var(--delay) both; }
.night.is-active .sway { transform-origin: 0 0; animation: sway-tree 5s ease-in-out infinite alternate; }
.night.is-active .twinkle { animation: twinkle 4.6s var(--delay) ease-in-out infinite; }
.offscreen :is(.cloud, .birds, .dog-tail, .dog-eyes, .sway, .twinkle) { animation-play-state: paused; }

html.lite .cloud, html.lite .birds, html.lite .dog-tail, html.lite .dog-eyes, html.lite .twinkle, html.lite .sway { animation: none !important; }
html.lite .night .city-window { animation-duration: .25s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .night-sky::after, .setting-sun, .birds { opacity: 0 !important; }
}
