/* Shared landing typography; the two editorial lists keep compact headers. */
:root {
  --hero-content-width: 1440px;
  --hero-gutter: clamp(20px, 4vw, 56px);
  --hero-title-size: clamp(32px, 5.1vw, 78px);
  --hero-title-line: 1.08;
  --hero-title-top: clamp(170px, 20svh, 220px);
  --hero-height: max(900px, 100svh);
  --hero-copy-width: calc(var(--hero-title-size) * 12);
}

html body :is(.seo-home-hero, .seo-hero) h1.seo-hero-title,
html body .journal-head h1 {
  margin: 0;
  width: 100%;
  max-width: var(--hero-copy-width) !important;
  font: 500 var(--hero-title-size)/var(--hero-title-line) Unbounded, sans-serif !important;
  letter-spacing: -.035em;
  text-wrap: balance;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
}

/* The home container used to include its gutters inside the 1440px limit. */
html body .seo-home-hero > .public-hero-content {
  width: calc(100% - var(--hero-gutter) * 2);
  max-width: var(--hero-content-width) !important;
  padding-inline: 0 !important;
  padding-block: 170px 110px !important;
  justify-content: center !important;
}
.seo-hero,
.journal-head {
  padding-top: var(--hero-title-top) !important;
  padding-inline: var(--hero-gutter) !important;
}
.seo-hero-funds { align-items: flex-start !important; }
.public-hero-grid {
  width: 100%;
}
.public-hero-copy,
.public-hero-content,
.journal-head > .journal-wrap { position: relative; min-width: 0; }

/* Eyebrows sit above the common title baseline without shifting it. */
.public-hero-eyebrow,
.journal-head .journal-eyebrow {
  position: absolute;
  bottom: calc(100% + 28px);
  left: 0;
  right: 0;
  margin: 0 !important;
  line-height: 1.5 !important;
}
@media (max-width: 1100px) {
  .public-hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 600px) {
  :root {
    --hero-title-size: clamp(28px, 8.2vw, 44px);
    --hero-title-line: 1.15;
    --hero-title-top: 160px;
  }
  /* Preserve the original mobile composition: animated sign above the title. */
  html body .seo-home-hero > .public-hero-content {
    min-height: 0 !important;
    padding-block: 340px 110px !important;
    justify-content: flex-start !important;
  }
}

/* Centre the primary copy in the same space as the home page. */
@media (min-width: 1101px) {
  .seo-home-hero, .seo-hero {
    min-height: var(--hero-height) !important;
  }
  .seo-hero {
    display: flex;
    align-items: center !important;
    padding-block: 170px 110px !important;
  }
  html body .seo-home-hero > .public-hero-content {
    min-height: var(--hero-height) !important;
  }
  /* Keep the original illustration widths and the original business columns.
     Their height must not shift the centre of the heading/text/button group. */
  .public-hero-grid > div:last-child {
    height: 0;
    min-height: 0 !important;
    align-self: center;
    align-items: center;
  }
  .seo-hero-buyers .public-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .seo-hero-buyers .public-hero-grid > div:last-child {
    justify-content: flex-end !important;
  }
  .seo-hero-buyers .public-hero-grid > div:last-child > div {
    max-width: calc(100vw - var(--hero-title-size) * 12 - var(--hero-gutter) * 2 - 32px);
  }
  .public-hero-secondary {
    position: absolute;
    top: 100%;
    left: 0;
  }
}

@media (min-width: 1101px) {
  html body :is(.seo-home-hero, .seo-hero) h1.seo-hero-title,
  html body .journal-head h1 {
    width: calc(var(--hero-title-size) * 14);
    max-width: calc(100vw - var(--hero-gutter) * 2 - 16px) !important;
  }
}

/* Match the canvas breakpoint using the available width, including its border. */
.public-flow-container { container-type: inline-size; }
@container (max-width: 701px) {
  .public-flow-diagram { height: 600px !important; }
}

@media (min-width: 900px) {
  .public-flow-steps { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .public-flow-steps > div { padding-inline: clamp(12px, 1.8vw, 22px) !important; }
  .public-flow-steps > div > div:last-child { font-size: clamp(14px, 1.4vw, 16px) !important; }
}
