/* proyecto (detalle) — castegui-v2 */

/* ─── Banner ───────────────────────────────────────────────────── */
.pd-hero {
  position: relative;
  height: 88vh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.pd-hero__bg {
  position: absolute;
  inset: 0;
  top: -15%;
  bottom: auto;
  width: 100%;
  height: 130%;          /* headroom para el parallax (no revela bordes) */
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: transform;
}

.pd-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 6, 6, .95) 0%,
    rgba(6, 6, 6, .55) 45%,
    rgba(6, 6, 6, .25) 100%
  );
  z-index: 1;
}

.pd-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 6rem;
}

.pd-hero__back {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-headings);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(252, 252, 252, .6);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}

.pd-hero__back:hover {
  color: var(--accent);
  text-decoration: none;
}

.pd-hero__title {
  font-family: var(--font-headings);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 500;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -6px;
  line-height: 1.0;
  margin: .6rem 0 1.1rem;
}

.pd-hero__meta {
  font-family: var(--font-headings);
  font-size: .9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(252, 252, 252, .72);
  margin: 0;
}

.pd-hero__sep {
  color: var(--accent);
  margin: 0 .6rem;
}

/* La animación de entrada del banner usa la utilidad global .hero-rise (main.min.css) */

/* ─── Descripción + meta ───────────────────────────────────────── */
.pd-intro {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

@media (min-width: 992px) {
  .pd-intro { padding: 7rem 0; }
}

/* El intro no es un rótulo, es una frase corrida: va en la fuente y el
   tracking del cuerpo de texto (lo mismo que los <p> de abajo) y a un
   cuerpo más chico que el h2 global. Es la excepción a la regla de
   marca de h1/h2 y al letter-spacing negativo de main.min.css — el
   tracking cerrado y la Helvetica for Target son para títulos de dos o
   tres palabras, no para un párrafo. */
.pd-intro h2 {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 2.6vw, 1.2rem);
  letter-spacing: normal;
  line-height: 1.3;
  text-transform: none;
}

.pd-intro__text {
  font-family: var(--font-body);
  font-size: clamp(.95rem, 1.6vw, 1.05rem);
  color: rgba(252, 252, 252, .65);
  line-height: 1.85;
  margin-bottom: 1.4rem;
  max-width: 62ch;
}

/* En desktop la ficha acompaña el scroll (sticky) */
@media (min-width: 992px) {
  .pd-aside {
    position: sticky;
    top: 5.5rem;
  }
}

/* Lista de metadatos */
.pd-meta {
  list-style: none;
  margin: 0;
  padding: .5rem 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-subtle);
}

.pd-meta__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.pd-meta__item:last-child {
  border-bottom: none;
}

.pd-meta__k {
  font-family: var(--font-headings);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gray);
}

.pd-meta__v {
  font-family: var(--font-headings);
  font-size: .95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-base);
  text-align: right;
}

/* ─── Galería (Splide) ─────────────────────────────────────────── */
.pd-gallery {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

@media (min-width: 992px) {
  .pd-gallery { padding: 7rem 0; }
}

.pd-gallery__splide {
  position: relative;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  visibility: hidden;            /* evita FOUC antes de montar Splide */
}

.pd-gallery__splide.is-active {
  visibility: visible;
}

.pd-gallery__item {
  overflow: hidden;
  height: clamp(240px, 38vw, 420px);
  border: 1px solid rgba(255, 255, 255, .07);
  cursor: zoom-in;
}

.pd-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .6s ease;
}

.pd-gallery__item:hover img {
  transform: scale(1.05);
}

/* Flechas y paginación (splide-core no las trae estilizadas) */
/* splide-core no posiciona las flechas: lo hacemos explícito (prev izq / next der) */
.pd-gallery__splide .splide__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  opacity: 1;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 0;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .40),
    0 8px 24px rgba(0, 0, 0, .28);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.pd-gallery__splide .splide__arrow svg {
  fill: var(--white);
  width: 1.1rem;
  height: 1.1rem;
}

.pd-gallery__splide .splide__arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .50);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 10px 28px rgba(0, 0, 0, .35);
}

.pd-gallery__splide .splide__arrow:disabled {
  opacity: .35;
}

.pd-gallery__splide .splide__arrow--prev { left: .5rem;  transform: translateY(-50%); }
.pd-gallery__splide .splide__arrow--next { right: .5rem; transform: translateY(-50%); }

.pd-gallery__splide .splide__arrow--prev:hover:not(:disabled),
.pd-gallery__splide .splide__arrow--next:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.08);
}

.pd-gallery__splide .splide__pagination {
  bottom: -2.25rem;
}

.pd-gallery__splide .splide__pagination__page {
  background: rgba(255, 255, 255, .25);
  border-radius: 0;
  width: 14px;
  height: 3px;
  margin: 0 4px;
  transition: background var(--transition), width var(--transition);
}

.pd-gallery__splide .splide__pagination__page.is-active {
  background: var(--accent);
  transform: none;
  width: 28px;
}

/* ─── Cifras — cintilla de números (banda con divisores) ───────── */
.pd-stats {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background-color: var(--bg-alt);
}

@media (min-width: 992px) {
  .pd-stats { padding: 7rem 0; }
}

.pd-stats__bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;            /* headroom para el parallax */
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}

.pd-stats__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, .55);
  z-index: 1;
}

.pd-stats__content {
  position: relative;
  z-index: 2;
}

.pd-stats__title {
  text-transform: none;
}

/* Divisores creados con el gap (1px) del grid: el fondo de la banda
   asoma por los huecos; las celdas usan el mismo fondo de la sección. */
.pd-stats__band {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background-color: rgba(255, 255, 255, .22);
  border-top: 1px solid rgba(255, 255, 255, .22);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

/* flex 1 1 160px: reparte en filas completas (sin celdas vacías) sea cual
   sea el número de cifras — 2 por fila en móvil, hasta 4+ en desktop */
.pd-stat {
  flex: 1 1 160px;
  background-color: rgba(6, 6, 6, .45);   /* panel translúcido sobre la foto */
  padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem);
}

.pd-stat__num {
  display: block;
  font-family: var(--font-headings);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  letter-spacing: .01em;
}

.pd-stat__unit {
  font-size: .4em;
  font-weight: 500;
  color: rgba(252, 252, 252, .6);
  margin-left: .3rem;
  vertical-align: baseline;
}

.pd-stat__label {
  display: block;
  margin-top: .9rem;
  font-family: var(--font-headings);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(252, 252, 252, .72);
}

@media (prefers-reduced-motion: reduce) {
  .pd-hero__bg,
  .pd-stats__bg { transform: none !important; }
}

/* El lightbox de galería es un componente compartido: vive en main.min.css */
