/* Christmas overlay 1 — Falling snow and string lights
 *
 * This stylesheet only layers decorations on the current site.
 * It does not recolor nav, buttons, sections, fonts, or backgrounds.
 *
 * After the holiday, remove this theme cleanly:
 *   1. Delete the <link> to /assets/christmas/theme.css on each page
 *   2. Delete the .xmas-decor block from each page
 *   3. Delete the y/assets/christmas/ folder
 */

.hero,
.hero-404 {
  position: relative;
}

.hero > *,
.hero-404 > * {
  position: relative;
  z-index: 2;
}

.xmas-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1 !important;
}

/* Hang the lights just under the fixed 4.75rem nav, inside the hero
   padding so they do not take document-flow space or cover the menu. */
.xmas-lights {
  position: absolute;
  top: 4.75rem;
  left: 0;
  right: 0;
  height: 38px;
  background: url("/assets/christmas/lights.svg") 0 0 / 200px 38px repeat-x;
  animation: xmas-twinkle 2.6s ease-in-out infinite alternate;
}

.xmas-lights::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/christmas/lights.svg") 100px 0 / 200px 38px repeat-x;
  animation: xmas-twinkle 1.9s ease-in-out infinite alternate-reverse;
  opacity: 0.7;
}

@keyframes xmas-twinkle {
  from { filter: brightness(0.92); }
  to { filter: brightness(1.28); }
}

.xmas-snow {
  position: absolute;
  top: -10%;
  width: 14px;
  height: 14px;
  background: url("/assets/christmas/snowflake.svg") center / contain no-repeat;
  opacity: 0.7;
  animation: xmas-fall 16s linear infinite;
  will-change: transform;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.45));
}

.xmas-snow-dot {
  background: radial-gradient(circle, #fff 0 50%, transparent 70%);
  filter: none;
}

.xmas-snow-1 { left: 4%;  width: 16px; height: 16px; animation-duration: 15s; }
.xmas-snow-2 { left: 11%; width: 7px;  height: 7px;  animation-duration: 19s; animation-delay: -4s; }
.xmas-snow-3 { left: 18%; width: 12px; height: 12px; animation-duration: 17s; animation-delay: -8s; }
.xmas-snow-4 { left: 26%; width: 6px;  height: 6px;  animation-duration: 21s; animation-delay: -2s; }
.xmas-snow-5 { left: 74%; width: 13px; height: 13px; animation-duration: 16s; animation-delay: -6s; }
.xmas-snow-6 { left: 82%; width: 7px;  height: 7px;  animation-duration: 20s; animation-delay: -11s; }
.xmas-snow-7 { left: 90%; width: 15px; height: 15px; animation-duration: 14s; animation-delay: -3s; }
.xmas-snow-8 { left: 96%; width: 6px;  height: 6px;  animation-duration: 18s; animation-delay: -9s; }
.xmas-snow-1, .xmas-snow-5 { --xmas-drift: 28px; }
.xmas-snow-2, .xmas-snow-6 { --xmas-drift: -22px; }
.xmas-snow-3, .xmas-snow-7 { --xmas-drift: 16px; }
.xmas-snow-4, .xmas-snow-8 { --xmas-drift: -12px; }

@keyframes xmas-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.75; }
  100% { transform: translate3d(var(--xmas-drift, 24px), 115%, 0) rotate(180deg); opacity: 0.3; }
}

.xmas-mark {
  position: absolute;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.xmas-mark-1 {
  top: 6.2rem;
  left: 0.85rem;
  width: 28px;
  height: 28px;
  background: url("/assets/christmas/snowflake.svg") center / contain no-repeat;
}

.xmas-mark-2 {
  top: 6.2rem;
  right: 0.85rem;
  width: 22px;
  height: 22px;
  background: url("/assets/christmas/snowflake.svg") center / contain no-repeat;
}

h2.display-4 {
  position: relative;
  padding-bottom: 0.35rem;
}

h2.display-4::after {
  content: "";
  display: block;
  width: min(14rem, 75%);
  height: 22px;
  margin: 0.45rem auto 0;
  background: url("/assets/christmas/divider.svg") center / contain no-repeat;
}

footer { position: relative; }

footer::before,
footer::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0.85;
  background: url("/assets/christmas/snowflake.svg") center / contain no-repeat;
}

footer::before { left: 0.85rem; }
footer::after { right: 0.85rem; }

@media (max-width: 767px) {
  /* Keep falling snow in the side margins so it does not cross titles or buttons. */
  .xmas-snow-3,
  .xmas-snow-4,
  .xmas-snow-5 { display: none; }
  .xmas-snow-1 { left: 3%; }
  .xmas-snow-2 { left: 10%; }
  .xmas-snow-6 { left: 88%; }
  .xmas-snow-7 { left: 94%; }
  .xmas-snow-8 { left: 98%; }

  /* Slightly tighter lights and corner flakes so the menu title is not crowded. */
  .xmas-lights {
    top: 4.55rem;
    height: 28px;
    background-size: 148px 28px;
  }
  .xmas-lights::after { background-size: 148px 28px; }
  .xmas-mark-1,
  .xmas-mark-2 {
    top: 5.85rem;
    width: 20px;
    height: 20px;
  }
  .xmas-mark-1 { left: 0.5rem; }
  .xmas-mark-2 { right: 0.5rem; }

  /* Extra top padding on content heroes only. Leave .hero-404 alone so the
     portrait 404 CTA / hours fix is unchanged. */
  .hero { padding-top: 6.75rem; }
}

@media (max-width: 575.98px) {
  footer::before,
  footer::after { width: 16px; height: 16px; top: 0.65rem; }
}

/* Short viewports (iPhone landscape ~844×390 and similar): shrink decorations
   so they clear titles and the 404 number, and tighten hero spacing so the
   hours line and Order button stay in view. iPhone portrait is 844px tall and
   iPad is taller still, so this does not apply there and the portrait 404
   fix stands. */
@media (max-height: 500px) {
  .xmas-lights {
    top: 4.35rem;
    height: 22px;
    background-size: 120px 22px;
  }
  .xmas-lights::after { background-size: 120px 22px; }
  .xmas-mark-1,
  .xmas-mark-2 {
    top: 5.4rem;
    width: 16px;
    height: 16px;
  }
  .xmas-mark-1 { left: 0.4rem; }
  .xmas-mark-2 { right: 0.4rem; }

  .hero {
    padding-top: 6.4rem;
    padding-bottom: 0.7rem;
    min-height: 100svh;
  }
  .hero .container { min-height: 0; }
  .hero h1 {
    font-size: clamp(1.85rem, 6vw, 2.75rem);
    margin-bottom: 0.4rem;
  }
  .hero .lead {
    min-height: 0;
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 0.55rem;
  }
  .hero .mb-5 { margin-bottom: 0.7rem !important; }

  .hero-404 {
    padding-top: 6.85rem;
    padding-bottom: 0.55rem;
  }
  .hero-404 .four-oh-four { font-size: clamp(3rem, 12vw, 4.25rem); }
  .hero-404 .subtitle { font-size: clamp(1.15rem, 4.2vw, 1.55rem); }
  .hero-404 .lead { font-size: 0.98rem; margin-bottom: 0.55rem; }
  .hero-404 .mt-5 { margin-top: 0.55rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .four-oh-four { animation: none; }
  .xmas-lights,
  .xmas-lights::after { animation: none; filter: none; }
  .xmas-snow { animation: none; opacity: 0; }
  .xmas-snow-1,
  .xmas-snow-7,
  .xmas-snow-8 { opacity: 0.8; top: auto; }
  .xmas-snow-1 { left: 1rem; bottom: 3.2rem; }
  .xmas-snow-7 { left: auto; right: 3.2rem; bottom: 1.1rem; }
  .xmas-snow-8 { left: auto; right: 1rem; bottom: 3.2rem; }
}
