/* Our Story page. Uses the site's colors and fonts from styles.css. */
.story-top {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.story-top .back {
  color: var(--slate);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.story-top .back:hover {
  color: var(--rust);
}

.story-hero {
  padding: 3rem 1.25rem 0;
  text-align: center;
}

.story-hero h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(3.6rem, 10vw, 6.5rem);
}

.story-hero h1 em {
  color: var(--rust);
}

.story-intro {
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  font-size: 1.2rem;
}

.story-pines {
  display: block;
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* Sections */
.story-chapters {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4rem 0 4.5rem;
}

.story-section-head {
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.story-label {
  margin: 0 0 0.15rem;
  color: var(--rust);
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 1.9rem;
  line-height: 1;
}

.story-section-head h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.3rem, 5vw, 3.3rem);
}

.story-section-head p:not(.story-label) {
  margin-bottom: 0.9rem;
  font-size: 1.1rem;
}

.story-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.25rem 2rem;
}

.story-photo {
  flex: 0 1 calc((100% - 4rem) / 3);
  max-width: 340px;
  margin: 0;
  transform: rotate(-1.6deg);
}

/* Show each photo whole, at its own shape (no cropping). */
.story-photo img { aspect-ratio: auto; }
.story-photo:not(:has(figcaption)) { padding-bottom: 10px; }
.story-photos { align-items: flex-start; }

.story-photos.count-1 .story-photo { flex-basis: 480px; max-width: 480px; }
.story-photos.count-2 .story-photo { flex-basis: calc((100% - 2rem) / 2); max-width: 420px; }
.story-photo:nth-child(2n) { transform: rotate(1.8deg) translateY(10px); }
.story-photo:nth-child(3n) { transform: rotate(-0.6deg); }

.story-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 1.5px dashed rgba(127, 156, 144, 0.7);
  background: #eef3f0;
  color: var(--teal);
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 1.7rem;
}

.story-sprig {
  display: block;
  width: auto;
  height: 110px;
  margin: 4rem auto 3rem;
  opacity: 0.85;
}

.story-error {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--coral-light);
  text-align: center;
}

/* Closing band */
.story-end {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.25rem max(20rem, 25vw);
  background: var(--coral);
  text-align: center;
}

.story-end p {
  max-width: 34rem;
  margin: 0 auto 2rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-style: italic;
  line-height: 1.2;
}

.story-end .buttons {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.story-end .button-light {
  border-color: var(--ink);
  color: var(--ink);
}

.story-end .button-light:hover {
  background: var(--paper);
}

.story-end img {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: max(1200px, 100%);
  max-width: none;
  transform: translateX(-50%);
  opacity: 0.85;
  pointer-events: none;
}

@media (max-width: 760px) {
  .story-photos,
  .story-photos.count-2 { gap: 1.5rem 1rem; }

  .story-photo,
  .story-photos.count-2 .story-photo {
    flex-basis: calc((100% - 1rem) / 2);
  }

  .story-photos.count-1 .story-photo { flex-basis: 100%; }

  .story-sprig {
    height: 80px;
    margin: 3rem auto 2.25rem;
  }

  .story-end {
    padding-bottom: 18rem;
  }
}
