/* ========================================
   HOLIDAY SEASON (temporary)
   Loaded only when `holiday.enabled: true` in _config.yml.
   Shown only before `holiday.ends` (checked in the browser),
   so it hides itself even if nobody switches it off.
   ======================================== */

:root {
  --holiday-evergreen: #4F6146;
  --holiday-evergreen-light: #6B8060;
  --holiday-berry: #A4483E;
  --holiday-gold: var(--color-terracotta);
  --holiday-ribbon-h: 2.25rem;
}

/* Hidden unless the date check in holiday-head.html passes */
.holiday-ribbon,
.holiday-sprig {
  display: none;
}

[data-holiday] .holiday-ribbon {
  display: flex;
}

[data-holiday] .holiday-sprig {
  display: block;
}

/* The ribbon sits inside the fixed header, so push content down by its height */
[data-holiday] .main {
  padding-top: calc(4rem + var(--holiday-ribbon-h));
}

/* Greeting ribbon ---------------------------------------- */
.holiday-ribbon {
  height: var(--holiday-ribbon-h);
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 1rem;
  background: var(--holiday-evergreen);
  border-bottom: 1px solid rgba(196, 164, 132, 0.55);
  color: var(--color-cream);
  white-space: nowrap;
  overflow: hidden;
}

.holiday-ribbon__greeting {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.holiday-ribbon__greeting--long {
  display: none;
}

.holiday-ribbon__star {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  color: var(--holiday-gold);
}

.holiday-ribbon__link {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-cream);
  text-decoration: none;
  border-bottom: 1px solid var(--holiday-gold);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.holiday-ribbon__link:hover,
.holiday-ribbon__link:focus-visible {
  color: var(--color-white);
  border-color: var(--color-white);
}

@media (min-width: 640px) {
  .holiday-ribbon__greeting--long {
    display: inline;
  }

  .holiday-ribbon__greeting--short {
    display: none;
  }
}

/* Holly sprig on the homepage headshot ------------------- */
.holiday-sprig {
  position: absolute;
  top: -1.75rem;
  left: -1rem;
  width: 6rem;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-6deg);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

@media (min-width: 768px) {
  .holiday-sprig {
    top: -2.5rem;
    left: -2.25rem;
    width: 8.5rem;
  }
}
