/* Meet Our Team. Uses the site design tokens from site.css. */

.team-wrap { padding: 3.5rem 0 4.5rem; }

/* Soft decorative blobs behind the page, echoing the mockup background. */
body.page-team {
  background:
    radial-gradient(420px 320px at -60px 320px, rgba(142, 168, 108, 0.18), transparent 70%),
    radial-gradient(420px 320px at calc(100% + 80px) 240px, rgba(142, 168, 108, 0.14), transparent 70%),
    linear-gradient(180deg, #f7faf7 0%, var(--bg) 100%);
}

.team-intro { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.team-empty { text-align: center; color: var(--muted); }

.team-eyebrow {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .4rem 1.1rem;
  border-radius: 999px;
}

.team-headline { margin: 1rem 0 0; }
.team-hl { color: var(--primary); }

.team-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin: 1.1rem 0 1.2rem;
}
.team-divider-line {
  width: 64px;
  height: 1px;
  background: var(--gold);
}
.team-divider img { width: 88px; height: auto; }

/* Three across on desktop, dropping to two then one. The client asked for the
   portraits to lead the card, so the image is the widest element rather than a
   small avatar above the text. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  /* No top/side padding: the photo runs edge to edge. */
  padding: 0 0 1.4rem;
  overflow: hidden;
  text-align: center;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.team-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

/* Portrait fills the card width at a fixed 4:5 ratio. Uploaded photos vary
   from landscape to square, so object-fit: cover crops rather than distorts,
   and object-position favours the top of the frame where faces sit. */
.team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0 0 1.15rem;
  background: var(--primary-soft);
  overflow: hidden;
}
.team-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform .35s ease;
}
.team-card:hover .team-avatar img { transform: scale(1.04); }
.team-initials {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  font-family: "Merriweather", serif;
}

/* Badge sits on the photo's lower-right corner, clear of the face. */
.team-photo-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.team-photo-badge svg { width: 19px; height: 19px; }

.team-name,
.team-role,
.team-bio { padding-left: 1.4rem; padding-right: 1.4rem; }

.team-name {
  font-size: 1.35rem;
  margin: 0 0 .3rem;
  color: var(--primary-strong);
}

.team-role {
  color: var(--gold);
  font-weight: 600;
  font-size: .95rem;
  margin: 0 0 .8rem;
}

.team-bio {
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.7;
  margin: 0 auto 1.2rem;
  max-width: none;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Pinned to the card bottom so every card's icon row lines up. */
.team-social {
  margin-top: auto;
  display: flex;
  /* Centred explicitly. The card used to get this from align-items: center,
     which had to go when the photo started spanning the full card width --
     that rule would have shrunk the image to its content width. */
  justify-content: center;
  gap: .75rem;
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}
.team-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--primary);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.team-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.team-social svg { width: 18px; height: 18px; }

/* Two across on tablets. */
@media (max-width: 1000px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 600px) {
  .team-wrap { padding: 2.5rem 0 3.5rem; }
  .team-intro { margin-bottom: 2rem; }
  /* One per row, and the photo gets a shallower crop so a single card does not
     take most of the screen height on a phone. */
  .team-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .team-card { padding: 0 0 1.3rem; }
  .team-photo { aspect-ratio: 3 / 2; margin-bottom: 1rem; }
  .team-name,
  .team-role,
  .team-bio,
  .team-social { padding-left: 1.1rem; padding-right: 1.1rem; }
  .team-photo-badge { width: 38px; height: 38px; right: 10px; bottom: 10px; }
  .team-photo-badge svg { width: 16px; height: 16px; }
  .team-social a { width: 38px; height: 38px; }
}
