/* Our Employees, from the Figma Continuum frame (Testimonials / our employees): quote tiles with an avatar, name and
   role. Figma shows three; the page has five, so the tiles sit in a swipeable row with three visible on desktop and
   dots underneath. The rail nodes stay on the row's outer corners rather than scrolling with the tiles. */

.lp-team__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 4rem 0 0;
}

.lp-team__header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1rem;
}

.lp-team__heading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lp-team__title {
  font-size: 1.875rem;
  line-height: 2.375rem;
  font-weight: 400;
  color: var(--lp-ui-text-primary);
}

/* The row sits on the section divider, which closes it; a bottom border here would leave an empty band below. The tiles'
   background would hide the section rails, so the row draws its own left and right edges on them. */
.lp-team__rail {
  position: relative;
  border-top: 1px solid var(--lp-ui-border-primary);
  border-right: 1px solid var(--lp-ui-border-primary);
  border-left: 1px solid var(--lp-ui-border-primary);
}

.lp-team__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lp-team__track::-webkit-scrollbar {
  display: none;
}

.lp-team__card {
  display: flex;
  flex: 0 0 85%;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-height: 18.75rem;
  padding: 2rem 1rem;
  border: none;
  background: var(--lp-ui-bg-primary);
  font: inherit;
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.lp-team__card + .lp-team__card {
  border-left: 1px solid var(--lp-ui-border-primary);
}

.lp-team__card:hover {
  background: var(--lp-ui-bg-secondary);
}

.lp-team__card:focus-visible,
.lp-story-modal__close:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--ring) 50%, transparent);
  outline-offset: -3px;
}

.lp-team__quote {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--lp-ui-text-primary);
}

.lp-team__author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lp-team__avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.75px rgba(0, 0, 0, 0.08);
  background: var(--lp-ui-bg-quaternary);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lp-ui-text-tertiary);
}

.lp-team__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-team__person {
  display: flex;
  flex-direction: column;
}

.lp-team__name {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--lp-ui-text-primary);
}

.lp-team__role {
  font-size: 0.75rem;
  line-height: 1.125rem;
  color: var(--lp-ui-text-quaternary);
}

/* Story modal, opened from a tile or from Why Us */

.lp-story-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(12, 17, 29, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lp-story-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 27.5rem;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--radius-ui-2xl);
  background: var(--lp-ui-bg-primary);
  box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
  animation: lp-story-modal-in 300ms ease-out both;
}

@keyframes lp-story-modal-in {
  from { opacity: 0; transform: scale(0.95); }
}

.lp-story-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--lp-ui-text-tertiary);
  cursor: pointer;
}

.lp-story-modal__close:hover {
  color: var(--lp-ui-text-primary);
}

.lp-story-modal__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lp-story-modal__photos {
  position: relative;
  flex: none;
  height: 23.75rem;
  overflow: hidden;
  background: var(--lp-ui-bg-secondary);
}

.lp-story-modal__dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.lp-story-modal__dot {
  width: 0.625rem;
  height: 0.625rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.lp-story-modal__dot.is-active {
  background: #FFFFFF;
}

.lp-story-modal__info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
}

.lp-story-modal__name {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  color: var(--lp-ui-text-primary);
}

.lp-story-modal__quote {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--lp-ui-text-secondary);
}

.lp-story-modal__quote .is-bold {
  font-weight: 600;
  color: var(--lp-ui-text-primary);
}

.lp-story-modal__sign {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--lp-ui-text-quaternary);
}

@media (min-width: 48rem) {
  .lp-team__inner { padding: 6rem 0 0; }
  .lp-team__header { flex-direction: row; align-items: flex-end; justify-content: space-between; padding: 0 1.5rem; }
  .lp-team__title { font-size: 2.25rem; line-height: 2.75rem; letter-spacing: -0.02em; }
  .lp-team__card { flex-basis: 50%; padding: 2rem 1.5rem; }

  .lp-story-modal__dialog {
    flex-direction: row;
    max-width: 56.25rem;
    height: 85vh;
    max-height: 37.5rem;
    overflow: hidden;
  }

  .lp-story-modal__photos { flex: 0 0 50%; height: auto; }
  .lp-story-modal__info { flex: 0 0 50%; justify-content: center; padding: 2.5rem; overflow-y: auto; }
}

@media (min-width: 64rem) {
  .lp-team__card { flex-basis: calc(100% / 3); }
}
