/* Roster — cast del proyecto Ink Dreamers.
   Layout: hero compacto + columna de chibis + panel con full body + info. */

.roster {
  min-height: 100dvh;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(2rem, 4vh, 3rem) clamp(1rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vh, 1.75rem);
}

.roster__intro {
  flex: 0 0 auto;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.roster__eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.roster__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.roster__subtitle {
  margin: 0.5rem auto 0;
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Stage: chibis col izq + panel der */
.roster__stage {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  min-height: 0;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Columna vertical de chibis */
.roster__chibis {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.5rem, 1.2vh, 1rem);
  width: clamp(70px, 8vw, 110px);
}

.chibi-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  overflow: visible; /* el label flota fuera del círculo */
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-fast) var(--ease-pop),
    box-shadow var(--dur-fast) var(--ease-soft);
}

.chibi-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.chibi-thumb__clip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.chibi-thumb:hover {
  transform: translateX(4px) scale(1.06);
  box-shadow: var(--shadow-soft);
}

/* Label flotante a la derecha del círculo */
.chibi-thumb__label {
  position: absolute;
  left: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--dur-fast) var(--ease-soft),
    transform var(--dur-fast) var(--ease-soft);
  box-shadow: var(--shadow-card);
  z-index: 10;
}

.chibi-thumb:hover .chibi-thumb__label,
.chibi-thumb[aria-pressed='true'] .chibi-thumb__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.chibi-thumb[aria-pressed='true'] {
  box-shadow: 0 0 0 3px var(--ink), var(--shadow-cta);
  transform: translateX(6px) scale(1.04);
}

/* Panel del personaje */
.character {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 3fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  background: var(--surface);
  border-radius: clamp(20px, 2vw, 32px);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow:
    0 0 0 1.5px var(--ink),
    0 28px 50px -18px rgba(0, 0, 0, 0.35),
    0 12px 24px -10px rgba(0, 0, 0, 0.18);
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  align-items: stretch;
}

.character__info-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  position: relative;
  z-index: 2;
}

@media (min-width: 881px) {
  .character__info-card {
    padding-left: clamp(1rem, 2.2vw, 2.25rem);
  }
}

.character__art-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.character__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 85% at 50% 45%,
      var(--tone-spotlight) 0%,
      rgba(232, 232, 232, 0.5) 40%,
      transparent 82%
    ),
    radial-gradient(
      ellipse 45% 6% at 50% 95%,
      rgba(0, 0, 0, 0.2) 0%,
      transparent 80%
    );
  pointer-events: none;
  z-index: 1;
}

.character__art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  user-select: none;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.2));
  animation: char-enter 540ms var(--ease-pop);
}

@keyframes char-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.character__index {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  margin: 0;
}

.character__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 1;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  position: relative;
  padding-bottom: 0.5rem;
}

.character__name::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--ink);
  border-radius: 2px;
}

.character__bio {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  max-width: 480px;
}

/* Responsive */
@media (max-width: 880px) {
  .roster {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .roster__stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 1rem;
  }
  .roster__chibis {
    flex-direction: row;
    justify-content: center;
    width: auto;
    flex-wrap: wrap;
  }
  .chibi-thumb {
    width: clamp(70px, 14vw, 100px);
  }
  /* Chibis wrappean a varias filas en móvil — el label flotante interfiere
     con la fila siguiente, mejor escondido. El nombre grande del panel ya
     identifica al personaje activo. */
  .chibi-thumb__label {
    display: none;
  }

  .character {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    aspect-ratio: auto;
    height: auto;
  }
  .character__art-area {
    min-height: clamp(280px, 60vw, 480px);
  }
  .character__name { font-size: clamp(1.8rem, 8vw, 2.5rem); }
}
