/* First Atlantic Canada lander motion and lightbox behavior. */
html { scrollbar-gutter: stable; }
h1 { text-wrap: pretty; }
h2 { text-wrap: balance; }
.keep-words { white-space: nowrap; }

/* Reveal content only after motion.js has a working IntersectionObserver. */
.motion-ready .motion-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms ease, transform 420ms ease;
  transition-delay: var(--motion-delay, 0ms);
}
.motion-ready .motion-reveal.is-visible {
  opacity: 1;
  transform: none;
}
.motion-ready .motion-reveal:focus-within,
.motion-ready .motion-reveal:focus {
  opacity: 1;
  transform: none;
  transition-delay: 0ms;
}

/* Keep the dialog mounted through its opacity exit transition. */
#lbx {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}
#lbx.on,
#lbx.is-closing {
  visibility: visible;
  pointer-events: auto;
}
#lbx.on { opacity: 1; transition-delay: 0s; }
#lbx.is-closing { opacity: 0; }
#lbx .lbx-back {
  position: absolute;
  inset: 0;
  background: rgba(6,14,28,.78);
  backdrop-filter: blur(6px);
}
#lbx .lbx-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1400px);
  height: 94vh;
  background: #0b1a2e;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(8px);
  transition: transform 240ms ease;
}
#lbx.on .lbx-panel { transform: none; }
#lbx .lbx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #c9d6e3;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .4px;
}
#lbx .lbx-head span { text-transform: uppercase; }
#lbx .lbx-x {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #3a5272;
  background: #142a47;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#lbx .lbx-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #06101e;
  text-align: center;
  overscroll-behavior: contain;
}
#lbx .lbx-scroll img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
  cursor: zoom-in;
}
#lbx .lbx-scroll.full img { max-width: none; cursor: zoom-out; }
#lbx .lbx-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 12px 16px;
  background: #0b1a2e;
}
#lbx .lbx-foot button {
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 30px;
  cursor: pointer;
}
#lbx .lbx-ret { background: transparent; color: #fff; border: 2px solid #3a5272; }
#lbx .lbx-full { background: var(--blue); color: #fff; border: 2px solid var(--blue); }
html.lbx-open { overflow: hidden; }

@media (max-width: 600px) {
  #lbx .lbx-panel { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
  #lbx .lbx-foot button { padding: 11px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .bar { transition: none !important; }
  .motion-ready .motion-reveal,
  .motion-ready .motion-reveal.is-visible,
  #lbx,
  #lbx .lbx-panel {
    transition: none !important;
    transform: none !important;
  }
  .motion-ready .motion-reveal { opacity: 1 !important; }
}
html[data-audit="true"] { scroll-behavior: auto !important; }
html[data-audit="true"] .motion-reveal,
html[data-audit="true"] #lbx,
html[data-audit="true"] #lbx .lbx-panel { transition: none !important; transform: none !important; }
@media print {
  .motion-ready .motion-reveal,
  .motion-ready .motion-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  #lbx { display: none !important; }
}
