/* Festive brand doodles — Google-style seasonal overlays on wordmarks */

.hl-brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hl-brand-mark .hl-brand-festive {
  position: absolute;
  inset: -0.55rem -0.65rem -0.45rem;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.hl-brand-mark .hl-brand-text,
.loader-brand,
.footer-logo,
.home-hero-brand {
  position: relative;
  z-index: 1;
}

html[data-festive]:not([data-festive=""]) .hl-brand-mark.is-festive {
  isolation: isolate;
}

/* Home hero greeting swap (Hymnal Library ↔ Merry/Happy …) */
.home-hero-brand .hl-brand-text {
  display: inline-block;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.home-hero-brand .hl-brand-text.is-swapping {
  opacity: 0;
  transform: translateY(0.2rem);
}

.home-hero-slide-festive {
  background-size: cover;
  background-position: center;
}

/* Shared doodle pieces */
.hl-doodle {
  position: absolute;
  display: block;
  pointer-events: none;
}

.hl-doodle-sparkle {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.35rem currentColor;
  animation: hl-twinkle 1.8s ease-in-out infinite;
}

.hl-doodle-flake {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat,
    linear-gradient(45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%);
  opacity: 0.85;
  animation: hl-drift 3.2s ease-in-out infinite;
}

.hl-doodle-holly {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50% 0 50% 50%;
  background: #1f7a3a;
  transform: rotate(-25deg);
  box-shadow: 0.28rem -0.08rem 0 #248a42;
}

.hl-doodle-berry {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #c62828;
  box-shadow: 0.2rem 0.05rem 0 #c62828, 0.1rem 0.22rem 0 #b71c1c;
}

.hl-doodle-hat {
  width: 1.15rem;
  height: 0.85rem;
  background: #c62828;
  border-radius: 0.55rem 0.55rem 0.1rem 0.1rem;
  box-shadow: inset 0 -0.18rem 0 #f8fafc;
}

.hl-doodle-hat::after {
  content: "";
  position: absolute;
  right: -0.12rem;
  top: -0.12rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: #f8fafc;
}

.hl-doodle-lights {
  left: 8%;
  right: 8%;
  bottom: -0.15rem;
  height: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hl-doodle-lights i {
  width: 0.32rem;
  height: 0.42rem;
  border-radius: 40% 40% 45% 45%;
  display: block;
  animation: hl-twinkle 1.4s ease-in-out infinite;
}

.hl-doodle-lights i:nth-child(1) { background: #ef4444; animation-delay: 0s; }
.hl-doodle-lights i:nth-child(2) { background: #22c55e; animation-delay: 0.2s; }
.hl-doodle-lights i:nth-child(3) { background: #fbbf24; animation-delay: 0.4s; }
.hl-doodle-lights i:nth-child(4) { background: #38bdf8; animation-delay: 0.6s; }
.hl-doodle-lights i:nth-child(5) { background: #f28d52; animation-delay: 0.8s; }
.hl-doodle-lights i:nth-child(6) { background: #a3e635; animation-delay: 1s; }
.hl-doodle-lights i:nth-child(7) { background: #f472b6; animation-delay: 1.2s; }

.hl-doodle-egg {
  width: 0.55rem;
  height: 0.72rem;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(160deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%);
  box-shadow: inset 0 -0.12rem 0 rgba(0, 0, 0, 0.08);
}

.hl-doodle-egg.alt {
  background: linear-gradient(160deg, #bfdbfe 0%, #60a5fa 55%, #3b82f6 100%);
}

.hl-doodle-egg.pink {
  background: linear-gradient(160deg, #fbcfe8 0%, #f472b6 55%, #ec4899 100%);
}

.hl-doodle-bloom {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fef3c7 0 18%, transparent 19%),
    radial-gradient(circle at 50% 18%, #f9a8d4 0 28%, transparent 29%),
    radial-gradient(circle at 82% 50%, #f9a8d4 0 28%, transparent 29%),
    radial-gradient(circle at 50% 82%, #f9a8d4 0 28%, transparent 29%),
    radial-gradient(circle at 18% 50%, #f9a8d4 0 28%, transparent 29%);
}

.hl-doodle-ear {
  width: 0.55rem;
  height: 0.7rem;
  border-radius: 50% 50% 40% 40%;
  background: #f8fafc;
  box-shadow: inset 0 0 0 0.12rem #e2e8f0;
}

.hl-doodle-leaf {
  width: 0.65rem;
  height: 0.95rem;
  border-radius: 0 70% 0 70%;
  background: linear-gradient(135deg, #f28d52, #b45309);
  transform: rotate(-20deg);
}

.hl-doodle-leaf.gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  transform: rotate(18deg);
}

.hl-doodle-leaf.crimson {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  transform: rotate(8deg);
}

.hl-doodle-feather {
  width: 0.35rem;
  height: 1.05rem;
  border-radius: 50% 50% 40% 40%;
  background: linear-gradient(180deg, #f28d52, #92400e);
  transform: rotate(-12deg);
}

.hl-doodle-heart {
  width: 0.55rem;
  height: 0.5rem;
  position: absolute;
  background: #e11d48;
  transform: rotate(-45deg);
}

.hl-doodle-heart::before,
.hl-doodle-heart::after {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #e11d48;
}

.hl-doodle-heart::before { top: -0.28rem; left: 0; }
.hl-doodle-heart::after { top: 0; left: 0.28rem; }

.hl-doodle-clover {
  width: 0.7rem;
  height: 0.7rem;
  position: absolute;
}

.hl-doodle-clover::before,
.hl-doodle-clover::after {
  content: "";
  position: absolute;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: #15803d;
}

.hl-doodle-clover::before {
  top: 0;
  left: 0.18rem;
  box-shadow: 0.18rem 0.28rem 0 #15803d, -0.18rem 0.28rem 0 #166534;
}

.hl-doodle-clover::after {
  bottom: 0.02rem;
  left: 0.3rem;
  width: 0.1rem;
  height: 0.34rem;
  border-radius: 2px;
  background: #14532d;
}

.hl-doodle-star {
  width: 0.55rem;
  height: 0.55rem;
  background: #fbbf24;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: hl-twinkle 2s ease-in-out infinite;
}

.hl-doodle-confetti {
  width: 0.28rem;
  height: 0.45rem;
  border-radius: 1px;
  transform: rotate(18deg);
  animation: hl-drift 2.4s ease-in-out infinite;
}

.hl-doodle-pumpkin {
  width: 0.75rem;
  height: 0.58rem;
  border-radius: 45%;
  background: linear-gradient(180deg, #fb923c, #ea580c);
  box-shadow: inset 0.18rem 0 0 rgba(255, 255, 255, 0.15), inset -0.18rem 0 0 rgba(0, 0, 0, 0.08);
}

.hl-doodle-pumpkin::before {
  content: "";
  position: absolute;
  top: -0.18rem;
  left: 50%;
  width: 0.12rem;
  height: 0.22rem;
  margin-left: -0.06rem;
  background: #166534;
  border-radius: 2px;
}

.hl-doodle-candle {
  width: 0.22rem;
  height: 0.7rem;
  background: #f8fafc;
  border-radius: 2px;
  box-shadow: 0.35rem 0 0 #f8fafc, 0.7rem 0 0 #f8fafc;
}

.hl-doodle-candle::after {
  content: "";
  position: absolute;
  top: -0.28rem;
  left: 0.02rem;
  width: 0.18rem;
  height: 0.28rem;
  border-radius: 50% 50% 40% 40%;
  background: #fbbf24;
  box-shadow: 0.35rem 0 0 #f59e0b, 0.7rem 0 0 #fbbf24;
  animation: hl-twinkle 1.2s ease-in-out infinite;
}

/* Holiday accent tints on brand text (subtle) */
html[data-festive="christmas"] .home-hero-brand.is-festive,
html[data-festive="christmas"] .loader-brand.is-festive {
  text-shadow: 0 0 18px rgba(34, 197, 94, 0.25), 0 2px 28px rgba(0, 0, 0, 0.4);
}

html[data-festive="easter"] .home-hero-brand.is-festive {
  text-shadow: 0 0 20px rgba(244, 114, 182, 0.28), 0 2px 28px rgba(0, 0, 0, 0.35);
}

html[data-festive="thanksgiving"] .home-hero-brand.is-festive {
  text-shadow: 0 0 18px rgba(242, 141, 82, 0.35), 0 2px 28px rgba(0, 0, 0, 0.4);
}

html[data-festive="newyear"] .home-hero-brand.is-festive {
  text-shadow: 0 0 22px rgba(251, 191, 36, 0.4), 0 2px 28px rgba(0, 0, 0, 0.4);
}

/* Hero / footer / loader sizing tweaks */
.home-hero-brand.hl-brand-mark {
  display: inline-block;
}

.home-hero-brand .hl-brand-festive {
  inset: -0.85rem -1rem -0.55rem;
}

.footer-logo.hl-brand-mark {
  display: inline-block;
}

.loader-brand.hl-brand-mark {
  display: inline-block;
}

.loader-brand .hl-brand-festive {
  inset: -0.7rem -0.9rem -0.5rem;
}

@keyframes hl-twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes hl-drift {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(0.2rem) rotate(12deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hl-doodle-sparkle,
  .hl-doodle-flake,
  .hl-doodle-lights i,
  .hl-doodle-star,
  .hl-doodle-confetti,
  .hl-doodle-candle::after {
    animation: none !important;
  }
}
