/* ============================================================
   E-Cell Committee — Social Connect Card (Redesigned)
   Keeps the profile-card.js CSS variable hooks intact.
   ============================================================ */

:root {
  --pointer-x: 50%;
  --pointer-y: 50%;
  --pointer-from-center: 0;
  --pointer-from-top: 0.5;
  --pointer-from-left: 0.5;
  --card-opacity: 0;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --background-x: 50%;
  --background-y: 50%;
  --behind-glow-color: rgba(0, 87, 176, 0.4);
  --behind-glow-size: 35%;
  --card-radius: 22px;
}

/* ── Grid ─────────────────────────────────────────────────── */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
  width: 100%;
  padding: 20px 0 40px;
  box-sizing: border-box;
}

/* ── Card Wrapper (perspective layer) ─────────────────────── */
.pc-card-wrapper {
  perspective: 700px;
  transform: translate3d(0, 0, 0.1px);
  position: relative;
  /* Must NOT be `none` — that kills page scrolling anywhere a finger
     lands on a card. `manipulation` keeps taps instant, allows pan/zoom. */
  touch-action: manipulation;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  grid-column: span 3;
}

.pc-card-wrapper:nth-child(-n+3) {
  grid-column: span 4;
}

/* ── Glow behind the card ─────────────────────────────────── */
.pc-behind {
  position: absolute;
  inset: -20px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--pointer-x) var(--pointer-y),
    var(--behind-glow-color) 0%,
    transparent var(--behind-glow-size)
  );
  filter: blur(48px) saturate(1.3);
  opacity: calc(0.85 * var(--card-opacity));
  transition: opacity 300ms ease;
  border-radius: var(--card-radius);
}

.pc-card-wrapper:hover,
.pc-card-wrapper.active {
  --card-opacity: 1;
}

/* ── Shell (receives JS class toggling) ───────────────────── */
.pc-card-shell {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ── Card ─────────────────────────────────────────────────── */
.pc-card {
  display: block;
  position: relative;
  aspect-ratio: 2160 / 2700;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.18),
    calc((var(--pointer-from-left) * 14px) - 5px) calc((var(--pointer-from-top) * 28px) - 10px) 30px -6px rgba(0, 0, 0, 0.22);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateZ(0) rotateX(0deg) rotateY(0deg);
  backface-visibility: hidden;
  cursor: pointer;
  background: #111;
}

.pc-card:hover,
.pc-card.active {
  transition: none;
  transform: translateZ(0) rotateX(var(--rotate-y)) rotateY(var(--rotate-x));
}

.pc-card-shell.entering .pc-card {
  transition: transform 180ms ease-out;
}

/* ── Full-bleed photo ─────────────────────────────────────── */
.pc-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 0;
  pointer-events: none;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.pc-card:hover .pc-card-photo {
  transform: scale(1.03);
  filter: grayscale(0%);
}

/* Name overlay removed — text is baked into the poster images */

/* ── Bottom footer strip ──────────────────────────────────── */
.pc-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: auto;
}

/* Footer avatar removed — bottom strip contains only the Connect button */

/* ── Connect button ───────────────────────────────────────── */
.pc-connect-btn {
  display: inline-flex;
  align-items: center;
  background: #0f0f0f;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.pc-connect-btn:hover {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  text-decoration: none;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pc-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
  .pc-card-wrapper, .pc-card-wrapper:nth-child(-n+3) {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .pc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .pc-card-wrapper, .pc-card-wrapper:nth-child(-n+3) {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .pc-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 320px;
    margin: 0 auto;
    padding: 16px 0;
  }
  .pc-card-wrapper, .pc-card-wrapper:nth-child(-n+3) {
    grid-column: span 1;
  }
  .pc-connect-btn {
    font-size: 12px;
    padding: 6px 16px;
  }
}