/* Home hero */

.logit-hero {
  position: relative;
  z-index: 40;
  --logit-hero-header: 3rem;
  --logit-hero-controls-h: 6.5rem;
}

@media (min-width: 1024px) {
  .logit-hero {
    --logit-hero-header: 3.75rem;
    --logit-hero-controls-h: 5.5rem;
  }
}

.logit-hero-wave {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.logit-hero__viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--logit-hero-header));
  min-height: 28rem;
  max-height: 56rem;
}

.logit-hero__inset {
  position: absolute;
  top: 0.75rem;
  right: var(--vw-3);
  bottom: 0.75rem;
  left: var(--vw-3);
  z-index: 1;
  pointer-events: none;
}

@media (min-width: 768px) {
  .logit-hero__inset {
    top: 1rem;
    right: var(--vw-4);
    bottom: 1rem;
    left: var(--vw-4);
  }
}

.logit-hero__frame {
  position: relative;
  height: 100%;
  max-height: calc(100vh - var(--logit-hero-header) - 2rem);
  margin-inline: auto;
  border-radius: 0.75rem;
  overflow: hidden;
  pointer-events: auto;
  background: linear-gradient(to bottom, #18181b, #52525b);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15);
  background-size: cover;
  background-position: center;
}

.logit-hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.logit-hero__bg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  will-change: transform;
}

.logit-hero__bg.logit-hero__bg--zoom {
  animation: logit-hero-zoom-out 8s ease-out forwards;
}

@keyframes logit-hero-zoom-out {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
  }
}

.logit-hero__gradient {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgb(9 9 11 / 0.82) 0%,
    rgb(9 9 11 / 0.35) 38%,
    rgb(9 9 11 / 0.2) 100%
  );
}

.logit-hero__slides-copy {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  padding: 1.25rem 1.25rem calc(var(--logit-hero-controls-h) + 0.5rem);
}

@media (min-width: 640px) {
  .logit-hero__slides-copy {
    padding: 2rem 2.5rem 2rem;
    max-width: 46rem;
  }
}

.logit-hero__text {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (min-width: 640px) {
  .logit-hero__text {
    top: 2rem;
    left: 2.5rem;
    right: auto;
    max-width: 42rem;
  }
}

.logit-hero__text.is-active {
  opacity: 1;
  transform: translateY(0);
}

.logit-hero__eyebrow {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(147 197 253);
}

.logit-hero__title {
  font-size: clamp(1.625rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.logit-hero__desc {
  margin-top: 0.75rem;
  max-width: 32rem;
  font-size: clamp(0.875rem, 1.5vw, 1.0625rem);
  line-height: 1.55;
  color: rgb(255 255 255 / 0.82);
}

/* Controls: inside rounded hero frame, 7px inset from bottom-right */
.logit-hero__controls {
  position: absolute;
  z-index: 30;
  right: 7px;
  bottom: 7px;
  left: 7px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
  pointer-events: none;
}

@media (min-width: 640px) {
  .logit-hero__controls {
    left: auto;
    width: min(22rem, calc(100% - 14px));
  }
}

.logit-hero__progress-row,
.logit-hero__preview {
  pointer-events: auto;
}

.logit-hero__progress-row {
  display: flex;
  width: 100%;
  align-items: center;
}

.logit-hero__progress-bar {
  position: relative;
  flex: 1;
  width: 100%;
  height: 2px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.2);
}

.logit-hero__progress {
  position: absolute;
  inset-block: 0;
  left: 0;
  border-radius: 0 9999px 9999px 0;
  background: #fff;
  transition: width 0.45s ease;
}

.logit-hero__preview {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.08);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.22);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.logit-hero__preview:hover {
  background: rgb(255 255 255 / 0.12);
}

.logit-hero__preview.is-shifting .logit-hero__preview-media,
.logit-hero__preview.is-shifting .logit-hero__preview-text {
  animation: logit-hero-preview-in 0.42s cubic-bezier(0.22, 0.85, 0.25, 1) forwards;
}

@keyframes logit-hero-preview-in {
  from {
    opacity: 0;
    transform: translateX(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.logit-hero__preview-media {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0.75rem 0 0.75rem 0.75rem;
  overflow: hidden;
  border-radius: 0.5rem;
  pointer-events: none;
}

@media (min-width: 768px) {
  .logit-hero__preview-media {
    width: 4rem;
    height: 4rem;
  }
}

.logit-hero__preview-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.logit-hero__preview-text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 0.75rem 0;
  pointer-events: none;
}

.logit-hero__preview-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
}

.logit-hero__preview-sub {
  margin-top: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: rgb(255 255 255 / 0.6);
}

.logit-hero__preview-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem 0 0.25rem;
  color: rgb(255 255 255 / 0.85);
  pointer-events: none;
}

/* Mobile bottom bar must not block hero controls */
#mobile-cta {
  pointer-events: none;
}

#mobile-cta a,
#mobile-cta button {
  pointer-events: auto;
}

#back-to-top {
  z-index: 35;
}
