.home-page {
  --home-preview-width: clamp(150px, 15vw, 184px);
}

.home-video-loops {
  width: min(1200px, calc(100% - 80px));
  margin: 0 auto 36px;
  padding: 21px 22px 14px;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 12% 0, #1466db0d, transparent 42%),
    linear-gradient(145deg, #fff, #f8faff);
  box-shadow: 0 12px 34px #16243c0a;
}

.home-video-loops__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.home-video-loops__eyebrow {
  margin: 0 0 6px;
  color: #1466db;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.6px;
}

.home-video-loops__header h2 {
  margin: 0;
  color: #172234;
  font-size: clamp(22px, 2.6vw, 29px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.home-video-loops__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.home-video-loops__all {
  margin-right: 5px;
  color: #1466db;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.home-video-loops__all:hover { text-decoration: underline; text-underline-offset: 3px; }

.home-video-loops__actions button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #d8e0ec;
  border-radius: 50%;
  background: #fff;
  color: #172234;
  font-size: 15px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.home-video-loops__actions button:hover:not(:disabled) {
  border-color: #1466db;
  background: #1466db;
  color: #fff;
}

.home-video-loops__actions button:disabled {
  color: #a4adba;
  cursor: default;
}

.home-video-loops__track {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 9px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.home-video-loop {
  display: block;
  min-width: 0;
  flex: 0 0 var(--home-preview-width);
  color: inherit;
  scroll-snap-align: start;
  text-decoration: none;
}

.home-video-loop__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: #121b2b;
}

.home-video-loop__poster,
.home-video-loop__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-video-loop__video {
  opacity: 0;
  transition: opacity 220ms ease, transform 350ms ease;
}

.home-video-loop__video[data-ready="true"] { opacity: 1; }

.home-video-loop:hover .home-video-loop__video { transform: scale(1.035); }

.home-video-loop:focus-visible {
  border-radius: 8px;
  outline: 3px solid #cc319c;
  outline-offset: 4px;
}

.home-video-loop__title {
  display: -webkit-box;
  min-height: 32px;
  overflow: hidden;
  margin: 8px 0 0;
  color: #172234;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-video-loop__category {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #69758a;
  font-size: 9px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-video-loops__note {
  margin: 6px 1px 0;
  color: #7a8595;
  font-size: 9px;
  line-height: 1.5;
}

.home-video-loop__watch {
  position: absolute;
  z-index: 1;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
  padding-inline: 7px;
  border: 1px solid #ffffff9e;
  border-radius: 5px;
  background: #152238e6;
  color: #fff;
  font-size: 9px;
  font-weight: 650;
}

@media (max-width: 700px) {
  .home-page {
    --home-preview-width: clamp(142px, 42vw, 168px);
  }

  .home-video-loops {
    width: calc(100% - 36px);
    margin-bottom: 28px;
    padding: 17px 13px 12px;
  }

  .home-video-loops__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 12px;
  }

  .home-video-loops__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .home-video-loops__all { margin-right: auto; }

}

@media (prefers-reduced-motion: reduce) {
  .home-video-loops__track { scroll-behavior: auto; }
  .home-video-loop__video { transition: none; }
}
