/* Section atmosphere: video remains inside the section's existing frame. */
body.atmosphere-active .atmosphere-frame {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden;
  background: transparent !important;
  background-image: none !important;
}

body.atmosphere-active .atmosphere-frame::before,
body.atmosphere-active .atmosphere-frame::after {
  background: none !important;
  opacity: 0 !important;
}

body.atmosphere-active .atmosphere-frame::before {
  animation: none !important;
  transform: none !important;
  will-change: auto !important;
}

body.atmosphere-active .atmosphere-frame .hero-art {
  display: none !important;
}

.site-atmosphere {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #43151d var(--atmosphere-poster) center / cover no-repeat;
}

.site-atmosphere__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--atmosphere-position, 50% 50%);
  opacity: 1;
}

.site-atmosphere__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(48, 12, 19, .62) 0%,
    rgba(48, 12, 19, .43) 50%,
    rgba(48, 12, 19, .28) 100%);
}

.site-atmosphere--contact .site-atmosphere__veil {
  background: rgba(48, 12, 19, .18);
}

/* Books keeps its video inside the same focused page-heading frame. */
body.atmosphere-active .books-page-hero.atmosphere-frame {
  display: flex;
  min-height: clamp(27rem, 42vw, 35rem);
  align-items: center;
  background-color: #32131b !important;
  color: #fbf2e4 !important;
}

body.atmosphere-active .books-page-hero.atmosphere-frame > .container {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 78rem);
  color: #fbf2e4;
}

body.atmosphere-active .books-page-hero .eyebrow,
body.atmosphere-active .books-page-hero h1,
body.atmosphere-active .books-page-hero > .container > p:not(.eyebrow),
body.atmosphere-active .books-page-hero .books-index a {
  color: #fbf2e4;
}

body.atmosphere-active .books-page-hero .books-index a {
  border-color: rgba(251, 242, 228, .44);
  text-decoration-color: rgba(212, 169, 97, .86);
}

body.atmosphere-active .atmosphere-frame > :not(.site-atmosphere) {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .site-atmosphere__video { object-position: var(--atmosphere-mobile-position, center); }
  .site-atmosphere__veil {
    background: linear-gradient(180deg,
      rgba(48, 12, 19, .64) 0%,
      rgba(48, 12, 19, .44) 62%,
      rgba(48, 12, 19, .34) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-atmosphere__video { display: none; }
  .site-atmosphere__veil { transition: none; }
}

/* The video is the full contact scene; the two reading panels sit over it. */
body.atmosphere-active #archive-request .request-contact {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: stretch;
  padding: 0;
  border: 0;
  background: transparent !important;
}

body.atmosphere-active .request-contact__block {
  display: flex !important;
  min-width: 0;
  min-height: 32rem;
  height: 100%;
  flex-direction: column;
  padding: clamp(1.1rem, 2.2vw, 1.8rem);
  border: 1px solid rgba(109, 71, 47, .24);
  background: rgba(250, 246, 238, .74) !important;
  box-shadow: 0 .8rem 2rem rgba(35, 10, 15, .12);
  box-sizing: border-box;
  color: #341820;
}

body.atmosphere-active .request-contact__block .eyebrow,
body.atmosphere-active .request-contact__block h2,
body.atmosphere-active .request-contact__block p,
body.atmosphere-active .request-contact__block label {
  color: #341820;
}

body.atmosphere-active .request-contact__block a:not(.button) {
  color: #6a2431;
  text-decoration-color: #bd8a43;
  text-underline-offset: .18em;
}

body.atmosphere-active .request-contact__actions { margin-top: auto; }

.footer-media-credit {
  display: block;
  max-width: 19rem;
  margin-top: .3rem;
  font-size: .62rem;
  line-height: 1.45;
}

.footer-media-credit summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: .62rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-media-credit small { display: block; margin-top: .35rem; }
.footer-media-credit a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 860px) {
  body.atmosphere-active #archive-request .request-contact { grid-template-columns: 1fr; }
  body.atmosphere-active #archive-request .request-contact { grid-auto-rows: auto; }
  body.atmosphere-active .request-contact__block { min-height: 0; height: auto; }
}

@media (max-width: 560px) {
  body.atmosphere-active .request-contact__block { padding: 1rem; }
}
