/* ==========================================================================
   Frasso Studio — Homepage Project Carousel & Scroller
   ========================================================================== */

.home-hero-carousel {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: #181310;
  user-select: none;
  -webkit-user-select: none;
}

/* Background Crossfade Image Layers */
.carousel-bg-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.carousel-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}
.carousel-bg-img.active {
  opacity: 1;
  z-index: 2;
}
.carousel-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Scrim Gradient Overlays */
.carousel-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top, rgba(24, 19, 16, 0.9) 0%, rgba(24, 19, 16, 0.3) 25%, rgba(24, 19, 16, 0) 50%);
}
.carousel-scrim-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(24, 19, 16, 0.6) 0%, rgba(24, 19, 16, 0) 100%);
}

/* Carousel Interactive Track & Surface */
.carousel-surface {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(48px, 9vh, 96px);
}

.carousel-viewport {
  width: 100%;
  overflow: hidden;
  cursor: grab;
}
.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  align-items: baseline;
  gap: clamp(32px, 5vw, 72px);
  padding-left: clamp(24px, 5vw, 60px);
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Individual Project Slide */
.carousel-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--wool);
  opacity: 0.45;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.carousel-item:hover {
  opacity: 0.85;
}
.carousel-item.active {
  opacity: 1;
  transform: scale(1.04);
}

.carousel-item-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--wool);
  white-space: nowrap;
}

.carousel-item-meta {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  display: flex;
  align-items: center;
  gap: 10px;
}
.carousel-meta-rule {
  display: inline-block;
  width: 18px;
  height: 1px;
  background-color: var(--sand);
  opacity: 0.6;
}

/* Timeline Progress Baseline */
.carousel-baseline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  z-index: 5;
}
.carousel-progress {
  height: 100%;
  width: 100%;
  background-color: var(--wool);
  transform-origin: left center;
  transform: scaleX(0.125);
  transition: transform 0.4s var(--ease-out);
}
