/* ==========================================================================
   Holiday edition of the homepage (Christmas 2026)
   Loaded only by app/home-christmas.php, on top of site.css.
   Colours come from the film: the midnight sky and the warm lamplight in the windows.
   The rescue's pink stays for buttons and accents.
   ========================================================================== */

.xmas {
  --night: #0C1626;
  --night-rgb: 12, 22, 38;
  --lamp: #F3B562;          /* lamplight amber: 10:1 on --night */
}

.xkicker {
  display: block;
  margin-bottom: 14px;
  font: 650 0.78rem/1.2 var(--f-text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lamp);
}

/* ---------- Hero: night over the sleeping town ---------- */
.xhero { background: var(--night); color: var(--white); }
.xhero-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/assets/img/holiday/hero-night-sky.jpg") 50% 100% / cover no-repeat;
}
/* darker at the top (under the header) and at the bottom, where the small type sits over the snowy roofs */
.xhero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(var(--night-rgb), 0.6) 0%, rgba(var(--night-rgb), 0) 34%),
    linear-gradient(to top, rgba(var(--night-rgb), 0.9) 0%, rgba(var(--night-rgb), 0.55) 24%, rgba(var(--night-rgb), 0) 48%);
}
.xsnow {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.xhero .hero-meta { border-top-color: rgba(255, 255, 255, 0.85); color: rgba(255, 255, 255, 0.85); }
.xhero .hero-title { position: relative; color: var(--white); }
.xhero .hero-title .fit-pink { color: var(--pink-light); }
.xhero .hero-sub { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 12px rgba(var(--night-rgb), 0.8); }
.xhero .btn-white:hover { background: var(--pink); color: var(--white); }
/* play triangles are CSS borders, not SVG: WebKit didn't repaint an SVG's currentColor after the hover colour faded back */
.xplay-btn { display: inline-flex; align-items: center; gap: 12px; }
.xplay-btn::before, .xplay::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 0.62em solid currentColor;
  border-block: 0.38em solid transparent;
}
.xplay-btn::before { font-size: 1rem; }

/* The sleigh flies between the two lines of the headline: in front of "Home for", behind "the holidays." */
.xhero .xl-1 { position: relative; z-index: 1; }
.xhero .xl-2 { position: relative; z-index: 3; }
.xsleigh {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 50%;
  width: clamp(150px, 21vw, 340px);
  margin-top: calc(clamp(150px, 21vw, 340px) * -0.62);
  pointer-events: none;
  animation: xfly 16s linear 1.4s infinite backwards;
  will-change: transform;
}
.xsleigh img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
  animation: xbob 2.6s ease-in-out infinite alternate;
}
@keyframes xfly {
  0%   { transform: translate3d(calc(-1 * var(--edge) - 100%), 30%, 0) rotate(-2deg); }
  70%  { transform: translate3d(calc(100vw - var(--edge)), -30%, 0) rotate(-6deg); }
  100% { transform: translate3d(calc(100vw - var(--edge)), -30%, 0) rotate(-6deg); }
}
@keyframes xbob { from { transform: translateY(-5%); } to { transform: translateY(5%); } }

/* ---------- The film: the reel frame grows to full bleed, with the film's poster ---------- */
.xfilm, .xfilm .reel-frame { background: var(--night); }
.xfilm-line { max-width: 13ch; }
.xfilm-line .xkicker { white-space: nowrap; }   /* one line, wider than the title under it */
.xplay {
  position: absolute;
  right: var(--edge);
  bottom: clamp(36px, 9vh, 96px);
  display: grid;
  place-items: center;
  width: clamp(76px, 8vw, 116px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--night);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  opacity: var(--line-o, 0);
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.xplay::before { margin-left: 8%; font-size: clamp(1.7rem, 2.2vw, 2.6rem); }
.xplay:hover { transform: scale(1.06); background: var(--pink); color: var(--white); }

.xfilm-dialog {
  width: min(1200px, 92vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #000;
  color: var(--white);
  overflow: visible;
}
.xfilm-dialog::backdrop { background: rgba(12, 22, 38, 0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xfilm-player { position: relative; aspect-ratio: 16 / 9; }
.xfilm-player img, .xfilm-player video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.xfilm-soon {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 24px 20px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.75));
  font-weight: 600;
}
.xfilm-close {
  position: absolute;
  top: -56px;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}
.xfilm-close:hover { background: var(--pink); }
.xfilm-close svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- Spotlight: the featured dog inside Santa's snow globe ---------- */
.xglobe { background: var(--night); }
.xglobe-fig { position: relative; width: min(100%, 420px); margin: 0; justify-self: center; }
.xglobe-ball {
  position: relative;
  z-index: 1;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22), 0 0 90px -10px rgba(243, 181, 98, 0.55);
}
.xglobe-ball img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 0.5s var(--ease); }
.xglobe-ball:hover img { transform: scale(1.09); }
.xglobe-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.6) 0, rgba(255, 255, 255, 0.14) 8%, transparent 20%),
    radial-gradient(circle at 72% 84%, rgba(255, 255, 255, 0.14) 0, transparent 26%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(var(--night-rgb), 0.4) 80%, rgba(255, 255, 255, 0.3) 99%);
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.2), inset 0 -24px 60px rgba(var(--night-rgb), 0.45);
}
/* two layers of flakes drifting down inside the glass */
.xglobe-snow { position: absolute; inset: 0; pointer-events: none; }
.xglobe-snow::before, .xglobe-snow::after {
  content: "";
  position: absolute;
  inset: -240px 0 0 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1.1px, transparent 1.7px);
  background-size: 120px 120px, 80px 80px;
  background-position: 10px 20px, 50px 60px;
  animation: xglobesnow 14s linear infinite;
}
.xglobe-snow::after { background-size: 160px 160px, 60px 60px; background-position: 70px 0, 20px 30px; opacity: 0.6; animation-duration: 22s; }
@keyframes xglobesnow { to { transform: translateY(240px); } }
.xglobe-base {
  position: relative;
  z-index: 0;
  display: block;
  width: 64%;
  height: 70px;
  margin: -26px auto 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #8A5634 0%, #5B331C 55%, #3A2112 100%);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.xglobe-base::before {
  content: "";
  position: absolute;
  inset: 22px 0 auto;
  height: 10px;
  background: linear-gradient(90deg, #8C6A2C, #E9CB7E 50%, #8C6A2C);
}
.xglobe .spot-title { font-size: clamp(3rem, 6.4vw, 6.2rem); }

/* ---------- Closer ---------- */
.xcloser-you {
  margin-top: clamp(6px, 1vw, 14px);
  font: 400 clamp(4.4rem, 13vw, 12rem)/0.88 var(--f-display);
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Phones ---------- */
@media (max-width: 800px) {
  .xhero-sky { background-position: 72% 100%; }
  .xfilm .reel-video { object-position: 47% 50%; }   /* keeps the white bull terrier, the tricolor and the girl in frame */
}

/* Tall screens (phones, tablets upright): a portrait crop of the sky plate, so it isn't enlarged */
@media (max-aspect-ratio: 3/4) {
  .xhero-sky { background-image: url("/assets/img/holiday/hero-night-sky-portrait.jpg"); background-position: 50% 100%; }
}

/* ---------- Reduce Motion: no flight, no snow; the sleigh parks beside the headline ---------- */
@media (prefers-reduced-motion: reduce) {
  .xsleigh { left: auto; right: 0; z-index: 0; animation: none !important; transform: rotate(-4deg); }   /* parked behind the headline, so no letters are hidden */
  .xsleigh img { animation: none !important; }
  .xsnow { display: none; }
  .xglobe-snow::before, .xglobe-snow::after { animation: none !important; }
}
