/*
 * Shared reading scale for project detail pages.
 * Keeps the editorial hierarchy while softening the jump from the portfolio grid.
 */

body {
  font-size: 17px;
  line-height: 1.76;
}

.hero,
.section,
.story,
.status,
.project-note {
  width: min(100%, 720px);
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(40px, 5.7vw, 72px);
  line-height: 1.14;
  text-wrap: balance;
}

.hero .lede {
  max-width: 38ch;
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.58;
  text-wrap: pretty;
}

h2 {
  font-size: clamp(27px, 3.1vw, 36px);
  line-height: 1.24;
  text-wrap: balance;
}

.section,
.story {
  padding-top: 50px;
}

.section p,
.story p,
.status p,
.project-note p {
  text-wrap: pretty;
}

.page > figure {
  width: min(calc(100% - 24px), 1000px);
  margin-top: 40px;
}

.page > figure.mobile {
  width: min(calc(100% - 24px), 390px);
}

.product-focus {
  width: min(calc(100% - 24px), 1000px);
  margin-right: auto;
  margin-left: auto;
}

figcaption {
  width: min(100%, 720px);
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

footer {
  width: min(100%, 720px);
}

@media (max-width: 820px) {
  body {
    font-size: 16.5px;
    line-height: 1.75;
  }

  .hero,
  .section,
  .story,
  .status,
  .project-note {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(38px, 8.8vw, 42px);
  }

  .hero .lede {
    font-size: 18px;
    line-height: 1.6;
  }

  h2 {
    font-size: clamp(26px, 7vw, 32px);
  }

  .section,
  .story {
    padding-top: 40px;
  }

  .page > figure {
    width: calc(100% - 16px);
    margin-top: 28px;
  }

  .page > figure.mobile {
    width: min(calc(100% - 16px), 390px);
  }

  .product-focus {
    width: calc(100% - 8px);
    margin-top: 42px;
  }
}
