/* About page "Meet Our Team" (frontend/partials/team.blade.php).
   Portrait cards in the site's leaf shape, centred so one or two members
   still look intentional. Uses the site's CSS variables. */

.team-section {
  position: relative;
  overflow: clip;
}

.team-glow {
  position: absolute;
  z-index: -1;
  top: 20%;
  left: 50%;
  width: 560px;
  height: 560px;
  margin-left: -280px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  filter: blur(110px);
  pointer-events: none;
}

.team-header {
  max-width: 680px;
  margin: 0 auto 50px;
  text-align: center;
}

.team-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  margin-bottom: 18px;
  border: 1px dashed color-mix(in srgb, var(--accent-color), transparent 45%);
  border-radius: 30px;
  color: var(--heading-color);
  font-size: 0.9rem;
  font-weight: 600;
}

.team-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--heading-color);
  color: #fff;
  font-size: 13px;
}

.team-title {
  margin-bottom: 12px;
  font-size: calc(2.5rem * var(--type-display-scale, 1));
  font-weight: 800;
  letter-spacing: -0.02em;
}

.team-title .accent-highlight {
  color: var(--accent-color);
}

.team-subtitle {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  font-size: 1.02rem;
}

/* ---------- Grid ---------- */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.team-grid > * {
  flex: 0 1 290px;
}

/* ---------- Member card ---------- */
.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 400px;
  overflow: hidden;
  border-radius: 56px 14px 56px 14px;
  background: var(--heading-color);
  color: #fff;
  box-shadow: 0 20px 44px color-mix(in srgb, var(--heading-color), transparent 82%);
  isolation: isolate;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 56px color-mix(in srgb, var(--accent-color), transparent 74%);
}

.team-card-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.team-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-card:hover .team-card-photo {
  transform: scale(1.08);
}

.team-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(150deg, color-mix(in srgb, var(--heading-color), var(--accent-color) 40%), var(--heading-color));
  color: rgb(255 255 255 / 0.2);
  font-family: var(--heading-font);
  font-size: calc(9rem * var(--type-display-scale, 1));
  font-weight: 800;
}

.team-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--heading-color), transparent 4%) 0%, color-mix(in srgb, var(--heading-color), transparent 40%) 38%, transparent 68%);
}

.team-card-body {
  position: relative;
  padding: 26px 26px 30px;
}

.team-card-role {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 30px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.team-card-name {
  margin: 0;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
}

/* Bio slides up on hover; always shown on touch screens. */
.team-card-bio {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  color: rgb(255 255 255 / 0.85);
  font-size: 0.9rem;
  line-height: 1.6;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.team-card:hover .team-card-bio {
  max-height: 160px;
  margin-top: 10px;
  opacity: 1;
}

.team-card-bar {
  position: absolute;
  left: 26px;
  bottom: 16px;
  width: 36px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent-color);
  transition: width 0.45s ease;
}

.team-card:hover .team-card-bar {
  width: calc(100% - 52px);
}

@media (hover: none) {
  .team-card-bio {
    max-height: none;
    margin-top: 10px;
    opacity: 1;
  }
}

/* ---------- "Work with our team" card ---------- */
.team-card-join {
  justify-content: center;
  padding: 36px 30px;
  background: var(--surface-color);
  border: 1.5px dashed color-mix(in srgb, var(--accent-color), transparent 50%);
  color: var(--heading-color);
  box-shadow: none;
}

.team-card-join:hover {
  box-shadow: 0 24px 50px color-mix(in srgb, var(--accent-color), transparent 84%);
}

.team-join-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  font-size: 26px;
}

.team-card-join h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  font-weight: 800;
}

.team-card-join p {
  margin-bottom: 24px;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  font-size: 0.92rem;
  line-height: 1.65;
}

.team-join-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 40px;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.team-join-btn:hover {
  color: #fff;
  background: var(--heading-color);
  transform: translateY(-2px);
}

@media (max-width: 575px) {
  .team-title {
    font-size: 1.8rem;
  }

  .team-grid > * {
    flex-basis: 100%;
  }

  .team-card {
    min-height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card,
  .team-card-photo,
  .team-card-bio,
  .team-card-bar {
    transition: none;
  }

  .team-card:hover,
  .team-card:hover .team-card-photo {
    transform: none;
  }
}
