.home-hero {
  background: #416786;
  color: #fff;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(17rem, 1fr) minmax(0, 2fr);
  grid-template-areas: "title gallery" "copy gallery" "link gallery";
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.1rem, 2vw, 2rem) clamp(1.5rem, 4vw, 4.5rem);
  max-width: 1600px;
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 5rem) 5% clamp(2.5rem, 5vw, 5rem);
}

.home-hero h1 {
  grid-area: title;
  margin: 0;
  max-inline-size: 13ch;
  font-size: clamp(2.75rem, 4.1vw, 4.35rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.home-hero h1 em { color: #b5f0ff; }

.home-hero-copy {
  grid-area: copy;
  min-width: 0;
}

.home-hero .hero-testimonial { max-inline-size: 33rem; }

.home-hero .hero-testimonial blockquote {
  font: inherit;
  letter-spacing: normal;
}

.home-hero .hero-testimonial blockquote p {
  font-size: clamp(1.13rem, 1rem + .55vw, 1.48rem);
  line-height: 1.43;
  text-wrap: pretty;
}

.hero-chapters-link {
  grid-area: link;
  justify-self: start;
  align-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid currentColor;
}

.home-gallery {
  grid-area: gallery;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  container-type: inline-size;
}

.home-gallery::after {
  content: "";
  margin-block-start: auto;
  border-block-end: 1px solid #a9c4da;
}

.hero-slides {
  display: grid;
  margin-block-end: .45rem;
}

.hero-slide {
  display: grid;
  grid-area: 1 / 1;
  align-self: start;
  z-index: 1;
  opacity: 1;
  visibility: visible;
  grid-template-columns: repeat(var(--artwork-count), minmax(0, 1fr));
  gap: clamp(.4rem, 1.2vw, 1.2rem);
}

.hero-slide[inert] {
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-slide { transition: opacity 3.25s ease-in-out; }

  .hero-slide[inert] {
    transition: opacity 3.25s ease-in-out, visibility 0s 3.25s;
  }
}

.hero-slide[hidden], .hero-controls[hidden] { display: none; }

.hero-slide-pair {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.hero-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 2;
  object-fit: contain;
}

@supports (height: 1cqi) {
  .hero-slide figure {
    display: grid;
    grid-template-rows: 50cqi auto;
    align-items: start;
  }

  .hero-slide img { height: 50cqi; }
}

.hero-slide-watercolors img {
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.hero-slide figcaption {
  display: block;
  min-height: 3.25rem;
  margin: 0;
  color: inherit;
  padding-block-start: .35rem;
  font: clamp(.875rem, 1.45vw, 1.2rem)/1.2 var(--serif);
  text-align: center;
}

.hero-slide figcaption a {
  display: inline-flex;
  align-items: start;
  justify-content: center;
  min-height: 44px;
}

.hero-slide[inert] figcaption { visibility: hidden; }
.hero-slide figcaption a:hover { text-decoration: underline; }

.hero-controls button {
  min-height: 44px;
  font: inherit;
}

.hero-arrow {
  position: absolute;
  z-index: 2;
  inset-block-start: 25cqi;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 1px solid #a9c4da;
  border-radius: 50%;
  background: #182e49ed;
}

.hero-arrow[data-step="-1"] { inset-inline-start: -22px; }
.hero-arrow[data-step="1"] { inset-inline-end: -22px; }

.hero-arrow span {
  width: 10px;
  height: 10px;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  rotate: 45deg;
  margin-inline-end: 3px;
}

.hero-arrow[data-step="-1"] span {
  rotate: -135deg;
  margin-inline: 3px 0;
}

.hero-arrow:hover { background: #294a65; }

@media (max-width: 900px) {
  .hero-arrow[data-step="-1"] { inset-inline-start: -8px; }
  .hero-arrow[data-step="1"] { inset-inline-end: -8px; }
}
.hero-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.home-hero :is(a, button):focus-visible { outline-color: #fff; outline-offset: 3px; }

#doorways > h2 { margin-block-end: .85rem; }

#doorways .chapters-reflection {
  max-width: 68ch;
  margin: 0 0 clamp(1.6rem, 3.5vw, 3.4rem);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

@media (min-width: 901px) {
  #doorways {
    --chapter-gap: clamp(18px, 2vw, 34px);
  }

  #doorways .chaplist { column-gap: var(--chapter-gap); }

  #doorways .chapters-reflection {
    max-width: calc((200% - var(--chapter-gap)) / 3);
    font-size: .9375rem;
    text-wrap: pretty;
  }
}

@media (max-width: 900px) {
  .home-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "gallery" "copy" "link";
    grid-template-rows: auto;
    row-gap: clamp(1rem, 3.2vw, 1.8rem);
    padding-block: clamp(1.75rem, 5vw, 3.25rem) 2.25rem;
  }

  .home-hero h1 {
    max-inline-size: 21ch;
    font-size: clamp(2.25rem, 1.9rem + 1.5vw, 2.75rem);
  }

  .home-gallery::after { margin-block-start: 0; }
  .hero-slide figcaption { min-height: 3.5rem; overflow-wrap: anywhere; }
}
