/*
 * Gingerbread Lane (holiday 2026): banners (Legacy Hall, Assembly Hall) and
 * popup (Assembly Hall). Markup: src/campaigns/gingerbread-lane.php.
 *
 * Each composition is laid out in container units (cqw) taken from the
 * designer's artboards, so it scales as one piece like the original JPGs:
 *   LH wide    1920x240   LH_Gingerbread Lane_Web Banner_1920x240
 *   LH narrow  960x391    ..._1920x440 web banner mobile
 *   AH wide    1920x300   AH_Gingerbread Lane_R2_1026_1920x300
 *   AH mid     1920x440   AH_Gingerbread Lane_R2_1026_1920x440 (650-899px)
 *   AH narrow  stacked version of the above for phones (not in the artwork)
 *   AH popup   AH_Gingerbread Lane_R2_1026_pop up
 *
 * Type: Brandon Grotesque (already loaded by site.css) stands in for the
 * artwork's Interstate, which has no web licence here.
 */

.gl {
  --gl-cream: #eeede8;
  --gl-crimson: #b42237;
  --gl-mint: #9ac39b;
  --gl-pine: #173e3b;
  --gl-red: #d83926;
  --gl-felt: #b9743a;
  --gl-lh-white: #f5efef;
  --gl-font: "Brandon Grotesque", "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------------
 * Shared pieces
 * ------------------------------------------------------------------- */

.gl .gl__house,
.gl .gl__logo,
.gl .gl__title,
.gl .gl__tagline,
.gl .gl__cta,
.gl .gl__snow {
  position: absolute;
  margin: 0;
}

.gl .gl__house,
.gl .gl__logo {
  display: block;
  max-width: none;
  height: auto;
  pointer-events: none;
}

.gl .gl__snow {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Back to front: snow, house, snow, copy, snow, logo and CTA. */
.gl .gl__snow--back { z-index: 1; }
.gl .gl__house { z-index: 2; }
.gl .gl__snow--mid { z-index: 3; }
.gl .gl__title,
.gl .gl__tagline { z-index: 4; }
.gl .gl__snow--front { z-index: 5; }
.gl .gl__logo { z-index: 6; }
.gl .gl__cta { z-index: 7; }

.gl .gl__title {
  padding: 0;
  font-family: var(--gl-font);
  font-weight: 900;
  font-style: normal;
  line-height: 0.8;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gl-cream);
}

.gl .gl__word,
.gl .gl__ginger,
.gl .gl__bread {
  display: inline;
}

.gl .gl__at {
  position: absolute;
  font-family: var(--gl-font);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.gl .gl__tagline {
  padding: 0;
  font-family: var(--gl-font);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.gl .gl__cta,
.gl .gl__cta:hover,
.gl .gl__cta:focus,
.gl .gl__cta:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  font-family: var(--gl-font);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.gl .gl__cta:focus-visible {
  outline: 3px solid var(--gl-cream);
  outline-offset: 3px;
}

.gl .gl__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gl .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) {
  .gl .gl__snow {
    display: none;
  }
}

/* ---------------------------------------------------------------------
 * Brand looks
 * ------------------------------------------------------------------- */

/* Legacy Hall: felt-textured headline, off-white outline and offset.
 *
 * Two layers, no CSS filter (Safari doesn't reliably apply drop-shadow()
 * to background-clip: text):
 *   - the real text: off-white, outlined and offset with text-shadow;
 *   - a decorative felt copy of each part (::after, from data-text, hidden
 *     from screen readers) laid exactly over it, the texture clipped to
 *     the letters.
 * The parts are positioned boxes with matching line boxes, so the copy
 * lines up glyph for glyph in every layout. */
.gl--lh .gl__word {
  display: inline-block;
}

.gl--lh .gl__ginger,
.gl--lh .gl__bread,
.gl--lh .gl__word--2 {
  position: relative;
  color: var(--gl-lh-white);
  text-shadow:
    0.024em 0 0 var(--gl-lh-white),
    0.022em 0.009em 0 var(--gl-lh-white),
    0.017em 0.017em 0 var(--gl-lh-white),
    0.009em 0.022em 0 var(--gl-lh-white),
    0 0.024em 0 var(--gl-lh-white),
    -0.009em 0.022em 0 var(--gl-lh-white),
    -0.017em 0.017em 0 var(--gl-lh-white),
    -0.022em 0.009em 0 var(--gl-lh-white),
    -0.024em 0 0 var(--gl-lh-white),
    -0.022em -0.009em 0 var(--gl-lh-white),
    -0.017em -0.017em 0 var(--gl-lh-white),
    -0.009em -0.022em 0 var(--gl-lh-white),
    0 -0.024em 0 var(--gl-lh-white),
    0.009em -0.022em 0 var(--gl-lh-white),
    0.017em -0.017em 0 var(--gl-lh-white),
    0.022em -0.009em 0 var(--gl-lh-white),
    0.02em 0.02em 0 var(--gl-lh-white),
    0.066em 0.042em 0 var(--gl-lh-white),
    0.064em 0.051em 0 var(--gl-lh-white),
    0.059em 0.059em 0 var(--gl-lh-white),
    0.051em 0.064em 0 var(--gl-lh-white),
    0.042em 0.066em 0 var(--gl-lh-white),
    0.033em 0.064em 0 var(--gl-lh-white),
    0.025em 0.059em 0 var(--gl-lh-white),
    0.02em 0.051em 0 var(--gl-lh-white),
    0.018em 0.042em 0 var(--gl-lh-white),
    0.02em 0.033em 0 var(--gl-lh-white),
    0.025em 0.025em 0 var(--gl-lh-white),
    0.033em 0.02em 0 var(--gl-lh-white),
    0.042em 0.018em 0 var(--gl-lh-white),
    0.051em 0.02em 0 var(--gl-lh-white),
    0.059em 0.025em 0 var(--gl-lh-white),
    0.064em 0.033em 0 var(--gl-lh-white),
    0.042em 0.042em 0 var(--gl-lh-white);
}

.gl--lh .gl__ginger::after,
.gl--lh .gl__bread::after,
.gl--lh .gl__word--2::after {
  content: attr(data-text);
  content: attr(data-text) / "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: var(--gl-felt);
  text-align: inherit;
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .gl--lh .gl__ginger::after,
  .gl--lh .gl__bread::after,
  .gl--lh .gl__word--2::after {
    /* The whole felt photo across the headline, as in the artwork (about
     * 11em), so the grain stays fine and reads as gingerbread. */
    background: var(--gl-felt) url("img/felt.webp") left center / 11em auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.gl--lh .gl__at {
  color: var(--gl-lh-white);
}

/* The hand-drawn outline is the artwork's own vector (img/cta-outline-lh.svg,
 * inlined behind the text): a red fill and a wobbly #f5efef stroke. It
 * stretches to the button; the stroke keeps its width. */
.gl--lh .gl__cta,
.gl--lh .gl__cta:hover,
.gl--lh .gl__cta:focus,
.gl--lh .gl__cta:visited {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gl-lh-white);
  font-weight: 700;
  transition: color 0.2s;
  --gl-cta-stroke: max(0.36cqw, 2px);
}

.gl--lh .gl__cta-shape {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.gl--lh .gl__cta-fill {
  fill: var(--gl-red);
  transition: fill 0.2s;
}

.gl--lh .gl__cta-line {
  fill: none;
  stroke: var(--gl-lh-white);
  stroke-width: var(--gl-cta-stroke);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.gl--lh .gl__cta:hover {
  color: var(--gl-red);
}

.gl--lh .gl__cta:hover .gl__cta-fill {
  fill: var(--gl-lh-white);
}

/* Assembly Hall: cream headline with a crimson offset. The banners' type
 * is wider than the popup's: GT America Expanded (site.css) there. */
.gl--ah .gl__title {
  text-shadow: 0.055em 0.055em 0 var(--gl-crimson);
}

.gl-banner.gl--ah .gl__title {
  font-family: "GT America Expanded", var(--gl-font);
  letter-spacing: -0.045em;
}

.gl--ah .gl__tagline {
  color: var(--gl-mint);
}

.gl--ah .gl__cta,
.gl--ah .gl__cta:hover,
.gl--ah .gl__cta:focus,
.gl--ah .gl__cta:visited {
  border: 0;
  border-radius: 0;
  background: var(--gl-crimson);
  color: var(--gl-mint);
  font-weight: 900;
  font-style: italic;
  transition: background-color 0.2s, color 0.2s;
}

.gl--ah .gl__cta:hover {
  background: var(--gl-mint);
  color: var(--gl-crimson);
}

/* ---------------------------------------------------------------------
 * Banners
 * ------------------------------------------------------------------- */

/* Full bleed, like the image banner it replaces. */
.gl-banner {
  position: relative;
  display: block;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
  container: gl-banner / inline-size;
}

.gl-banner.gl--lh { background: var(--gl-red); }
.gl-banner.gl--ah { background: var(--gl-pine); }

.gl-banner__inner {
  position: relative;
  isolation: isolate;
}

/* Legacy Hall, narrow (960x391 artboard). ----------------------------- */

.gl-banner.gl--lh .gl-banner__inner { height: 40.75cqw; }

.gl-banner.gl--lh .gl__house { left: 6cqw; top: -4cqw; width: 53cqw; }
.gl-banner.gl--lh .gl__logo { left: 4.25cqw; top: 4.25cqw; width: 19cqw; }

.gl-banner.gl--lh .gl__title {
  right: 6.9cqw;
  top: 3.6cqw;
  font-size: 10.6cqw;
  line-height: 0.81;
  text-align: right;
}

.gl-banner.gl--lh .gl__ginger,
.gl-banner.gl--lh .gl__bread,
.gl-banner.gl--lh .gl__word--2 {
  display: block;
}

.gl-banner.gl--lh .gl__bread::before {
  content: "-";
  content: "-" / "";
}

.gl-banner.gl--lh .gl__bread::after {
  content: "-" attr(data-text);
  content: "-" attr(data-text) / "";
}

/* Vertical, reading bottom to top, along the headline's right edge. */
.gl-banner.gl--lh .gl__at {
  left: 100%;
  bottom: 0;
  margin-left: max(0.35em, 4px);
  font-size: max(3.2cqw, 11px);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.gl-banner.gl--lh .gl__cta {
  left: 65.25cqw;
  top: 30.75cqw;
  width: 28.75cqw;
  height: 7.25cqw;
  min-height: 26px;
  --gl-cta-stroke: max(0.6cqw, 2px);
  font-size: max(2.9cqw, 12px);
}

/* Legacy Hall, wide (1920x240 artboard), from 650px. ------------------- */

@container gl-banner (min-width: 650px) {
  .gl-banner.gl--lh .gl-banner__inner { height: 12.5cqw; }

  .gl-banner.gl--lh .gl__house { left: 2.2cqw; top: -0.9cqw; width: 16.3cqw; }
  .gl-banner.gl--lh .gl__logo { left: 81.6cqw; top: 1.6cqw; width: 13cqw; }

  .gl-banner.gl--lh .gl__title {
    left: 12.8cqw;
    right: auto;
    top: 2.15cqw;
    font-size: 6.15cqw;
    letter-spacing: 0.035em;
    text-align: left;
  }

  .gl-banner.gl--lh .gl__ginger,
  .gl-banner.gl--lh .gl__bread {
    display: inline-block;
  }

  .gl-banner.gl--lh .gl__word--2 {
    display: inline-block;
  }

  .gl-banner.gl--lh .gl__bread::before {
    content: none;
  }

  .gl-banner.gl--lh .gl__bread::after {
    content: attr(data-text);
    content: attr(data-text) / "";
  }

  .gl-banner.gl--lh .gl__at {
    left: auto;
    right: 0;
    bottom: auto;
    top: 100%;
    margin: 0.36em 0 0;
    font-size: 3.05cqw;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .gl-banner.gl--lh .gl__cta {
    left: 80.9cqw;
    top: 6.3cqw;
    width: 15.3cqw;
    height: 4.55cqw;
    --gl-cta-stroke: max(0.36cqw, 2px);
    font-size: max(1.75cqw, 12px);
  }
}

/* Assembly Hall, narrow (phones; stacked, no artboard). --------------- */

.gl-banner.gl--ah .gl-banner__inner { height: 57.5cqw; }

.gl-banner.gl--ah .gl__house { left: -3cqw; top: 1.5cqw; width: 45cqw; }
.gl-banner.gl--ah .gl__logo { display: none; }

.gl-banner.gl--ah .gl__title {
  right: 5cqw;
  top: 2cqw;
  font-size: 9.6cqw;
  line-height: 0.98;
  text-align: right;
}

.gl-banner.gl--ah .gl__ginger,
.gl-banner.gl--ah .gl__bread,
.gl-banner.gl--ah .gl__word--2 {
  display: block;
}

.gl-banner.gl--ah .gl__bread::before {
  content: "-";
  content: "-" / "";
}

.gl-banner.gl--ah .gl__tagline {
  right: 5cqw;
  top: 31.5cqw;
  width: 54cqw;
  font-size: max(3.9cqw, 13px);
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
}

.gl-banner.gl--ah .gl__tag {
  white-space: nowrap;
}

/* Two lines: "Workshops + Family Fun" / "Holiday Cheer". */
.gl-banner.gl--ah .gl__tagline > :nth-child(4) {
  display: none;
}

.gl-banner.gl--ah .gl__tagline > :nth-child(5) {
  display: block;
}

.gl-banner.gl--ah .gl__cta {
  right: 5cqw;
  top: 44.5cqw;
  width: 50cqw;
  height: 9.5cqw;
  min-height: 36px;
  /* Mint on crimson is 3.3:1: keep it large text (bold 19px+) for WCAG AA. */
  font-size: max(4.6cqw, 19px);
}

/* Assembly Hall, mid (1920x440 artboard), 650-899px. ------------------ */

@container gl-banner (min-width: 650px) {
  .gl-banner.gl--ah .gl-banner__inner { height: 22.9cqw; }

  .gl-banner.gl--ah .gl__house { left: 0.6cqw; top: -0.6cqw; width: 20.6cqw; }
  .gl-banner.gl--ah .gl__logo { display: block; left: 50.6cqw; top: 10.4cqw; width: 18.6cqw; }

  .gl-banner.gl--ah .gl__title {
    left: 20.6cqw;
    right: auto;
    top: 1.6cqw;
    font-size: 8.2cqw;
    line-height: 0.99;
    text-align: left;
  }

  .gl-banner.gl--ah .gl__ginger,
  .gl-banner.gl--ah .gl__bread {
    display: inline;
  }

  .gl-banner.gl--ah .gl__bread::before {
    content: none;
  }

  .gl-banner.gl--ah .gl__tagline {
    left: 21.3cqw;
    right: auto;
    top: 17.6cqw;
    width: auto;
    font-size: 3.45cqw;
    letter-spacing: 0.1em;
    line-height: 1.15;
    text-align: left;
    white-space: nowrap;
  }

  /* One line here. */
  .gl-banner.gl--ah .gl__tagline > :nth-child(4),
  .gl-banner.gl--ah .gl__tagline > :nth-child(5) {
    display: inline;
  }

  .gl-banner.gl--ah .gl__cta {
    left: 71.6cqw;
    right: auto;
    top: 10.5cqw;
    width: 26cqw;
    height: 5.2cqw;
    min-height: 0;
    font-size: 3.4cqw;
  }
}

/* Assembly Hall, wide (1920x300 artboard). ---------------------------- */

@container gl-banner (min-width: 900px) {
  .gl-banner.gl--ah .gl-banner__inner { height: 15.625cqw; }

  .gl-banner.gl--ah .gl__house { left: -0.6cqw; top: -1.6cqw; width: 20.4cqw; }
  .gl-banner.gl--ah .gl__logo { left: 79.7cqw; top: 1.8cqw; width: 18.2cqw; }

  .gl-banner.gl--ah .gl__title {
    left: 18cqw;
    top: 1.75cqw;
    font-size: 6.3cqw;
    line-height: 0.99;
  }

  .gl-banner.gl--ah .gl__tagline {
    left: 41.9cqw;
    top: 9cqw;
    font-size: 2.15cqw;
    letter-spacing: 0.13em;
  }

  .gl-banner.gl--ah .gl__tagline > :nth-child(4) {
    display: none;
  }

  .gl-banner.gl--ah .gl__tagline > :nth-child(5) {
    display: block;
  }

  .gl-banner.gl--ah .gl__cta {
    left: 75.3cqw;
    top: 8.75cqw;
    width: 22.8cqw;
    height: 4.6cqw;
    font-size: 2.85cqw;
  }
}

/* ---------------------------------------------------------------------
 * Popup (Assembly Hall, 4250x7083 artboard)
 * ------------------------------------------------------------------- */

html.gl-popup-open,
html.gl-popup-open body {
  overflow: hidden;
}

/*
 * Framed like the theme's other popups (.m-global-modal: 15px solid
 * border; Assembly Hall's are usually #003c71). The border sits outside
 * the artwork (content-box), so the artwork keeps its proportions.
 */
.gl-popup {
  --gl-popup-border: 15px;
  --gl-popup-border-color: #363636;
  box-sizing: content-box;
  width: min(
    450px,
    calc((100dvh - 48px - 2 * var(--gl-popup-border)) * 0.6),
    calc(100vw - 48px - 2 * var(--gl-popup-border))
  );
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: var(--gl-popup-border) solid var(--gl-popup-border-color);
  background: var(--gl-popup-border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.gl-popup[open] {
  display: block;
}

.gl-popup::backdrop {
  background: rgba(10, 25, 24, 0.75);
}

.gl-popup__inner {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4250 / 7083;
  overflow: hidden;
  container-type: inline-size;
  box-sizing: content-box;
  /* Pine to the mint panel's top edge, then mint. */
  background: linear-gradient(var(--gl-pine) 0 72.8%, var(--gl-mint) 72.8% 100%);
}

.gl-popup .gl__snowflake {
  top: -1.667cqw;
  left: -1.667cqw;
  width: 5cqw;
  height: 5cqw;
}

/* The house stands in front of the headline here. */
.gl-popup .gl__title { z-index: 2; }
.gl-popup .gl__house { z-index: 4; }
.gl-popup .gl__snow--mid { z-index: 3; }

.gl-popup .gl__title {
  left: 0.6cqw;
  top: 2.2cqw;
  font-size: 23.9cqw;
  line-height: 0.81;
}

.gl-popup .gl__ginger,
.gl-popup .gl__bread {
  display: block;
}

/* "LANE" runs down the right edge, top to bottom. */
.gl-popup .gl__word--2 {
  position: absolute;
  left: 79.4cqw;
  top: 40.4cqw;
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
  text-shadow: -0.055em 0.055em 0 var(--gl-crimson);
}

.gl-popup .gl__house { left: 8.6cqw; top: 37.6cqw; width: 68.6cqw; }

.gl-popup .gl__tagline {
  left: 0;
  right: 0;
  top: 128.2cqw;
  font-size: 5.25cqw;
  letter-spacing: 0.035em;
  text-align: center;
  color: var(--gl-pine);
}

.gl-popup .gl__cta {
  left: 21.4cqw;
  top: 134.9cqw;
  width: 57.3cqw;
  height: 9.9cqw;
  font-size: 7.4cqw;
  letter-spacing: 0.07em;
}

.gl-popup .gl__cta:focus-visible {
  outline-color: var(--gl-pine);
}

.gl-popup .gl__logo { left: 27cqw; top: 147.6cqw; width: 45.8cqw; }

/* Snow stays in the pine area, above the mint panel. */
.gl-popup .gl__snow { bottom: 27.2%; }

/* Over the frame's top-right corner; 40px for tapping. */
.gl-popup .gl-popup__close,
.gl-popup .gl-popup__close:hover,
.gl-popup .gl-popup__close:focus {
  position: absolute;
  z-index: 10;
  /* Centred on the frame's outer corner. */
  top: calc(-1 * var(--gl-popup-border));
  right: calc(-1 * var(--gl-popup-border));
  transform: translate(50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--gl-pine);
  border-radius: 50%;
  background: var(--gl-cream);
  color: var(--gl-pine);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gl-popup .gl-popup__close:hover {
  background: var(--gl-mint);
}

.gl-popup .gl-popup__close:focus-visible {
  outline: 3px solid var(--gl-cream);
  outline-offset: 2px;
}

.gl-popup .gl-popup__close svg {
  width: 50%;
  height: 50%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.5;
}
