:root {
  --accent-color: rgb(209, 156, 77);
  --opacity-accent: rgba(209, 156, 77, 0.2);
  --higher-opacity-accent: rgba(209, 156, 77, 0.85);
}

body {
  font-family: "Playfair Display", serif;
  width: 100%;
  background-color: #261a05;
  color: white;
}

.scrolly {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-self: flex-start;
  align-items: center;
  width: 50%;
}

.background {
  background-image: url("./assets/background-photos/1.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: background-image 2s ease;
  opacity: 1;
  transition: opacity 1s ease;
  top: 0;
  right: 0;
  position: fixed;
  height: 100%;
  overflow: none;
  width: 40%;
  z-index: -1;
}

.background img {
  width: 100%;
  height: 100%;
}

.photo-text {
  position: fixed;
  bottom: 5px;
  right: 5px;
  max-width: 20rem;
  text-wrap: wrap;
}

.photo-caption-bg {
  font-style: italic;
}

.photo-credit-bg,
.photo-caption-bg {
  background-color: #f5efed;
  color: #3a5743;
  padding: 0.02rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1.2rem;
  margin-top: 5px;
  text-wrap: wrap;
}

.step {
  margin: 8vh 0;
  padding: 1rem;
  margin-left: 15rem;
  border-radius: 5px;
  text-align: left;
  width: 70%;
}

.step:last-child {
  margin-bottom: 40vh;
}

p {
  font-family: "freight-text-pro", "Times", serif;
}

#step-heading,
#step-lede {
  text-align: center;
  padding-top: 20vh;
  padding-bottom: 30vh;
  width: 80%;
  margin-left: auto;
}

h4 {
  font-style: italic;
}

#byline {
  font-weight: normal;
  font-family: "freight-text-pro", "Times", serif;
  font-size: 0.8rem;
}

#byline .author {
  background-color: var(--accent-color);
  /* color: #f5efed; */
  color: #261a05;
  padding: 0.2rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  border-radius: 0.5rem;
  font-weight: bold;
  line-height: 1.5rem;
  white-space: nowrap;
}

#byline .author a {
  color: inherit;
  text-decoration: inherit;
}

a {
  color: var(--accent-color);
}

#heading-green {
  color: var(--accent-color);
}

.other-news-step {
  opacity: 1;
  transition: opacity 0.3s ease;
  background-color: #f5efed;
  padding: 0.2rem 1rem;
  border-radius: 0.5rem;
}

/* .other-news-step.is-visible {
  opacity: 1;
} */

.dual-photo {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  padding: 1.5rem;
}

.dual-photo .article-photo {
  padding: 0;
}

.article-photo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: none;
}

.article-photo img {
  margin: 0.2rem;
  padding: 0;
  max-height: 15rem;
}

.article-photo p {
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  /* font-style: italic; */
  text-align: center;
  color: gray;
}

/* mobile formatting */
@media (max-width: 720px) {
  #step-heading,
  #step-lede {
    width: 100%;
    padding-left: 0;
    margin-left: 0;
    margin: auto;
  }

  .scrolly {
    width: 70%;
    margin: auto;
    justify-self: flex-end;
  }

  .background {
    width: 0;
  }

  .photo-credit-bg,
  .photo-caption-bg {
    display: none;
  }

  .step {
    /* margin: 5vh 0; */
    margin-left: 30vw;
    width: 65%;
  }

  .article-photo img {
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .article-photo {
    display: block;
  }
}

.progress-container {
  display: none;
  position: fixed;
  left: 0;
  top: 10vh;
  height: 80vh;
  width: 40px;
  z-index: 10;
}

.progress-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  /* background: rgba(255, 255, 255, 0.2); */
  background: var(--opacity-accent);
  border-radius: 2em;
}

.progress-fill {
  width: 100%;
  height: 0%;
  /* background: white; */
  background-color: var(--accent-color);
  transition: height 0.3s ease;
  border-radius: 2em;
}

.progress-label {
  position: absolute;
  left: 32px;
  top: 0;
  transform: translateY(-50%);
  background: var(--accent-color);
  color: black;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.progress-label.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

.label-main {
  position: relative;
  z-index: 2;
}

.label-context {
  position: absolute;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  /* visibility: hidden; */
}

.context-above {
  bottom: 100%;
  margin-bottom: 2px;
  align-items: flex-start;
}

.context-below {
  top: 100%;
  margin-top: 2px;
  align-items: flex-start;
}

.context-item {
  background: var(--higher-opacity-accent);
  color: black;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  opacity: 0.4;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}

.context-item:hover {
  opacity: 1;
}

/* .progress-label:hover .label-context {
  visibility: visible;
  pointer-events: auto;
} */
