/* Snow-covered boughs from NEON's winter price artwork. Santa hat cropped from
   Hert Niks, Pexels photo 6262360. Decorations occupy only the outer gutters. */
/* Ornaments cropped from Laura James's Pexels photograph 6102366. */
@media screen and (min-width: 84rem) and (forced-colors: none) {
  .neon-winter {
    --winter-edge: min(calc((100% - 80rem) / 2 - 8px), 9rem);
    --winter-tile: clamp(45rem, 96vh, 60rem);
  }
  .neon-winter main.relative::before,
  .neon-winter main.relative::after,
  .neon-winter body:not(:has(main.relative, [data-site-editor]))::before,
  .neon-winter body:not(:has(main.relative, [data-site-editor]))::after {
    content: "";
    position: absolute;
    inset-block: 0;
    left: 0;
    width: var(--winter-edge);
    z-index: 3;
    pointer-events: none;
    background: url("../garland/left.webp") left top / 100% var(--winter-tile) repeat-y;
  }
  .neon-winter main.relative::after,
  .neon-winter body:not(:has(main.relative, [data-site-editor]))::after {
    left: auto;
    right: 0;
    background-image: url("../garland/right.webp");
  }
  .neon-winter body:not(:has(main.relative, [data-site-editor]))::before,
  .neon-winter body:not(:has(main.relative, [data-site-editor]))::after {
    max-height: 75vh;
  }
  .neon-winter main.relative + footer {
    background-image: url("../garland/left.webp"), url("../garland/right.webp");
    background-size: var(--winter-edge) var(--winter-tile);
    background-position: left top, right top;
    background-repeat: repeat-y;
  }
}
@media screen and (forced-colors: none) {
  .neon-winter div:has(> svg.neon-glow-lg[width="1000"])::after {
    content: "";
    position: absolute;
    top: 2rem;
    margin-top: 12.32%;
    left: 58.7%;
    width: 21%;
    aspect-ratio: 245 / 337;
    background: url("../santa-hat.webp") center / contain no-repeat;
    transform: translateY(-89%) rotate(5deg);
    transform-origin: 50% 100%;
    pointer-events: none;
  }
}

.neon-winter main.relative > .section-line {
  position: relative;
  z-index: 2;
  max-width: none;
  height: 1px;
  background: #365266;
  box-shadow: none;
}

.neon-winter :where(
  main.relative :is(.glass, button):has(> img.object-cover:not(.absolute)),
  #prices .glass-hover
) {
  position: relative;
}

/* Cards share the gallery thumbnail cap, including its height and shadow. */
@media screen and (forced-colors: none) {
  .neon-winter :is(#faq summary, #faq .gradient-card, #games .glass, #map .clubs-map,
      #loyalty .grid > .glass-hover, #reviews .grid > .glass, #clubContacts .grid > .glass,
      #contacts .gradient-card, main.relative > section:first-of-type .gradient-card)::after,
  .neon-winter :where(
    main.relative .relative:not(.fixed, .scanlines):has(> img.object-cover:not(.absolute)),
    main.relative :is(.glass, button):not(.scanlines):has(> img.object-cover:not(.absolute)),
    #prices .glass-hover
  )::after,
  .neon-winter main.relative .scanlines:has(> img.carousel-slide)::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    height: var(--snow-cap-height, 9px);
    border-radius: inherit;
    background:
      radial-gradient(ellipse 19px 7px at 24px 0, #f2faff 78%, #b8d8ee 93%, transparent 100%) 0 0 / 83px 100% repeat-x,
      radial-gradient(ellipse 11px 5px at 42px 0, #e1f3ff 78%, #adcee6 92%, transparent 100%) 0 0 / 57px 100% repeat-x,
      radial-gradient(ellipse 21px 4px at 63px 0, #e5f4ff 70%, #bedcf0 91%, transparent 100%) 0 0 / 109px 100% repeat-x,
      linear-gradient(#f3faff, #d3eaf9) top / 100% 2px no-repeat;
    filter: var(--cap-shadow, drop-shadow(0 2px 2px #061c2a80));
    pointer-events: none;
  }
}

.neon-winter #prices .glass-hover::after {
  inset-inline: 9px;
  opacity: 0.82;
}

@media (forced-colors: active) {
  .neon-winter :where(
    main.relative .relative:not(.fixed, .scanlines):has(> img.object-cover:not(.absolute)),
    main.relative :is(.glass, button):not(.scanlines):has(> img.object-cover:not(.absolute)),
    #prices .glass-hover
  )::after,
  .neon-winter main.relative .scanlines:has(> img.carousel-slide)::before {
    content: none;
  }
}

/* Snow is cut from NEON's price artwork. The baubles are cropped from the same
   Laura James photograph as the garland (Pexels 6102366). */
@media screen and (forced-colors: none) {
  .neon-winter :is(#faq summary, #faq .gradient-card, #games .glass, #map .clubs-map,
    #loyalty .grid > .glass-hover, #reviews .grid > .glass, #clubContacts .grid > .glass,
    #contacts .gradient-card, main.relative > section:first-of-type .gradient-card) {
    position: relative;
  }
  .neon-winter #faq summary {
    border-radius: inherit;
  }
  /* The full card height preserves both corner arcs when clipping the snow. */
  .neon-winter main.relative > section:first-of-type:has(h1 > span + .neon-text) .gradient-card {
    --snow-cap-height: 100%;
  }
  /* Green tinsel from Guzel Sadykova's Pexels photo 14947247;
     the illuminated strand comes from NEON's winter price artwork. */
  /* Each wrapped line paints its glyphs in front of the garland. */
  .neon-winter main.relative h1:has(> span + .neon-text) {
    line-height: 1.13;
  }
  .neon-winter main.relative h1:has(> span + .neon-text) > span {
    padding-inline: .28em;
    margin-inline: -.28em;
    background-image: linear-gradient(currentColor, currentColor), url("./draped-tinsel.webp");
    background-size: 100% 100%, 100% .91em;
    background-position: left top, center .08em;
    background-repeat: no-repeat, no-repeat;
    -webkit-background-clip: text, border-box;
    background-clip: text, border-box;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    -webkit-text-fill-color: transparent;
  }
  .neon-winter main.relative h1:has(> span + .neon-text) > .neon-text {
    text-shadow: none;
    filter: drop-shadow(0 0 .08em color-mix(in srgb, var(--accent) 50%, transparent));
  }

  .neon-winter header.sticky + main.relative > section:first-of-type:not([id])::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5rem;
    background:
      url("../rims/champagne.webp") 6% top / auto 4.15rem no-repeat,
      url("../rims/red-star.webp") 12% top / auto 2.85rem no-repeat,
      url("../rims/ruby.webp") 22% top / auto 3.45rem no-repeat,
      url("../rims/gold-star.webp") 32% top / auto 2.6rem no-repeat,
      url("../rims/champagne.webp") 42% top / auto 3.85rem no-repeat,
      url("../rims/red-star.webp") 51% top / auto 3rem no-repeat,
      url("../rims/ruby.webp") 61% top / auto 4.2rem no-repeat,
      url("../rims/gold-star.webp") 72% top / auto 2.8rem no-repeat,
      url("../rims/champagne.webp") 83% top / auto 4.3rem no-repeat,
      url("../rims/red-star.webp") 94% top / auto 3.25rem no-repeat;
    z-index: 4;
    pointer-events: none;
  }
  .neon-winter main.relative > #branches + .section-line:has(+ #gallery)::before,
  .neon-winter main.relative > #gallery + .section-line:has(+ #games)::before,
  .neon-winter main.relative > #gallery + .section-line:has(+ #games)::after,
  .neon-winter main.relative > .section-line:has(+ #branches)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    width: clamp(7rem, calc((100% - 76rem) / 2 + 3rem), 30rem);
    aspect-ratio: 960 / 340;
    background: url("../snow/bank.webp") right bottom / 100% 100% no-repeat;
    pointer-events: none;
  }
  .neon-winter main.relative > #branches + .section-line:has(+ #gallery)::before,
  .neon-winter main.relative > #gallery + .section-line:has(+ #games)::before {
    left: 0;
    right: auto;
    transform: scaleX(-1);
  }
  .neon-winter main.relative > #gallery + .section-line:has(+ #games)::before {
    width: clamp(5rem, calc((100% - 79rem) / 2), 22rem);
    aspect-ratio: 2 / 1;
  }
}
@media screen and (max-width: 48rem) and (forced-colors: none) {
  .neon-winter header.sticky + main.relative > section:first-of-type:not([id])::after {
    height: 3rem;
    background: url("../rims/ruby.webp") 6% top / auto 2.5rem no-repeat,
                url("../rims/gold-star.webp") 33% top / auto 1.8rem no-repeat,
                url("../rims/champagne.webp") 65% top / auto 2.65rem no-repeat,
                url("../rims/red-star.webp") 92% top / auto 2rem no-repeat;
  }
}

/* The cap tapers away before the rounded corners of the FAQ cards. */
@media screen and (forced-colors: none) {
  .neon-winter #faq {
    position: relative;
  }
  .neon-winter #faq summary::after,
  .neon-winter #faq .gradient-card::after {
    --first-patch: 20%;
    --second-patch: 67%;
    margin-inline: 12px;
    --cap-shadow: none;
    /* A zero-height gap separates the two solid, tapering silhouettes. */
    clip-path: polygon(0 0, 100% 0,
      calc(var(--second-patch) + 12%) 0, calc(var(--second-patch) + 8%) 16%,
      calc(var(--second-patch) + 4%) 74%, var(--second-patch) 100%,
      calc(var(--second-patch) - 5%) 64%, calc(var(--second-patch) - 8%) 18%, calc(var(--second-patch) - 12%) 0,
      calc(var(--first-patch) + 15%) 0, calc(var(--first-patch) + 11%) 17%,
      calc(var(--first-patch) + 6%) 81%, var(--first-patch) 100%,
      calc(var(--first-patch) - 7%) 74%, calc(var(--first-patch) - 11%) 17%, calc(var(--first-patch) - 15%) 0);
  }
  .neon-winter #faq details:nth-child(3n + 2) summary::after {
    --first-patch: 43%;
    --second-patch: 83%;
  }
  .neon-winter #faq details:nth-child(3n) summary::after {
    --first-patch: 25%;
    --second-patch: 77%;
  }
  .neon-winter #faq .gradient-card::after {
    --first-patch: 26%;
    --second-patch: 80%;
  }

  /* Snowman photographed by Susanne Jutzeler, Pexels 10526562. */
  .neon-winter #faq::after {
    content: "";
    position: absolute;
    right: min(0px, calc((100% - 100vw) / 2));
    bottom: 0;
    width: clamp(9rem, calc((100vw - 80rem) / 2), 23rem);
    aspect-ratio: 760 / 540;
    background: url("../faq-winter/snowman-bank.webp") right bottom / contain no-repeat;
    pointer-events: none;
  }
}
@media screen and (max-width: 98rem) and (forced-colors: none) {
  .neon-winter #faq {
    padding-bottom: max(7.5rem, 1.5rem + 9vw);
  }
}

@media screen and (forced-colors: none) {
  /* Snow figure in a knitted hat and scarf, photographed by Arina Krasnikova (Pexels 6012807). */
  .neon-winter main.relative > #games::after {
    content: "";
    position: absolute;
    left: clamp(1rem, calc((100vw - 80rem) * .14), 13rem);
    bottom: 0;
    z-index: 4;
    height: clamp(4.25rem, calc((100vw - 80rem) * .44), 13.25rem);
    aspect-ratio: 490 / 548;
    background: url("./snow-lady.webp") left bottom / contain no-repeat;
    pointer-events: none;
  }
}
