/* ================================================
   PROYECTO DETALLADO — REDISEÑO EDITORIAL
   ================================================ */

/* Escala tipográfica del sistema de proyecto — reutilizar siempre estos
   tokens, no crear tamaños/pesos nuevos sueltos por selector. */
:root {
  --fs-label-xs:      0.65rem;                        /* badges, numeración, meta dt */
  --fs-label:         0.75rem;                         /* breadcrumb, back-btn, fun-note */
  --fs-body:          0.95rem;                         /* descripciones cortas de card */
  --fs-lead:          clamp(1rem, 1.8vw, 1.25rem);     /* párrafos largos de lectura */
  --fs-card-title:    1.35rem;                         /* títulos de card (h3) */
  --fs-stat:          clamp(2.3rem, 5vw, 3.4rem);      /* números grandes de métricas */
  --fs-stat-suffix:   clamp(1.2rem, 2.5vw, 1.7rem);    /* símbolo/prefijo junto al número */
  --fs-section-title: clamp(2.5rem, 6vw, 4.5rem);      /* títulos de sección (h2) */
}

/* ── IMAGEN — SCROLL REVEAL 3D ────────────────────────────────────────────── */
.proy-image-3d-wrapper {
  position: relative;
  height: 180vh;
}

.proy-image-3d {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1500px;
}

.proy-image-3d-shadow {
  position: absolute;
  bottom: 12%;
  width: min(600px, 60vw);
  height: 60px;
  background: radial-gradient(ellipse, rgba(42, 0, 14, 0.25) 0%, transparent 70%);
  filter: blur(10px);
  z-index: 0;
}

.proy-image-3d-float {
  position: relative;
  z-index: 1;
  animation: proyImgFloat 6s ease-in-out infinite;
}

@keyframes proyImgFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}

.proy-image-3d-tilt {
  position: relative;
  width: min(760px, 80vw);
  aspect-ratio: 1100 / 846;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

/* Variante para imágenes muy panorámicas (ej. mockups de laptop+tablet+celular) */
.proy-image-3d-tilt--wide {
  width: min(1000px, 88vw);
  aspect-ratio: 1400 / 727;
}

.proy-image-3d-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.18));
}

/* Stack de fotos dentro de la imagen dinámica del hero — mismo mecanismo que
   las cards de Proyectos en portfolio.js, llevado a fotos (ver initImageStack) */
.proy-image-3d-cycle-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(42, 0, 14, 0.22);
  filter: none;
  will-change: transform;
}

/* ── BOTÓN FLOTANTE VOLVER ───────────────────────────────────────────────── */
.proy-back-btn {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 100;
  padding: 0.7rem 1.2rem;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.proy-back-btn:hover {
  background: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Botón volver + migas de pan: única nav de las páginas de proyecto.
   Se ocultan al bajar y reaparecen al subir (ver initTopbarScroll en scroll-animation.js). */
.proy-back-btn.nav-hidden,
.proy-breadcrumb.nav-hidden {
  transform: translateY(-140%);
  opacity: 0;
  pointer-events: none;
}

.proy-hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--cream);
  margin: 0;
  padding: 0;
}

/* ── DETALLE — personajes decorativos colgados cerca de un titular ───────── */
.proy-detail-minion {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 20px 30px rgba(42, 0, 14, 0.18));
}

/* Ancla la letra específica de la que "cuelga" el detalle (ver .proy-hero-n-anchor) */
.proy-hero-n-anchor {
  position: relative;
  display: inline-block;
}

.proy-detail-minion--hero {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -10px;
  width: clamp(52px, 6.24vw, 88px);
}

/* La "o" del titular sustituida por una foto — usada una sola vez */
.proy-hero-o-tarta {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: -0.1em;
  margin: 0 0.02em;
  box-shadow: 0 6px 14px rgba(42, 0, 14, 0.25);
}


.proy-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.orb-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 0.5s var(--ease-out);
}

.proy-hero-orb {
  position: absolute;
  border-radius: 50%;
}

.orb-1 {
  width: 75%;
  height: 75%;
  top: -25%;
  left: 5%;
  background: radial-gradient(circle at 45% 45%, rgba(228, 28, 55, 0.8) 0%, rgba(180, 10, 40, 0.4) 40%, transparent 70%);
  filter: blur(55px);
  animation: orbDrift1 14s ease-in-out infinite;
}

.orb-2 {
  width: 60%;
  height: 60%;
  top: 5%;
  right: -15%;
  background: radial-gradient(circle, rgba(210, 20, 50, 0.6) 0%, rgba(140, 5, 30, 0.3) 45%, transparent 70%);
  filter: blur(75px);
  animation: orbDrift2 18s ease-in-out infinite;
}


.proy-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  height: 100%;
  padding: 3rem 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.proy-breadcrumb {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dark);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.proy-breadcrumb a {
  color: var(--dark);
  opacity: 0.5;
  text-decoration: none;
  transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.proy-breadcrumb a:hover {
  color: var(--red);
  opacity: 1;
}

.proy-breadcrumb span:last-child {
  font-weight: 700;
}

.proy-hero-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.05;
  animation: heroTitle 1.2s var(--ease-out) both;
  animation-delay: 0.2s;
  margin: 0;
  max-width: 950px;
}

.proy-hero-title-thin {
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--dark);
}

.proy-hero-title-bold {
  font-weight: 900;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  color: var(--dark);
  letter-spacing: -0.05em;
}

.proy-hero-content .scroll-hint {
  position: static;
  transform: none;
  margin-top: 1.5rem;
}

.proy-hero-content .scroll-mouse {
  background: rgba(42, 0, 14, 0.1);
}

.proy-hero-content .scroll-dot {
  background: var(--red);
}

.proy-hero-content .scroll-label {
  color: rgba(42, 0, 14, 0.5);
}

/* ── CONTEXTO SECTION ─────────────────────────────────────────────────── */
.proy-contexto {
  background: var(--cream);
  padding: 11rem 2rem;
}

.proy-contexto .proy-section-inner,
.proy-bigidea .proy-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.proy-contexto .proy-opp-title {
  margin-bottom: 2.5rem;
}

.proy-fun-note {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 2rem;
  transform: rotate(-2deg);
}

/* Párrafos largos (lectura detenida): tipografía UI, nunca display, peso regular accesible */
.proy-contexto-desc {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--dark);
  max-width: 850px;
  margin-bottom: 4rem;
  text-wrap: pretty;
}

.proy-contexto-desc strong {
  font-weight: 700;
}

.proy-contexto-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  border-top: 1px solid rgba(42, 0, 14, 0.08);
  padding-top: 3rem;
}

.proy-meta-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.proy-meta-group dt {
  font-family: var(--font-ui);
  font-size: var(--fs-label-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(42, 0, 14, 0.5);
}

.proy-meta-group dd {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--dark);
  line-height: 1.4;
}

/* ── OPPORTUNITIES — GRID 2×2 ─────────────────────────────────────────────── */
.proy-opportunities {
  background: var(--cream);
  padding: 11rem 2rem;
  position: relative;
  overflow: hidden;
}

.proy-opp-header {
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.proy-opp-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-section-title);
  color: var(--dark);
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0;
}

.proy-opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.proy-opp-card {
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

/* Entrada escalonada: animation (no transition) para no interferir con el hover */
.proy-opp-card.anim-up {
  opacity: 0;
  transform: translateY(40px) scale(0.94);
}

.proy-opp-card.anim-up.visible {
  animation: proyOppReveal 0.7s var(--ease-out) both;
}

.proy-opp-grid .proy-opp-card:nth-child(1).visible { animation-delay: 0s; }
.proy-opp-grid .proy-opp-card:nth-child(2).visible { animation-delay: 0.12s; }
.proy-opp-grid .proy-opp-card:nth-child(3).visible { animation-delay: 0.24s; }
.proy-opp-grid .proy-opp-card:nth-child(4).visible { animation-delay: 0.36s; }

@keyframes proyOppReveal {
  from { opacity: 0; transform: translateY(40px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.proy-opp-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(228, 28, 55, 0.2);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.proy-opp-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}

.proy-opp-icon svg {
  width: 100%;
  height: 100%;
}

.proy-opp-cardtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-card-title);
  color: var(--dark);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
}

.proy-opp-desc {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--text-gray);
  margin: 0;
}

.proy-opp-desc strong,
.proy-approach-desc strong {
  font-weight: 700;
  color: var(--dark);
}

/* ── LA IDEA — momento central de las páginas de campaña creativa ────────── */
.proy-bigidea {
  background: var(--cream);
  padding: 11rem 2rem;
}

.proy-bigidea-eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
}

.proy-bigidea-statement {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--dark);
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 850px;
  margin-bottom: 2rem;
}

.proy-bigidea .proy-contexto-desc {
  margin-bottom: 0;
}

.proy-bigidea-audience {
  display: block;
  width: clamp(150px, 16vw, 210px);
  margin: 2rem 0 0;
}

.proy-bigidea-patterns {
  display: flex;
  align-items: flex-end;
  gap: 1.75rem;
  margin: 2.5rem 0 0;
}

.proy-bigidea-pattern {
  width: clamp(64px, 7vw, 96px);
  height: auto;
}

/* ── POSTS — piezas de campaña en formato vertical (redes) ────────────────── */
.proy-posts {
  background: var(--cream);
  padding: 8rem 2rem;
}

.proy-posts-header {
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.proy-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.proy-post-card {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: default;
  box-shadow: 0 18px 32px rgba(42, 0, 14, 0.16);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.proy-post-card--story {
  aspect-ratio: 9 / 16;
}

.proy-post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 46px rgba(42, 0, 14, 0.22);
}

.proy-post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.proy-post-caption {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 2rem;
  font-family: var(--font-ui);
  font-size: var(--fs-label-xs);
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}

.proy-post-card:hover .proy-post-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Pieza sin foto todavía — mismo marco que proy-post-card, sin hover ni click */
.proy-post-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: var(--border);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-gray);
}

/* Imagen dinámica del hero cuando aún no hay foto — mismo marco que
   .proy-image-3d-img, para que el reveal 3D siga funcionando igual */
.proy-image-3d-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  background: var(--border);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gray);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.18));
}

/* ── APPROACH — GRID 4 COLUMNAS (vive dentro de Resultados) ──────────────── */
.proy-approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.proy-approach-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.proy-approach-itemtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-card-title);
  color: var(--dark);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
}

.proy-approach-desc {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--text-gray);
  margin: 0;
}

/* ── MÉTRICAS — FILAS TIPO BANDA ────────────────────────────────────────────── */
.proy-metrics-section {
  background: var(--cream);
  padding: 11rem 2rem;
  text-align: left;
}

.proy-metrics-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.proy-metrics-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-section-title);
  color: var(--dark);
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0 0 4rem;
}

.proy-metrics-rows {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: 3rem;
}

.proy-metric-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.proy-metric-circle {
  width: clamp(170px, 20vw, 260px);
  height: clamp(170px, 20vw, 260px);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 25px 50px rgba(228, 28, 55, 0.3), inset 0 -12px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(60px);
  opacity: 0;
  transition: transform 0.85s var(--ease-out), opacity 0.7s var(--ease-out);
}

.proy-metric-row.visible .proy-metric-circle {
  transform: translateY(0);
  opacity: 1;
}

.proy-metric-line {
  display: block;
  width: 1px;
  height: 0;
  background: rgba(42, 0, 14, 0.25);
  transition: height 0.5s var(--ease-out) 0.35s;
}

.proy-metric-row.visible .proy-metric-line {
  height: 40px;
}

.proy-metric-label {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--fs-body);
  letter-spacing: 0.01em;
  color: var(--dark);
  line-height: 1.35;
  margin-top: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-out) 0.55s, transform 0.6s var(--ease-out) 0.55s;
}

/* Escalonado: cada círculo sube después que el anterior */
.proy-metrics-rows .proy-metric-row:nth-child(2) .proy-metric-circle { transition-delay: 0.18s; }
.proy-metrics-rows .proy-metric-row:nth-child(2) .proy-metric-line   { transition-delay: 0.53s; }
.proy-metrics-rows .proy-metric-row:nth-child(2) .proy-metric-label  { transition-delay: 0.73s; }

.proy-metrics-rows .proy-metric-row:nth-child(3) .proy-metric-circle { transition-delay: 0.36s; }
.proy-metrics-rows .proy-metric-row:nth-child(3) .proy-metric-line   { transition-delay: 0.71s; }
.proy-metrics-rows .proy-metric-row:nth-child(3) .proy-metric-label  { transition-delay: 0.91s; }

.proy-metric-row.visible .proy-metric-label {
  opacity: 1;
  transform: translateY(0);
}

.proy-metric-value {
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
}

.proy-metric-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-stat);
  color: var(--white);
  line-height: 1;
}

.proy-metric-symbol {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-stat-suffix);
  color: var(--white);
}

.proy-metric-prefix {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-stat-suffix);
  color: var(--white);
  margin-right: 0.1rem;
}

/* ── SHOWROOM — fotos flotantes ───────────────────────────────────────────── */
.proy-showroom {
  background: var(--cream);
  padding: 8rem 2rem;
}

.proy-showroom-inner {
  position: relative;
  max-width: 1200px;
  min-height: 65vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Variante con más fotos (8 en vez de 5): necesita más alto para la segunda fila */
.proy-showroom-inner--tall {
  min-height: 118vh;
}

.proy-showroom-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4rem, 13vw, 11rem);
  color: var(--dark);
  letter-spacing: -0.06em;
  line-height: 1;
  text-align: center;
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out);
}

.proy-showroom-title.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.proy-showroom-photos {
  position: absolute;
  inset: 0;
}

.proy-float-photo {
  position: absolute;
  opacity: 0;
  transform: translateY(26px) scale(0.94);
  filter: blur(5px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}

.proy-float-photo.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* posiciones y tamaños repartidos, encimándose apenas sobre el titular */
.pf-1 { top: 1%;    left: -1%;  width: clamp(294px, 29vw, 378px); }
.pf-2 { top: -8%;   left: 50%;  width: clamp(195px, 19vw, 255px); }
.pf-3 { top: 10%;   right: -2%; width: clamp(240px, 24vw, 310px); }
.pf-4 { bottom: 2%; left: 17%;  width: clamp(250px, 25vw, 320px); }
.pf-5 { bottom: -9%; right: 6%; width: clamp(304px, 30vw, 388px); }

/* Segunda fila — solo cuando el showroom usa 8 fotos (.proy-showroom-inner--tall) */
.pf-6 { top: 58%; left: 4%;  width: clamp(220px, 22vw, 290px); }
.pf-7 { top: 54%; left: 39%; width: clamp(180px, 18vw, 235px); }
.pf-8 { top: 60%; right: 3%; width: clamp(255px, 25vw, 330px); }

/* Variante con 6 fotos (.proy-showroom-inner--six): dos filas repartidas sin huecos */
.proy-showroom-inner--six { min-height: 80vh; }
.pf6-a { top: -2%;  left: -1%;  width: clamp(250px, 25vw, 320px); }
.pf6-b { top: -9%;  left: 37%;  width: clamp(190px, 19vw, 250px); }
.pf6-c { top: 4%;   right: -2%; width: clamp(240px, 24vw, 310px); }
.pf6-d { bottom: -6%; left: 5%;   width: clamp(225px, 22vw, 290px); }
.pf6-e { bottom: 6%;  left: 38%;  width: clamp(185px, 18vw, 240px); }
.pf6-f { bottom: -10%; right: 3%; width: clamp(270px, 27vw, 350px); }

.proy-float-inner {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--dark);
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(42, 0, 14, 0.18);
  transition: filter 0.4s var(--ease-out);
}

.proy-float-inner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

/* Título flotante 8px arriba de la foto, solo al hacer hover */
.proy-float-caption {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  padding: 0.35rem 0.75rem;
  background: var(--white);
  border-radius: 2rem;
  font-family: var(--font-ui);
  font-size: var(--fs-label-xs);
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(42, 0, 14, 0.12);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}

.proy-float-photo:hover .proy-float-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Al hacer hover en una foto, las demás se blurean */
.proy-showroom-photos:has(.proy-float-photo:hover) .proy-float-photo:not(:hover) .proy-float-inner {
  filter: blur(4px);
}

/* ── Lightbox: click en una foto la abre en grande ───────────────────────── */
.proy-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0s linear 0.35s;
  z-index: 200;
}

.proy-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s var(--ease-out);
}

.proy-lightbox-figure {
  position: relative;
  max-width: min(1000px, 100%);
  max-height: 100%;
  margin: 0;
  transform: scale(0.94);
  transition: transform 0.35s var(--ease-out);
}

.proy-lightbox.is-open .proy-lightbox-figure {
  transform: scale(1);
}

.proy-lightbox-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.proy-lightbox-figure figcaption {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0.35rem 0.75rem;
  background: var(--white);
  border-radius: 2rem;
  font-family: var(--font-ui);
  font-size: var(--fs-label-xs);
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.proy-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--dark);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s var(--ease-out);
}

.proy-lightbox-close:hover {
  transform: scale(1.08);
}

.proy-lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* ── SIGUIENTE PROYECTO ──────────────────────────────────────────────────── */
.proy-next-section {
  background: var(--cream);
  padding: 8rem 2rem;
}

.proy-next-link {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  color: var(--dark);
  text-decoration: none;
}

.proy-next-label {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  text-align: center;
  margin-bottom: 1rem;
}

.proy-next-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1;
  text-align: center;
  margin: 0;
  transition: color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.proy-next-link:hover .proy-next-title {
  color: var(--red);
  transform: scale(1.06);
}

.proy-next-arrow {
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out);
}

.proy-next-link:hover .proy-next-arrow {
  transform: translateX(10px);
}

/* ── ANIMACIONES ──────────────────────────────────────────────────────────── */
@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(120px, -80px) scale(1.12); }
  50%       { transform: translate(-60px, 60px) scale(0.92); }
  75%       { transform: translate(80px, 90px) scale(1.08); }
}

@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30%       { transform: translate(-100px, 70px) scale(1.15); }
  60%       { transform: translate(90px, -60px) scale(0.88); }
  80%       { transform: translate(-50px, -80px) scale(1.1); }
}

@keyframes orbDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  35%       { transform: translate(90px, -70px) scale(1.1); }
  65%       { transform: translate(-80px, 60px) scale(0.93); }
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Sin stack de scroll en mobile (ver initImageStack): solo la primera foto, fija */
  .proy-image-3d-cycle-img {
    position: static;
    width: 100%;
    height: 100%;
    transform: none !important;
  }

  .proy-image-3d-cycle-img:not(:first-child) {
    display: none;
  }

  .proy-back-btn {
    top: 1rem;
    right: 1rem;
    padding: 0.6rem 1rem;
    font-size: var(--fs-label-xs);
  }

  .proy-breadcrumb {
    top: 1rem;
    left: 1rem;
    gap: 0.5rem;
    font-size: var(--fs-label-xs);
  }

  .proy-hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .proy-contexto {
    padding: 5rem 1.5rem;
  }

  .proy-bigidea {
    padding: 5rem 1.5rem;
  }

  .proy-detail-minion {
    display: none;
  }

  .proy-posts {
    padding: 5rem 1.5rem;
  }

  .proy-posts-header {
    margin-bottom: 2rem;
  }

  .proy-posts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .proy-contexto-meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .proy-meta-group dt {
    font-size: 0.6rem;
  }

  .proy-meta-group dd {
    font-size: 0.8rem;
  }

  /* Títulos de sección: el mismo tamaño reducido para las tres secciones */
  .proy-opp-title,
  .proy-metrics-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 2.5rem;
  }

  .proy-opp-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .proy-approach-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .proy-metrics-section {
    padding: 5rem 1.5rem;
  }

  .proy-metrics-rows {
    flex-direction: column;
    align-items: stretch;
    gap: 2.5rem;
  }

  .proy-metric-row {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    text-align: left;
    gap: 1.25rem;
  }

  .proy-metric-circle {
    flex-shrink: 0;
    width: clamp(90px, 24vw, 120px);
    height: clamp(90px, 24vw, 120px);
  }

  .proy-metric-line {
    width: 0;
    height: 1px;
  }

  .proy-metric-row.visible .proy-metric-line {
    width: 32px;
    height: 1px;
  }

  .proy-metric-label {
    margin-top: 0;
  }

  .proy-metric-number {
    font-size: 1.5rem;
  }

  .proy-showroom {
    padding: 5rem 1.5rem;
  }

  .proy-showroom-title {
    font-size: clamp(2.5rem, 13vw, 5rem);
  }

  .proy-showroom-inner {
    min-height: auto;
    flex-direction: column;
    gap: 3rem;
  }

  .proy-showroom-photos {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .proy-float-photo,
  .pf-1, .pf-2, .pf-3, .pf-4, .pf-5, .pf-6, .pf-7, .pf-8,
  .pf6-a, .pf6-b, .pf6-c, .pf6-d, .pf6-e, .pf6-f {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 360px;
  }

  /* En touch no hay hover — la etiqueta va siempre visible, arriba de la foto */
  .proy-float-caption {
    position: static;
    align-self: flex-start;
    opacity: 1;
    transform: none;
    margin-bottom: 0.6rem;
  }

  .proy-showroom-photos:has(.proy-float-photo:hover) .proy-float-photo:not(:hover) .proy-float-inner {
    filter: none;
  }

  .proy-lightbox {
    padding: 1.5rem;
  }

  .proy-lightbox-figure img {
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
  }

  .proy-next-section {
    padding: 5rem 1.5rem;
  }

  .proy-next-title {
    gap: 0.6rem;
    font-size: clamp(1.6rem, 9vw, 3rem);
  }
}

@media (max-width: 480px) {
  .proy-hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .proy-opp-grid {
    grid-template-columns: 1fr;
  }
}
