/* The fixed header already has its own space above the homepage banner. */
.home-page .home-hero {
  --hero-product-block-gap: clamp(1rem, 3vh, 2.5rem);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100svh - var(--site-header-height));
  padding-block-end: var(--hero-product-block-gap);
}

.home-page .home-hero__content {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: var(--hero-product-block-gap);
  pointer-events: none;
}

.home-page .home-hero__content > .more-button { pointer-events: auto; }

.home-page .home-hero__timeline {
  flex: none;
  margin-block-start: 0;
}

.home-hero__controls {
  display: none;
}

.home-hero__timeline span {
  position: absolute;
  top: 50%;
  left: 0;
  margin: 0;
  transform: translateY(-50%);
}

.home-hero-products {
  --hero-product-gap: 12px;
  --hero-product-image-size: clamp(3.25rem, 6vw, 6.75rem);
  --hero-product-columns: 6;
  --hero-product-visible-columns: min(var(--hero-product-columns), var(--hero-product-count, var(--hero-product-columns)));
  position: relative;
  z-index: 3;
  width: calc(100% - 2 * var(--home-hero-side-inset, 0%));
  margin: var(--hero-product-block-gap) auto 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: auto;
  overscroll-behavior-inline: contain;
}

.home-hero-products:not([data-hero-products-ready]) { scroll-snap-type: x mandatory; }
.home-hero-products::-webkit-scrollbar { display: none; }
.home-hero-products__track {
  display: flex;
  gap: var(--hero-product-gap);
  height: auto;
}

.home-hero-products .home-hero-product {
  flex-shrink: 0;
  width: calc((100% - (var(--hero-product-visible-columns) - 1) * var(--hero-product-gap)) / var(--hero-product-visible-columns));
  height: clamp(7.875rem, 9vw, 8.75rem);
  scroll-snap-align: start;
}

.home-hero-products[data-hero-product-count="1"] .home-hero-product {
  width: min(100%, 24rem);
}

.home-hero-products .home-hero-product__link {
  display: grid;
  grid-template-columns: var(--hero-product-image-size) minmax(0, 1fr);
  padding-inline-start: clamp(.5rem, .9vw, .875rem);
  height: 100%;
  overflow: hidden;
  border-radius: .875rem;
  background: rgb(78 83 89 / 76%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
}

.home-hero-product__image {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  align-self: center;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  border-radius: .875rem;
  background: #f0f0f3;
}

.home-hero-product__image img {
  display: block;
  width: 76%;
  height: 68%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .25s ease;
}

.home-hero-product__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  gap: .5rem;
  padding: .5rem clamp(.4375rem, .8vw, .875rem);
}

.home-hero-product__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow-wrap: anywhere;
  font-size: clamp(.75rem, 1vw, .9375rem);
  font-weight: 600;
  line-height: 1.35;
}

.home-hero-product__arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 50%;
  color: #fff;
}

.home-hero-product__arrow svg { display: block; width: 4px; height: 7px; }
.home-hero-product__link:focus-visible { outline: 2px solid var(--home-gold); outline-offset: -3px; }

@media (hover: hover) {
  .home-hero-product__link:hover .home-hero-product__image img { transform: translateY(-3px); }
  .home-hero-product__link:hover .home-hero-product__arrow { background: var(--home-gold); border-color: var(--home-gold); }
}

@media (max-width: 1000px) {
  .home-hero-products {
    --hero-product-image-size: clamp(3.375rem, 9vw, 5.5rem);
    --hero-product-columns: 4;
  }
}

@media (max-width: 640px) {
  .home-hero-products {
    --hero-product-image-size: clamp(3.25rem, 16vw, 5rem);
    --hero-product-columns: 2;
  }
}

@media (max-width: 360px) {
  .home-hero-product__title { -webkit-line-clamp: 5; }
}

@media (max-height: 540px) {
  .home-page .home-hero { --hero-product-block-gap: 0.75rem; }
  .home-page .home-hero__title {
    font-size: clamp(1.5rem, 4.8vmin, 2.5rem);
    line-height: 1.25;
  }
  .home-page .home-hero__content .more-button { margin-top: 0.75rem; }
  .home-hero-products { --hero-product-image-size: 3rem; }
  .home-hero-products .home-hero-product { height: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-product__image img { transition: none; }
  .home-hero-product__link:hover .home-hero-product__image img { transform: none; }
}

.home-hero-products[hidden] { display: none; }
