/* The Website Library's closing slide, in the homepage's normal scroll flow. */
.website-library-thanks {
  --thanks-gutter: clamp(24px, 5vw, 96px);
  --thanks-serif: "Cormorant Garamond", Georgia, serif;
  --thanks-ease: cubic-bezier(.19, 1, .22, 1);
  position: relative;
  z-index: 5;
  isolation: isolate;
  min-height: max(100svh, 440px);
  overflow: clip;
  scroll-margin-top: 88px;
  background: #1b1b1d;
  color: #f0ede5;
}

.website-library-thanks :is(.ty-left, .ty-right) {
  position: absolute;
  z-index: 3;
  top: 50%;
  max-width: min(25vw, 400px);
  transform: translateY(-50%);
}
.website-library-thanks .ty-left { left: var(--thanks-gutter); }
.website-library-thanks .ty-right {
  right: var(--thanks-gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.website-library-thanks h2 {
  margin: 0;
  font: 300 clamp(32px, 3.2vw, 60px)/1.04 var(--thanks-serif);
  letter-spacing: -.02em;
}
.website-library-thanks .thanks-note {
  max-width: 17em;
  margin: 0 0 18px;
  color: #d6d3ca;
  font: italic 400 clamp(16px, 1.3vw, 23px)/1.4 var(--thanks-serif);
  letter-spacing: .004em;
}
.website-library-thanks .thanks-signature img {
  display: block;
  width: clamp(120px, 10vw, 180px);
  height: auto;
  opacity: .85;
}

.website-library-thanks .dots-portrait {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.website-library-thanks canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .6s ease;
}
.website-library-thanks .ready:not(.fallback) canvas { opacity: 1; }
.website-library-thanks .dots-fallback {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: auto;
  max-width: none;
  height: 96%;
  transform: translateX(-50%);
  filter: grayscale(1) brightness(.62) contrast(1.15);
  mix-blend-mode: screen;
  opacity: .55;
  transition: opacity .6s ease;
}
.website-library-thanks .ready:not(.fallback) .dots-fallback { opacity: 0; }
.website-library-thanks .dots-orb {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px #e8f3ff, 0 0 26px 8px #9fcfff66, 0 0 70px 26px #6fb4ff1f;
  opacity: 0;
  transition: opacity .8s ease;
}
.website-library-thanks .built:not(.fallback) .dots-orb { opacity: 1; }
.website-library-thanks .dots-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  margin: -60px;
  opacity: 0;
  transition: opacity .45s ease;
}
/* The inline point-cloud artwork is the loading state; no preloader covers it. */
.website-library-thanks .loading:not(.built, .fallback) .dots-loader { opacity: 0; }
.website-library-thanks .dots-loader svg {
  position: absolute;
  inset: 0;
  width: 100%;
  transform: rotate(-90deg);
}
.website-library-thanks .dl-track {
  fill: none;
  stroke: #bfe0ff26;
  stroke-width: 1;
  stroke-dasharray: 1 3;
}
.website-library-thanks .dl-fill {
  fill: none;
  stroke: #bfe0ffd9;
  stroke-width: 1.2;
  stroke-dasharray: 0 100;
  stroke-linecap: round;
}
.website-library-thanks .dl-num {
  margin-top: -6px;
  font: 300 26px/1 ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}
.website-library-thanks .dots-loader small {
  position: absolute;
  top: 70px;
  color: #a6a59a;
  font: 10px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

:root:not(.motion-paused) .website-library-thanks.portrait-active .rise {
  animation: website-library-thanks-rise 1.1s var(--thanks-ease) both;
}
:root:not(.motion-paused) .website-library-thanks.portrait-active .thanks-signature { animation-delay: .08s; }
@keyframes website-library-thanks-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-footer .home-footer-signature {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}
.footer-track .home-footer .footer-links { flex-wrap: wrap; }

@media (max-width: 900px) {
  .website-library-thanks {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 88px);
    padding: 0 var(--thanks-gutter) max(76px, env(safe-area-inset-bottom));
  }
  .website-library-thanks .dots-portrait {
    position: relative;
    flex: 0 0 clamp(260px, 53svh, 590px);
    margin-inline: calc(-1 * var(--thanks-gutter));
  }
  .website-library-thanks .dots-fallback {
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    transform: none;
    object-fit: contain;
    object-position: center bottom;
  }
  .website-library-thanks :is(.ty-left, .ty-right) {
    position: relative;
    inset: auto;
    max-width: 100%;
    text-align: left;
    transform: none;
  }
  .website-library-thanks .ty-left { margin-top: 10px; }
  .website-library-thanks .ty-right { align-items: flex-start; margin-top: 9px; }
  .website-library-thanks .thanks-note {
    max-width: 26em;
    margin-bottom: 12px;
    font-size: 18px;
  }
}

@media (max-width: 520px) and (max-height: 640px) {
  .website-library-thanks .dots-portrait { flex-basis: clamp(170px, 34svh, 220px); }
  .website-library-thanks .thanks-note { font-size: 16px; }
}

@media (max-width: 760px) {
  .footer-track .footer.home-footer {
    padding-bottom: max(165px, calc(148px + env(safe-area-inset-bottom)));
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .home-footer .home-footer-signature { grid-column: 1 / -1; }
}
.motion-paused .website-library-thanks :is(.dots-orb, .dots-loader) { display: none; }
.motion-paused .website-library-thanks :is(canvas, .dots-fallback) { transition: none; }
.motion-paused .website-library-thanks .loading:not(.ready) .dots-fallback { opacity: .55; }

/* Height-driven perspective matches the WebGL camera at every aspect ratio. */
.website-library-thanks .dots-portrait .dots-first-frame {
  top: 0;
  bottom: auto;
  left: 50%;
  width: auto;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
  filter: none;
  mix-blend-mode: normal;
  opacity: 1;
}
.website-library-thanks .dots-portrait.ready:not(.fallback) .dots-first-frame { opacity: 0; }
.motion-paused .website-library-thanks .dots-portrait.loading:not(.ready) .dots-first-frame { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .website-library-thanks :is(canvas, .dots-fallback, .dots-orb, .dots-loader) { transition: none; }
  :root:not(.motion-paused) .website-library-thanks.portrait-active .rise { animation: none; }
  .website-library-thanks :is(.dots-orb, .dots-loader) { display: none; }
  .website-library-thanks .loading:not(.ready) .dots-fallback { opacity: .55; }
  .website-library-thanks .dots-portrait.loading:not(.ready) .dots-first-frame { opacity: 1; }
}
@media (forced-colors: active) {
  .website-library-thanks { background: Canvas; color: CanvasText; }
  .website-library-thanks .thanks-note { color: CanvasText; }
  .website-library-thanks .dots-portrait { visibility: hidden; }
  .website-library-thanks .thanks-signature img { display: none; }
}
