.chs-home-hero {
  box-sizing: border-box;
  width: 100%;
  font-family: var(--chs-font-body);
  color: var(--chs-black);
}

.chs-home-hero *,
.chs-home-hero *::before,
.chs-home-hero *::after {
  box-sizing: border-box;
}

.chs-home-hero__breakout {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-top: 0;
  margin-right: calc(50% - 50vw);
  margin-bottom: 3rem;
  margin-left: calc(50% - 50vw);
}

.chs-home-hero__viewport {
  /* Carousel geometry lives in CSS so the first paint (and SSR HTML) is
     already in its final position — no JS measurement, no snap-in.
     Bands mirror the getCarouselDimensions scale table. */
  --hero-center-w: 992px;
  --hero-center-half-w: 496px;
  --hero-center-h: 558px;
  --hero-side-w: 430px;
  --hero-side-h: 340px;
  --hero-side-top: 139px;
  --hero-gap: 745px;
  --hero-drag: 0px;
  position: relative;
  width: 100%;
  height: var(--hero-center-h);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.chs-home-hero__viewport.is-dragging {
  cursor: grabbing;
}

.chs-home-hero__slide {
  position: absolute;
  left: 50%;
  width: var(--hero-side-w);
  height: var(--hero-side-h);
  top: var(--hero-side-top);
  max-width: 90vw;
  overflow: hidden;
  z-index: 3;
  transform: translateX(calc(-50% + var(--hero-drag)));
  transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.chs-home-hero__viewport.is-dragging .chs-home-hero__slide {
  transition: none;
}

.chs-home-hero__slide[data-offset="0"] {
  width: var(--hero-center-w);
  height: var(--hero-center-h);
  top: 0;
  z-index: 10;
  transform: translateX(calc(-50% + var(--hero-drag)));
}

.chs-home-hero__slide[data-offset="1"] {
  z-index: 4;
  transform: translateX(calc(-50% + var(--hero-gap) + var(--hero-drag)));
}

.chs-home-hero__slide[data-offset="-1"] {
  z-index: 4;
  transform: translateX(calc(-50% - var(--hero-gap) + var(--hero-drag)));
}

.chs-home-hero__slide[data-offset="2"] {
  transform: translateX(calc(-50% + var(--hero-gap) + var(--hero-gap) + var(--hero-drag)));
}

.chs-home-hero__slide[data-offset="-2"] {
  transform: translateX(calc(-50% - var(--hero-gap) - var(--hero-gap) + var(--hero-drag)));
}

.chs-home-hero__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--chs-radius-large);
  /* Calm placeholder while the slide photo downloads */
  background-color: var(--chs-blue-lightest);
}

.chs-home-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--chs-radius-large);
  pointer-events: none;
}

.chs-home-hero__overlay {
  position: absolute;
  right: 4.75rem;
  bottom: 1.5rem;
  z-index: 2;
  box-sizing: border-box;
  width: min(32rem, calc(100% - 9.5rem));
  max-width: 32rem;
  padding: 1.5rem;
  border-radius: var(--chs-radius-large);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.chs-home-hero__overlay.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
}

.chs-home-hero__card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chs-home-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.chs-home-hero__tile-title {
  margin: 0;
  color: var(--chs-blue);
  font-family: var(--chs-font-heading);
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1.3;
}

.chs-home-hero__tile-body {
  margin: 0;
  color: var(--chs-black);
  font-size: 1rem;
  line-height: 1.5;
}

.chs-home-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: fit-content;
  margin: 0;
  padding: 0.375rem 1.5rem;
  border: 1px solid var(--chs-blue);
  border-radius: var(--chs-radius-pill);
  background-color: transparent;
  color: var(--chs-blue);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 300ms cubic-bezier(0.455, 0.03, 0.515, 0.955),
    color 300ms cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.chs-home-hero__button:hover,
.chs-home-hero__button:focus-visible {
  background-color: var(--chs-blue);
  color: var(--chs-white);
}

.chs-home-hero__button:focus-visible,
.chs-home-hero__arrow:focus-visible {
  outline: 2px solid var(--chs-blue);
  outline-offset: 2px;
}

.chs-home-hero__button-icon {
  display: flex;
  width: 1rem;
  height: 1rem;
}

.chs-home-hero__arrow {
  position: absolute;
  top: calc(50% - 1.5rem);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 100%;
  background-color: rgba(90, 136, 167, 0.75);
  color: var(--chs-white);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.chs-home-hero__arrow:hover {
  opacity: 0.85;
}

/* Anchored to the centered slide's edge, correct at first paint */
.chs-home-hero__arrow--prev {
  left: calc(50% - min(var(--hero-center-half-w), 45vw) + 1rem);
}

.chs-home-hero__arrow--next {
  left: calc(50% + min(var(--hero-center-half-w), 45vw) - 4rem);
}

.chs-home-hero__arrow-icon {
  display: flex;
  width: 1rem;
  height: 1rem;
}

.chs-home-hero__content {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.chs-home-hero__title {
  margin: 0 0 1rem;
  color: var(--chs-blue);
  font-family: var(--chs-font-heading);
  font-size: 4.5rem;
  font-weight: 300;
  line-height: 1.2;
}

.chs-home-hero__subcopy {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
}

@media (max-width: 991px) {
  .chs-home-hero__breakout {
    margin-bottom: 2.5rem;
  }

  .chs-home-hero__title {
    font-size: 3.25rem;
  }

  .chs-home-hero__tile-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 767px) {
  .chs-home-hero__breakout {
    margin-bottom: 2rem;
  }

  .chs-home-hero__title {
    font-size: 2.5rem;
  }

  .chs-home-hero__subcopy {
    font-size: 1rem;
  }

  .chs-home-hero__tile-title {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .chs-home-hero__tile-body {
    font-size: 0.875rem;
  }
}

@media (max-width: 495px) {
  .chs-home-hero__arrow {
    display: none;
  }

  .chs-home-hero__overlay {
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 479px) {
  .chs-home-hero__overlay {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: none;
    padding: 0.75rem;
  }
}

/* Geometry bands matching the getCarouselDimensions scale table */
@media (min-width: 768px) and (max-width: 991px) {
  .chs-home-hero__viewport {
    --hero-center-w: 843px;
    --hero-center-half-w: 422px;
    --hero-center-h: 474px;
    --hero-side-w: 366px;
    --hero-side-h: 289px;
    --hero-side-top: 118px;
    --hero-gap: 633px;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .chs-home-hero__viewport {
    --hero-center-w: 694px;
    --hero-center-half-w: 347px;
    --hero-center-h: 391px;
    --hero-side-w: 301px;
    --hero-side-h: 238px;
    --hero-side-top: 97px;
    --hero-gap: 294px;
  }
}

@media (max-width: 479px) {
  .chs-home-hero__viewport {
    --hero-center-w: 546px;
    --hero-center-half-w: 273px;
    --hero-center-h: 307px;
    --hero-side-w: 237px;
    --hero-side-h: 187px;
    --hero-side-top: 76px;
    --hero-gap: 231px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chs-home-hero__slide,
  .chs-home-hero__overlay {
    transition-duration: 0.01s;
  }
}

