/* =========================
   Team page
   ========================= */

.team-page-head{
  text-align: center;
  margin: 6px 0 18px;
}

.team-page-title{
  margin: 0;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: .4px;
  text-shadow: 0 10px 22px rgba(0,0,0,.65);
}

.team-page-desc{
  margin: 8px auto 0;
  max-width: 900px;
  font-size: 18px;
  line-height: 1.45;
  color: rgba(255,255,255,.82);
  text-shadow: 0 6px 16px rgba(0,0,0,.55);
}

/* Grid */
.team-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

/* Card */
.member-card{
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,.85);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.20)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.06) 0px,
      rgba(255,255,255,.06) 21px,
      rgba(0,0,0,.06) 21px,
      rgba(0,0,0,.06) 42px
    ),
    linear-gradient(180deg, var(--pn-woodA), var(--pn-woodB));
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  overflow: hidden;
  position: relative;
  padding: 0;
}

.member-card::before{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,0));
  opacity: .9;
}

.member-card:hover{
  transform: translateY(-2px);
  transition: transform .12s ease, filter .12s ease;
  filter: brightness(1.05);
}

/* =========================
   TRANSITION (BLUR REVEAL)
   ========================= */

.member-card-inner{
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
}

/* faces */
.member-face{
  position: absolute;
  inset: 0;
  padding: 12px 10px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  transition:
    opacity .28s ease,
    filter .28s ease,
    transform .28s ease;
}

/* FRONT */
.member-front{
  opacity: 1;
  filter: none;
  transform: scale(1);
}

/* BACK */
.member-back{
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  background: rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* hover state */
.member-card:hover .member-front{
  opacity: .15;
  filter: blur(4px);
  transform: scale(.97);
}

.member-card:hover .member-back{
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* =========================
   Content
   ========================= */

.member-name{
  position: relative;
  font-size: 18px;
  font-weight: 1000;
  margin: 2px 0 8px;
  text-shadow: 0 6px 14px rgba(0,0,0,.6);
}

.member-img-frame{
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.member-img{
  width: 70%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid rgba(0,0,0,.85);
  box-shadow: 0 12px 22px rgba(0,0,0,.35);
}

.member-fav{
  position: relative;
  margin: 4px 0 6px;
  color: rgba(255,255,255,.85);
}

.member-fav-label{
  font-size: 13px;
  opacity: .85;
  font-weight: 900;
}

.member-fav-value{
  font-size: 15px;
  font-weight: 900;
  margin-top: 2px;
}

.member-ranks{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 12px;
  align-items: center;
}

.member-rank-text{
  width: fit-content;
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  font-weight: 1000;
  letter-spacing: .2px;
  font-size: 14px;
  text-shadow:
    0 6px 14px rgba(0,0,0,.55),
    0 0 8px rgba(0,0,0,.35);
}

/* Back side */
.member-back-title{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  opacity: .8;
}

.member-back-value{
  font-size: 16px;
  font-weight: 1000;
  margin-top: 2px;
  margin-bottom: 10px;
}

.member-back-quote{
  width: 90%;
  padding: 10px;
  margin-top: 50px;
  margin-left: -5px;
  border-left: 3px solid rgba(255, 255, 255, 0.42);
  background: rgba(99, 99, 99, 0.08);
  font-style: italic;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255,255,255,.85);
}

.member-back-joined{
  margin-top: auto;
  font-size: 12px;
  opacity: .9;
}

.member-joined-label{
  font-weight: 900;
  opacity: .8;
  margin-right: 6px;
}

.member-joined-value{
  font-weight: 1000;
}
/* Hotfix: keep small team profile pictures fitted to their frame */
.member-img-frame{
  width:min(170px, 72%);
  aspect-ratio:1 / 1;
  margin-left:auto;
  margin-right:auto;
  align-items:center;
  overflow:hidden;
  border-radius:16px;
  border:3px solid rgba(0,0,0,.85);
  background:rgba(0,0,0,.28);
  box-shadow:0 12px 22px rgba(0,0,0,.35);
}
.member-img-frame .member-img,
.member-img{
  width:100%;
  height:100%;
  max-width:none;
  display:block;
  object-fit:cover;
  border:0;
  border-radius:13px;
  box-shadow:none;
  margin:0;
}
