/* ============================================================
   TEAM — kwizzbit/team  ("The quiz team.")
   Deep-sand band, 4-col photo grid (7 people + a mobile "+" cell
   + a Join-us panel). Cards lift on hover; everything scroll-reveals.
   .js-reveal is scoped to .team so it can't touch other segments.
   Button comes from the global button.css.
   ============================================================ */
.team {
  background: var(--wp--preset--color--cream); /* matches the hero-split story sections */
  padding-block: calc(6rem + 100px) calc(7rem + 100px);
  overflow-x: clip;
}
.team__inner {
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: var(--wp--custom--layout--gutter);
}
.team__header {
  text-align: center;
  margin-bottom: 3rem;
}
.team__eyebrow {
  font-family: 'Pixelar', monospace;
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--wp--preset--color--coral);
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}
.team__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 0.889;
  letter-spacing: -0.10769em;
  color: var(--wp--preset--color--ink);
}
.team__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  max-width: 1137px;
  margin-inline: auto;
}

.team__card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: none;
  outline: none;
  font-size: 0;
  line-height: 0;
  transition: transform var(--wp--custom--motion--dur-base) var(--wp--custom--motion--ease-out);
}

/* 8th cell — mobile only */
.team__card--plus {
  display: none;
  background: rgba(255, 54, 35, 0.10);
  align-items: center;
  justify-content: center;
  font-size: 0;
}
.team__card--plus::after {
  content: '+';
  display: block;
  font-family: var(--wp--preset--font-family--body);
  font-size: 1.25rem;
  font-weight: 400;
  color: rgba(255, 54, 35, 0.45);
  line-height: 1;
}
.team__card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: none;
  outline: none;
}
.team__card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 0.875rem 0.75rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.55) 35%,
    rgba(0,0,0,0)    100%
  );
}
.team__name {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--sm);
  font-weight: 600;
  color: var(--wp--preset--color--white);
  line-height: 1.2;
  margin-bottom: 0.2em;
}
.team__role {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  line-height: 1.2;
}

/* Optional per-person link, sat in the bottom-right of the overlay so it never
   reflows the name/role block. Only Mark carries one today, hence absolute
   rather than a layout change on .team__card-info. */
.team__social {
  position: absolute;
  right: 0.875rem;
  bottom: 0.875rem;
  display: flex;
}
.team__social:focus-visible { outline: none; }
/* The hover fade rides on the SVG, not on the positioned anchor. Fading an
   absolutely-positioned element promotes it to its own compositing layer for
   the duration, and Safari re-rounds that layer to a different device pixel,
   so the icon twitches a pixel on hover. Same fix as the footer social icons. */
.team__social svg {
  display: block;
  opacity: 0.8;
  transition: opacity 160ms ease-out;
}
.team__social:hover svg,
.team__social:focus-visible svg { opacity: 1; }
.team__join {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--wp--preset--color--cream);
}
.team__join-heading {
  font-family: 'Roobert Semimono', monospace;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.08em;
  color: var(--wp--preset--color--ink);
  margin-bottom: 0.75rem;
}
.team__join-copy {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--sm);
  font-weight: 500;
  color: var(--wp--custom--color--subcopy);
  line-height: 1.45;
  margin-bottom: 1.25rem;
  max-width: 160px;
}

/* ── Scroll reveal (scoped to .team) ─────────────────────── */
.team .js-reveal {
  opacity: 0;
  transition: opacity   0.65s var(--wp--custom--motion--ease-out),
              transform 0.65s var(--wp--custom--motion--ease-out);
}
.team .js-reveal:not(.team__card) { transform: translateY(24px); }
.team .js-reveal.is-visible:not(.team__card) { opacity: 1; transform: translateY(0); }
/* Cards: opacity only — transform is reserved for the JS offset/hover */
.team .js-reveal.team__card.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .team .js-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Tablet ≤1023 ────────────────────────────────────────── */
@media (max-width: 1023px) {
  .team__card--plus { display: flex; }
  .team { padding-block: 4rem 5rem; }
  .team__title { font-size: clamp(2.5rem, 6vw, 4rem); }
  .team__grid { grid-template-columns: repeat(2, 1fr); max-width: 446px; }
  .team__join { grid-column: 1 / -1; align-items: center; text-align: center; padding: 2rem 1.5rem; }
  .team__join-copy { max-width: 280px; }
  .team__join-heading { font-size: 2.25rem; }
}

/* ── Mobile ≤640 ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .team__card--plus { display: flex; }
  /* +40px top & bottom (was 3rem / 3.5rem) */
  .team { padding-block: calc(3rem + 40px) calc(3.5rem + 40px); }
  .team__header { margin-bottom: calc(2rem + 12px); } /* +12px under the title */
  .team__eyebrow { font-size: 18px; }
  .team__title { font-size: clamp(2rem, 10.13vw, 2.375rem); line-height: 0.89; letter-spacing: -0.10763em; }
  .team__grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; max-width: 100%; }
  .team__card-info { padding: 2rem 0.625rem 0.5rem; }
  .team__name { font-size: 0.8125rem; }
  .team__role { font-size: 0.6875rem; }
  .team__social { right: 0.625rem; bottom: 0.5rem; }
  .team__social svg { width: 12px; height: 12px; }
  .team__join { grid-column: 1 / -1; align-items: center; text-align: center; padding: 1.75rem 1.25rem; }
  .team__join-heading { font-size: 1.25rem; margin-bottom: 0.5rem; }
  .team__join-copy { font-size: var(--wp--preset--font-size--sm); margin-bottom: 1.25rem; max-width: 220px; }
}
