/*
 * Gingerbread Lane homepage banner: the section around the shared artwork
 * (inc/gingerbread-lane-banner.php; artwork styles in gingerbread-lane.css).
 *
 * Border widths come from the Customizer's .framed-section rule (16-17px,
 * 24-25px from 1024px), like the homepage's other sections; the colour is
 * the artwork's frame green. Pink is the artboard background (#fc5971).
 */
/*
 * position + isolation: the section is the stacking context, so its snow
 * layers interleave with the artwork's layers (the compositions don't form
 * stacking contexts of their own). overflow: hidden clips the house and the
 * snow at the inside of the border.
 */
.shaverhall-gl-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-style: solid;
  border-color: #586c3e;
  background: #fc5971;
}

/*
 * Snow across the whole section, between the artwork's layers: behind the
 * house (2), behind the copy (4) and over the copy (6); the logos and CTA
 * are at 7, so never covered.
 */
.shaverhall-gl-banner__snow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shaverhall-gl-banner__snow--back { z-index: 2; }
.shaverhall-gl-banner__snow--mid { z-index: 4; }
.shaverhall-gl-banner__snow--front { z-index: 6; }

/*
 * Flakes at the pen's size: a 10px core and 10px glow, drawn as one radial
 * gradient in a 30px box centred on the flake's position.
 */
.shaverhall-gl-banner .shaverhall-gl__snowflake {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    #fff 33%,
    rgba(255, 255, 255, 0.5) 36%,
    rgba(255, 255, 255, 0.15) 66%,
    rgba(255, 255, 255, 0) 100%
  );
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .shaverhall-gl-banner__snow {
    display: none;
  }
}

/* Narrow: the portrait poster, as in the popup. */
.shaverhall-gl-banner .shaverhall-gl-landscape {
  display: none;
}

.shaverhall-gl-banner .shaverhall-gl-poster {
  max-width: 600px;
  margin: 0 auto;
}

.shaverhall-gl-banner {
  padding: 40px 20px;
}

/*
 * Wide: the landscape composition, edge to edge inside the frame (the house
 * bleeds off the edges as in the design), up to 1600px wide; beyond that it
 * centres on the pink.
 */
@media (min-width: 1024px) {
  .shaverhall-gl-banner {
    padding: 0;
  }

  .shaverhall-gl-banner .shaverhall-gl-poster {
    display: none;
  }

  .shaverhall-gl-banner .shaverhall-gl-landscape {
    display: block;
    max-width: 1600px;
    margin: 0 auto;
  }
}
