/* Homepage presentation is scoped so essay layouts keep their own rhythm. */
.home-page {
  --home-green: #496226;
  --home-blue: #22566a;
  --home-rust: #a04321;
}

.home-skip {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: #faf7f2;
  color: #111;
  transform: translateY(-200%);
}

.home-skip:focus {
  transform: translateY(0);
}

.home-page .site-header {
  right: 0;
}

.home-page .site-header__inner,
.home-shell,
.home-page .hero__inner {
  width: min(100% - 3rem, 60rem);
  max-width: none;
  padding-inline: 0;
  margin-inline: auto;
}

.home-page .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  opacity: 1;
}

.home-page .hero {
  min-height: 38rem;
  padding: 0;
}

.home-page .hero::before {
  background-position: 65% center;
}

.home-page .hero::after {
  background: linear-gradient(90deg, rgba(45, 28, 6, 0.65), rgba(51, 34, 8, 0.3) 55%, rgba(51, 34, 8, 0.06));
}

.home-page .hero__inner {
  margin-block: 0;
  padding-block: 8rem 3.75rem;
}

.home-brand {
  font: 1rem NEUE_MONTREAL_MEDIUM, sans-serif;
  margin-bottom: 1.4rem;
}

.home-page .hero__title {
  max-width: 15ch;
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin-bottom: 1.25rem;
}

.home-page .hero__tagline {
  max-width: 31rem;
  font: 1.15rem/1.5 NEUE_MONTREAL_REGULAR, sans-serif;
  margin-bottom: 1.75rem;
}

.home-page .hero__actions {
  gap: 0.85rem 1.5rem;
  align-items: center;
}

.home-page .hero .btn--secondary {
  gap: 1.25rem;
  background: #faf7f2;
  border-color: #faf7f2;
  color: #29351c;
}

.home-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: #fff;
  font: 0.95rem NEUE_MONTREAL_MEDIUM, sans-serif;
}

.home-page .hero a:focus-visible {
  color: #fff;
  outline-color: #fff;
}

.home-page .hero .btn:focus-visible {
  color: #29351c;
}

.home-section {
  padding-block: clamp(3rem, 6vw, 5rem);
  scroll-margin-top: 1.5rem;
}

.home-section--first {
  padding-bottom: 3rem;
}

.home-section--detached {
  padding-top: 3rem;
  border-top: 1px solid #ded9cb;
}

.home-section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-bottom: 2rem;
}

.home-page .section__label {
  margin-bottom: 1rem;
  font-size: 0.73rem;
  line-height: 1.5;
  letter-spacing: 0.11em;
  color: #5b614f;
}

.home-section h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.home-prose,
.home-example > p:not(.section__label) {
  font-size: 1.12rem;
  line-height: 1.6;
}

/* Match the prose to the section heading, rather than its eyebrow label. */
.home-section-intro > .home-prose {
  margin-top: calc(1rem + (0.73rem * 1.5));
}

.home-prose p:last-child,
.home-example p:last-child {
  margin-bottom: 0;
}

.home-model {
  margin: 0;
}

.home-model__art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

/* The diagram's text equivalent stays available to assistive technology.
   On smaller screens it becomes the visible, reflowing diagram. */
.home-map {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-model figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  margin-top: 0.75rem;
  font: 0.85rem/1.5 NEUE_MONTREAL_REGULAR, sans-serif;
  color: #595b51;
}

.home-model figcaption strong {
  font-family: NEUE_MONTREAL_MEDIUM, sans-serif;
  font-weight: normal;
  color: #33382c;
}

.home-model figcaption a {
  flex-shrink: 0;
  padding-block: 0.5rem;
  color: var(--home-green);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-example {
  max-width: 43rem;
  margin: 2rem auto 0;
  padding-left: 1.5rem;
  border-left: 3px solid #8fa84b;
}

.home-example .section__label {
  margin-bottom: 0.6rem;
}

.home-section--detached .home-example {
  border-left-color: #bd7756;
}

.home-takeaway {
  max-width: 43rem;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
}

.home-takeaway h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.home-takeaway p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.6;
}

.home-takeaway p + p {
  margin-top: 1.25rem;
}

.home-section--software {
  border-top: 1px solid #ded9cb;
  padding-bottom: clamp(8rem, 14vw, 12rem);
}

.home-section--publication {
  background: #eaf0dd;
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.65rem;
  color: var(--home-green);
  font: 0.95rem NEUE_MONTREAL_MEDIUM, sans-serif;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  max-width: 100%;
  min-height: 48px;
  padding: 0.9rem 1.2rem;
  border: 1px solid #293b1e;
  border-radius: 3px;
  background: #293b1e;
  color: #fff;
  font: 0.95rem/1.4 NEUE_MONTREAL_MEDIUM, sans-serif;
  text-decoration: none;
}

.home-primary-action:hover {
  background: #1c2c13;
  border-color: #1c2c13;
  color: #fff;
  text-decoration: none;
}

.home-primary-action:focus-visible {
  outline: 3px solid var(--home-green);
  outline-offset: 4px;
}

.home-primary-action span {
  flex-shrink: 0;
}

.home-reading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

.home-reading article {
  border-top: 1px solid #c6cebb;
  padding-top: 1.4rem;
}

.home-reading h3 {
  max-width: 21ch;
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 0.9rem;
}

.home-reading h3 a {
  color: #26361b;
}

.home-reading h3 a span {
  white-space: nowrap;
  font-size: 0.8em;
}

.home-reading article > p:last-child {
  max-width: 32rem;
  font-size: 1.06rem;
  line-height: 1.6;
  margin: 0;
}

.home-all-articles {
  margin-top: 1.5rem;
}

.home-page .site-footer {
  background: #1d2116;
}

.home-page .site-footer a {
  overflow-wrap: anywhere;
}

.home-footer-links {
  margin: 1rem 0 0;
  font: 0.85rem/1.5 NEUE_MONTREAL_REGULAR, sans-serif;
}

.home-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 900px) {
  .home-page .site-header__inner,
  .home-shell,
  .home-page .hero__inner {
    width: calc(100% - 2rem);
  }

  .home-page .site-header__inner {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .home-page .site-header {
    padding-top: 0.65rem;
  }

  .home-page .site-nav {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .home-page .hero {
    min-height: 0;
  }

  .home-page .hero__inner {
    padding-block: 6.5rem 2.75rem;
  }

  .home-page .hero__title {
    max-width: 17ch;
    font-size: clamp(2.3rem, 7vw, 3rem);
  }

  .home-page .hero__tagline {
    font-size: 1rem;
    max-width: 29rem;
  }

  .home-brand {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }

  .home-page .hero::after {
    background: linear-gradient(90deg, rgba(45, 28, 6, 0.65), rgba(45, 28, 6, 0.25));
  }

  .home-section-intro {
    grid-template-columns: 1fr;
    gap: 1.3rem;
    margin-bottom: 1.75rem;
  }

  .home-section-intro > .home-prose {
    margin-top: 0;
  }

  .home-section h2 {
    font-size: 1.95rem;
    max-width: 23ch;
  }

  .home-prose,
  .home-takeaway p,
  .home-example > p:not(.section__label) {
    font-size: 1.08rem;
  }

  .home-model__art {
    display: none;
  }

  .home-map {
    position: static;
    width: auto;
    height: auto;
    padding: 1.35rem 1.15rem;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    border: 1px solid #e9ddc8;
    border-radius: 0.6rem;
    background: radial-gradient(ellipse at 50% 24%, #f6e5c6, transparent 60%), #f8eee0;
    font: 0.94rem/1.45 NEUE_MONTREAL_REGULAR, sans-serif;
  }

  .home-map__eyebrow {
    font-size: 0.75rem;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8c491b;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .home-map h3 {
    font-size: 1.08rem;
    font-weight: normal;
    line-height: 1.25;
    margin-bottom: 0.4rem;
  }

  .home-map p:last-child {
    margin-bottom: 0;
  }

  .home-map__activity {
    max-width: 24rem;
    margin-inline: auto;
    padding: 1.1rem;
    border: 1px solid #dab477;
    border-radius: 45% / 25%;
    background: #f9e4bd;
    text-align: center;
  }

  .home-map__activity h3 {
    color: #8a4d17;
  }

  .home-map__people {
    display: block;
    width: 7.5rem;
    height: auto;
    margin: 0 auto 0.6rem;
    color: #625332;
  }

  .home-map__connection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding-block: 1rem;
    color: var(--home-green);
  }

  .home-map__connection > span {
    font: 2.5rem/1 sans-serif;
  }

  .home-map__connection p {
    margin: 0;
    font-size: 0.9rem;
  }

  .home-map__conditions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .home-map__conditions > div {
    border-top: 2px solid currentColor;
    padding-top: 0.65rem;
  }

  .home-map__constraint {
    color: var(--home-green);
  }

  .home-map__freedom {
    color: var(--home-blue);
  }

  .home-map__conditions p {
    color: #393b31;
    font-size: 0.9rem;
  }

  .home-map__outcome {
    border-top: 1px solid #d9cbb3;
    margin: 1.25rem 0 0;
    padding: 1rem 0 0;
    list-style: none;
    font-family: NEUE_MONTREAL_MEDIUM, sans-serif;
    color: #3e4d2a;
  }

  .home-map__outcome li {
    display: grid;
    grid-template-columns: 1em minmax(0, 1fr);
    column-gap: 0.5em;
  }

  .home-map__outcome li > span {
    font-family: Arial, sans-serif;
    font-weight: bold;
  }

  .home-model--detached .home-map {
    background: #f8eee4;
  }

  .home-model--detached .home-map__eyebrow,
  .home-model--detached .home-map__connection,
  .home-model--detached .home-map__outcome {
    color: var(--home-rust);
  }

  .home-map__authority {
    padding: 1rem;
    border: 2px solid #b96643;
    margin-bottom: 1.3rem;
    text-align: center;
  }

  .home-map__authority h3 {
    color: var(--home-rust);
  }

  .home-model--detached .home-map__activity {
    background: transparent;
    border: 2px dashed #aaa08f;
    border-radius: 45% / 25%;
  }

  .home-model--detached .home-map__activity h3 {
    color: #645c4f;
  }

  .home-model figcaption {
    display: block;
    font-size: 0.82rem;
  }

  .home-model figcaption a {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.3rem;
    min-height: 44px;
    margin-top: 0.15rem;
  }

  .home-example {
    margin-top: 1.5rem;
    padding-left: 1rem;
  }

  .home-reading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.75rem;
  }

  .home-reading h3 {
    font-size: 1.65rem;
  }

}

@media (max-width: 600px) {
  .home-page .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .home-page .site-nav {
    gap: 0.15rem 0.75rem;
  }

  .home-page .hero__inner {
    padding-top: 9rem;
  }
}

@media (max-width: 360px) {
  .home-map__conditions {
    grid-template-columns: 1fr;
  }

  .home-map {
    padding-inline: 1rem;
  }

  .home-page .site-nav {
    gap: 0.15rem 0.75rem;
  }

  .home-page .hero__inner {
    padding-top: 11rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.home-page) {
    scroll-behavior: auto;
  }

  .home-page .btn {
    transition: none;
  }
}
