/* Thanksgiving overlay. Custom properties and empty slots only. */

html[data-season="thanksgiving"] {
  --season-accent: #A3263A;
  --season-accent-2: #E8A33D;
  --season-rule: #A3263A;
  --season-tone-sky: #FFF4E3;
  --season-tone-meadow: #F4EFD9;
  --season-olive: #4F5A2A;
  --season-wheat: #E9C98B;
}

html[data-season="thanksgiving"] .season-garland {
  top: 100%;
  left: 0;
  width: 100%;
  height: 28px;
  overflow: hidden;
  background: url("art/garland.svg") repeat-x center / auto 28px;
}

html[data-season="thanksgiving"] .season-hero-decor {
  right: 16px;
  bottom: 16px;
  width: min(168px, 38vw);
  height: 64px;
  overflow: hidden;
  background: url("art/hero-decor.svg") right bottom / contain no-repeat;
}

html[data-season="thanksgiving"] .season-corner {
  top: 6px;
  right: 12px;
  width: 36px;
  height: 36px;
  overflow: hidden;
  background: url("art/leaf-cluster.svg") center / contain no-repeat;
}

html[data-season="thanksgiving"] #blue-bags .season-corner {
  background-image: url("art/pumpkin.svg");
}

html[data-season="thanksgiving"] #fundraisers .season-corner {
  background-image: url("art/pie.svg");
}

html[data-season="thanksgiving"] #meetings .season-corner {
  background-image: url("art/acorn.svg");
}

html[data-season="thanksgiving"] #donate .season-corner {
  background-image: url("art/turkey-small.svg");
}

html[data-season="thanksgiving"] #committee .season-corner {
  background-image: url("art/cornucopia.svg");
}

html[data-season="thanksgiving"] #contact .season-corner {
  background-image: url("art/leaf-oak.svg");
}

html[data-season="thanksgiving"] .season-divider {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 18px;
  overflow: hidden;
  background: url("art/divider-leaves.svg") repeat-x center bottom / auto 18px;
}

html[data-season="thanksgiving"] #hero .season-divider,
html[data-season="thanksgiving"] #fundraisers .season-divider,
html[data-season="thanksgiving"] #donate .season-divider {
  background-image: url("art/divider-crust.svg");
  height: 16px;
}

html[data-season="thanksgiving"] .season-footer-decor {
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  overflow: hidden;
  background: url("art/footer-edge.svg") repeat-x center bottom / auto 44px;
}

html[data-season="thanksgiving"] .season-fall .fall-leaf {
  position: absolute;
  top: -12%;
  width: 28px;
  height: 28px;
  opacity: 0.85;
  pointer-events: none;
  animation-name: season-leaf-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes season-leaf-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(12px, 110vh, 0) rotate(280deg);
  }
}

html[data-season="thanksgiving"] .season-fall.is-paused .fall-leaf {
  animation-play-state: paused;
}

html[data-season="thanksgiving"] .btn:not(.btn--ghost) {
  gap: 0;
}

html[data-season="thanksgiving"] .btn:not(.btn--ghost)::after {
  content: "";
  display: block;
  width: 0;
  height: 14px;
  margin: 0;
  overflow: hidden;
  background: url("art/leaf-tiny.svg") center / contain no-repeat;
  opacity: 0;
  transform: scale(0.4);
  transition: width 200ms ease, margin 200ms ease, opacity 200ms ease, transform 200ms ease;
}

html[data-season="thanksgiving"] .btn:not(.btn--ghost):hover::after,
html[data-season="thanksgiving"] .btn:not(.btn--ghost):focus-visible::after {
  width: 14px;
  margin-left: 8px;
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html[data-season="thanksgiving"] .season-fall {
    z-index: 0;
  }

  html[data-season="thanksgiving"] .season-fall .fall-leaf {
    animation: none;
    width: 18px;
    height: 18px;
    opacity: 0.85;
  }

  html[data-season="thanksgiving"] .fall-leaf:nth-child(odd) {
    left: 2px !important;
    right: auto !important;
  }

  html[data-season="thanksgiving"] .fall-leaf:nth-child(even) {
    left: auto !important;
    right: 2px !important;
  }

  html[data-season="thanksgiving"] .fall-leaf:nth-child(1) { top: 18% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(2) { top: 22% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(3) { top: 36% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(4) { top: 40% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(5) { top: 54% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(6) { top: 58% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(7) { top: 70% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(8) { top: 74% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(9) { top: 84% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(10) { top: 88% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(11) { top: 30% !important; }
  html[data-season="thanksgiving"] .fall-leaf:nth-child(12) { top: 64% !important; }

  html[data-season="thanksgiving"] .btn:not(.btn--ghost)::after {
    transition: none;
  }
}
