/* Holiday effects: lights, moon, Easter cross, Thanksgiving candle, nativity, flag.
   Used by the site and by the invitation page guests open. */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#deco { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
/* fine warm-white fairy lights (Christmas) */
.fairy { position: absolute; top: 0; left: 0; right: 0; height: 26px; }
.fairy::before { content: ''; position: absolute; left: -2%; right: -2%; top: 0; height: 18px; border-bottom: 1px solid rgba(255,255,255,.18); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.fairy span { position: absolute; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff3d6; box-shadow: 0 0 6px 2px rgba(255,226,160,.75), 0 0 16px 4px rgba(255,214,140,.25); animation: shimmer 3.2s var(--d) infinite ease-in-out; }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .fairy span { animation: none; } }
.pt-cap { font-family: var(--title-font); font-weight: 600; font-size: clamp(.9rem, 1.5vw, 1.08rem); letter-spacing: .01em; color: #3b302a; }

/* real-looking Christmas lights: dark wire, sockets, glowing glass bulbs */
.xlights { position: absolute; top: 0; left: 0; right: 0; height: 40px; }
.xwire { position: absolute; left: 0; top: 0; width: 100%; height: 20px; overflow: visible; }
.xwire path { fill: none; stroke: #1b2a22; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.xbulb { position: absolute; width: 11px; height: 17px; margin-left: -5.5px; transform: rotate(var(--r)); transform-origin: 50% 0; }
.xbulb::before { content: ''; position: absolute; left: 2.5px; top: 0; width: 6px; height: 6px; border-radius: 1.5px; background: linear-gradient(90deg, #3c4a3f, #6f7d70 45%, #2d3830); }
.xbulb::after { content: ''; position: absolute; left: 0; top: 5px; width: 11px; height: 13px; border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9) 0 8%, var(--c) 38%, color-mix(in srgb, var(--c) 60%, #000) 100%);
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--c) 70%, transparent), 0 0 22px 6px color-mix(in srgb, var(--c) 30%, transparent);
  animation: glowbulb 4s var(--d) infinite ease-in-out; }
@keyframes glowbulb { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(.72); } }
@media (prefers-reduced-motion: reduce) { .xbulb::after { animation: none; } }
/* Halloween moon, softly glowing, for the bats to fly across */
.moon { position: absolute; right: 8%; top: 70px; width: clamp(90px, 14vw, 170px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fffbea 0, #f3e6c0 40%, #d9c79a 75%, #c2b080 100%);
  box-shadow: 0 0 40px 10px rgba(255,236,190,.18), 0 0 120px 40px rgba(255,220,160,.08); opacity: .85; }
.moon::before { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 62% 58%, rgba(150,130,90,.35) 0 9%, transparent 10%), radial-gradient(circle at 35% 66%, rgba(150,130,90,.25) 0 6%, transparent 7%), radial-gradient(circle at 55% 28%, rgba(150,130,90,.22) 0 5%, transparent 6%); }

/* classic C9 Christmas bulbs (replaces the small round bulbs) */
.xlights { height: 58px; }
.xwire { height: 22px; }
.xwire path { stroke: #1f4a24; stroke-width: 2.4; }
.xbulb { top: 7px; width: 20px; height: 40px; margin-left: -10px; transform-origin: 50% 2px;
  filter: drop-shadow(0 0 5px var(--c)) drop-shadow(0 0 14px color-mix(in srgb, var(--c) 55%, transparent));
  animation: c9glow 5s var(--d) infinite ease-in-out; }
.xbulb::before, .xbulb::after { display: none; }
.xbulb svg { display: block; transform: rotate(var(--r)); transform-origin: 50% 2px; }
@keyframes c9glow { 0%, 100% { opacity: 1; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .xbulb { animation: none; } }
body[data-theme="christmas"].topdeco header { padding-top: calc(56px + env(safe-area-inset-top)); }
@media (max-width: 600px) { .xbulb { width: 16px; height: 32px; margin-left: -8px; } .xbulb svg { width: 16px; height: 32px; } }
/* random twinkle (driven from fx.js) */
.xbulb { animation: none; transition: opacity .28s ease, filter .28s ease; }
.xbulb.dim { opacity: .38; filter: drop-shadow(0 0 1px var(--c)); }

/* holiday tiles without photos: a still picture of the holiday's effect */
.hcard .cover.art { opacity: 1; }
.hcard .shade { background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72)); }
.hcard .nm, .hcard .ct { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
/* Halloween: the moon sits behind the flying bats */
body[data-theme="halloween"] #deco { z-index: 0; }
/* Easter: the cross with light behind it */
.ecross { position: relative; width: min(46vw, 210px); aspect-ratio: 100 / 160; margin: 6px auto 4px; }
.ecross-svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgba(255,232,170,.75)) drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.ecross-glow { position: absolute; left: 50%; top: 34%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,246,220,.75) 0%, rgba(255,233,180,.35) 22%, rgba(255,220,150,0) 60%); }
.ecross-rays { position: absolute; left: 50%; top: 34%; width: 420%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,240,200,.20) 0deg 5deg, rgba(255,240,200,0) 5deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 30%, transparent 65%); mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 30%, transparent 65%);
  animation: ecrays 120s linear infinite; }
@keyframes ecrays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ecross-rays { animation: none; } }
.ecross, .ecross * { pointer-events: none; } /* the glow is decoration: never block taps on the header or buttons */

/* Thanksgiving: the family's picture as the centerpiece, with a flickering candle */
.hero-photo { position: relative; margin: 4px auto 18px; width: min(100%, 620px); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); }
.hero-photo img { display: block; width: 100%; height: auto; }
.hero.has-photo .title, .hero.has-photo .sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.candle-glow { position: absolute; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,214,140,.55) 0%, rgba(255,170,80,.22) 30%, rgba(255,150,60,0) 65%);
  animation: candleglow 2.7s infinite; }
.candle-flame { position: absolute; width: 1.6%; aspect-ratio: 1 / 2.4; transform: translate(-50%, -62%); border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 72%, #fff8e1 0 22%, #ffd77a 45%, rgba(255,150,40,.7) 70%, rgba(255,120,30,0) 100%); mix-blend-mode: screen; filter: blur(.4px);
  transform-origin: 50% 100%; animation: candleflame 1.9s infinite; }
@keyframes candleglow {
  0% { opacity: .85; transform: translate(-50%, -50%) scale(1); } 9% { opacity: .62; transform: translate(-50%, -50%) scale(.96); }
  17% { opacity: .95; transform: translate(-50%, -50%) scale(1.04); } 31% { opacity: .7; } 38% { opacity: .9; transform: translate(-50%, -50%) scale(1.01); }
  52% { opacity: .58; transform: translate(-50%, -50%) scale(.95); } 61% { opacity: .92; } 74% { opacity: .75; transform: translate(-50%, -50%) scale(1.03); }
  83% { opacity: .98; } 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); } }
@keyframes candleflame {
  0% { transform: translate(-50%, -62%) rotate(0) scaleY(1); opacity: .9; } 13% { transform: translate(-50%, -62%) rotate(-3deg) scaleY(1.08); }
  27% { transform: translate(-50%, -62%) rotate(2deg) scaleY(.94); opacity: .75; } 41% { transform: translate(-50%, -62%) rotate(-1deg) scaleY(1.1); opacity: 1; }
  58% { transform: translate(-50%, -62%) rotate(3deg) scaleY(.96); } 72% { transform: translate(-50%, -62%) rotate(-2deg) scaleY(1.05); opacity: .8; }
  86% { transform: translate(-50%, -62%) rotate(1deg) scaleY(.98); } 100% { transform: translate(-50%, -62%) rotate(0) scaleY(1); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .candle-glow, .candle-flame { animation: none; } }

/* Thanksgiving: leaves drift in front of the picture (they never block taps) */
body[data-theme="thanksgiving"] #fx { z-index: 4; }
/* Christmas nativity: behind the page (snow falls in front of it), bottom right */
#scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#scene .nativity { position: absolute; right: max(1vw, 6px); bottom: 0; width: clamp(210px, 30vw, 430px); height: auto; }
#scene .nv-star { transform-box: fill-box; transform-origin: center; animation: nvTwinkle 4.5s ease-in-out infinite; }
#scene .nv-beam { animation: nvBeam 6s ease-in-out infinite; }
@keyframes nvTwinkle { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .82; transform: scale(.93); } 60% { opacity: 1; transform: scale(1.04); } }
@keyframes nvBeam { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { #scene .nv-star, #scene .nv-beam { animation: none; } }
@media (max-width: 640px) { #scene .nativity { opacity: .9; } }
body.ss-open #scene { display: none; }

/* 4th of July: a huge flag waving behind the page; fireworks burst in front of it */
#scene .usflag { position: absolute; left: 50%; top: 70px; width: min(94vw, 1000px); transform: translateX(-50%); }
#scene .usflag .cloth { position: relative; margin-left: 14px; aspect-ratio: 1.9 / 1; filter: brightness(.68) saturate(.9); opacity: .9; }
#scene .usflag .cloth i { position: absolute; top: 0; bottom: 0; width: calc(100% / var(--n) + 1px); background-image: var(--img);
  background-size: calc(var(--n) * 100%) 100%; background-repeat: no-repeat; animation: flagWave 2.6s ease-in-out var(--d) infinite; }
@keyframes flagWave {
  0%, 100% { transform: translateY(calc(var(--a) * -1)); filter: brightness(1.12); }
  50% { transform: translateY(var(--a)); filter: brightness(.72); }
}
#scene .usflag .pole { position: absolute; left: 0; top: -14px; width: 12px; height: 100vh; border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, #6d6d6d, #e9e9e9 40%, #9a9a9a 70%, #555); }
#scene .usflag .pole::before { content: ''; position: absolute; left: -5px; top: -18px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #d6a93a 55%, #8a6614); }
@media (prefers-reduced-motion: reduce) { #scene .usflag .cloth i { animation: none; } }
@media (max-width: 640px) { #scene .usflag { top: 64px; width: calc(100vw - 4px); } }
