/* Meet the Team - compact vertical cinematic cards */

.sf-team {
  --sf-team-bg: #0c0c10;
  --sf-team-surface: rgba(20, 20, 26, 0.85);
  --sf-team-border: rgba(255, 255, 255, 0.08);
  --sf-team-gold: #c4a574;
  --sf-team-accent: #e9204f;
  --sf-team-text: #f4f4f5;
  --sf-team-muted: rgba(255, 255, 255, 0.58);
  --sf-team-radius: 14px;
  --sf-team-ease: cubic-bezier(0.22, 0.9, 0.22, 1);
  position: relative;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(2.25rem, 4.5vw, 3.25rem) 0 clamp(2.75rem, 5vw, 3.5rem);
  background: var(--sf-team-bg);
  overflow: hidden;
  isolation: isolate;
}

.sf-team.team-section {
  background: var(--sf-team-bg) !important;
}

.sf-team::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(196, 165, 116, 0.35) 45%,
    transparent
  );
}

.sf-team__grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 0;
}

.sf-team__glow {
  pointer-events: none;
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  z-index: 0;
}

.sf-team__glow--gold {
  top: 0;
  right: -4%;
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  background: radial-gradient(circle, rgba(196, 165, 116, 0.14), transparent 68%);
}

.sf-team__glow--accent {
  bottom: -8%;
  left: -6%;
  width: min(36vw, 320px);
  height: min(36vw, 320px);
  background: radial-gradient(circle, rgba(233, 32, 79, 0.1), transparent 70%);
}

.sf-team__container {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.sf-team__head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
}

.sf-team__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sf-team-gold);
  margin: 0 0 10px;
}

.sf-team__title {
  font-family: var(--sf-font-display, 'Jost', sans-serif);
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--sf-team-text);
  margin: 0 0 10px;
  text-wrap: balance;
}

.sf-team__lead {
  font-size: clamp(0.88rem, 1.6vw, 0.98rem);
  line-height: 1.55;
  color: var(--sf-team-muted);
  margin: 0;
}

/* Responsive grid - centered, slightly larger cards */
.sf-team__grid {
  display: grid;
  grid-template-columns: minmax(0, 300px);
  justify-content: center;
  justify-items: stretch;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 520px) {
  .sf-team__grid {
    grid-template-columns: repeat(2, minmax(260px, 300px));
    justify-content: center;
    gap: 18px;
  }
}

@media (min-width: 900px) {
  .sf-team__grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    justify-content: center;
    gap: 22px;
  }
}

/* Vertical card */
.sf-team__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: var(--sf-team-surface);
  border: 1px solid var(--sf-team-border);
  border-radius: var(--sf-team-radius);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 2px 14px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 0.5s var(--sf-team-ease),
    border-color 0.35s ease,
    box-shadow 0.5s var(--sf-team-ease);
}

.sf-team__card--lead {
  border-color: rgba(196, 165, 116, 0.2);
}

@media (min-width: 900px) {
  .sf-team__card--lead {
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(196, 165, 116, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

.sf-team__card:focus-visible {
  outline: 2px solid var(--sf-team-gold);
  outline-offset: 2px;
}

.sf-team__card:hover,
.sf-team__card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(196, 165, 116, 0.28);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(233, 32, 79, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Portrait - compact but slightly larger */
.sf-team__portrait {
  position: relative;
  aspect-ratio: 5 / 4;
  max-height: 240px;
  overflow: hidden;
  background: #0a0a0e;
}

.sf-team__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: grayscale(0.28) contrast(1.04);
  transform: scale(1);
  transition:
    transform 0.7s var(--sf-team-ease),
    filter 0.55s var(--sf-team-ease);
}

.sf-team__card:hover .sf-team__portrait img,
.sf-team__card:focus-within .sf-team__portrait img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.06);
}

.sf-team__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 45%,
    rgba(8, 8, 12, 0.5) 78%,
    rgba(8, 8, 12, 0.88) 100%
  );
  pointer-events: none;
}

.sf-team__spotlight {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 15%,
    rgba(196, 165, 116, 0.18),
    transparent 65%
  );
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.sf-team__card:hover .sf-team__spotlight,
.sf-team__card:focus-within .sf-team__spotlight {
  opacity: 1;
}

/* Body */
.sf-team__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
  gap: 0;
}

.sf-team__tag {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sf-team-gold);
  margin: 0 0 6px;
  line-height: 1.2;
}

.sf-team__name {
  font-family: var(--sf-font-display, 'Jost', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sf-team-text);
  margin: 0 0 4px;
  line-height: 1.25;
}

.sf-team__role {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(196, 165, 116, 0.92);
  margin: 0 0 10px;
  line-height: 1.35;
}

.sf-team__bio {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--sf-team-muted);
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Social */
.sf-team__social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sf-team__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.78rem;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--sf-team-ease);
}

.sf-team__social a:hover {
  color: var(--sf-team-gold);
  border-color: rgba(196, 165, 116, 0.4);
  background: rgba(196, 165, 116, 0.08);
  transform: translateY(-2px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sf-team__card,
  .sf-team__portrait img,
  .sf-team__social a {
    transition: none;
  }

  .sf-team__portrait img {
    filter: none;
  }
}
