.hero.is-winter .autumn-deco {
  display: none;
}

.winter-hero {
  --winter-art-height: min(60%, 38vw, 520px);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.winter-ridge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: clamp(70px, 10.5vw, 165px);
}

.winter-lamp,
.winter-branches {
  position: absolute;
  right: 0;
  bottom: 0;
  height: var(--winter-art-height);
  aspect-ratio: 2 / 3;
}

.winter-lamp svg,
.winter-branches svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.winter-lamp::before {
  content: "";
  position: absolute;
  inset: 8% 5% 48% 19%;
  background: radial-gradient(ellipse, #f7ba62a6, #f4bc6c3b 42%, transparent 72%);
}

@media (max-width: 768px) {
  .winter-hero {
    --winter-art-height: clamp(215px, 55vw, 345px);
  }
}
.winter-snow {
  position: absolute;
  inset: 0;
  container-type: size;
}

.winter-snow span {
  position: absolute;
  top: -8px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 2px #69818a50;
  opacity: 0;
  animation: winter-snowfall var(--duration) linear var(--delay) infinite;
}

.winter-snow span:nth-child(1) { --x: 12%; --size: 2px; --duration: 38s; --delay: -11s; --drift: 17px; --alpha: .70; }
.winter-snow span:nth-child(2) { --x: 23%; --size: 3px; --duration: 31s; --delay: -23s; --drift: -26px; --alpha: .70; }
.winter-snow span:nth-child(3) { --x: 37%; --size: 3px; --duration: 32s; --delay: -17s; --drift: -22px; --alpha: .75; }
.winter-snow span:nth-child(4) { --x: 49%; --size: 2px; --duration: 43s; --delay: -13s; --drift: 25px; --alpha: .60; }
.winter-snow span:nth-child(5) { --x: 61%; --size: 2.5px; --duration: 44s; --delay: -31s; --drift: 24px; --alpha: .74; }
.winter-snow span:nth-child(6) { --x: 70%; --size: 2px; --duration: 41s; --delay: -27s; --drift: 16px; --alpha: .63; }
.winter-snow span:nth-child(7) { --x: 79%; --size: 3.5px; --duration: 36s; --delay: -8s; --drift: -19px; --alpha: .78; }
.winter-snow span:nth-child(8) { --x: 87%; --size: 3px; --duration: 35s; --delay: -15s; --drift: 21px; --alpha: .67; }
.winter-snow span:nth-child(9) { --x: 92%; --size: 2px; --duration: 34s; --delay: -25s; --drift: -15px; --alpha: .66; }
.winter-snow span:nth-child(10) { --x: 96%; --size: 2px; --duration: 39s; --delay: -19s; --drift: -18px; --alpha: .62; }

@keyframes winter-snowfall {
  0% { transform: translate(0, 0); opacity: 0; }
  14% { opacity: var(--alpha); }
  36% { transform: translate(var(--drift), 36cqh); }
  69% { transform: translate(calc(var(--drift) * .3), 69cqh); }
  83% { opacity: var(--alpha); }
  100% { transform: translate(var(--drift), calc(100cqh + 10px)); opacity: 0; }
}

@media (max-width: 768px) {
  .winter-snow span:nth-child(even) { display: none; }
}
/* Give the decoration room below the existing wrapped desktop copy. */
@media (769px <= width <= 1150px) {
  .hero.is-winter .hero-inner {
    padding-bottom: 120px;
  }

  .winter-hero {
    --winter-art-height: min(45%, 31vw);
  }
}
/* The adopted artwork supplies the scenery for the wide desktop preview. */
@media (min-width: 1280px) {
  .hero.is-winter {
    min-height: 100vh;
  }

  .hero.is-winter .winter-hero {
    --winter-background-height: max(120vh, 56.35vw);
    background: url("../images/winter-hero-bg.png") right top / auto var(--winter-background-height) no-repeat;
  }

  .hero.is-winter .winter-ridge,
  .hero.is-winter .winter-lamp,
  .hero.is-winter .winter-branches {
    display: none;
  }
}
/* Keep the adopted scenery below the existing mobile copy. */
@media (max-width: 768px) {
  .hero.is-winter .winter-hero::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: var(--winter-background-height);
    background: url("../images/winter-hero-bg.png") right bottom / auto 100% no-repeat;
    mask-image: linear-gradient(to bottom, transparent, #000 36px);
  }

  .hero.is-winter .winter-ridge,
  .hero.is-winter .winter-lamp,
  .hero.is-winter .winter-branches {
    display: none;
  }
}
@media (max-width: 320px) {
  .hero.is-winter .hero-title {
    font-size: 27.5px;
  }
}
@keyframes winter-lamp-glow {
  0%, 100% { opacity: .33; }
  24% { opacity: .64; }
  41% { opacity: .43; }
  67% { opacity: .59; }
  83% { opacity: .37; }
}

/* The flame is at (1487, 416) in the 1670 × 941 artwork.
   The right offset uses its distance from the image's right edge. */
.hero.is-winter .winter-hero::after {
  content: "";
  display: none;
  position: absolute;
  right: calc(var(--winter-background-height) * 183 / 941);
  width: calc(var(--winter-background-height) * .12);
  height: calc(var(--winter-background-height) * .14);
  border-radius: 50%;
  background: radial-gradient(ellipse, #ffdf8c80 0%, #ffb75147 26%, #f69a2817 49%, transparent 70%);
  animation: winter-lamp-glow 7.4s ease-in-out infinite;
}

@media (min-width: 1280px) {
  .hero.is-winter .winter-hero::after {
    display: block;
    top: calc(var(--winter-background-height) * 416 / 941);
    transform: translate(50%, -50%);
  }
}

@media (max-width: 768px) {
  .hero.is-winter .winter-hero {
    --winter-background-height: clamp(280px, 80vw, 330px);
  }

  .hero.is-winter .winter-hero::after {
    display: block;
    bottom: calc(var(--winter-background-height) * 525 / 941);
    transform: translate(50%, 50%);
  }
}

/* Intermediate desktop widths use the site's existing standalone lamp. */
@media (769px <= width < 1280px) {
  .hero.is-winter .winter-lamp::after {
    content: "";
    position: absolute;
    left: 64%;
    top: 30%;
    width: 28%;
    height: 24%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, #ffdf8c80, #ffb75147 30%, transparent 70%);
    animation: winter-lamp-glow 7.4s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.is-winter .winter-snow,
  .hero.is-winter .winter-hero::after,
  .hero.is-winter .winter-lamp::after {
    display: none;
    animation: none;
  }
}