/* ── Team page styles ───────────────────────────────────────── */

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

/* ── Page hero ───────────────────────────────────────────────── */
.team-hero {
  position: relative;
  padding: 110px 0 96px;
  background: var(--bg);
  overflow: hidden;
}

.team-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.5;
}

.team-hero__glow--1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(60, 106, 180, 0.65), transparent 70%);
  top: -140px;
  right: -60px;
}

.team-hero__glow--2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(119, 180, 255, 0.35), transparent 70%);
  bottom: -80px;
  left: 10%;
}

.team-hero__content {
  position: relative;
  max-width: 680px;
  z-index: 1;
}

/* ── Team grid ───────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 16px;
  align-items: start;
}

/* ── Team card ───────────────────────────────────────────────── */
.team-card {
  background: radial-gradient(
      circle at 10% 10%,
      rgba(92, 137, 214, 0.1),
      transparent 35%
    ),
    rgba(12, 17, 32, 0.9);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, opacity 260ms ease, filter 260ms ease;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(92, 137, 214, 0.35);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
}

.team-card__photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(18%);
  transition: filter 300ms ease, transform 300ms ease;
}

.team-card:hover .team-card__photo {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.team-card__body {
  display: flex;
}

.team-card__summary {
  flex: 1 1 auto;
  padding: 16px 20px 20px;
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
}

.team-card__name {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-card__role {
  /* extends .eyebrow-badge */
  align-self: start;
}

.team-card__bio {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.team-card__links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.team-card__social {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.team-card__social svg {
  width: 16px;
  height: 16px;
}

.team-card__social:hover,
.team-card__social:focus-visible {
  color: #93c5fd;
  background: rgba(92, 137, 214, 0.15);
  border-color: rgba(92, 137, 214, 0.4);
}

/* ── Expand button ───────────────────────────────────────────── */
.team-card__expand {
  margin-left: auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.team-card__expand::before {
  content: 'More';
}

.team-card__expand[aria-expanded="true"]::before {
  content: 'Less';
}

.team-card__expand:hover,
.team-card__expand:focus-visible {
  color: #93c5fd;
  background: rgba(92, 137, 214, 0.15);
  border-color: rgba(92, 137, 214, 0.4);
  outline: none;
}

.team-card__expand-icon {
  width: 14px;
  height: 14px;
  transition: transform 300ms ease;
  flex-shrink: 0;
}

.team-card__expand[aria-expanded="true"] .team-card__expand-icon {
  transform: rotate(180deg);
}

/* ── Expanded panel (slides in from the right) ───────────────── */
.team-card__expanded {
  flex: 0 0 0;
  width: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-left: 1px solid transparent;
  transition:
    flex-basis 400ms cubic-bezier(.4, 0, .2, 1),
    width      400ms cubic-bezier(.4, 0, .2, 1),
    max-height 400ms cubic-bezier(.4, 0, .2, 1),
    opacity    300ms ease 80ms,
    border-color 400ms ease;
}

.team-card.is-expanded .team-card__expanded {
  flex: 0 0 320px;
  width: 320px;
  max-height: 600px;
  opacity: 1;
  border-left-color: var(--border);
}

.team-card.is-expanded {
  border-color: rgba(92, 137, 214, 0.45);
  box-shadow: 0 0 0 1px rgba(92, 137, 214, 0.12),
              0 24px 64px rgba(0, 0, 0, 0.55);
}

.team-card.is-expanded .team-card__photo-wrap {
  aspect-ratio: 16 / 7;
  transition: aspect-ratio 400ms ease;
}

.team-card__photo-wrap {
  transition: aspect-ratio 400ms ease;
}

/* Span 2 grid columns to make room for the side panel */
@media (min-width: 680px) {
  .team-card.is-expanded {
    grid-column: span 2;
  }
}

/* Dim and blur siblings while a card is expanded */
.team-grid.has-expanded .team-card:not(.is-expanded) {
  opacity: 0.35;
  filter: blur(1px);
  transform: scale(0.97) translateY(0);
}

.team-card__expanded-inner {
  width: 320px;
  min-width: 320px;
  padding: 16px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

/* ── Informal expanded content ───────────────────────────────── */
.team-card__quote {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #e2e8f0;
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid rgba(92, 137, 214, 0.7);
}

.team-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-card__tag {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(92, 137, 214, 0.15);
  border: 1px solid rgba(92, 137, 214, 0.3);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #93c5fd;
}

.team-card__casual {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.team-card__casual-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.75);
  margin-bottom: 3px;
}

/* ── Values grid ─────────────────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.value-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 10px;
  transition: border-color 180ms ease, background 180ms ease;
}

.value-card:hover {
  border-color: rgba(92, 137, 214, 0.3);
  background: rgba(92, 137, 214, 0.05);
}

.value-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
}

.value-card__icon svg {
  width: 100%;
  height: 100%;
}

.value-card__title {
  margin: 0;
  font-size: 14px;
  color: #ffffff;
}

.value-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ── CTA strip ───────────────────────────────────────────────── */
.team-cta {
  background: linear-gradient(
    140deg,
    rgba(60, 106, 180, 0.12) 0%,
    transparent 60%
  );
  border-top: 1px solid var(--border);
}

.team-cta__inner {
  text-align: center;
  display: grid;
  place-items: center;
  gap: 16px;
}

.team-cta__inner h2 {
  margin: 0;
}

.team-cta__inner .section__summary {
  max-width: 460px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .team-hero {
    padding: 80px 0 64px;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  /* On mobile the panel drops downward instead of sideways */
  .team-card__body {
    flex-direction: column;
  }

  .team-card__expanded {
    flex: none !important;
    width: 100% !important;
    max-height: 0;
    opacity: 1;
    border-left: none;
    border-top: 1px solid transparent;
    transition:
      max-height 420ms cubic-bezier(.4, 0, .2, 1),
      border-color 420ms ease;
  }

  .team-card.is-expanded .team-card__expanded {
    max-height: 600px;
    border-top-color: var(--border);
  }
}
