.origin-story-page {
  min-height: calc(100vh - var(--nav-offset, 80px));
  min-height: calc(100dvh - var(--nav-offset, 80px));
  padding: calc(var(--nav-offset, 80px) + 48px) calc(var(--page-gutter, clamp(20px, 5vw, 80px)) + var(--safe-left, 0px)) calc(120px + var(--safe-bottom, 0px)) calc(var(--page-gutter, clamp(20px, 5vw, 80px)) + var(--safe-right, 0px));
  background: #ffffff;
}

.origin-story-page__label {
  font-family: 'Inter', sans-serif;
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.42);
  margin: 0 0 clamp(12px, 1.5vw, 16px);
}

.origin-story-page__title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  width: fit-content;
  max-width: 100%;
  margin-bottom: clamp(24px, 3vw, 32px);
  text-align: left;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: 2px;
  color: rgba(0, 0, 0, 0.9);
}

.origin-story-page__title .title-line {
  display: inline;
}

.origin-story-page__title::after {
  content: '';
  flex-basis: 100%;
  width: 100%;
  height: 1px;
  margin-top: clamp(14px, 1.8vw, 20px);
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.1) 45%,
    rgba(0, 0, 0, 0.04) 75%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.origin-story-page__title.reveal--title.is-visible::after {
  transform: scaleX(1);
}

.origin-story-page__text {
  max-width: none;
  width: 100%;
  text-align: left;
  overflow: hidden;
}

.origin-story-page__media {
  float: right;
  width: clamp(340px, 44%, 580px);
  margin: 0.2em 0 1.5em clamp(28px, 3.5vw, 48px);
  border-radius: 8px;
  overflow: hidden;
}

.origin-story-page__media.reveal.is-visible {
  opacity: 1;
}

.origin-story-page__photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: top center;
}

.origin-story-page__text p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 1.15vw, 17px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.78;
  margin: 0 0 1.3em;
  color: rgba(0, 0, 0, 0.62);
}

.origin-story-page__text p:first-of-type {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.76;
  color: rgba(0, 0, 0, 0.68);
}

.origin-story-page__question {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 1.25vw, 18px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.78);
  margin: 0 0 1.5em;
}

.origin-story-page__text p:last-child {
  margin-bottom: 0;
}

.origin-story-page__text .reveal--soft.is-visible {
  opacity: 0.9;
}

.origin-story-page__back {
  margin-top: clamp(36px, 4.5vw, 48px);
}

/* Tablet portrait: the 340px floor on the float left the copy in a ~380px
   column, so the image shrinks to keep a readable measure beside it. */
@media (min-width: 700px) and (max-width: 1040px) {
  .origin-story-page__media {
    width: clamp(260px, 36%, 420px);
    margin: 0.2em 0 1.4em clamp(24px, 3vw, 36px);
  }
}

/* Below iPad mini width there is no room for text beside the image. */
@media (max-width: 699px) {
  .origin-story-page__media {
    float: none;
    display: block;
    width: min(100%, 480px);
    margin: 0 auto clamp(28px, 4vw, 36px);
  }
}

@media (max-width: 768px) {
  .origin-story-page {
    padding: calc(var(--nav-offset, 68px) + 40px) calc(clamp(24px, 5vw, 32px) + var(--safe-left, 0px)) calc(96px + var(--safe-bottom, 0px)) calc(clamp(24px, 5vw, 32px) + var(--safe-right, 0px));
  }

  .origin-story-page__text p,
  .origin-story-page__question {
    font-size: 16px;
    line-height: 1.75;
  }
}

@media (max-width: 480px) {
  .origin-story-page {
    padding: calc(var(--nav-offset, 64px) + 32px) calc(20px + var(--safe-left, 0px)) calc(72px + var(--safe-bottom, 0px)) calc(20px + var(--safe-right, 0px));
  }

  .origin-story-page__media {
    width: 100%;
  }

  .origin-story-page__title {
    text-wrap: balance;
  }

  .origin-story-page__text p:first-of-type {
    font-size: 17px;
  }
}
