/* The header monogram is reused unchanged in the portrait label and ribbon. */
.brand-monogram {
  display: block;
  flex: none;
  width: 26px;
  height: auto;
  overflow: visible;
}

.studio .portrait-label {
  align-items: center;
  gap: 13px;
  line-height: 1.65;
}

.studio .portrait-label > div {
  min-width: 0;
  text-wrap: balance;
}

.studio .portrait-monogram {
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  color: var(--accent, #a17c5b);
}

.studio .portrait-monogram .brand-monogram {
  width: 28px;
}

/* Equal groups make -50% exactly one cycle, including the boundary spacing. */
.expertise-strip {
  --expertise-gap: clamp(26px, 3.2vw, 58px);
  display: block;
  min-height: 0;
  padding: 25px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}

.expertise-strip:focus-visible {
  outline: 2px solid var(--accent, #a17c5b);
  outline-offset: -3px;
}

.expertise-strip .expertise-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: expertise-v8-drift 35.2s linear infinite;
  will-change: transform;
}

.expertise-strip .expertise-group,
.expertise-strip .expertise-group[aria-hidden="true"] {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-around;
  width: max-content;
  min-width: 100vw;
  gap: var(--expertise-gap);
  padding: 0 calc(var(--expertise-gap) / 2);
  box-sizing: border-box;
}

.expertise-strip .expertise-group > span {
  flex: none;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .025em;
}

.expertise-strip .expertise-group > i,
.expertise-strip .expertise-group > i:last-child {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--accent, #a17c5b);
}

.expertise-strip .brand-monogram {
  width: 25px;
}

/* Reset V7's sticky hover/active pause on touch; only keyboard focus pauses. */
@media (prefers-reduced-motion: no-preference) {
  .expertise-strip .expertise-track,
  .expertise-strip:hover .expertise-track,
  .expertise-strip:active .expertise-track {
    animation-play-state: running;
  }

  .expertise-strip:focus-visible .expertise-track {
    animation-play-state: paused;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .expertise-strip:hover .expertise-track {
    animation-play-state: paused;
  }
}

@keyframes expertise-v8-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 760px) {
  .expertise-strip {
    --expertise-gap: 25px;
    padding: 20px 0;
    mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  }

  .expertise-strip .expertise-track {
    animation-duration: 28.8s;
  }

  .expertise-strip .expertise-group > span {
    font-size: 11px;
    letter-spacing: .015em;
  }

  .expertise-strip .brand-monogram {
    width: 23px;
  }

  .studio .portrait-label {
    gap: 11px;
  }

  .studio .portrait-monogram {
    flex-basis: 25px;
  }

  .studio .portrait-monogram .brand-monogram {
    width: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expertise-strip {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .expertise-strip .expertise-track {
    width: 100%;
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }

  .expertise-strip .expertise-group {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    min-width: 0;
    gap: 16px 22px;
    padding: 0 24px;
  }

  .expertise-strip .expertise-group[aria-hidden="true"] {
    display: none !important;
  }
}
