/* Secondary chapter choreography. Static content is the default. */
#universo,
#conexoes,
#memorias,
#jornada {
  background: var(--paper, #f6f4eb);
}

.atmo-word-mask,
.atmo-word,
.atmo-read-word {
  display: inline-block;
  vertical-align: baseline;
}

/* Original headings color authored spans; neutral motion wrappers inherit it. */
h2 span.atmo-word-mask,
h2 span.atmo-word,
h2 span.atmo-read-word {
  color: inherit;
}

/* The small optical bleed protects italic strokes and descenders. */
.atmo-motion .atmo-word-mask {
  overflow: clip;
  padding: .09em .12em .19em;
  margin: -.09em -.12em -.19em;
  vertical-align: bottom;
}

.atmo-motion .atmo-word {
  transform-origin: 0 100%;
}

.atmo-managed.reveal {
  transition: none;
}

.atmo-card-row {
  display: contents;
}

.atmo-card-marker {
  display: none;
}

/* A brand refrain between the festival and its next chapter. */
.atmo-ribbon {
  margin: 55px -8.14% -1px;
  overflow: clip;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  color: var(--ink, #181918);
  padding: 23px 0 26px;
  pointer-events: none;
}

.atmo-ribbon-track {
  display: flex;
  gap: .3em;
  width: max-content;
  white-space: nowrap;
  font: 800 clamp(52px, 6.8vw, 108px)/.92 var(--display, Impact, sans-serif);
  letter-spacing: -.025em;
}

.atmo-ribbon-track > span {
  display: block;
}

.atmo-ribbon-track > span:nth-child(even) {
  color: var(--red, #e42529);
  font-style: italic;
}

/* Three short, native sticky layers; no spacer or forced scroll distance. */
@media (min-width: 901px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  .atmo-deck-active #conexoes .experience-grid:not([data-experience-deck]) {
    display: block;
    position: relative;
    isolation: isolate;
  }

  .atmo-deck-active #conexoes .atmo-card-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    position: sticky;
    top: calc(72px + var(--atmo-layer, 0) * 22px);
    margin-top: 28px;
    z-index: var(--atmo-order, 1);
    transform-origin: 50% 0;
  }

  .atmo-deck-active #conexoes .atmo-card-marker {
    display: block;
    height: 0;
    margin: 0;
    pointer-events: none;
  }

  .atmo-deck-active #conexoes .atmo-card-row[data-atmo-first] {
    margin-top: 0;
  }

  .atmo-deck-active #conexoes .atmo-card-row:last-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .atmo-deck-active #conexoes .atmo-card-row > .experience {
    margin: 0;
  }
}

/* Keyboard navigation must never have to chase an animated control. */
.atmo-motion .atmo-card-row:focus-within,
.atmo-motion .atmo-managed:focus-within {
  opacity: 1 !important;
}

@media (max-width: 760px) {
  .atmo-ribbon {
    margin: 38px -6.82% 0;
    padding: 18px 0 21px;
  }

  .atmo-ribbon-track {
    font-size: clamp(40px, 9vw, 65px);
  }
}

/* Media-query changes are also handled by gsap.matchMedia(). */
@media (prefers-reduced-motion: reduce) {
  .atmo-word-mask {
    overflow: visible;
  }

  .atmo-word,
  .atmo-read-word,
  .atmo-card-row {
    opacity: 1 !important;
    transform: none !important;
  }

  .atmo-ribbon {
    display: none;
  }
}

@media print {
  .atmo-ribbon {
    display: none;
  }

  .atmo-word-mask {
    overflow: visible !important;
  }

  .atmo-word,
  .atmo-read-word,
  .atmo-managed,
  .atmo-card-row {
    opacity: 1 !important;
    transform: none !important;
    position: static !important;
  }
}
