/* ============================================================================
 * ZIVOX — Our Team (overview + profile page)
 *
 * Only loaded by /team/ and /team/<slug>/. Content is fetched from the site's
 * own /api/team endpoints, so these rules describe card layout and image
 * handling rather than any data. Photos use object-fit:contain so a portrait
 * is never cropped, matching the Founder & CEO photo treatment.
 * ==========================================================================*/

.team-group { margin-top: 44px; }
.team-group:first-of-type { margin-top: 0; }

.team-group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.team-group-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.team-group-head span { font-size: 12.5px; color: var(--faint); }

.team-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.team-card:hover { transform: translateY(calc(-3px * var(--depth))); box-shadow: var(--sh-3); }
.team-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.team-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Neutral placeholder: initials, so a missing photo never shows a broken image */
.team-initials {
  font-family: var(--font-display, inherit);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--faint);
  user-select: none;
}

.team-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.team-name { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.team-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.team-roles .badge { height: 22px; font-size: 11px; }
.team-short { margin: 2px 0 0; font-size: 13.2px; line-height: 1.6; color: var(--muted); }
.team-more {
  margin-top: auto;
  padding-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.team-more svg { width: 15px; height: 15px; }

/* Skeleton shown while the directory loads */
.team-skel { pointer-events: none; }
.team-skel .sk {
  background: linear-gradient(90deg, var(--line-2) 25%, var(--bg-2) 37%, var(--line-2) 63%);
  background-size: 400% 100%;
  animation: teamShimmer 1.4s ease infinite;
  border-radius: 8px;
}
.team-skel .sk-photo { aspect-ratio: 4 / 5; border-radius: 0; }
.team-skel .sk-line { height: 12px; margin-bottom: 10px; }
.team-skel .sk-line.short { width: 55%; }
@keyframes teamShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .team-skel .sk { animation: none; } }

/* Empty / error state */
.team-empty {
  padding: 34px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.team-empty strong { display: block; margin-bottom: 6px; color: var(--ink-2); }

/* ------------------------------------------------------------ profile page */

.team-profile { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .team-profile { grid-template-columns: 320px 1fr; gap: 40px; align-items: start; } }

.team-profile-photo {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--sh-2);
}
.team-profile-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 620px);
  object-fit: contain;
  border-radius: 14px;
}

.team-profile h1 { margin: 0 0 10px; }
.team-profile-roles { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }

.team-block { margin-top: 26px; }
.team-block h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}
.team-block p { margin: 0 0 12px; font-size: 14.6px; line-height: 1.72; color: var(--ink-2); }
.team-block ul { margin: 0; padding-left: 18px; }
.team-block li { margin-bottom: 7px; font-size: 14.4px; line-height: 1.65; color: var(--ink-2); }

.team-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-ink);
  text-decoration: none;
}
.team-back svg { width: 16px; height: 16px; }
.team-back:hover { text-decoration: underline; }

/* Grievance Officer inline notice on the profile + grievance pages */
.team-officer-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--info-bg);
  border: 1px solid rgba(29, 111, 242, .18);
  font-size: 13.4px;
  line-height: 1.6;
  color: var(--ink-2);
}
.team-officer-note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--brand); }
