/* Teams: OHO-style profiles and the round-table call to action */

/* Hero: the group portrait sits at the top with heads in full; the title lives in the shaded band below the faces */
.page-hero--teams {
  min-height: max(100svh, 720px);
  max-height: 1100px;
  padding-bottom: clamp(40px, 5vw, 72px);
}

.page-hero--teams .page-hero__img {
  object-position: 50% 0%;
}

.page-hero--teams::after {
  background:
    linear-gradient(0deg, rgba(36, 37, 40, 1) 0%, rgba(36, 37, 40, 0.92) 18%, rgba(36, 37, 40, 0.35) 42%, rgba(36, 37, 40, 0.1) 65%, rgba(36, 37, 40, 0.55) 100%);
}

@media (max-width: 960px) {
  .page-hero--teams {
    min-height: min(100svh, 760px);
  }

  .page-hero--teams .page-hero__img {
    object-position: 46% 0%;
  }
}

.page-hero--teams .page-hero__inner {
  position: relative;
  z-index: 1;
}

/* Intro: the team promise, then three defining points */
.team-intro {
  padding: clamp(88px, 10vw, 150px) var(--edge) clamp(40px, 5vw, 72px);
}

.team-intro__lede {
  max-width: 28ch;
  margin-bottom: clamp(48px, 5vw, 80px);
  font-size: clamp(30px, 1rem + 2.4vw, 60px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.team-intro__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}

.team-intro__points li {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 18px;
  line-height: 1.5;
  color: var(--on-dark-muted);
}

.team-intro__points span {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--turquoise);
}

/* Profiles: the founder as one wide row, then everyone else three to a row */
.profiles {
  overflow-x: clip;
  padding: clamp(56px, 7vw, 104px) var(--edge) clamp(96px, 11vw, 168px);
}

.founder {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
  scroll-margin-top: 24px;
}

.founder__media {
  position: relative;
  grid-column: 1 / span 4;
  max-width: 400px;
}

.founder__photo {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.founder__body {
  grid-column: 6 / span 7;
}

.founder__name {
  font-size: clamp(40px, 1rem + 3.4vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.founder__bio {
  max-width: 56ch;
  margin-top: clamp(20px, 2.4vw, 32px);
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.profile__dots {
  position: absolute;
  left: -22%;
  bottom: -22%;
  width: 82%;
  aspect-ratio: 1;
  background-image: radial-gradient(var(--turquoise) 1.6px, transparent 2px);
  background-size: 12px 12px;
  -webkit-mask: radial-gradient(circle at 70% 30%, #000 30%, transparent 72%);
  mask: radial-gradient(circle at 70% 30%, #000 30%, transparent 72%);
  opacity: 0.6;
  pointer-events: none;
}

.profile__kicker {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
}

.profiles__head {
  margin: clamp(96px, 10vw, 152px) 0 clamp(36px, 4vw, 56px);
}

.profiles__title {
  font-size: clamp(36px, 0.8rem + 3vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(48px, 5vw, 72px) var(--gutter);
}

.member-card {
  display: flex;
  flex-direction: column;
  scroll-margin-top: 24px;
}

.member-card__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 22px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 1.5rem;
  box-shadow: 0 4px 12px 4px rgba(56, 206, 187, 0.1);
}

.member-card__name {
  font-size: clamp(22px, 1rem + 0.7vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.member-card__role {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--turquoise);
}

.founder .member-card__role {
  margin-top: 14px;
  font-size: clamp(19px, 0.9rem + 0.6vw, 26px);
}

.member-card__bio {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-dark-muted);
}

.profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.profile__tags li {
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* Round-table CTA: the team takes its seats around a table, one chair is left for you */
@property --tilt {
  syntax: "<angle>";
  inherits: true;
  initial-value: 56deg;
}

.table-cta {
  overflow-x: clip;
  padding: 0;
}

.table-cta__link {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
  padding: clamp(72px, 9vw, 140px) var(--edge) clamp(48px, 6vw, 96px);
  background:
    radial-gradient(circle at 25% 55%, rgba(56, 206, 187, 0.14), transparent 55%),
    var(--surface-deep);
  text-decoration: none;
}

.table-cta__link:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: -6px;
}

.table-cta__room {
  --tilt: 56deg;
  grid-column: 1 / span 6;
  justify-self: center;
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1.15;
  perspective: 1100px;
  container-type: inline-size;
  transition: --tilt 0.9s var(--ease-out);
}

.js .table-cta__room[data-reveal] {
  transition:
    opacity 1.2s ease,
    transform 1.2s ease,
    --tilt 0.9s var(--ease-out);
}

.table-cta__link:hover .table-cta__room,
.table-cta__link:focus-visible .table-cta__room {
  --tilt: 38deg;
}

.table,
.table__top {
  position: absolute;
  inset: 0;
  transform: rotateX(var(--tilt));
  transform-style: preserve-3d;
}

.table {
  z-index: 1;
}

.table__top {
  z-index: 0;
}

.table__top::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58cqi;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid rgba(56, 206, 187, 0.5);
  border-radius: 50%;
  background:
    url("/assets/site/mark-color.png") center / 12cqi auto no-repeat,
    radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.5px) 0 0 / 12px 12px,
    radial-gradient(circle, #2c2e31, #1b1c1e 70%);
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.03),
    0 40px 60px rgba(0, 0, 0, 0.5);
}

.seat {
  --R: 41cqi;
  --S: 15cqi;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--S);
  height: var(--S);
  margin: calc(var(--S) / -2);
  transform: rotate(var(--a)) translateX(var(--R)) rotate(calc(var(--a) * -1)) rotateX(calc(var(--tilt) * -1));
  transform-origin: center;
  transition:
    transform 1.2s var(--ease-out),
    opacity 1.2s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms + 200ms);
}

.seat img {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

/* Before reveal the team is scattered; on reveal they walk to their chairs */
.js .table-cta__room:not(.is-in) .seat {
  opacity: 0;
  transform: translate(var(--sx, 0px), var(--sy, 0px)) scale(0.4) rotateX(calc(var(--tilt) * -1));
}

.seat--open {
  display: grid;
  place-items: center;
}

.seat__you {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px dashed var(--yellow);
  border-radius: 50%;
  background: rgba(247, 168, 27, 0.12);
  color: var(--yellow);
  font-size: clamp(13px, 3.2cqi, 18px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: seat-pulse 2.2s ease-in-out infinite;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.table-cta__link:hover .seat__you {
  background: var(--yellow);
  color: var(--surface-deep);
}

@keyframes seat-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(247, 168, 27, 0.55);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(247, 168, 27, 0);
  }
}

.table-cta__copy {
  grid-column: 8 / span 5;
  display: grid;
  justify-items: start;
  gap: 24px;
}

.table-cta__title {
  font-size: clamp(40px, 1rem + 3.2vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.table-cta__text {
  font-size: clamp(16px, 1.1vw, 19px);
  line-height: 1.55;
  color: var(--on-dark-muted);
}

.table-cta__btn .btn__dot {
  background: var(--yellow);
}

.table-cta__link:hover .btn__label {
  background: var(--turquoise);
}

.table-cta__link:hover .btn__dot {
  background: var(--white);
}

.table-cta__link:hover .btn__dot svg:first-child {
  transform: translate(150%, -150%);
}

.table-cta__link:hover .btn__dot svg + svg {
  transform: none;
}

@media (max-width: 960px) {
  .team-intro__points {
    grid-template-columns: 1fr;
  }

  .founder__media,
  .founder__body {
    grid-column: 1 / -1;
  }

  .founder__media {
    max-width: min(300px, 72vw);
    margin-bottom: 36px;
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-cta__room,
  .table-cta__copy {
    grid-column: 1 / -1;
  }

  .table-cta__room {
    margin-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seat__you {
    animation: none;
  }
}

/* Phones: keep two across so the team reads in a few swipes */
@media (max-width: 560px) {
  .member-grid {
    gap: 36px 14px;
  }

  .member-card__photo {
    margin-bottom: 14px;
    border-radius: 1rem;
  }

  .member-card__name {
    font-size: 17px;
  }

  .member-card__role {
    font-size: 12.5px;
    line-height: 1.35;
  }

  .member-card__bio {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.5;
  }

  .member-card .profile__tags {
    display: none;
  }
}
