/* Ken Burns hero — pair with lab/components/ken-burns.js */

.if-kb {
  position: relative;
  overflow: hidden;
  background: #0c0b09;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.if-kb__stage {
  position: absolute;
  inset: 0;
}

.if-kb__frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
}

.if-kb__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.if-kb__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.64) 0%,
    rgba(0, 0, 0, 0.12) 36%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

/* Optional chrome over hero */
.if-kb-chrome {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: #fff;
}
.if-kb-chrome .if-kb-counter {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.25rem, 4vw, 3rem);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
  pointer-events: none;
}
.if-kb-chrome .if-kb-arrows {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(3.5rem, 8vh, 5rem);
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}
.if-kb-chrome .if-kb-arrows button {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 2px;
  font-size: 1rem;
  line-height: 1;
}
.if-kb-chrome .if-kb-arrows button:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .if-kb__frame img {
    transform: scale(1.05) !important;
  }
}
