/* December greeting. Applied only while html.festive is set by /js/festive.js. */

html.festive {
  --festive-h: 40px;
  --festive-art: 136px;
}

@media (max-width: 700px) {
  html.festive {
    --festive-art: 96px;
  }
}

.festive-ribbon {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--festive-h);
  margin: 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #14543e;
  color: #f7f3ea;
  border-bottom: 3px solid #c6a15a;
  box-shadow: inset 0 -1px 0 #8f2d2d;
  font-family: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.festive-ribbon-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
  pointer-events: none;
}

.festive-ribbon-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 380px) {
  .festive-ribbon {
    font-size: 13px;
    letter-spacing: 0.01em;
    gap: 8px;
    padding: 0 8px;
  }
  .festive-ribbon-mark {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }
}

/* Marketing nav is fixed. Static navs (the 404 page) ignore top. */
html.festive .nav {
  top: var(--festive-h);
}

/* Pages without a full-bleed hero keep their header below the ribbon. */
html.festive body.festive-flow {
  padding-top: var(--festive-h);
}

html.festive:has(.hero) {
  scroll-padding-top: calc(var(--festive-h) + 64px);
}

/* Space for the hero wreath is reserved before the illustration is inserted. */
html.festive .hero-content::before {
  content: "";
  display: block;
  width: var(--festive-art);
  height: var(--festive-art);
  margin: 0 auto 14px;
}

.festive-hero-art {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: var(--festive-art);
  height: var(--festive-art);
  display: block;
  margin: 0;
  pointer-events: none;
  line-height: 0;
  transform: translateX(-50%);
}

.festive-hero-art svg,
.festive-holly svg {
  display: block;
  width: 100%;
  height: 100%;
}

.festive-holly {
  position: absolute;
  z-index: 2;
  left: calc(100% + 10px);
  top: 50%;
  width: 34px;
  height: 38px;
  display: block;
  margin: 0;
  pointer-events: none;
  line-height: 0;
  transform: translateY(-50%);
}

nav.nav > a.festive-holly-anchor,
.site-header > a.festive-holly-anchor {
  position: relative;
}

nav.nav > a.festive-holly-anchor {
  display: inline-block;
}

/* Partner survey wordmark is centred. Logo is 30px tall, 176.3×36.5. */
.ms-header.festive-holly-anchor {
  position: relative;
}

.ms-header.festive-holly-anchor .festive-holly {
  left: 50%;
  margin-left: 82px;
}

.festive-snow {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.festive-snow span {
  position: absolute;
  top: 0;
  left: var(--x, 50%);
  width: var(--s, 3px);
  height: var(--s, 3px);
  margin-top: -8px;
  border-radius: 50%;
  background: var(--c, #e2c15a);
  opacity: var(--o, 0.7);
  box-shadow: 0 0 6px var(--c, #e2c15a);
  animation: festive-drift var(--d, 28s) linear var(--delay, 0s) infinite;
}

@keyframes festive-drift {
  0% { transform: translate3d(0, -4vh, 0); }
  100% { transform: translate3d(var(--drift, 8px), 108vh, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .festive-snow { display: none; }
}

@media (max-width: 767px) {
  .festive-snow { display: none; }
}

@media (forced-colors: active) {
  .festive-ribbon {
    background: Canvas;
    color: CanvasText;
    border-bottom: 3px solid CanvasText;
    box-shadow: none;
  }
}

@media print {
  html.festive { --festive-h: 0px; --festive-art: 0px; }
  .festive-ribbon,
  .festive-holly,
  .festive-hero-art,
  .festive-snow,
  html.festive .hero-content::before { display: none !important; }
}
