/* Pit Wall hero carousel — scoped to .hero-carousel--pit-wall (Option B).
   Revert: HERO_CAROUSEL_STYLE=glass node build.mjs */

.hero-carousel--pit-wall .hero-cinematic__stage {
  width: min(100%, 280px);
}

.hero-carousel--pit-wall .hero-pit-wall {
  width: 100%;
  container-type: inline-size;
}

/* ── Device frame ── */

.hero-device-frame {
  position: relative;
  width: 100%;
  padding: 0 3px;
}

.hero-device-frame__shell {
  position: relative;
  padding: 10px 8px 12px;
  border-radius: 36px;
  background: linear-gradient(155deg, #3d4454 0%, #1a1f2e 42%, #0d1018 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.hero-device-frame__shell::before,
.hero-device-frame__shell::after {
  content: '';
  position: absolute;
  left: -2px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #4b5368, #252a38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-device-frame__shell::before {
  top: 88px;
  height: 28px;
}

.hero-device-frame__shell::after {
  top: 128px;
  height: 28px;
}

.hero-device-frame__notch {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 22px;
  margin: 0 auto 6px;
  border-radius: 0 0 14px 14px;
  background: #0a0e17;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.hero-device-frame__screen {
  border-radius: 24px;
  overflow: hidden;
  background: #0a0e17;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-carousel--pit-wall .hero-phone-carousel__viewport {
  aspect-ratio: 390 / 784;
}

/* ── Slide transition (horizontal) ── */

.hero-carousel--pit-wall .hero-phone-carousel__slide {
  opacity: 0;
  transform: translateX(20px) scale(0.985);
  transition:
    opacity 0.48s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-carousel--pit-wall .hero-phone-carousel__slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-carousel--pit-wall[data-slide-direction='prev'] .hero-phone-carousel__slide.is-active {
  animation: hero-pit-slide-in-from-left 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-carousel--pit-wall[data-slide-direction='next'] .hero-phone-carousel__slide.is-active {
  animation: hero-pit-slide-in-from-right 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hero-pit-slide-in-from-right {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes hero-pit-slide-in-from-left {
  from {
    opacity: 0;
    transform: translateX(-24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.hero-carousel--pit-wall .hero-phone-carousel__split,
.hero-carousel--pit-wall .hero-phone-carousel__slide .app-screenshot {
  border-radius: 0;
}

.hero-carousel--pit-wall .hero-phone-carousel__slide--contain .app-screenshot {
  display: flex;
  height: 100%;
  border-radius: 0;
  background: #0a0e17;
  align-items: flex-start;
  justify-content: center;
}

.hero-carousel--pit-wall .hero-phone-carousel__slide--contain .app-screenshot img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: top center;
}

/* ── Feature tabs ── */

.hero-phone-carousel__tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  padding: 0;
  width: 100%;
}

.hero-phone-carousel__tab {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 5px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--font);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hero-phone-carousel__tab .material-symbols-outlined {
  font-size: 1rem;
  opacity: 0.75;
}

.hero-phone-carousel__tab-label {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.15;
}

.hero-phone-carousel__tab:hover {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
}

.hero-phone-carousel__tab.is-active {
  color: var(--accent-lap);
  border-bottom-color: var(--accent-lap);
  background: rgba(110, 231, 183, 0.06);
}

.hero-phone-carousel__tab.is-active .material-symbols-outlined {
  opacity: 1;
}

/* ── Caption blurb ── */

.hero-phone-carousel__caption {
  margin: 8px 0 0;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
  min-height: 2.9em;
}

.hero-phone-carousel.is-static .hero-phone-carousel__tabs {
  display: none;
}

/* ── Desktop sizing ── */

@media (min-width: 960px) {
  .hero-carousel--pit-wall .hero-cinematic__stage {
    flex: 0 0 300px;
    width: 300px;
  }

  .hero-device-frame__shell {
    padding: 12px 10px 14px;
    border-radius: 40px;
  }

  .hero-device-frame__notch {
    width: 96px;
    height: 24px;
  }

  .hero-device-frame__screen {
    border-radius: 26px;
  }

  .hero-phone-carousel__tab {
    font-size: 0.55rem;
    padding: 8px 1px 6px;
  }

  .hero-phone-carousel__caption {
    font-size: 0.75rem;
  }
}

@container (max-width: 290px) {
  .hero-phone-carousel__tab {
    font-size: 0.5rem;
    padding: 6px 0 5px;
    gap: 1px;
  }

  .hero-phone-carousel__tab .material-symbols-outlined {
    font-size: 0.9rem;
  }
}

@media (max-width: 959px) {
  .hero-carousel--pit-wall .hero-cinematic__stage {
    max-width: 280px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel--pit-wall .hero-phone-carousel__slide,
  .hero-carousel--pit-wall .hero-phone-carousel__slide.is-active {
    animation: none;
    transition: none;
    transform: none;
  }
}
