/* ── members.css ── */

/* Card dimensions — tweak these to taste */
:root {
  --card-w: 240px;
  --card-h: 320px;
  --card-gap: 28px;
  --scroll-speed: 36s;
}

/* ── Page wrapper ── */

.members-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.members-page .page-title {
  margin-bottom: 3rem;
}

/* ── Carousel ── */

/* Fade edges so cards ghost in/out at the sides */
.carousel-track-wrap {
  position: relative;
  width: 100vw;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
}

/* Each set is a flex row of cards */
.carousel-set {
  display: flex;
  flex-shrink: 0;
  gap: var(--card-gap);
  padding: 20px var(--card-gap);
  animation: scroll-left var(--scroll-speed) linear infinite;
}

/* Pause both sets when any card is flipped */
.carousel-track-wrap.is-paused .carousel-set {
  animation-play-state: paused;
}

/* Also pause on hover (CSS-only fallback) */
/* .carousel-track-wrap:hover .carousel-set {
  animation-play-state: paused;
} */

@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% - var(--card-gap))); }
}

/* ── Flip card ── */

.flip-card {
  flex-shrink: 0;
  width: var(--card-w);
  height: var(--card-h);
  perspective: 1000px;
  cursor: pointer;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
}

.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
}

/* Shared face styles */
.flip-card__front,
.flip-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Front face ── */

.flip-card__front {
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
}

.flip-card__img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) saturate(0.85);
  transition: filter 0.4s ease;
}

.flip-card:hover .flip-card__img {
  filter: brightness(1) saturate(1);
}

.flip-card__name {
  display: block;
  padding: 14px 16px 16px;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

/* ── Back face ── */

.flip-card__back {
  transform: rotateY(180deg);
  background: rgba(8, 14, 24, 0.96);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 32px 24px;
  box-shadow:
    inset 0 0 0 1px rgba(140, 200, 255, 0.08),
    0 0 60px rgba(140, 200, 255, 0.04);
}

.flip-card__role {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(140, 200, 255, 0.7);
}

.flip-card__bio {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ── Hint text ── */

.members-hint {
  margin-top: 2.8rem;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  :root {
    --card-w: 180px;
    --card-h: 240px;
    --card-gap: 18px;
  }
}