/* Hover slideshow — demo homepage previews */

.hover-slider {
  --hs-ink: #050f1f;
  --hs-ink-muted: rgba(7, 22, 43, 0.55);
  --hs-ink-faint: rgba(7, 22, 43, 0.28);
  --hs-border: rgba(7, 22, 43, 0.12);
  --hs-image-bg: rgba(11, 31, 59, 0.06);
  --hs-inactive: 0.28;
  --hs-overlay: linear-gradient(to top, rgba(5, 15, 31, 0.88) 0%, rgba(5, 15, 31, 0.35) 45%, rgba(5, 15, 31, 0.08) 100%);
  color: var(--hs-ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

@media (prefers-color-scheme: dark) {
  .hover-slider {
    --hs-ink: #f4f7fb;
    --hs-ink-muted: rgba(244, 247, 251, 0.72);
    --hs-ink-faint: rgba(244, 247, 251, 0.35);
    --hs-border: rgba(255, 255, 255, 0.14);
    --hs-image-bg: rgba(255, 255, 255, 0.06);
    --hs-inactive: 0.42;
    --hs-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.08) 100%);
  }
}

.hover-slider-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.5rem 3rem;
}

.hover-slider-titles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 16rem);
}

.hover-slider-title {
  position: relative;
  display: inline-block;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-align: left;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--hs-ink);
  outline: none;
}

.hover-slider-title:focus-visible {
  outline: 3px solid rgba(196, 92, 62, 0.92);
  outline-offset: 4px;
}

.hover-slider-char {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.hover-slider-char-base,
.hover-slider-char-active {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.hover-slider-char-base {
  opacity: var(--hs-inactive);
}

.hover-slider-char-active {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 1;
  color: var(--hs-ink);
  transform: translateY(110%);
}

.hover-slider-title.is-active .hover-slider-char-base {
  transform: translateY(-110%);
}

.hover-slider-title.is-active .hover-slider-char-active {
  transform: translateY(0);
}

.hover-slider-images {
  position: relative;
  width: min(100%, 28rem);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--hs-border);
  background: var(--hs-image-bg);
  box-shadow: 0 24px 48px -28px rgba(7, 22, 43, 0.35);
}

@media (prefers-color-scheme: dark) {
  .hover-slider-images {
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.65);
  }
}

.hover-slider-images::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--hs-border);
  z-index: 3;
}

.hover-slider-frame {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);
  transition: clip-path 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

div.hover-slider-frame {
  cursor: default;
}

.hover-slider-frame.is-active {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 1;
}

.hover-slider-frame:focus-visible {
  outline: 3px solid rgba(196, 92, 62, 0.92);
  outline-offset: -3px;
}

.hover-slider-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hover-slider-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--hs-overlay);
  pointer-events: none;
}

.hover-slider-heading {
  margin: 0;
  max-width: 95%;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hover-slider-caption {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--hs-ink-muted);
  text-align: center;
}

.hover-slider-caption a {
  color: var(--hs-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--hs-ink-faint);
  text-underline-offset: 2px;
}

.hover-slider-caption a:hover {
  text-decoration-color: var(--hs-ink-muted);
}

@media (max-width: 767px) {
  .hover-slider-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 1.75rem;
  }

  .hover-slider-titles {
    gap: 0.2rem;
  }

  .hover-slider-images {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hover-slider-char-base,
  .hover-slider-char-active,
  .hover-slider-frame {
    transition: none;
  }

  .hover-slider-char-base {
    opacity: 1;
  }

  .hover-slider-char-active {
    display: none;
  }

  .hover-slider-frame {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    opacity: 0;
  }

  .hover-slider-frame.is-active {
    opacity: 1;
  }
}
