/* Lost Christmas page. Every class is prefixed lc- so it can't clash with the WordPress theme.
   Images are /img/lc-*.v1.*; rename this file and the images together when either changes. */
@font-face { font-family: Poppins; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/poppins-300-latin.v24.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-400-latin.v24.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-500-latin.v24.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrainsmono-latin.v24.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700-latin.v24.woff2) format("woff2"); }

.lc-body {
  --lc-navy: #0c0a4d;
  --lc-link: #0b6dc2;
  --lc-edge: #d9d9d9;
  --lc-max: 1400px;
  margin: 0;
  background: #fff;
  color: var(--lc-navy);
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
}
.lc-body *, .lc-body *::before, .lc-body *::after { box-sizing: border-box; }

/* Nothing grows past 1400px: centred, with a 1px grey edge on the left and right only. */
.lc-page {
  max-width: var(--lc-max);
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  border-inline: 1px solid var(--lc-edge);
  background: #fff;
}

.lc-banner { position: relative; z-index: 1; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.lc-banner__link { display: block; }
.lc-banner__img { display: block; width: 100%; height: auto; }

/* Background starts directly under the banner and fades to white. */
.lc-main {
  flex: 1;
  padding: clamp(32px, 6vw, 80px) clamp(24px, 10.4vw, 146px) 0;
  background: #fff url(/img/lc-bg-1400.v1.jpg) no-repeat top center / max(100%, 800px) auto;
}
/* Falling snow (public/js/lc-snow.v1.js): a canvas over the banner and background, under the content, never in the way of clicks.
   It sits after the banner (z-index 1) and before the main content (z-index 1), so DOM order sets the layering. */
.lc-page { position: relative; }
.lc-snow { position: absolute; top: 0; left: 0; width: 100%; z-index: 1; pointer-events: none; }
.lc-main > * { position: relative; z-index: 1; }
@supports (background-image: image-set(url(a.avif) type("image/avif"))) {
  .lc-main {
    background-image: image-set(
      url(/img/lc-bg-1400.v1.avif) type("image/avif") 1x, url(/img/lc-bg-1889.v1.avif) type("image/avif") 2x,
      url(/img/lc-bg-1400.v1.webp) type("image/webp") 1x, url(/img/lc-bg-1889.v1.webp) type("image/webp") 2x,
      url(/img/lc-bg-1400.v1.jpg) type("image/jpeg") 1x, url(/img/lc-bg-1889.v1.jpg) type("image/jpeg") 2x);
  }
}
@media (max-width: 800px) {
  .lc-main { background-image: url(/img/lc-bg-800.v1.jpg); }
  @supports (background-image: image-set(url(a.avif) type("image/avif"))) {
    .lc-main { background-image: image-set(
      url(/img/lc-bg-800.v1.avif) type("image/avif") 1x, url(/img/lc-bg-1400.v1.avif) type("image/avif") 2x,
      url(/img/lc-bg-800.v1.webp) type("image/webp") 1x, url(/img/lc-bg-1400.v1.webp) type("image/webp") 2x,
      url(/img/lc-bg-800.v1.jpg) type("image/jpeg") 1x, url(/img/lc-bg-1400.v1.jpg) type("image/jpeg") 2x); }
  }
}

.lc-title {
  margin: 0 0 clamp(20px, 5vw, 70px);
  text-align: center;
  text-transform: uppercase;
  font-weight: 300;
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  line-height: 1.15;
  text-wrap: balance;
}
.lc-title strong { font-weight: 700; display: block; }
.lc-title a { color: inherit; text-decoration: none; }
@media (min-width: 640px) {
  .lc-title { font-size: clamp(2.5rem, 5.2vw, 4.55rem); }
  .lc-title strong { display: inline; }
}

/* One column: poster, find, about. Two columns from 900px. */
.lc-grid { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.lc-poster { display: block; width: min(72%, 360px); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.lc-poster__img { display: block; width: 100%; height: auto; }

.lc-find { width: 100%; max-width: 436px; text-align: center; }
/* One column: the dropdown comes before the poster so it sits above the fold on a phone. */
.lc-find { order: 1; }
.lc-poster { order: 2; margin-top: 40px; }
.lc-about { order: 3; }
.lc-find__label { display: block; font-size: 1.1rem; font-weight: 400; margin-bottom: 18px; }
/* The jump links move focus here (for screen readers). It isn't interactive, so no focus ring. */
.lc-find__label:focus { outline: none; }
.lc-find__label strong, .lc-prompt__text strong { font-weight: 700; }

.lc-select { position: relative; }
.lc-select::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--lc-navy); border-bottom: 1.5px solid var(--lc-navy);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.lc-select__input {
  display: block; width: 100%; height: 63px; padding: 0 44px 0 20px;
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--lc-navy); border-radius: 6px; background: #fff; color: var(--lc-navy);
  font: 500 1.05rem/1 Poppins, system-ui, sans-serif; text-align: left; cursor: pointer;
}
.lc-select__input:disabled { cursor: default; opacity: .7; }
.lc-select__input:focus-visible, .lc-list a:focus-visible, .lc-poster:focus-visible, .lc-title a:focus-visible {
  outline: 3px solid var(--lc-link); outline-offset: 3px;
}

.lc-results { margin-top: 36px; text-align: left; }
.lc-prompt { display: flex; align-items: flex-end; gap: 14px; padding-left: 28px; }
.lc-prompt__arrow { flex: none; width: 62px; height: auto; margin-bottom: 18px; }
.lc-prompt__text { margin: 0; font-size: 1.2rem; line-height: 1.45; }
/* No room for the arrow on a phone. */
@media (max-width: 639px) { .lc-prompt { display: block; padding: 0; text-align: center; } .lc-prompt__arrow { display: none; } }

.lc-list { list-style: none; margin: 0; padding: 0; }
.lc-list[hidden], .lc-prompt[hidden] { display: none; }
.lc-list li { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.lc-list img { flex: none; width: 87px; height: 87px; border-radius: 10px; }
.lc-list__name { margin: 0; font-size: 1rem; line-height: 1.4; }
.lc-list a { display: inline-block; color: var(--lc-link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lc-list a:hover { text-decoration-thickness: 2px; }
.lc-noscript { margin-top: 24px; }

.lc-about { width: 100%; max-width: 480px; margin-top: 40px; padding-top: 40px; border-top: 2px dashed #9aa1b5; }
.lc-about p { margin: 0 0 1.2em; }
.lc-about__meta { font-weight: 500; }
.lc-about__credits { line-height: 1.55; }
.lc-about__credits strong { font-weight: 700; }

/* Same as the root page's footer: JetBrains Mono, 0.875rem, regular, grey. */
.lc-footer { margin-top: 80px; padding: 0 24px 48px; text-align: center; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .875rem; font-weight: 400; line-height: 1.25; color: #767676; }
.lc-footer p { margin: 0; }
.lc-footer__back { margin-bottom: 14px; }
.lc-footer__back a { color: var(--lc-link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lc-footer__back a:hover { text-decoration-thickness: 2px; }
.lc-footer__back a:focus-visible { outline: 3px solid var(--lc-link); outline-offset: 3px; }

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

@media (min-width: 900px) {
  .lc-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "poster find" "about find";
    column-gap: clamp(32px, 6.4vw, 90px);
    justify-items: stretch;
    align-items: start;
  }
  .lc-poster { grid-area: poster; width: min(100%, 476px); margin-top: 0; order: 0; }
  .lc-find { grid-area: find; justify-self: center; order: 0; }
  .lc-about { grid-area: about; order: 0; max-width: none; margin-top: 56px; padding-top: 0; border-top: 0; }
  .lc-find__label { font-size: 1.25rem; }
  .lc-prompt__text { font-size: 1.35rem; }
}
/* Poster and list are only links to the find section on one column. */
@media (min-width: 900px) { .lc-poster, .lc-title a, .lc-banner__link { cursor: default; } }

/* Phones: drop the "Find Lost Christmas in your region" line and the "Select your region..." prompt so the poster sits higher.
   The label stays for screen readers (it names the dropdown and is the jump target). */
@media (max-width: 639px) {
  .lc-find__label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .lc-prompt { display: none; }
  .lc-results:has(.lc-list[hidden]) { margin-top: 0; }  /* no gap while nothing is chosen */
}
