/* Team directory and bio window (cards built by assets/team.js).
   Shared by about.html#team and bryantclaypartners.html#leadership. */
/* ===== Team directory (cards built by assets/team.js) =====
   Modeled on berkeleycap.com/about: a row of text filters, then one even
   grid of square-cornered headshots with name and title below. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.td { max-width: 1280px; margin: 0 auto 96px; padding: 0 40px; }
.td-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 58px 28px; align-items: start; }
.td-card { display: block; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.td-card[hidden] { display: none; }
/* Square crops from scripts/team-crops.py: every head the same size and height */
.td-photo { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #FAF8F2; }
.td-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; filter: grayscale(100%); transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
/* Black and white until you hover (or tab to) a card, then full color */
.td-card:hover .td-photo img, .td-card:focus-visible .td-photo img { transform: scale(1.04); filter: grayscale(0%); }
.td-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.td-name { display: block; margin-top: 18px; font-family: var(--font-serif); font-size: 21px; font-weight: 400; line-height: 1.25; color: var(--dark-green); }
.td-title { display: block; margin-top: 8px; font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.td-org { display: block; margin-top: 5px; font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dark-green); }
.td-bio-org { display: block; margin-top: 6px; color: var(--dark-green); }
.td-grid.td-fade .td-card:not([hidden]) { animation: tdIn .45s ease both; }
@keyframes tdIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .td-grid.td-fade .td-card { animation: none; } .td-photo img { transition: none; } }
@media (max-width: 1100px) { .td-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .td { padding: 0 16px; margin-bottom: 64px; }
  .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; }
  .td-name { font-size: 18px; margin-top: 12px; }
  .td-title { font-size: 10px; letter-spacing: 0.12em; margin-top: 6px; }
  .td-org { font-size: 10px; letter-spacing: 0.12em; margin-top: 4px; }
}

/* Bio window */
.td-bio { margin: auto; inset: 0; width: min(780px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 0; background: #fff; color: var(--text-dark); overflow: hidden; }
.td-bio[open] { display: flex; flex-direction: column; animation: tdBioIn .35s cubic-bezier(.22,1,.36,1); }
.td-bio::backdrop { background: rgba(12, 53, 25, 0.62); }
@keyframes tdBioIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.td-bio-body { overflow-y: auto; padding: 44px 48px 40px; }
.td-bio-close { position: absolute; top: 10px; right: 14px; z-index: 1; background: none; border: 0; font-size: 30px; line-height: 1; padding: 6px; color: var(--text-dark); cursor: pointer; }
.td-bio-close:hover { color: var(--gold); }
.td-bio-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid rgba(0,0,0,0.08); margin-bottom: 26px; }
.td-bio-photo-box { width: 220px; aspect-ratio: 1 / 1; overflow: hidden; background: #FAF8F2; }
.td-bio-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-bio-name { font-family: var(--font-serif); font-size: 32px; font-weight: 400; line-height: 1.15; color: var(--dark-green); margin: 0; }
.td-bio-title { margin: 10px 0 18px; font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.td-bio-contact a { display: block; overflow-wrap: anywhere; font-size: 15px; color: var(--text-dark); margin-bottom: 4px; transition: color .2s; }
.td-bio-contact a:hover { color: var(--gold); }
.td-bio-text p { font-size: 15px; line-height: 1.75; color: var(--text-dark); margin: 0 0 14px; }
body.td-bio-open { overflow: hidden; }
@media (max-width: 640px) {
  .td-bio-body { padding: 40px 22px 28px; }
  .td-bio-head { grid-template-columns: 104px 1fr; gap: 16px; padding-bottom: 22px; margin-bottom: 20px; }
  .td-bio-photo-box { width: 104px; }
  .td-bio-name { font-size: 24px; }
  .td-bio-title { font-size: 10.5px; margin: 6px 0 10px; }
  /* phone: name and title beside the photo, email and phone full width below */
  .td-bio-head { align-items: end; row-gap: 0; }
  .td-bio-id { display: contents; }
  .td-bio-photo-box { grid-row: 1 / span 2; }
  .td-bio-name { grid-column: 2; align-self: end; }
  .td-bio-title { grid-column: 2; align-self: start; margin-bottom: 0; }
  .td-bio-contact { grid-column: 1 / -1; margin-top: 16px; }
  .td-bio-contact a { font-size: 14px; }
}
