﻿/* ============================================================
   Velvet Route — Estilos de ficha de proyecto
   Complementa styles.css (que debe cargarse antes)
   ============================================================ */

/* ── Hero del proyecto ───────────────────────────────────── */
.proyecto-hero {
  position: relative;
  aspect-ratio: 16/9;
  min-height: 44vh;  /* fallback para móviles muy pequeños */
  margin-top: 68px;  /* desktop: empieza justo debajo del header fijo (68px) */
  display: grid;
  place-items: end start;
  overflow: hidden;
}

.proyecto-art,
.proyecto-hero-overlay {
  position: absolute;
  inset: 0;
}

.proyecto-art {
  background: linear-gradient(135deg, var(--art-a, #2a1a30), var(--art-b, #1a2a3a));
  background-size: cover;
  background-position: center 32%; /* favorece la zona alta donde están las caras */
}

/* Textura sutil: puntos diminutos */
.proyecto-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.proyecto-hero-overlay {
  background:
    linear-gradient(180deg, rgba(12,11,14,.35) 0%, rgba(12,11,14,.85) 100%),
    linear-gradient(90deg, rgba(12,11,14,.6) 0%, transparent 60%);
}

.proyecto-hero-content {
  position: relative;
  z-index: 1;
  padding: 56px clamp(22px, 6vw, 72px) 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

/* Breadcrumb */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 6px 14px 6px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  transition: color var(--t), background var(--t);
}
.breadcrumb:hover {
  color: var(--text);
  background: rgba(255,255,255,.1);
}

.proyecto-hero-content .status-pill {
  font-size: .72rem;
}

.proyecto-hero-content h1 {
  font-size: clamp(3rem, 9vw, 6rem);
  margin: 0;
  line-height: .92;
}

.proyecto-meta-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold);
}
.proyecto-meta-hero span {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ── Layout principal ────────────────────────────────────── */
.proyecto-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding: 56px clamp(22px, 5vw, 68px);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Info: bloques de texto ──────────────────────────────── */
.info-block {
  margin-bottom: 48px;
}
.info-block h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 8px 0 20px;
}
.info-block p {
  color: var(--text-dim);
  line-height: 1.78;
  font-size: .97rem;
  margin-bottom: 14px;
}

/* Cita del equipo */
blockquote.team-note {
  margin: 0;
  padding: 22px 24px;
  background: var(--surface);
  border-left: 3px solid var(--red);
  border-radius: 0 10px 10px 0;
}
blockquote.team-note p {
  margin: 0;
  font-style: italic;
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.72;
}

/* Lista de créditos */
.creditos-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.credito-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.credito-item:last-child { border-bottom: 0; }
.credito-rol {
  color: var(--text-dim);
  font-weight: 500;
}
.credito-nombre {
  color: var(--text-muted);
  font-style: italic;
}

/* ── Aside: estado ───────────────────────────────────────── */
.proyecto-estado {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 88px;
}

.estado-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Barras de progreso detalladas */
.progreso-detalle {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.progreso-fila {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.progreso-pct     { color: var(--text-muted); }
.progreso-pct.red { color: var(--red-bright); }

/* Meta info */
.estado-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.meta-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  font-size: .86rem;
  border-bottom: 1px solid var(--line);
}
.meta-fila:last-child { border-bottom: 0; }
.meta-label  { color: var(--text-muted); font-weight: 500; }
.red-text    { color: var(--red-bright); font-weight: 700; }
.muted-text  { color: var(--text-muted); font-style: italic; }

/* Botón deshabilitado */
.button.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Mini actualizaciones en aside */
.updates-mini .section-kicker { margin-bottom: 16px; }
.update-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.update-item time {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.update-item p {
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ── Responsive ──────────────────────────────────────────── */

/* Desktop: limitar la altura para que el hero no ocupe toda la pantalla */
@media (min-width: 961px) {
  .proyecto-hero {
    aspect-ratio: auto;
    height: 55vh;
    max-height: 580px;
  }
}

@media (max-width: 960px) {
  /* Header pasa a position:absolute column (~127px) */
  .proyecto-hero {
    margin-top: 130px;
  }
}

@media (max-width: 900px) {
  .proyecto-layout {
    grid-template-columns: 1fr;
  }
  .proyecto-estado {
    position: static;
  }
}

@media (max-width: 600px) {
  .proyecto-hero-content h1 {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }

  /* Hero compacto en móvil: sin aspect-ratio fijo, altura limitada */
  .proyecto-hero {
    aspect-ratio: auto;
    height: 44vh;
    min-height: 220px;
    max-height: 300px;
  }

  /* Menos padding en el layout de proyecto */
  .proyecto-layout {
    padding: 32px 20px 48px;
    gap: 32px;
  }

  .info-block {
    padding-bottom: 28px;
  }
}

/* ── Grid de heroínas con imagen ─────────────────────────── */
.heroinas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 4px;
}

.heroina-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t);
}

.heroina-card:hover {
  border-color: var(--red-border);
  transform: translateY(-3px);
}

.heroina-card--sub {
  border-style: dashed;
  opacity: .85;
}

.heroina-img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center top;
  background: var(--bg);
}

.heroina-body {
  padding: 12px 14px 16px;
}

.heroina-nombre {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.heroina-sub-label {
  font-style: normal;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text-muted);
}

.heroina-body p {
  font-size: .83rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 500px) {
  .heroinas-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .heroina-body {
    padding: 10px 10px 12px;
  }
}

/* ── Grid de previews in-game ────────────────────────────── */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.preview-thumb {
  all: unset;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  transition:
    border-color var(--t),
    transform .22s var(--ease-out),
    box-shadow .22s var(--ease-out);
}
.preview-thumb:hover {
  border-color: var(--red-border);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 22px var(--red-glow);
}
.preview-thumb:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@media (max-width: 600px) {
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ── Lightbox ─────────────────────────────────────────────── */
@keyframes lightbox-in {
  from { opacity: 0; transform: scale(.9);  }
  to   { opacity: 1; transform: scale(1);   }
}
@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 97000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lightbox-fade .22s var(--ease-out) both;
}
.lightbox[hidden] { display: none !important; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,7,10,.93);
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-mid);
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), border-color var(--t), transform .14s var(--ease-out);
}
.lightbox-close:hover {
  background: rgba(255,255,255,.14);
  border-color: var(--red-border);
  transform: scale(1.1);
}
.lightbox-close:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.lightbox-img {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1280px);
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 32px 80px rgba(0,0,0,.75), 0 0 0 1px var(--line-mid);
  animation: lightbox-in .28s var(--ease-out) both;
  display: block;
}

/* Flechas de navegación */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;             /* encima de la imagen (z-index:1) en todo momento */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-mid);
  background: rgba(12,11,14,.65);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), border-color var(--t), transform .16s var(--ease-out);
}
.lightbox-arrow:hover {
  background: rgba(194,39,61,.22);
  border-color: var(--red-border);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-arrow:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.lightbox-arrow--prev { left:  clamp(8px, 2vw, 28px); }
.lightbox-arrow--next { right: clamp(8px, 2vw, 28px); }

/* En móvil: sacar las flechas de encima de la imagen y ponerlas abajo al centro */
@media (max-width: 600px) {
  .lightbox {
    padding-bottom: 76px;   /* espacio para las flechas bajo la imagen */
  }
  .lightbox-arrow {
    top: auto;
    bottom: 20px;
    transform: none;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  .lightbox-arrow:hover {
    transform: scale(1.08);
  }
  .lightbox-arrow--prev {
    left: calc(50% - 52px);
  }
  .lightbox-arrow--next {
    right: auto;
    left: calc(50% + 8px);
  }
  .lightbox-counter {
    bottom: 70px;   /* subir el contador para que no se solape con las flechas */
  }
}

/* Contador de imagen (ej. "1 / 3") */
.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: .8rem;
  font-weight: 700;
  color: rgba(236,230,220,.55);
  letter-spacing: .08em;
  pointer-events: none;
}
