.hero-slide-deck {
  --gutter: clamp(17px, 4.3vw, 28px);
  --stage: clamp(252px, max(71vw, 15rem), 354px);
  --headline: clamp(1.95rem, 7.6vw, 2.95rem);
  position: relative;
  margin-block: clamp(10px, 1.7vw, 22px) 0;
}

.hero-slide-feature {
  --subject-x: 49%;
  --subject-y: 17%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  block-size: var(--stage);
  border-radius: clamp(16px, 2.8vw, 30px);
  background: #2b231d;
  color: #fff;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}
.hero-slide-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: block;
  touch-action: pan-y pinch-zoom;
  -webkit-user-drag: none;
}
.hero-slide-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--subject-x) var(--subject-y);
  pointer-events: none;
}
.hero-slide-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgb(12 11 10 / .88), rgb(14 13 12 / .69) 22%, rgb(14 13 12 / .38) 42%, transparent 68%),
    radial-gradient(ellipse at top right, rgb(17 16 15 / .53), transparent 24%);
}
.hero-slide-copy {
  position: absolute;
  inset: auto var(--gutter) var(--gutter);
  z-index: 1;
  pointer-events: none;
}
.hero-slide-title {
  margin: 0;
  font-size: var(--headline);
  line-height: 1.13;
  font-weight: 800;
  text-shadow: 0 1px 3px rgb(0 0 0 / .38);
  letter-spacing: -.055em;
}
.hero-slide-topic {
  display: inline-flex;
  max-width: 100%;
  min-height: 48px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  touch-action: pan-y pinch-zoom;
}
.hero-slide-topic:focus-visible,
.hero-slide-feature > .guide-share:focus-visible {
  outline-color: currentColor;
  outline-offset: 2px;
}
.hero-slide-line { display: block; }
.hero-slide-feature > .guide-share {
  position: absolute;
  z-index: 2;
  inset: 4px 5px auto auto;
  color: #fff;
  filter: drop-shadow(0 1px 2px #211710);
}
.hero-slide-feature > .guide-share svg { width: 1.42rem; height: 1.42rem; }

/* Focal points are measured on the original photographs. */
.hero-slide-feature[data-scene="health"] { --subject-x: 52%; --subject-y: 12%; }
.hero-slide-feature[data-scene="meal"] { --subject-x: 49%; --subject-y: 2%; }
.hero-slide-feature[data-scene="care"] { --subject-x: 50%; --subject-y: 4%; }
.hero-slide-feature[data-scene="money"] { --subject-x: 50%; --subject-y: 32%; }

.hero-slide-footer { padding-block: .65rem .05rem; }
.hero-slide-deck .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .45rem .55rem;
  margin: 0;
}
.hero-slide-deck .hero-actions > a {
  flex: 1 1 auto;
  min-width: 0;
  min-height: max(48px, 3.15rem);
  padding: .52rem .65rem;
  gap: .36rem;
  border-radius: .72rem;
  font-size: 1.12rem;
  line-height: 1.27;
}
.hero-slide-deck .hero-actions > .primary {
  background: #ad3f17;
  box-shadow: none;
}
.hero-slide-deck .hero-actions > .primary:hover { background: #903013; }
.hero-slide-deck .hero-actions > .outline {
  border: 0;
  background: transparent;
  color: #563521;
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}
.hero-slide-deck .hero-actions > .outline:hover { color: #883411; background: #f7eee3; }

.hero-slide-controls {
  position: absolute;
  z-index: 4;
  inset: 6px auto auto 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: white;
  color: #312823;
  box-shadow: 0 2px 10px #261b1730;
}
.hero-slide-controls:not(:focus-within) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}
.hero-slide-controls button {
  display: grid;
  place-items: center;
  width: max(48px, 2.7rem);
  height: max(48px, 2.7rem);
  border-radius: 9px;
  background: #fcf7f0;
}
.hero-slide-controls button svg { width: 1.4rem; height: 1.4rem; }

@media (min-width: 620px) {
  .hero-slide-deck {
    --stage: clamp(312px, max(39vw, 17rem), 476px);
    --gutter: clamp(26px, 3.2vw, 48px);
  }
  .hero-slide-title { font-size: clamp(2.35rem, 4.2vw, 3.85rem); }
  .hero-slide-media::after {
    background:
      radial-gradient(ellipse at bottom left, rgb(12 11 10 / .85) 0%, rgb(14 13 12 / .62) 22%, transparent 62%),
      linear-gradient(to top, rgb(12 11 10 / .42), transparent 43%),
      radial-gradient(ellipse at top right, rgb(17 16 15 / .5), transparent 20%);
  }
  .hero-slide-feature > .guide-share { inset: 9px 12px auto auto; }
  .hero-slide-footer { padding-block: .78rem 0; }
  .hero-slide-deck .hero-actions > a {
    flex: 0 1 auto;
    padding-inline: 1.3rem;
    font-size: 1.22rem;
  }
}

/* Reserve more vertical room for a two-line headline at the largest text setting. */
@media (max-width: 619px) {
  html[data-large="2"] .hero-slide-deck { --stage: clamp(304px, max(72vw, 14.7rem), 370px); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-slide-media[data-direction] .hero-slide-photo { animation: guide-photo-arrive .26s ease-out; }
  .hero-slide-feature[data-dragging] .hero-slide-photo {
    animation: none;
    transform: scale(1.08) translateX(var(--hero-drag, 0%));
  }
  @keyframes guide-photo-arrive {
    from { opacity: .8; }
    to { opacity: 1; }
  }
}
