/* Homepage only. Shared typography, colours and focus styles come from atlas.css. */
.home {
  --home-gutter: var(--editorial-gutter);
  --home-section: clamp(3.5rem, 8vw, 8rem);
  --home-width: var(--editorial-width);
}

.home .home-field,
.home .feature-copy {
  width: min(100%, var(--home-width));
  margin-inline: auto;
  padding-inline: var(--home-gutter);
}

.home .hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(34rem, 76svh, 54rem);
  margin: 0;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.home .hero img {
  position: absolute;
  grid-area: auto;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.home .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgb(22 20 16 / .76), transparent 76%),
    linear-gradient(90deg, rgb(22 20 16 / .54), transparent 76%);
  pointer-events: none;
}

.home .hero figcaption {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  justify-self: start;
  align-self: end;
  width: min(100%, 39rem);
  padding: clamp(1.25rem, 4vw, 3.5rem) var(--home-gutter);
  background: none;
  color: inherit;
}

.home .hero h1 {
  font-size: clamp(3.6rem, 7.8vw, 7.5rem);
  font-weight: 600;
  line-height: .89;
  letter-spacing: -.065em;
}

.home .hero h1 em {
  padding-left: .18em;
  color: var(--paper);
  color: color-mix(in srgb, var(--paper) 82%, var(--clay));
}

.home .hero .subtitle {
  margin-top: 1.2rem;
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
}

.home .hero .intro-copy {
  margin-top: 1rem;
  max-width: 38ch;
}

/* Let the image move more slowly than the page while the cover exits. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .home .hero {
      view-timeline-name: --cover;
      view-timeline-axis: block;
    }

    .home .hero img {
      animation: cover-drift linear both;
      animation-timeline: --cover;
      animation-range: exit 0% exit 100%;
    }

    @keyframes cover-drift {
      from { transform: translateY(0); }
      to { transform: translateY(12%); }
    }
  }
}

.home .hero .primary:focus-visible {
  outline-color: var(--paper);
}

.home .home-introduction {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding-block: var(--home-section);
}

.home .home-introduction figure img {
  display: block;
  width: 100%;
  height: auto;
}

.home .home-introduction figcaption {
  padding-top: .7rem;
}

.home :is(.home-field, .feature) h2 {
  margin: .6rem 0 1.5rem;
  font-size: clamp(2rem, 4.7vw, 4.5rem);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -.06em;
  line-height: .99;
}

.home .home-introduction p + p {
  margin-top: .9rem;
}

.home :is(.home-introduction, .home-driver) a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .6rem;
  font-size:var(--fs-body-sm);
  font-weight: 600;
}

.home .home-drivers {
  background: var(--light);
  padding-block: var(--home-section);
}

.home .home-driver-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 3rem);
}

.home .home-driver {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 1rem;
}

.home .home-driver h3 {
  margin: .9rem 0 .65rem;
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  line-height: 1.1;
  text-transform: none;
}

.home .home-driver p:not(.number) {
  margin-bottom: .7rem;
}

.home .home-driver a {
  margin-top: auto;
}

.home .feature {
  padding-block: var(--home-section);
}

.home .feature-copy {
  padding-block: 0;
}

.home .home-contents {
  border-top: 1px solid var(--line);
  padding-block: var(--home-section);
}

.home .chapters {
  padding: 0;
  margin-block: 2rem 3rem;
}

.home .panel {
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.home .chapter-field,
.home .dwelling-plan {
  border: 0;
}

.home .resources {
  padding-inline: 0;
}

.home footer nav {
  flex-wrap: wrap;
  gap: .2rem 1rem;
}

.home footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size:var(--fs-label);
}

@media (max-width: 760px) {
  .home .hero {
    min-height: clamp(32rem, 75svh, 42rem);
  }

  .home .hero img {
    object-position: 57% center;
  }

  .home .hero::after {
    background: linear-gradient(0deg, rgb(22 20 16 / .86), rgb(22 20 16 / .6) 50%, transparent 90%);
  }

  .home .hero figcaption {
    width: 100%;
    padding-block: 2rem 2.5rem;
  }

  .home .hero h1 {
    font-size: clamp(3.2rem, 13vw, 5.75rem);
  }

  .home .home-introduction,
  .home .home-driver-grid,
  .home .dwelling-studies {
    grid-template-columns: minmax(0, 1fr);
  }

  .home .dwelling-studies {
    grid-auto-flow: row;
    overflow: visible;
    scroll-snap-type: none;
    gap: 2rem;
    padding: 0;
  }
}
