/* MARK: Homepage hero v2 (takeover carousel) */

.home-v2-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--calabash-section-gap);
  background: var(--calabash-light-grey);
}

.home-v2-hero__sr-title {
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.home-v2-hero__viewport {
  height: 650px;
  height: clamp(440px, calc(100svh - 101px), 650px);
  overflow: hidden;
}

.home-v2-hero__track {
  display: flex;
  height: 100%;
  transition: transform 900ms ease;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .home-v2-hero__track {
    transition: none;
  }
}

.home-v2-hero__slide {
  position: relative;
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  height: 100%;
}

/* MARK: Triptych slide: Service / Mats / Pest */

.home-v2-hero__slide--triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-v2-hero__panel {
  position: relative;
  display: block;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.home-v2-hero__slide--triptych .home-v2-hero__panel:last-child {
  border-right: none;
}

.home-v2-hero__panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--calabash-transition);
}

.home-v2-hero__panel:hover img,
.home-v2-hero__panel:focus-visible img {
  transform: scale(1.05);
}

.home-v2-hero__panel::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 20, 20, 0.75), rgba(4, 20, 20, 0) 58%);
  content: "";
}

.home-v2-hero__panel:focus-visible {
  outline: 3px solid var(--calabash-company-orange-a11y);
  outline-offset: -3px;
}

.home-v2-hero__panel-overlay {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 34px;
  left: 20px;
  color: var(--calabash-white);
}

.home-v2-hero__panel-title {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-v2-hero__panel-description {
  display: block;
  font-size: 0.88rem;
  line-height: 1.4;
}

/* MARK: Shop slide */

.home-v2-hero__slide--shop {
  background-color: var(--calabash-border);
}

.home-v2-hero__shop-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-v2-hero__slide--shop::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 20, 20, 0.78), rgba(4, 20, 20, 0.32) 50%, rgba(4, 20, 20, 0) 78%);
  content: "";
}

.home-v2-hero__shop-content {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(560px, calc(100% - 80px));
  height: 100%;
  padding: 0 60px;
  color: var(--calabash-white);
}

.home-v2-hero__shop-content .home-v2-eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.home-v2-hero__shop-content h2 {
  margin: 0;
  color: var(--calabash-white);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.home-v2-hero__shop-description {
  max-width: 460px;
  margin: 16px 0 24px;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.45;
}

.home-v2-hero__shop-content .calabash-ora-outline-button {
  align-self: flex-start;
  min-width: 220px;
}

@media (max-width: 1100px) {
  .home-v2-hero__viewport {
    height: 480px;
    height: clamp(420px, calc(100svh - 97px), 480px);
  }

  .home-v2-hero__shop-content {
    padding: 0 40px;
  }
}

@media (max-width: 820px) {
  .home-v2-hero__viewport {
    height: 420px;
  }

  .home-v2-hero__panel-description {
    display: none;
  }

  .home-v2-hero__shop-content {
    width: calc(100% - 60px);
    padding: 0 30px;
  }

  .home-v2-hero__shop-description {
    margin-bottom: 18px;
  }

  .home-v2-hero__shop-content .calabash-ora-outline-button {
    min-width: 0;
  }
}

/* MARK: Phones: the three panels stack into wide bands */
@media (max-width: 590px) {
  .home-v2-hero__viewport {
    height: auto;
  }

  .home-v2-hero__slide--triptych {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
    grid-auto-rows: clamp(140px, calc((100svh - 235px) / 3), 260px);
  }

  .home-v2-hero__panel {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .home-v2-hero__slide--triptych .home-v2-hero__panel:last-child {
    border-bottom: none;
  }

  .home-v2-hero__panel img {
    object-position: var(--hero-panel-mobile-position, 50% 50%);
  }

  .home-v2-hero__panel::after {
    background: linear-gradient(to top, rgba(4, 20, 20, 0.82), rgba(4, 20, 20, 0) 80%);
  }

  .home-v2-hero__panel-overlay {
    right: 20px;
    bottom: 18px;
    left: 20px;
  }

  .home-v2-hero__panel-description {
    display: block;
  }

  .home-v2-hero__shop-content {
    padding: 0 20px;
  }

  .home-v2-hero__shop-content h2 {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }

  .home-v2-hero__shop-description {
    font-size: 0.92rem;
  }
}
