/* SJCare Foundation
 *
 * Team register. Appointment records presented as a ruled index: portrait,
 * role, name and remit. No boxes, no shadows.
 */

.team-ledger {
  display: grid;
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.team-ledger__head {
  display: grid;
  gap: 0.55rem;
  max-width: 74ch;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ix-rule);
}

.team-ledger__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.024em;
  color: var(--ix-ink);
  text-wrap: balance;
}

.team-ledger__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ix-muted);
  max-width: 70ch;
}

.team-ledger__count {
  margin: 0.2rem 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ix-terracotta);
}

.team-register {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ix-rule);
  border-left: 1px solid var(--ix-rule);
  background: #fff;
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ix-rule);
  border-bottom: 1px solid var(--ix-rule);
  background: #fff;
  transition: background-color 0.35s var(--ix-ease);
}

.team-card:hover {
  background: var(--ix-cloth);
}

.team-card__portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(155deg, #22385c 0%, #16243f 52%, #0d1728 100%);
}

.team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  filter: saturate(0.94);
  transform: scale(1);
  transition: transform 0.6s var(--ix-ease), filter 0.4s var(--ix-ease);
}

.team-card:hover .team-card__photo {
  transform: scale(1.04);
  filter: saturate(1.02);
}

.team-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  align-content: center;
  background-image:
    radial-gradient(circle at 28% 18%, rgba(192, 143, 51, 0.22), transparent 58%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.05), transparent 60%);
}

.team-card__icon {
  width: clamp(3rem, 6vw, 4.25rem);
  height: clamp(3rem, 6vw, 4.25rem);
  color: rgba(245, 242, 234, 0.42);
  stroke-width: 1.1;
}

.team-card__monogram {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ix-ochre);
}

.team-card__body {
  display: grid;
  gap: 0.35rem;
  padding: clamp(0.95rem, 1.7vw, 1.35rem);
  border-top: 1px solid transparent;
  transition: border-color 0.35s var(--ix-ease);
}

.team-card:hover .team-card__body {
  border-top-color: var(--ix-terracotta);
}

.team-card__role {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ix-terracotta);
}

.team-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ix-ink);
}

.team-card__text {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ix-muted);
}

.team-cta {
  background: var(--ix-indigo-deep);
  color: var(--ix-cloth);
  border-top: 1px solid var(--ix-rule-dark);
}

.team-cta__inner {
  width: min(100% - (var(--ix-gutter) * 2), var(--ix-max));
  margin-inline: auto;
  padding: clamp(2.4rem, 5vw, 4rem) 0;
  display: grid;
  gap: 0.6rem;
  max-width: min(var(--ix-max), 100%);
}

.team-cta__label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ix-ochre);
}

.team-cta__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--ix-cloth);
  max-width: 26ch;
  text-wrap: balance;
}

.team-cta__text {
  margin: 0;
  max-width: 62ch;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(245, 242, 234, 0.78);
}

.team-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.7rem;
}

.team-cta__link {
  color: var(--ix-cloth);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--ix-rule-dark);
  padding-bottom: 0.28rem;
  transition: color 0.25s var(--ix-ease), border-color 0.25s var(--ix-ease);
}

.team-cta__link:hover {
  color: var(--ix-ochre);
  border-bottom-color: var(--ix-ochre);
}

.team-cta__link .icon {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 1024px) {
  .team-register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .team-register {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-card__portrait {
    aspect-ratio: 1 / 1;
  }

  .team-cta__actions {
    gap: 0.85rem;
  }

  .team-cta__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card,
  .team-card__photo,
  .team-card__body,
  .team-cta__link {
    transition: none;
  }

  .team-card:hover .team-card__photo {
    transform: none;
  }
}
