/* Christmas dressing, linked only while SeasonalHelper#christmas_theme? is
   true. Plain CSS served by Propshaft rather than part of the Sass bundle, so
   out of season it costs visitors nothing and removing it touches no shared
   file. Everything here layers over the normal styles; none of it is needed. */

:root {
  /* 7.7:1 on the band's evergreen, so it can carry text. */
  --obi-xmas-gold: #e3b955;
  /* 5.5:1 on --obi-ink, enough for the hero's small bold eyebrow. */
  --obi-xmas-berry: #ef5350;
  --obi-evergreen: #12301f;
}

.christmas-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  padding: 0.55rem 1rem;
  color: var(--obi-limewash);
  background: var(--obi-evergreen);
  border-bottom: 2px solid #8e1f24;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

.christmas-band__message {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.christmas-band__star {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  fill: var(--obi-xmas-gold);
}

.christmas-band__links {
  display: inline-flex;
  gap: 1.25rem;
}

.christmas-band__link {
  color: var(--obi-xmas-gold);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.christmas-band__link:hover,
.christmas-band__link:focus-visible {
  color: var(--obi-limewash);
}

.christmas-band__link:focus-visible {
  outline: 2px solid var(--obi-limewash);
  outline-offset: 3px;
}

/* Phones already have Book a table pinned to the bottom of the screen
   (.mobile-actions); the Christmas link stays, it is the band's point. */
@media (max-width: 760px) {
  .christmas-band__link--booking { display: none; }
}

.site-navbar {
  border-bottom-color: rgba(227, 185, 85, 0.6);
}

/* The hero is shared by the home, history and most other public pages. */
.home-hero__eyebrow,
.home-hero h1 em {
  color: var(--obi-xmas-berry);
}

/* Snow drifting down the dark copy panel, behind the words, and a sprig of
   holly in its top corner. isolation gives the panel its own stacking context
   so both sit behind the text without dropping behind the hero's background;
   overflow keeps the snow off the photo, where it vanished against the sky. */
.home-hero__copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.home-hero__copy::before {
  position: absolute;
  inset-block-start: clamp(0.5rem, 1.5vw, 1.25rem);
  inset-inline-end: clamp(0.5rem, 2vw, 1.5rem);
  z-index: -1;
  width: clamp(6.5rem, 26%, 10rem);
  aspect-ratio: 200 / 140;
  content: "";
  background: url("/assets/christmas-holly-85346ee8.svg") no-repeat 100% 0 / contain;
  pointer-events: none;
}

/* One 240px tile, scrolled by exactly its own height so the loop is seamless.
   A transform rather than background-position, so the browser moves it on
   the compositor instead of repainting the panel every frame. */
.home-hero__copy::after {
  position: absolute;
  inset-block-start: -240px;
  inset-inline: 0;
  z-index: -2;
  height: calc(100% + 240px);
  content: "";
  background: url("/assets/christmas-snow-e3a4b612.svg") repeat 0 0 / 240px 240px;
  opacity: 0.4;
  pointer-events: none;
  will-change: transform;
  animation: christmas-snowfall 16s linear infinite;
}

@keyframes christmas-snowfall {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 240px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__copy::after {
    animation: none;
  }
}

/* Father Christmas and his reindeer cross the pale sky at the top of the
   photo every so often, climbing as they go. The figure is the container so
   cqw can say "the photo's width" while the sleigh's own width is the % in
   translate. A browser without container units drops the keyframes and the
   sleigh simply stays parked off the left edge. */
.home-hero__image {
  container-type: inline-size;
}

.home-hero__image::before {
  position: absolute;
  inset-block-start: clamp(0.5rem, 4%, 2rem);
  inset-inline-start: 0;
  z-index: 1;
  width: clamp(11rem, 36%, 20rem);
  aspect-ratio: 420 / 130;
  content: "";
  background: url("/assets/christmas-sleigh-0eac609e.svg") no-repeat 0 0 / contain;
  filter: drop-shadow(0 0.15rem 0.2rem rgba(14, 14, 13, 0.25));
  pointer-events: none;
  transform: translateX(-110%);
  will-change: transform;
  animation: christmas-sleigh 20s linear 1.5s infinite;
}

@keyframes christmas-sleigh {
  0%    { transform: translate(-110%, 2.5rem) rotate(-3deg); }
  12%   { transform: translate(calc(25cqw - 50%), 1.25rem) rotate(-6deg); }
  24%   { transform: translate(calc(50cqw - 50%), 1.6rem) rotate(-4deg); }
  36%   { transform: translate(calc(75cqw - 50%), 0.25rem) rotate(-7deg); }
  48%   { transform: translate(calc(100cqw + 10%), -1rem) rotate(-8deg); }
  100%  { transform: translate(calc(100cqw + 10%), -1rem) rotate(-8deg); }
}

/* Still: parked mid-sky rather than gone. */
@media (prefers-reduced-motion: reduce) {
  .home-hero__image::before {
    animation: none;
    transform: translate(calc(50cqw - 50%), 1rem) rotate(-4deg);
  }
}
