/* Final mobile headline alignment after device-width visual review. */

@media (max-width: 767px) {
  body.ni-home .hero > .frame-1544 {
    align-items: flex-start !important;
  }

  body.ni-home .hero .frame-1544 > .h1 {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.ni-home .hero .h1.white {
    width: 100% !important;
    font-size: clamp(58px, 17.2vw, 72px) !important;
  }
}

/* Case-study carousel: calmer scale and explicit desktop navigation. */

body.ni-home .section-carousel {
  padding: clamp(112px, 11vw, 176px) 0 clamp(128px, 12vw, 196px) !important;
}

body.ni-home .section-carousel > .h2 {
  margin: 0 clamp(22px, 5.4vw, 88px) clamp(36px, 3.5vw, 56px) !important;
  font-size: clamp(68px, 8vw, 132px) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.06em !important;
}

body.ni-home .section-carousel > .h2::before {
  margin-bottom: clamp(22px, 2.2vw, 34px);
}

body.ni-home .ni-carousel-controls {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: clamp(26px, 3vw, 44px);
  padding: 0 clamp(22px, 5.4vw, 88px);
  color: rgba(243, 240, 233, 0.7);
  font: 500 10px/1 Neue Haas Grotesk, Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.ni-home .ni-carousel-guide,
body.ni-home .ni-carousel-buttons {
  display: flex;
  align-items: center;
}

body.ni-home .ni-carousel-guide {
  gap: clamp(18px, 2.2vw, 34px);
}

body.ni-home .ni-carousel-guide::before {
  content: "";
  width: clamp(44px, 5vw, 80px);
  height: 1px;
  background: rgba(243, 240, 233, 0.34);
  transform: scaleX(var(--ni-carousel-progress, 0));
  transform-origin: left center;
  transition: transform 320ms var(--ni-ease);
}

body.ni-home .ni-carousel-status {
  min-width: 4.5em;
  color: var(--ni-paper);
  font-variant-numeric: tabular-nums;
}

body.ni-home .ni-carousel-buttons {
  gap: 8px;
}

body.ni-home .ni-carousel-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(243, 240, 233, 0.42);
  border-radius: 50%;
  color: var(--ni-paper);
  background: transparent;
  font: 300 20px/1 Neue Haas Grotesk, Arial, sans-serif;
  cursor: pointer;
  transition:
    color 280ms ease,
    background-color 280ms ease,
    border-color 280ms ease,
    opacity 280ms ease;
}

body.ni-home .ni-carousel-button:hover:not(:disabled) {
  border-color: var(--ni-paper);
  color: var(--ni-ink);
  background: var(--ni-paper);
}

body.ni-home .ni-carousel-button:disabled {
  opacity: 0.28;
  cursor: default;
}

body.ni-home .carousel-list {
  grid-auto-columns: clamp(420px, 48vw, 760px) !important;
  gap: clamp(22px, 2.4vw, 38px) !important;
  cursor: grab;
  overscroll-behavior-inline: contain;
  touch-action: auto;
}

body.ni-home .carousel-list::before,
body.ni-home .carousel-list::after {
  content: none !important;
  display: none !important;
}

body.ni-home .carousel-list.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

body.ni-home .carousel-list.is-dragging a {
  cursor: grabbing;
}

body.ni-home .carousel-card-wrapper .project-card-headline {
  font-size: clamp(34px, 3.25vw, 54px) !important;
  line-height: 0.96 !important;
}

@media (max-width: 991px) {
  body.ni-home .section-carousel > .h2 {
    font-size: clamp(66px, 10vw, 98px) !important;
  }

  body.ni-home .carousel-list {
    grid-auto-columns: min(70vw, 650px) !important;
  }
}

@media (max-width: 767px) {
  body.ni-home .section-carousel {
    padding: 88px 0 112px !important;
  }

  body.ni-home .section-carousel > .h2 {
    margin: 0 18px 30px !important;
    font-size: clamp(58px, 17vw, 78px) !important;
  }

  body.ni-home .section-carousel > .h2::before {
    margin-bottom: 18px;
  }

  body.ni-home .ni-carousel-controls {
    margin-bottom: 24px;
    padding: 0 18px;
  }

  body.ni-home .ni-carousel-guide {
    gap: 14px;
  }

  body.ni-home .ni-carousel-buttons {
    display: none;
  }

  body.ni-home .carousel-list {
    grid-auto-columns: 84vw !important;
    touch-action: auto;
  }

  body.ni-home .carousel-card-wrapper .project-card-headline {
    font-size: 34px !important;
  }
}
