.quebec-life {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  container-type: inline-size;
  --quebec-santa-cycle: 32s;
}
.quebec-river {
  position: absolute;
  inset: 0;
  /* Water behind the spire, rooftops and the large spruce. */
  clip-path: polygon(63% 30%, 68.5% 29%, 68.9% 31.8%, 70.4% 32.4%,
    70.8% 35.7%, 72% 36.7%, 73.9% 37.7%, 75.4% 38.2%, 77.2% 38.7%, 80% 39.8%,
    81.4% 39.7%, 83% 39.8%, 85.3% 39.7%, 85.6% 37.8%, 86.5% 37.8%,
    87% 39.4%, 89.2% 39.2%, 90.5% 38.7%, 93% 37.8%, 95% 36.6%,
    96.6% 33.9%, 97.8% 28.5%, 100% 28.5%, 100% 25.4%, 63% 25.4%);
}
.quebec-steamer {
  position: absolute;
  left: 65%;
  top: 35.8%;
  width: 6.5cqw;
  transform: translate(-50%, -100%);
  animation: quebec-crossing 47s -12s linear infinite;
}
.quebec-life .quebec-steamer img { position: relative; width: 100%; height: auto; }
.quebec-wake {
  position: absolute;
  left: -72%;
  bottom: 0;
  width: 157%;
  height: 17%;
  background: radial-gradient(ellipse at 69% 65%, #e3f6f5b3, #c5edff66 40%, transparent 72%);
  transform: rotate(2deg);
}
.quebec-ship-smoke {
  position: absolute;
  left: 43%;
  top: 19%;
  width: 19%;
  aspect-ratio: 1.6;
  border-radius: 50%;
  background: radial-gradient(ellipse, #d6e7f6aa, #d9eafa44 55%, transparent 75%);
  animation: quebec-ship-puff 3.7s linear infinite;
}
.quebec-ship-smoke + .quebec-ship-smoke { animation-delay: -1.85s; }
@keyframes quebec-crossing {
  0% { left: 64%; top: 34.4% }
  89%, 100% { left: 109%; top: 37% }
}
@keyframes quebec-ship-puff {
  0% { transform: translate(-50%,-50%) scale(.4); opacity: 0 }
  15% { opacity: .9 }
  100% { transform: translate(-290%,-240%) scale(1.6); opacity: 0 }
}

.quebec-chimney {
  position: absolute;
  left: 40.1%;
  top: 20.1%;
}
.quebec-chimney::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -.65cqw;
  width: 1.7cqw;
  height: 3.7cqw;
  background: radial-gradient(ellipse at 50% 77%, #edf2f5a8, #e7f1fb48 42%, transparent 71%);
  filter: blur(.14cqw);
  transform: rotate(11deg);
  transform-origin: center bottom;
}
.quebec-chimney i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 6.9cqw;
  aspect-ratio: 1.25;
  background:
    radial-gradient(ellipse at 37% 57%, #eef5ffb3 0%, #e7f1fb45 38%, transparent 66%),
    radial-gradient(ellipse at 63% 42%, #fff0e5ad 0%, #e1edff5c 34%, transparent 63%);
  filter: blur(.16cqw);
  animation: quebec-chimney-puff 7.6s var(--phase) linear infinite;
}
@keyframes quebec-chimney-puff {
  0% { transform: translate(-50%, 9%) scale(.12) rotate(6deg); opacity: 0 }
  14% { opacity: .72 }
  43% { transform: translate(-35%, -45%) scale(.48) rotate(-14deg); opacity: .76 }
  80% { opacity: .44 }
  100% { transform: translate(var(--drift), -155%) scale(1.33) rotate(-28deg); opacity: 0 }
}

.quebec-window {
  position: absolute;
  top: 53.35%;
  width: 4.9%;
  height: 9.2%;
  overflow: hidden;
  clip-path: polygon(0 100%, 0 38%, 5% 25%, 15% 14%, 32% 5%, 50% 2%, 68% 5%,
    85% 14%, 95% 25%, 100% 38%, 100% 100%);
  mask-image: linear-gradient(90deg, #000 28%, transparent 28% 32%, #000 32% 58%, transparent 58% 63%, #000 63%),
    linear-gradient(#000 35%, transparent 35% 39%, #000 39% 70%, transparent 70% 74%, #000 74%);
  mask-composite: intersect;
  mix-blend-mode: multiply;
}
.quebec-window-west { left: 37.9%; }
.quebec-window-east { left: 57.5%; --window-offset: -400%; }
.quebec-window > i {
  position: absolute;
  bottom: -19%;
  left: -100%;
  width: 82%;
  height: 121%;
  background: #452928;
  mask: url("north-village/santa-presents.webp") center bottom / contain no-repeat;
  opacity: 0;
  animation: quebec-santa-walk var(--quebec-santa-cycle) linear infinite, quebec-santa-step .95s ease-in-out infinite alternate;
}
/* Both apertures show the same route in room coordinates. */
@keyframes quebec-santa-walk {
  0%, 4% { left: calc(-110% + var(--window-offset, 0%)); opacity: .76; transform: scaleX(-1) }
  34%, 72% { left: calc(515% + var(--window-offset, 0%)); opacity: .76; transform: scaleX(-1) }
  73% { transform: scaleX(1) }
  96%, 100% { left: calc(-110% + var(--window-offset, 0%)); opacity: .76; transform: scaleX(1) }
}
@keyframes quebec-santa-step { from { translate: 0 2% } to { translate: 0 -3% } }

.quebec-wrapping {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: quebec-wrap-cameo var(--quebec-santa-cycle) linear infinite;
}
.quebec-santa-wrapper {
  position: absolute;
  inset: 2% 9% 10%;
  background: url("quebec-life/santa-wrap.webp") 0 0 / 400% 100% no-repeat;
  filter: saturate(.7) brightness(.84) sepia(.13);
  animation: quebec-wrap-poses var(--quebec-santa-cycle) step-end infinite;
}
.quebec-wrap-bench {
  position: absolute;
  inset: 91% 0 0;
  border-top: 1px solid #c48b45;
  background: #593222;
}
.quebec-wrap-parcel {
  position: absolute;
  left: 35%;
  bottom: 8%;
  width: 35%;
  height: 28%;
  border-radius: 10% 10% 4% 4%;
  background: linear-gradient(165deg, #fff4d3 0 16%, #b75e35 16% 100%);
  box-shadow: inset -.18cqw 0 #6e2b233f;
  transform-origin: center bottom;
  animation: quebec-wrap-paper var(--quebec-santa-cycle) ease-in-out infinite;
}
.quebec-wrap-parcel b {
  position: absolute;
  inset: 0 41%;
  opacity: 0;
  background: linear-gradient(90deg,#dc921f,#ffe092 55%,#e9a931);
  transform-origin: center bottom;
  animation: quebec-wrap-ribbon var(--quebec-santa-cycle) ease-out infinite;
}
.quebec-wrap-parcel em {
  position: absolute;
  left: 26%;
  bottom: 92%;
  width: 47%;
  height: 37%;
  opacity: 0;
  transform-origin: center bottom;
  background: #ffdc78;
  clip-path: polygon(0 40%, 17% 4%, 51% 55%, 82% 7%, 100% 34%, 99% 81%, 56% 100%, 6% 85%);
  animation: quebec-wrap-bow var(--quebec-santa-cycle) ease-out infinite;
}
@keyframes quebec-wrap-cameo {
  0%, 35%, 70%, 100% { opacity: 0; translate: 20% 2% }
  39%, 64% { opacity: 1; translate: 0 0 }
}
@keyframes quebec-wrap-poses {
  0%, 48%, 68%, 100% { background-position-x: 0 }
  42% { background-position-x: 33.333% }
  53% { background-position-x: 66.667% }
  59% { background-position-x: 100% }
}
@keyframes quebec-wrap-paper {
  0%, 38% { scale: 1 .55; rotate: -10deg }
  44% { scale: 1 .82; rotate: 5deg }
  49%, 64% { scale: 1 1; rotate: 0deg; translate: 0 0 }
  71%, 100% { scale: .96 .96; translate: 80% -30% }
}
@keyframes quebec-wrap-ribbon {
  0%, 51% { opacity: 0; scale: 1 0 }
  53%, 100% { opacity: 1; scale: 1 1 }
}
@keyframes quebec-wrap-bow {
  0%, 56% { opacity: 0; scale: .3 .3 }
  58.5% { opacity: 1; scale: 1.2 1.16 }
  60%, 100% { opacity: 1; scale: 1 1 }
}

.quebec-tree-party {
  position: absolute;
  left: 20.7%;
  top: 48%;
  width: 17%;
  height: 29%;
  --party-cycle: 16s;
}
.quebec-tree-party::before,
.quebec-party-guest::after {
  content: "";
  position: absolute;
  background: radial-gradient(ellipse, #344d746b 0%, #52688d32 42%, transparent 72%);
  pointer-events: none;
}
.quebec-tree-party::before { inset: auto 25% 0 24%; height: 9%; }
.quebec-party-guest::after { inset: auto 13% -3%; height: 14%; z-index: -1; }
.quebec-life .quebec-party-tree {
  position: absolute;
  left: 26%;
  bottom: 3%;
  width: 61%;
  height: 91%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 .28cqw .23cqw #4b699e50);
}
.quebec-party-guest {
  position: absolute;
  bottom: 0;
  width: 35%;
  height: 48%;
  transform-origin: 50% 97%;
  background: var(--guest-image) center bottom / contain no-repeat;
  filter: drop-shadow(0 .18cqw .14cqw #405e875e);
}
.quebec-party-guest-left {
  --guest-image: url("quebec-life/party-left.webp");
  left: 5%;
  animation: quebec-decorate-left var(--party-cycle) ease-in-out infinite;
}
.quebec-party-guest-right {
  --guest-image: url("quebec-life/party-right.webp");
  left: 65%;
  height: 44%;
  animation: quebec-decorate-right var(--party-cycle) ease-in-out infinite;
}
@keyframes quebec-decorate-left {
  0%, 47%, 100% { transform: translateX(-9%) rotate(-3deg) }
  13% { transform: translateX(5%) rotate(3deg) }
  24%, 33% { transform: translateX(18%) rotate(14deg) }
  67% { transform: translateX(-5%) rotate(-6deg) }
}
@keyframes quebec-decorate-right {
  0%, 41%, 98%, 100% { transform: translateX(10%) rotate(3deg) }
  52% { transform: translateX(-5%) rotate(-6deg) }
  63%, 71% { transform: translateX(-17%) rotate(-15deg) }
  87% { transform: translateX(5%) rotate(1deg) }
}
.quebec-party-bauble {
  position: absolute;
  width: 5%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle at 32% 31%, #fff6c9, var(--bauble-color) 55%, #762929);
  box-shadow: 0 0 .23cqw var(--bauble-color);
}
.quebec-party-gold {
  --bauble-color: #ec9a25;
  left: 49%;
  top: 57%;
  animation: quebec-hang-gold var(--party-cycle) ease-in-out infinite;
}
.quebec-party-red {
  --bauble-color: #e03f48;
  left: 66%;
  top: 50%;
  animation: quebec-hang-red var(--party-cycle) ease-in-out infinite;
}
@keyframes quebec-hang-gold {
  0%, 16%, 99%, 100% { opacity: 0; left: 33%; top: 49% }
  20% { opacity: 1; left: 36%; top: 51% }
  31%, 93% { opacity: 1; left: 49%; top: 57% }
  98% { opacity: 0; left: 49%; top: 57% }
}
@keyframes quebec-hang-red {
  0%, 54%, 99%, 100% { opacity: 0; left: 76%; top: 49% }
  57% { opacity: 1; left: 73%; top: 51% }
  70%, 93% { opacity: 1; left: 66%; top: 55% }
  98% { opacity: 0; left: 66%; top: 55% }
}
.quebec-party-star {
  position: absolute;
  left: 56.5%;
  top: 6.5%;
  transform: translate(-50%, -50%);
  color: #fff2ac;
  font: 1.5cqw/1 sans-serif;
  text-shadow: 0 0 .5cqw #ffc655;
  opacity: .62;
  animation: quebec-party-star var(--party-cycle) ease-in-out infinite;
}
@keyframes quebec-party-star {
  0%, 74%, 100% { opacity: .55; scale: .74 }
  83%, 90% { opacity: 1; scale: 1.34 }
}
.quebec-party-lantern {
  position: absolute;
  inset: 0;
  background: url("quebec-life/scene.webp") center / 100% 100% no-repeat;
  clip-path: polygon(26.5% 66.7%, 27.05% 67.3%, 27.25% 68.5%, 28.5% 69.7%,
    28.02% 70.4%, 27.77% 74.35%, 28.58% 75.3%, 29.04% 76.4%,
    24.6% 76.6%, 24.8% 75.2%, 25.15% 74.35%, 25% 70.61%, 24.6% 69.7%,
    25.65% 68.61%, 26% 67.24%);
}

.quebec-fox {
  position: absolute;
  left: 79.7%;
  top: 74.8%;
  width: 5.7cqw;
  aspect-ratio: 1.25;
  transform: translate(-50%, -98%);
  animation: quebec-fox-path 24s linear infinite;
}
.quebec-fox::before {
  content: "";
  position: absolute;
  inset: auto 6% -6% 8%;
  height: 20%;
  background: radial-gradient(ellipse, #36568070, transparent 69%);
}
.quebec-fox-facing {
  position: absolute;
  inset: 0;
  animation: quebec-fox-turn 24s ease-in-out infinite;
}
.quebec-fox-facing i, .quebec-fox-facing b {
  position: absolute;
  inset: 0;
  background: url("quebec-life/fox-rest.webp") 0 0 / 400% 100% no-repeat;
}
.quebec-fox-facing i { animation: quebec-fox-scratch 24s step-end infinite; }
.quebec-fox-facing b {
  background-image: url("quebec-life/fox-walk.webp");
  opacity: 0;
  animation: quebec-fox-gait 24s linear infinite, quebec-fox-walking 24s step-end infinite;
}
@keyframes quebec-fox-path {
  0%, 11%, 83%, 100% { left: 79.7%; top: 74.8% }
  25%, 72% { left: 84.4%; top: 76.2% }
  37%, 60% { left: 88.4%; top: 74.9% }
}
@keyframes quebec-fox-turn {
  0%, 56%, 89%, 100% { transform: scaleX(1) }
  58%, 87% { transform: scaleX(-1) }
}
@keyframes quebec-fox-walking {
  0%, 37%, 83%, 100% { opacity: 0 }
  11%, 60% { opacity: 1 }
}
@keyframes quebec-fox-scratch {
  0%, 37%, 49%, 100% { opacity: 1; background-position-x: 0 }
  39%, 46% { background-position-x: 33.333% }
  41%, 43%, 45% { background-position-x: 66.667% }
  42%, 44%, 47% { background-position-x: 33.333% }
  48% { background-position-x: 100% }
  11%, 60% { opacity: 0 }
  83% { opacity: 1; background-position-x: 0 }
}
@keyframes quebec-fox-gait {
  0%, 11%, 15%, 19%, 23%, 27%, 31%, 35%, 60%, 64%, 68%, 72%, 76%, 80% {
    background-position-x: 0;
    animation-timing-function: steps(4, jump-none);
  }
  14.99%, 18.99%, 22.99%, 26.99%, 30.99%, 34.99%, 37%, 63.99%, 67.99%, 71.99%, 75.99%, 79.99%, 83%, 100% {
    background-position-x: 100%;
    animation-timing-function: step-end;
  }
}
.quebec-fox-foreground {
  position: absolute;
  inset: 0;
  background: url("quebec-life/scene.webp") center / 100% 100% no-repeat;
  clip-path: polygon(100% 100%, 100% 65%, 94.3% 68%, 92.2% 72%, 91.4% 71.5%, 90.7% 73%,
    89.8% 73.7%, 90.1% 75.2%, 88.8% 75.8%, 89.1% 77%, 88% 78.1%, 85.9% 79.9%, 85% 85%, 85% 100%);
}

.quebec-light {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 1.68cqw;
  aspect-ratio: 1;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, #fffbd8 8%, var(--glow) 18%, transparent 67%);
  mix-blend-mode: screen;
  opacity: .2;
  animation: quebec-twinkle var(--period) var(--phase) ease-in-out infinite alternate;
}
@keyframes quebec-twinkle {
  0%, 30% { opacity: .12; scale: .66 }
  85%, 100% { opacity: .94; scale: 1 }
}

@media (prefers-reduced-motion: reduce) {
  .quebec-life * { animation: none !important; }
  .quebec-steamer { left: 82%; }
  .quebec-chimney, .quebec-ship-smoke, .quebec-fox-facing b { display: none; }
  .quebec-light { opacity: .25; }
  .quebec-wrapping, .quebec-wrap-parcel b, .quebec-wrap-parcel em { opacity: 1; }
  .quebec-santa-wrapper { background-position-x: 100%; }
}
