/* Halloween decorations on the homepage (inc/halloween.php). This file only loads while they're
   switched on (wp-admin → Homepage → Halloween). Everything here is decoration: it never takes clicks
   away from the page, except the few characters that say boo when tapped (assets/js/halloween.js). */

/* ---------- Shared ---------- */
.ldr-spooky .ldr-root { overflow-x: clip; } /* Nothing that peeks out sideways can add a scrollbar. */
.ldr-sp { position: absolute; z-index: 2; display: block; line-height: 0; pointer-events: none; -webkit-user-select: none; user-select: none; }
.ldr-sp-art { display: block; width: 100%; height: auto; overflow: visible; }
[data-ldr-boo] { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ldr-sp-pk { position: relative; display: block; }
.ldr-sp-pk > .ldr-sp-art { position: relative; }
.ldr-sp-patch { display: flex; align-items: flex-end; }

/* Speech bubbles ("Boo!"): some pop up on their own, all of them when the character is tapped. */
.ldr-sp-say { position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 3; padding: 7px 12px 8px; border-radius: 14px; background: #fff; color: var(--ldr-ink); font: 800 13px/1.1 var(--ldr-font); letter-spacing: 0; white-space: nowrap; box-shadow: 0 8px 24px rgba(59, 40, 88, .22); opacity: 0; translate: -50% 0; scale: .5; transform-origin: 50% 100%; transition: opacity .2s, scale .3s var(--ldr-ease); pointer-events: none; }
.ldr-sp-say::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }
.is-boo > .ldr-sp-say { opacity: 1; scale: 1; animation: none !important; }
.is-boo > .ldr-sp-art { animation: ldr-sp-jump .7s var(--ldr-ease); }

/* Little moves the drawings make by themselves. */
.ldr-sp-blink { transform-box: fill-box; transform-origin: 50% 50%; animation: ldr-sp-blink 5.2s infinite; }
.ldr-sp-flame { animation: ldr-sp-flicker 2.4s infinite; }
.ldr-sp-beat { transform-box: fill-box; transform-origin: 50% 50%; animation: ldr-sp-beat 1.8s ease-in-out infinite; }
.ldr-sp-wave { transform-box: fill-box; transform-origin: 90% 90%; animation: ldr-sp-wave .9s ease-in-out infinite alternate; }
.ldr-sp-wing { transform-box: fill-box; animation: ldr-sp-flap .26s ease-in-out infinite alternate; }
.ldr-sp-wing--l { transform-origin: 100% 55%; }
.ldr-sp-wing--r { transform-origin: 0 55%; animation-name: ldr-sp-flap-r; }
.ldr-sp-legs { transform-box: fill-box; animation: ldr-sp-legs .8s ease-in-out infinite alternate; }
.ldr-sp-legs--l { transform-origin: 100% 30%; }
.ldr-sp-legs--r { transform-origin: 0 30%; animation-direction: alternate-reverse; }
.ldr-sp-z { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; animation: ldr-sp-z 3.3s ease-in infinite; }
.ldr-sp-z--2 { animation-delay: 1.1s; }
.ldr-sp-z--3 { animation-delay: 2.2s; }
.ldr-sp-glow { position: absolute; inset: -18% -22% -6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 190, 70, .55), rgba(255, 190, 70, 0)); animation: ldr-sp-glow 2.4s infinite; }
.ldr-sp-star { width: 14px; color: #FFB648; z-index: 0; opacity: .8; animation: ldr-sp-twinkle 3s ease-in-out infinite; }

/* ---------- Logo: a witch hat ---------- */
.ldr-spooky .ldr-brand { position: relative; }
.ldr-sp-hat { left: -13px; top: -19px; width: 38px; rotate: -20deg; transform-origin: 60% 90%; animation: ldr-sp-tip 7s ease-in-out infinite; }
.ldr-brand--sm .ldr-sp-hat { left: -10px; top: -10px; width: 30px; }

/* ---------- Hero ---------- */
.ldr-spooky .ldr-hero { padding-top: calc(clamp(45px, 6vw, 72px) + clamp(36px, 4.4vw, 52px)); background: radial-gradient(900px 520px at 88% 0%, #FFE4D3 0%, rgba(255, 228, 211, 0) 70%), radial-gradient(700px 420px at 0% 100%, #F3EAFF 0%, rgba(243, 234, 255, 0) 70%); }
.ldr-spooky .ldr-hero__blob--a { background: radial-gradient(circle, #FFD8C2 0%, rgba(255, 216, 194, 0) 70%); }
.ldr-spooky .ldr-hero__blob--b { background: radial-gradient(circle, #EEE3FF 0%, rgba(238, 227, 255, 0) 70%); }
.ldr-spooky .ldr-hero__heart:nth-child(3), .ldr-spooky .ldr-hero__heart:nth-child(6) { color: #FF8A2B; }
.ldr-spooky .ldr-hero__heart:nth-child(5) { color: #8E5BE0; }
.ldr-spooky .ldr-kicker__ic { background: #FFE6D3; }
.ldr-spooky .ldr-kicker__ic .ldr-sp-art { width: 19px; animation: ldr-sp-wobble 2.6s ease-in-out infinite; transform-origin: 50% 90%; }

/* A garland across the top: string swags with pennants that sway. */
.ldr-sp-garland { top: 0; left: 0; right: 0; height: clamp(72px, 8.4vw, 104px); z-index: 0; }
.ldr-sp-garland__string { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ldr-sp-flag { position: absolute; width: clamp(24px, 2.7vw, 36px); translate: -50% -3px; transform-origin: 50% 0; animation: ldr-sp-swing 2.8s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.ldr-sp-garland--narrow { display: none; }

/* Bats that cross now and then. */
.ldr-sp-fly { top: 16%; left: 0; width: clamp(42px, 4.4vw, 62px); translate: -120% 0; animation: ldr-sp-fly 15s linear infinite; }
.ldr-sp-bob { display: block; animation: ldr-sp-bob 1.25s ease-in-out infinite alternate; }
.ldr-sp-fly--1 { animation-delay: -1.5s; }
.ldr-sp-fly--2 { top: 27%; width: clamp(32px, 3.2vw, 46px); animation-duration: 21s; animation-delay: -12s; }
.ldr-sp-fly--2 .ldr-sp-bob { animation-duration: 1s; }
.ldr-sp-fly--3 { top: 7%; width: clamp(28px, 2.8vw, 40px); animation-duration: 27s; animation-delay: -21s; }

.ldr-sp-star--1 { top: 34%; left: 2.5%; }
.ldr-sp-star--2 { top: 62%; left: 44%; width: 11px; color: #B79CF0; animation-delay: -1s; }
.ldr-sp-star--3 { top: 21%; left: 52%; width: 16px; animation-delay: -2s; }
.ldr-sp-star--4 { top: 88%; left: 8%; width: 12px; color: #B79CF0; animation-delay: -.5s; }
.ldr-sp-star--5 { top: 90%; left: 62%; width: 13px; animation-delay: -1.6s; }

/* A ghost that peeks out from behind the video, and two pumpkins sitting on the corner of the photos. */
.ldr-sp-peek { top: 0; left: 14%; width: clamp(60px, 6.4vw, 84px); z-index: 0; translate: 0 -60%; animation: ldr-sp-peek 9s ease-in-out infinite; }
.ldr-sp-peek > .ldr-sp-say { animation: ldr-sp-say 9s infinite; }
.ldr-sp-patch--hero { right: -16px; bottom: -24px; z-index: 3; }
.ldr-sp-patch--hero .ldr-sp-pk--big { width: clamp(62px, 6.4vw, 84px); transform-origin: 50% 100%; animation: ldr-sp-wobble 3.4s ease-in-out infinite; }
.ldr-sp-patch--hero .ldr-sp-pk--small { width: clamp(38px, 3.9vw, 50px); margin-left: -8px; transform-origin: 50% 100%; animation: ldr-sp-hop 5.5s infinite; }
.ldr-sp-patch--hero .ldr-sp-say { left: auto; right: 0; translate: 0 0; transform-origin: 80% 100%; }
.ldr-sp-patch--hero .ldr-sp-say::after { left: auto; right: 22px; }

/* ---------- Reels: a bat asleep on a twig ---------- */
.ldr-spooky .ldr-band--reels { position: relative; }
.ldr-sp-sleep { top: 6px; right: clamp(24px, 13vw, 200px); width: clamp(40px, 4vw, 52px); transform-origin: 50% 8%; animation: ldr-sp-sway 3.4s ease-in-out infinite alternate; }

/* ---------- Numbers band: a night sky ---------- */
.ldr-spooky .ldr-stats { background: radial-gradient(60% 120% at 92% 0%, rgba(255, 214, 150, .2), rgba(255, 214, 150, 0) 70%), linear-gradient(135deg, #5D3FA3 0%, #3C256B 55%, #27173F 100%); box-shadow: 0 24px 60px rgba(46, 26, 84, .3); }
.ldr-spooky .ldr-stats__item { position: relative; z-index: 1; }
.ldr-spooky .ldr-stats__label { color: #FFD7AF; }
.ldr-sp-moon { top: 14px; right: 3.5%; width: clamp(52px, 6vw, 82px); z-index: 0; animation: ldr-sp-float 5s ease-in-out infinite alternate; }
.ldr-sp-moon::before { content: ""; position: absolute; inset: -45%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 234, 170, .42), rgba(255, 234, 170, 0)); }
.ldr-sp-fly--band { top: 26%; width: clamp(30px, 3vw, 40px); z-index: 0; animation-duration: 12s; animation-delay: -3s; }
.ldr-sp-star--b1 { top: 16%; left: 5%; color: #FFE4A0; }
.ldr-sp-star--b2 { top: 70%; left: 13%; width: 10px; color: #fff; animation-delay: -1.2s; }
.ldr-sp-star--b3 { top: 22%; left: 31%; width: 9px; color: #fff; animation-delay: -2.1s; }
.ldr-sp-star--b4 { top: 78%; left: 47%; width: 12px; color: #FFE4A0; animation-delay: -.6s; }
.ldr-sp-star--b5 { top: 14%; left: 63%; width: 10px; color: #fff; animation-delay: -1.7s; }
.ldr-sp-star--b6 { top: 74%; left: 79%; width: 13px; color: #FFE4A0; animation-delay: -2.5s; }
.ldr-sp-star--b7 { top: 48%; left: 95%; width: 9px; color: #fff; animation-delay: -.9s; }

/* ---------- Date ideas intro: a pumpkin rolls along the loading bar; a spider by the countries ---------- */
.ldr-spooky .ldr-loading__bar { overflow: visible; background: #F2E8FF; }
.ldr-spooky .ldr-loading__bar > span { background: linear-gradient(90deg, #FF9A3D, #EF4F6B 55%, #8E5BE0); }
.ldr-sp-roll { top: 50%; right: -13px; width: 26px; margin-top: -14px; animation: ldr-sp-roll 5s ease-in-out infinite alternate; }
.ldr-spooky .ldr-countries { position: relative; }
.ldr-sp-corner { inset: 0; z-index: 1; border-radius: inherit; overflow: hidden; }
.ldr-sp-web { position: absolute; display: block; width: clamp(78px, 8.6vw, 112px); color: rgba(122, 34, 51, .26); }
.ldr-sp-web--tr { top: 0; right: 0; scale: -1 1; }
.ldr-sp-dangle { position: absolute; top: 20px; right: 24px; width: 38px; height: 180px; overflow: hidden; }
.ldr-sp-spider { position: absolute; top: 0; left: 0; width: 38px; translate: 0 64px; animation: ldr-sp-dangle 4.6s ease-in-out infinite alternate; }
.ldr-sp-spider::before { content: ""; position: absolute; bottom: 58%; left: 50%; width: 1px; height: 400px; margin-left: -.5px; background: rgba(46, 26, 43, .4); }

/* ---------- Our videos: a ghost peeks out from behind the phone ---------- */
.ldr-spooky .ldr-phone__body { position: relative; z-index: 1; }
.ldr-spooky .ldr-phone__stat { z-index: 2; }
.ldr-sp-side { top: 17%; left: calc(50% - 165px - 36px); width: 86px; z-index: 0; translate: -30px 0; animation: ldr-sp-side 10s ease-in-out infinite; }
.ldr-sp-side > .ldr-sp-say { left: 30%; animation: ldr-sp-say2 10s infinite; }

/* ---------- Why choose us: a web, a pumpkin sitting on a card, candy corn ---------- */
.ldr-spooky .ldr-reason { position: relative; }
.ldr-sp-sit { top: -43px; right: 24px; width: 54px; transform-origin: 50% 100%; animation: ldr-sp-hop 6s infinite; }
.ldr-sp-candies { top: 22px; right: 20px; display: flex; gap: 3px; }
.ldr-sp-candies > span { display: block; width: 16px; rotate: -12deg; }
.ldr-sp-candies > span + span { rotate: 16deg; translate: 0 3px; }

/* ---------- Testimonials: two ghosts in love ---------- */
.ldr-spooky #home-reviews { position: relative; }
.ldr-sp-couple { top: clamp(52px, 7vw, 96px); right: max(16px, calc(50% - 590px)); width: clamp(96px, 10vw, 142px); animation: ldr-sp-float 4.4s ease-in-out infinite alternate; }

/* ---------- Contact: a pumpkin on the form ---------- */
.ldr-spooky #contact .ldr-formcard { position: relative; }
.ldr-sp-cardpk { top: -44px; right: 36px; width: 56px; transform-origin: 50% 100%; animation: ldr-sp-hop 7s 1.5s infinite; }

/* ---------- Footer: a pumpkin patch on top, eyes in the dark ---------- */
.ldr-spooky .ldr-footer { position: relative; }
.ldr-sp-patch--right { bottom: calc(100% - 7px); right: clamp(14px, 7vw, 110px); gap: 2px; }
.ldr-sp-patch--left { bottom: calc(100% - 5px); left: clamp(14px, 6vw, 96px); gap: 6px; }
.ldr-sp-patch .ldr-sp-pk--big { width: clamp(60px, 5.6vw, 74px); }
.ldr-sp-patch .ldr-sp-pk--mid { width: clamp(46px, 4.6vw, 58px); }
.ldr-sp-patch .ldr-sp-pk--small { width: clamp(34px, 3.4vw, 42px); }
.ldr-sp-patch--right .ldr-sp-pk--big { transform-origin: 50% 100%; animation: ldr-sp-wobble 3.8s ease-in-out infinite; }
.ldr-sp-patch--right .ldr-sp-say { left: auto; right: -6px; translate: 0 0; transform-origin: 80% 100%; }
.ldr-sp-patch--right .ldr-sp-say::after { left: auto; right: 26px; }
.ldr-sp-patch--left .ldr-sp-pk--small { transform-origin: 50% 100%; animation: ldr-sp-hop 6.5s 2s infinite; }
.ldr-sp-candy { display: block; width: 17px; margin-bottom: 1px; rotate: -16deg; }
.ldr-sp-tomb { position: relative; display: block; width: clamp(46px, 4.6vw, 58px); margin-right: -4px; }
.ldr-sp-tomb > .ldr-sp-art { position: relative; }
.ldr-sp-tombghost { position: absolute; left: 19%; bottom: 40%; width: 62%; translate: 0 -40%; animation: ldr-sp-tombpeek 8s ease-in-out infinite; }
.ldr-sp-eyes { display: flex; gap: 7px; z-index: 0; }
.ldr-sp-eyes i { display: block; width: 8px; height: 11px; border-radius: 50%; background: #FFD25A; box-shadow: 0 0 10px 2px rgba(255, 210, 90, .45); animation: ldr-sp-eyes 4.8s infinite; }
.ldr-sp-eyes--1 { top: 24px; left: 41%; }
.ldr-sp-eyes--2 { top: 46px; right: 3%; gap: 6px; }
.ldr-sp-eyes--2 i { width: 7px; height: 9px; animation-delay: -2.3s; }
.ldr-sp-star--f1 { top: 18px; left: 22%; width: 10px; color: #FFE4A0; }
.ldr-sp-star--f2 { top: 34px; left: 60%; width: 8px; color: #fff; animation-delay: -1.3s; }
.ldr-sp-star--f3 { top: 14px; left: 78%; width: 12px; color: #FFE4A0; animation-delay: -2.2s; }
.ldr-sp-star--f4 { top: 48px; left: 5%; width: 8px; color: #fff; animation-delay: -.7s; }

/* ---------- Smaller screens ---------- */
@media (max-width: 991px) {
	.ldr-sp-sit { top: 14px; right: 16px; width: 44px; } /* The card isn't in the top row any more: it sits inside the corner. */
}
@media (max-width: 919px) {
	.ldr-sp-couple { top: 10px; right: 12px; width: 80px; }
}
@media (max-width: 760px) {
	.ldr-sp-garland--wide { display: none; }
	.ldr-sp-garland--narrow { display: block; }
	.ldr-sp-fly--3, .ldr-sp-star--2, .ldr-sp-star--3, .ldr-sp-star--4 { display: none; } /* On phones the hero's text fills the width. */
	.ldr-sp-patch--hero { right: -4px; bottom: -18px; }
	.ldr-sp-patch--left { display: none; }
	.ldr-sp-eyes--1 { left: 56%; }
}
@media (max-width: 600px) {
	.ldr-sp-side { top: 24px; left: 15%; width: 64px; translate: 0 -62%; animation-name: ldr-sp-peek; }
	.ldr-sp-side > .ldr-sp-say { left: 50%; }
}

/* ---------- Keyframes ---------- */
@keyframes ldr-sp-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes ldr-sp-flicker { 0%, 100% { opacity: .1; } 9% { opacity: .65; } 13% { opacity: .25; } 28% { opacity: .8; } 44% { opacity: .35; } 51% { opacity: .9; } 68% { opacity: .2; } 80% { opacity: .7; } }
@keyframes ldr-sp-glow { 0%, 100% { opacity: .55; } 30% { opacity: 1; } 45% { opacity: .7; } 60% { opacity: .95; } 80% { opacity: .6; } }
@keyframes ldr-sp-beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(.95); } 45% { transform: scale(1.12); } }
@keyframes ldr-sp-wave { from { transform: rotate(-14deg); } to { transform: rotate(18deg); } }
@keyframes ldr-sp-flap { from { transform: rotate(16deg) scaleY(.8); } to { transform: rotate(-20deg); } }
@keyframes ldr-sp-flap-r { from { transform: rotate(-16deg) scaleY(.8); } to { transform: rotate(20deg); } }
@keyframes ldr-sp-legs { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes ldr-sp-z { 0% { opacity: 0; transform: translate(-5px, 7px) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(5px, -9px) scale(1.15); } }
@keyframes ldr-sp-twinkle { 0%, 100% { opacity: .25; transform: scale(.55) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(40deg); } }
@keyframes ldr-sp-tip { 0%, 82%, 100% { transform: none; } 86% { transform: rotate(-12deg) translateY(-3px); } 90% { transform: rotate(7deg); } 94% { transform: rotate(-3deg); } }
@keyframes ldr-sp-swing { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes ldr-sp-fly { 0% { translate: -120% 0; } 40%, 100% { translate: calc(100vw + 30px) -36px; } }
@keyframes ldr-sp-bob { from { transform: translateY(-9px) rotate(-8deg); } to { transform: translateY(9px) rotate(6deg); } }
@keyframes ldr-sp-peek { 0%, 6% { transform: translateY(66%); } 15% { transform: translateY(-4%) rotate(-5deg); } 19% { transform: translateY(0) rotate(-4deg); } 32% { transform: translateY(3%) rotate(6deg); } 46% { transform: translateY(0) rotate(-3deg); } 60% { transform: translateY(2%) rotate(4deg); } 74% { transform: translateY(0) rotate(0); } 86%, 100% { transform: translateY(66%); } }
@keyframes ldr-sp-say { 0%, 21% { opacity: 0; scale: .5; } 25%, 44% { opacity: 1; scale: 1; } 48%, 100% { opacity: 0; scale: .5; } }
@keyframes ldr-sp-say2 { 0%, 27% { opacity: 0; scale: .5; } 31%, 52% { opacity: 1; scale: 1; } 56%, 100% { opacity: 0; scale: .5; } }
@keyframes ldr-sp-side { 0%, 8% { transform: translateX(84px) rotate(12deg); } 20% { transform: translateX(-4px) rotate(-10deg); } 26% { transform: translateX(0) rotate(-7deg); } 40% { transform: translateX(5px) rotate(-3deg); } 54% { transform: translateX(0) rotate(-9deg); } 68% { transform: translateX(5px) rotate(-4deg); } 80% { transform: translateX(0) rotate(-7deg); } 92%, 100% { transform: translateX(84px) rotate(12deg); } }
@keyframes ldr-sp-wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes ldr-sp-hop { 0%, 80%, 100% { transform: none; } 84% { transform: scale(1.1, .88); } 89% { transform: translateY(-14px) scale(.94, 1.08); } 94% { transform: scale(1.08, .92); } 97% { transform: none; } }
@keyframes ldr-sp-jump { 0% { transform: none; } 30% { transform: translateY(-12px) rotate(-6deg) scale(1.06); } 60% { transform: translateY(0) rotate(4deg); } 80% { transform: rotate(-2deg); } 100% { transform: none; } }
@keyframes ldr-sp-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes ldr-sp-float { from { transform: translateY(-7px) rotate(-2deg); } to { transform: translateY(7px) rotate(2deg); } }
@keyframes ldr-sp-roll { from { transform: rotate(-160deg); } to { transform: rotate(560deg); } }
@keyframes ldr-sp-dangle { from { transform: translateY(-46px); } to { transform: translateY(30px); } }
@keyframes ldr-sp-tombpeek { 0%, 12% { transform: translateY(72%); } 24% { transform: translateY(-4%) rotate(-6deg); } 30%, 52% { transform: translateY(0) rotate(-4deg); } 62% { transform: translateY(0) rotate(5deg); } 72% { transform: translateY(0); } 84%, 100% { transform: translateY(72%); } }
@keyframes ldr-sp-eyes { 0%, 88%, 100% { transform: scaleY(1); } 91% { transform: scaleY(.1); } 94% { transform: scaleY(1); } 96% { transform: scaleY(.1); } 98% { transform: scaleY(1); } }

/* Sections that are off screen rest (assets/js/halloween.js), and so does everything for visitors who
   ask for less motion — the characters then simply sit in their places. */
.ldr-sp-idle .ldr-sp, .ldr-sp-idle .ldr-sp *, .ldr-sp-idle .ldr-kicker__ic .ldr-sp-art { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
	.ldr-sp, .ldr-sp *, .ldr-kicker__ic .ldr-sp-art { animation: none !important; }
	.ldr-sp-fly { display: none; }
	.ldr-sp-say { transition: none; }
	.ldr-sp-z { opacity: .9; }
}
@media print {
	.ldr-sp { display: none !important; }
}
