/* ============================================================
   Cross-linking metadata UI
   ============================================================ */

/* --- Relations block (bio pages) --- */
/* When inside a bio page, integrate visually with bio-layout: same container
   width, smaller top padding, separator on top, no double margin under footer */
.section--relations {
  padding: 0 0 80px 0;
}
body[data-page-type="person"] .section--relations {
  padding: 0 0 60px 0;
  margin-top: -20px;  /* close gap with bio-layout */
}
body[data-page-type="person"] .section--relations .section__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
body[data-page-type="person"] .section--relations .section__header {
  margin-bottom: 24px;
}
body[data-page-type="person"] .section--relations .section__title {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 8px;
}
.rel-block {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 32px;
}
.rel-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rel-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.rel-row__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}
.rel-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rel-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: all 0.18s ease;
  background: rgba(255, 255, 255, 0.02);
}
.rel-chip:hover {
  border-color: #ff6633;
  color: #ff6633;
  background: rgba(255, 102, 51, 0.06);
}
.rel-insights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rel-insight a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.5;
  transition: color 0.18s ease;
  display: inline-block;
  padding: 4px 0;
}
.rel-insight a::before {
  content: "→ ";
  color: #ff6633;
  margin-right: 4px;
}
.rel-insight a:hover {
  color: #ff6633;
}

/* --- Linked case cards (practice pages with real deals) --- */
.case-card--linked {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.case-card--linked:hover {
  transform: translateY(-2px);
}
.case-card--linked:hover .case-card__title {
  color: #ff6633;
}

/* --- Anchor scroll offset for sticky header --- */
section[id], article[id], h3[id] {
  scroll-margin-top: var(--header-height, 80px);
}

/* ============================================
   People-hero v2 — Title left + values band
   ============================================ */
.people-hero--v2 {
  min-height: auto !important;
  padding: calc(var(--header-height) + 5rem) 2.5rem 5rem !important;
}

.people-hero__head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4.5rem;
}

.people-hero__head-left {
  /* Title sits left */
}

.people-hero--v2 .people-hero__title {
  font-size: clamp(2.4rem, 6.5vw, 5.5rem);
  margin-bottom: 0;
}

.people-hero--v2 .people-hero__lead {
  margin: 0;
  padding-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 460px;
  margin-left: auto;
}

/* Values band — full width row of 3 */
.people-hero__values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255, 102, 51, 0.35);
}

.people-hero__value {
  position: relative;
  padding: 2.25rem 2rem 2rem 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.people-hero__value:last-child {
  border-right: none;
}

.people-hero__value:not(:first-child) {
  padding-left: 2rem;
}

.people-hero__value-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: 0.85rem;
}

.people-hero__value-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 0.6rem 0;
  line-height: 1.1;
}

.people-hero__value-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 900px) {
  .people-hero__head {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .people-hero--v2 .people-hero__lead {
    margin-left: 0;
  }
  .people-hero__values {
    grid-template-columns: 1fr;
  }
  .people-hero__value {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem 0;
  }
  .people-hero__value:not(:first-child) {
    padding-left: 0;
  }
  .people-hero__value:last-child {
    border-bottom: none;
  }
}

/* ============================================
   People filter bar
   ============================================ */
.people-filter {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem;
  padding: 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.people-filter__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}

.people-filter__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.people-filter__tab {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.people-filter__tab:hover {
  border-color: rgba(255, 102, 51, 0.5);
  color: #fff;
}

.people-filter__tab.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #1a1a1a;
  font-weight: 600;
}

.people-filter__select {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.55rem 2.25rem 0.55rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.6) 50%), linear-gradient(135deg, rgba(255,255,255,0.6) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.people-filter__select option {
  background: #1a1a1a;
  color: #fff;
}

@media (max-width: 700px) {
  .people-filter {
    padding: 0 1.25rem;
    gap: 0.75rem;
  }
}

/* Filtered cards: hide ones not matching mercato filter */
.person-card.is-hidden {
  display: none !important;
}

/* People-hero v2 — solid dark, no image background */
.people-hero--v2 {
  background: #000 !important;
}
.people-hero--v2::before {
  background: linear-gradient(180deg, rgba(255,102,51,0.05) 0%, transparent 60%) !important;
}

/* ============================================
   Practice/UHNWI team-card portrait — photo enhancement
   ============================================ */
.practice-team-card__portrait[style*="background-image"] {
  filter: grayscale(1);
  transition: filter 0.4s ease;
}
.practice-team-card:hover .practice-team-card__portrait[style*="background-image"] {
  filter: grayscale(0);
}
.practice-team-card__portrait[style*="background-image"]::after {
  /* Override the existing orange gradient overlay so the photo is clearly visible */
  background: linear-gradient(135deg, rgba(255,102,51,0.06) 0%, rgba(255,255,255,0.02) 100%);
  pointer-events: none;
}
