/* Elevated before / after compare — light band, champagne accents */

.ehd-ba {
  position: relative;
  padding: 5.5rem 0 5rem;
  background: linear-gradient(180deg, #f7f4ef 0%, #f1ebe3 100%);
  color: #1a1a1a;
  overflow: hidden;
}

.ehd-ba__eyebrow {
  color: #9a7b4f !important;
  letter-spacing: 0.14em;
}

.ehd-ba__title {
  color: #121212 !important;
  margin-bottom: 0.65rem;
  max-width: 18ch;
}

.ehd-ba__lede {
  color: rgba(26, 26, 26, 0.72);
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.ehd-ba__cta {
  margin-top: 0.5rem;
}

.ehd-ba__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: min(72vh, 640px);
  border-radius: 2px;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  background: #e8e2d8;
  box-shadow:
    0 0 0 1px rgba(154, 123, 79, 0.28),
    0 18px 40px rgba(18, 18, 18, 0.12);
}

.ehd-ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  display: block;
}

.ehd-ba__before-clip {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  z-index: 2;
  height: 100%;
  border-right: 1px solid rgba(250, 249, 247, 0.55);
}

.ehd-ba__img--before {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  max-width: none;
  width: 100%;
}

.ehd-ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.ehd-ba__handle-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(196, 165, 116, 0.2),
    #c4a574 18%,
    #faf9f7 50%,
    #c4a574 82%,
    rgba(196, 165, 116, 0.2)
  );
  box-shadow: 0 0 14px rgba(154, 123, 79, 0.35);
}

.ehd-ba__handle-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(250, 249, 247, 0.95);
  border: 1.5px solid #c4a574;
  box-shadow: 0 8px 20px rgba(18, 18, 18, 0.22);
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 5px;
}

.ehd-ba__handle-knob span {
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
}

.ehd-ba__handle-knob span:first-child {
  border-width: 5px 7px 5px 0;
  border-color: transparent #9a7b4f transparent transparent;
}

.ehd-ba__handle-knob span:last-child {
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent #9a7b4f;
}

.ehd-ba__tag {
  position: absolute;
  z-index: 5;
  top: 1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
  border: 1px solid rgba(196, 165, 116, 0.55);
  background: rgba(250, 249, 247, 0.88);
  color: #1a1a1a;
  backdrop-filter: blur(6px);
}

.ehd-ba__tag--before {
  left: 1rem;
}

.ehd-ba__tag--after {
  right: 1rem;
  border-color: rgba(26, 26, 26, 0.18);
}

.ehd-ba__range {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  z-index: 6;
  width: calc(100% - 2rem);
  margin: 0 1rem;
  opacity: 0;
  height: 44px;
  cursor: ew-resize;
}

.ehd-ba__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.35rem;
  margin-bottom: 1.75rem;
}

.ehd-ba__project {
  color: #121212 !important;
  font-size: 1.35rem;
  margin: 0 0 0.2rem;
}

.ehd-ba__product {
  color: #9a7b4f;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.ehd-ba__ig {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(154, 123, 79, 0.65);
  padding-bottom: 2px;
}

.ehd-ba__ig:hover {
  color: #9a7b4f;
}

.ehd-ba__thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.ehd-ba__thumb {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(26, 26, 26, 0.12);
  background: #fff;
  color: rgba(26, 26, 26, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ehd-ba__thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: brightness(0.96);
  transition: filter 0.25s ease;
}

.ehd-ba__thumb span {
  display: block;
  padding: 0 0.35rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.ehd-ba__thumb:hover,
.ehd-ba__thumb.is-active {
  border-color: #c4a574;
  color: #121212;
  transform: translateY(-2px);
}

.ehd-ba__thumb.is-active img,
.ehd-ba__thumb:hover img {
  filter: brightness(1);
}

@media (max-width: 991px) {
  .ehd-ba {
    padding: 4rem 0 3.5rem;
  }

  .ehd-ba__thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ehd-ba__stage {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
}

@media (max-width: 575px) {
  .ehd-ba__thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ehd-ba__title {
    max-width: none;
  }
}
