/*
 * Corrections for behavior inherited from the archived Squarespace site.
 */

/* These were the only active rules in the remote component stylesheets. */
.sqs-block[data-definition-name="website.components.html"] .sqs-html-content {
  position: relative;
  z-index: 0;
}

.sqs-block[data-definition-name="website.components.spacer"] .sqs-block-content {
  visibility: hidden;
}

/* Reproduce the sizing performed by the removed shape-block visitor. */
.sqs-block[data-definition-name="website.components.shape"] .sqs-block-content,
.sqs-block[data-definition-name="website.components.shape"] .sqs-shape-block-outer-container,
.sqs-block[data-definition-name="website.components.shape"] .sqs-shape-block-container {
  width: 100%;
  height: 100%;
}

.sqs-block[data-definition-name="website.components.shape"] .sqs-shape-block-outer-container,
.sqs-block[data-definition-name="website.components.shape"] .sqs-shape-block-container {
  position: relative;
}

.sqs-block[data-definition-name="website.components.shape"] .sqs-shape {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  fill: var(--shape-block-background-color);
}

/* Reproduce the dimensions performed by the removed fluid-image visitor. */
.sqs-block[data-definition-name="website.components.imageFluid"] .sqs-block-content,
.sqs-block[data-definition-name="website.components.imageFluid"] .fluid-image-component-root,
.sqs-block[data-definition-name="website.components.imageFluid"] .fluid-image-animation-wrapper {
  width: 100%;
  height: 100%;
}

.sqs-block[data-definition-name="website.components.imageFluid"] .fluid-image-container {
  position: relative;
  width: var(--image-component-container-width, 100%);
  height: var(--image-component-container-height, 100%);
  overflow: hidden;
}

.sqs-block[data-definition-name="website.components.imageFluid"] .fluid-image-container img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Classic image-layout blocks also relied on a visitor to fit the image to
 * their aspect-ratio container. Without it, square art can stretch vertically. */
img[data-sqsp-image-classic-block-image][data-image*="/burstAsset+41.png"],
img[data-sqsp-image-classic-block-image][data-image*="/research+circleAsset+37.png"] {
  height: 100% !important;
}

.timeline-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms ease-in-out, transform 400ms ease-in-out;
}

.timeline-item.triggered {
  opacity: 0;
  transform: translateY(40px);
}

/* The old visitor bundle released these presentation states after boot. */
.header,
footer,
section > .content-wrapper {
  opacity: 1 !important;
  animation: none !important;
}

body.header--menu-open .header-menu {
  visibility: visible !important;
  opacity: 1 !important;
}

body.header--menu-open .header-menu .header-menu-nav-list,
body.header--menu-open .header-menu .header-menu-actions,
body.header--menu-open .header-menu .header-menu-cta {
  transform: translateY(0) !important;
}

@media only screen and (pointer: coarse) and (max-width: 1024px),
       screen and (max-width: 800px) {
  /*
   * Keep the header logo anchored in a fixed box. The original stylesheet
   * rotated the absolutely positioned wrapper, which made its bounds orbit.
   */
  .header-title-logo {
    width: 100px;
    height: 100px;
    -webkit-animation: none !important;
    animation: none !important;
  }

  .header-title-logo > a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
  }

  .header-title-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 50%;
    -webkit-animation: rotation 70s infinite linear;
    animation: rotation 70s infinite linear;
  }
}

/* Publication-page navigation and the sections added to the static archive. */
.archive-publication-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1rem;
  margin: 1.5rem 0;
}

.archive-publication-jumps span {
  font-weight: 700;
}

.archive-publication-jumps a {
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

.archive-publication-section,
.archive-publication-section[id],
section#book,
section#pre-analysis-plan,
section#other-publications {
  scroll-margin-top: 120px;
}

.archive-publication-section {
  padding: clamp(3.5rem, 7vw, 7rem) 4vw;
  background: #fff;
  color: #17383a;
}

.archive-publication-section--teal {
  background: #1e7d82;
  color: #fff;
}

.archive-publication-section--cream {
  background: #f3eee4;
}

.archive-publication-section__inner {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.archive-publication-section__inner > h2,
.archive-publication-section__inner > p:not(.archive-publication-section__label) {
  max-width: 900px;
}

.archive-publication-section__label {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-publication-section h2 {
  margin-top: 0;
}

.archive-publication-section h2,
.archive-publication-section h3,
.archive-publication-section p,
.archive-publication-section a {
  color: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.archive-publication-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.archive-publication-section__actions a {
  display: inline-block;
  padding: 0.75rem 1rem;
  border: 1px solid currentColor;
  text-decoration: none;
}

.archive-publication-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.archive-publication-cards article {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid rgba(23, 56, 58, 0.25);
}

.archive-publication-cards h3 {
  margin-top: 0;
}

@media screen and (max-width: 800px) {
  .archive-publication-section {
    padding-right: 6vw;
    padding-left: 6vw;
  }

  .archive-publication-cards {
    grid-template-columns: 1fr;
  }
}

/* The archived footer now contains only its navigation and credits. */
#footer-sections .fluid-engine {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--sqs-site-max-width, 1500px);
  margin-right: auto;
  margin-left: auto;
  padding-right: 4vw;
  padding-left: 4vw;
}

@media screen and (max-width: 767px) {
  #footer-sections .fluid-engine {
    padding-right: 6vw;
    padding-left: 6vw;
  }
}
