/* Keep the hero's footprint while actual cards move through the depth positions. */
.hero-card-stack {
  --hero-card-surface: #fffdf8;
  position: absolute;
  right: 27px;
  bottom: 76px;
  width: 512px;
  isolation: isolate;
}
.hero-stack-deck { display: grid; }
.hero-card-stack .hero-testimonial {
  grid-area: 1 / 1;
  position: relative;
  inset: auto;
  width: 100%;
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--hero-card-surface);
  backdrop-filter: none;
  box-shadow: 0 2px 5px #173d350a, 0 12px 28px #173d3512;
  transform-origin: center top;
}
.hero-card-stack[data-stack-ready] .hero-testimonial { padding-top: 66px; }
.hero-card-stack .hero-testimonial::before,
.hero-card-stack .hero-testimonial::after { content: none; }
.hero-card-stack .hero-testimonial[data-depth='0'] { z-index: 3; transform: translateY(0) scale(1); }
.hero-card-stack .hero-testimonial[data-depth='1'] { z-index: 2; transform: translateY(-15px) scale(.94); }
.hero-card-stack .hero-testimonial[data-depth='2'] { z-index: 1; transform: translateY(-30px) scale(.88); }
.hero-card-stack .hero-testimonial[aria-hidden=true] { pointer-events: none; }
.hero-card-stack .hero-testimonial[aria-hidden=true] > * { visibility: hidden; }
.hero-card-stack .hero-stack-copy,
.hero-card-stack blockquote { font: 400 28px/1.4 var(--serif); text-wrap: pretty; }
.hero-stack-eyebrow { font-size: 12px; line-height: 18px; color: var(--muted); margin-bottom: 8px; }
.hero-card-stack figcaption > div { min-width: 0; }
.hero-card-stack figcaption p { color: var(--muted); }
.hero-card-stack .hero-testimonial figcaption a { min-height: 24px; }
.hero-card-stack .hero-testimonial figcaption a img { position: static; width: 16px; height: 16px; transform: none; }
.hero-stack-controls { position: absolute; inset: 12px 12px auto; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-stack-pagination, .hero-stack-actions { display: flex; align-items: center; gap: 2px; }
.hero-stack-controls button { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; border-radius: 50%; padding: 0; border: 1px solid transparent; background: transparent; color: var(--ink); }
.hero-stack-actions button { border-color: var(--line); }
.hero-stack-pagination button { width: 28px; }
.hero-stack-pagination span { width: 6px; height: 6px; border-radius: 99px; background: var(--muted); }
.hero-stack-pagination [aria-current=true] span { width: 16px; background: var(--ink); }
.hero-stack-count { min-width: 38px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
html[data-theme=dark] .hero-card-stack { --hero-card-surface: #203b31; }
html[data-theme=dark] .hero-card-stack .hero-testimonial { background: var(--hero-card-surface); }
@media (hover: hover) and (pointer: fine) {
  .hero-stack-controls button:hover { background: var(--sage); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-card-stack:not([data-stack-immediate]) .hero-testimonial { transition: transform 280ms var(--ease-out); }
}
@media (max-width: 1100px) {
  .hero { display: flex; flex-direction: column; gap: 64px; min-height: 0; }
  .hero-intro { max-width: 100%; }
  .hero-card-stack { position: relative; right: auto; bottom: auto; width: min(512px, 100%); align-self: flex-end; }
}
@media (max-width: 680px) {
  .hero-card-stack { position: relative; right: auto; bottom: auto; width: 100%; }
  .hero-card-stack .hero-testimonial { padding-inline: 20px; }
  .hero-card-stack .hero-stack-copy, .hero-card-stack blockquote { font-size: 25px; }
  .hero-stack-controls button { min-height: 44px; }
  .hero-stack-actions button { width: 44px; }
}
@media (forced-colors: active) {
  .hero-card-stack .hero-testimonial { border: 1px solid CanvasText; }
  .hero-stack-pagination span { background: ButtonText; }
  .hero-stack-pagination [aria-current=true] span { background: Highlight; }
  .hero-stack-actions button { border-color: ButtonText; }
}
