/* Empiria Partners · Team page (local draft)
   Photo-forward grid inspired by typography/spacing patterns on comparable
   boutique team pages, restated in Empiria type, navy and gold. No third-party
   assets or copy. */

/* ── Hero ── */
.news-hero {
  padding: 108px 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
@media (min-width: 768px) { .news-hero { padding: 140px 0 64px; } }
.news-hero .eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
}
.news-hero .eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--line-2);
}
.news-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: 0;
}
.news-hero h1 em { font-style: italic; color: var(--accent); }

/* ── Body layout: intro rail + grids ── */
.team-body { padding: 56px 0 120px; }
@media (min-width: 768px) { .team-body { padding: 72px 0 140px; } }
@media (min-width: 1100px) {
  .team-body .container { max-width: 1240px; }
}

.team-layout { display: block; }
.team-rail { margin: 0 0 48px; max-width: 36ch; }
.team-rail-kicker {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 14px;
}
.team-rail-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}
.team-main { min-width: 0; }

@media (min-width: 1100px) {
  .team-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0 56px;
    align-items: start;
  }
  .team-rail {
    position: sticky;
    top: 96px;
    margin: 0;
    max-width: none;
    padding-top: 6px;
  }
}

.team-block { margin-bottom: 72px; }
.team-block:last-of-type { margin-bottom: 0; }
.team-block .sec-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 28px;
}

/* ── Grid ── */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 14px;
}
@media (min-width: 620px) {
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .team-grid.partners,
  .team-grid.manager { grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
  .team-grid.associates { grid-template-columns: repeat(4, 1fr); gap: 48px 28px; }
}
/* When the rail is present, keep associates at 4 columns; manager card
   shares the 3-col track so its width matches a partner card. */
@media (min-width: 1100px) {
  .team-grid.partners,
  .team-grid.manager { gap: 48px 28px; }
  .team-grid.associates { gap: 48px 24px; }
}

/* ── Card: photo, name, role, then a deliberate "Profilo" control ──
   The bio opens ONLY on click / tap / keyboard (checkbox), never on hover or
   focus. Height is animated with grid-template-rows, so the card grows
   smoothly; cards in the same row keep their own height (align-items:start). */
.team-grid { align-items: start; }
.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "photo"
    "name"
    "role"
    "toggle"
    "reveal"
    "li";
  align-content: start;
  min-width: 0;
  position: relative;
}
.person-visual { display: contents; }
/* Hidden checkbox is painted over the label, never at the top of the card
   (that caused the page to jump up on close, when the input took focus). */
.person-toggle {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  z-index: 1;
}
.person-photo {
  grid-area: photo;
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 873;
  overflow: hidden;
  background: #0C1A2E;
  border-radius: 0;
  box-shadow: none;
}
.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: scale(1.06) translateX(0);
  transition: transform 0.55s cubic-bezier(0.29, 0.59, 0.23, 0.93);
}
@media (hover: hover) and (pointer: fine) {
  .person-photo:hover img { transform: scale(1.06) translateX(4px); }
}
.person-photo .initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 72px);
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
  user-select: none;
}
.person-name { grid-area: name; }
.person-role { grid-area: role; }
.person-li { grid-area: li; margin-top: 16px; }

/* Control row: "Profilo" + an ivory plus that turns into a cross */
.person-toggle-label {
  position: relative;
  overflow-anchor: auto;
  grid-area: toggle;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.person-toggle-label::after {
  content: '';
  flex: none;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1px 100% no-repeat;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.person-toggle-label:hover { color: var(--ink); border-top-color: var(--accent); }
.person:has(.person-toggle:checked) .person-toggle-label { color: var(--accent); border-top-color: var(--accent); }
.person:has(.person-toggle:checked) .person-toggle-label::after { transform: rotate(135deg); }
.person:has(.person-toggle:focus-visible) .person-toggle-label {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* Animated drawer */
.person-reveal {
  grid-area: reveal;
  overflow-anchor: none;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.3s ease,
    visibility 0s linear 0.55s;
}
.person-reveal-in { min-height: 0; overflow: hidden; overflow-anchor: none; }
.person-reveal-in > :first-child { margin-top: 16px; }
.person:has(.person-toggle:checked) .person-reveal {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition:
    grid-template-rows 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.45s ease 0.1s,
    visibility 0s;
}

.person-name {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 16px 0 2px;
}
.person-role {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 6px;
}
.person-office {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.person-bio {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
}
.person-bio li {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  padding-left: 12px;
  position: relative;
}
.person-bio li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* Other experience (native <details>, no JS) */
.person-more { margin: 0 0 4px; }
.person-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.person-more > summary::-webkit-details-marker { display: none; }
.person-more > summary::marker { content: ''; }
.person-more > summary::after {
  content: '';
  width: 11px;
  height: 11px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1px 100% no-repeat;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.person-more[open] > summary::after { transform: rotate(135deg); }
:root { interpolate-size: allow-keywords; }
.person-more::details-content {
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  transition: block-size 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.35s ease, content-visibility 0.45s allow-discrete;
}
.person-more[open]::details-content { block-size: auto; opacity: 1; }
.person-more > summary:hover { color: var(--accent); }
.person-more > summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; color: var(--accent); }
.person-more > .person-bio { margin: 8px 0 0; }
.person-more > .person-bio li { color: var(--muted); }

.person-li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
  width: fit-content;
}
.person-li:hover { color: var(--accent); }
.person-li svg { width: 13px; height: 13px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .person-photo img {
    transform: none;
    transition: none;
  }
  .person-reveal,
  .person-more::details-content,
  .person-more > summary::after,
  .person-toggle-label::after { transition: none; }
}

/* Nav CTA + mobile drawer (legal.css hides .nav-links under 800px) */
.nav-cta {
  display: inline-flex;
  align-items: center;
  margin-left: 24px;
  padding: 7px 13px;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; }
.nav-links .nav-cta { margin-left: 4px; }
.nav-links a.is-current { color: var(--ink); }
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  margin-right: -8px;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--ink-2);
  transition: 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.drawer {
  display: none;
  flex-direction: column;
  padding: 8px 0 24px;
  border-top: 1px solid var(--line);
}
.drawer.open { display: flex; }
.drawer a {
  padding: 16px 0;
  font-size: 18px;
  font-family: 'Instrument Serif', serif;
  border-bottom: 1px solid var(--line);
}
.drawer a:last-of-type { border-bottom: none; }
.drawer a.nav-cta {
  margin: 16px 0 0;
  width: fit-content;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.10em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--accent);
}
@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .drawer, .drawer.open { display: none !important; }
}
@media (min-width: 800px) and (max-width: 1180px) {
  .nav-links { gap: 16px; }
  .lang-switch { margin-left: 14px; }
  .nav-cta { margin-left: 10px; }
}

.team-close {
  margin-top: 88px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}
.team-close p {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 18em;
}
.team-close p em { font-style: italic; color: var(--accent); }
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 26px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid var(--accent);
  transition: background 0.2s, color 0.2s;
}
.btn-gold:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg); }

/* R7c · Phones: two cards per row. Names may wrap, roles and controls a touch
   smaller. Cards never move when a profile opens: the profile opens in a
   full-width panel placed right after the pair (team panel script). The open
   card and its panel share one lighter surface; the other card of the row dims.
   Row spacing is a card margin, not a grid gap, so an empty panel adds nothing
   (a grid gap around it caused a second 32px step when it was removed). */
@media (max-width: 619px) {
  .team-grid { row-gap: 0; margin-bottom: -32px; }
  .team-grid > .person { margin-bottom: 32px; z-index: 0; }
  .person-name { font-size: 18px; line-height: 1.15; margin: 12px 0 4px; overflow-wrap: anywhere; }
  .person-role { font-size: 10px; letter-spacing: 0.1em; line-height: 1.4; }
  .person-toggle-label { font-size: 10.5px; letter-spacing: 0.12em; margin-top: 10px; padding: 11px 0; }
  .person-toggle-label::after { width: 11px; height: 11px; }
  .person-links { margin-top: 12px; }
  .person-li { font-size: 10.5px; letter-spacing: 0.06em; }

  /* The panel script keeps the tapped card steady itself (Safari has no
     native scroll anchoring), so Chrome's anchoring must not add a second shift. */
  html:has(.team-grid) { overflow-anchor: none; }
  .person .person-reveal { display: none; }

  .team-grid > .person { transition: opacity 0.35s ease; }
  .team-grid > .person.is-dim { opacity: 0.38; }
  .team-grid > .person::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -7px; left: -7px; right: -7px; bottom: -32px;
    background: var(--bg-elev);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .team-grid > .person.is-open::before { opacity: 1; }

  .team-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    margin: 0 -7px;
    background: var(--bg-elev);
    overflow-anchor: none;
    transition: grid-template-rows 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .team-panel.is-open { grid-template-rows: 1fr; }
  .team-panel-in { min-height: 0; overflow: hidden; overflow-anchor: none; }
  .team-panel-body {
    padding: 4px 16px 22px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .team-panel.is-open .team-panel-body { opacity: 1; transition: opacity 0.4s ease 0.12s; }
  .team-panel-name {
    font-family: 'Instrument Serif', serif;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 12px;
  }
  .team-panel .person-bio { margin: 0; }
  .team-panel .person-bio li { font-size: 13.5px; }
}
@media (max-width: 619px) and (prefers-reduced-motion: reduce) {
  .team-panel, .team-panel-body, .team-panel.is-open .team-panel-body,
  .team-grid > .person, .team-grid > .person::before { transition: none; }
}
