/* ============================================================
   Página Proyectos — hero banner ancho + sección Escáner 3D
   (nube de puntos → modelo 3D → realidad). Usa tokens CGK.
   ============================================================ */

/* ---- Hero banner (imagen 21:9 outpaint del render Upgrade 13K) ---- */
.proy-hero {
  position: relative;
  width: 100%;
  height: clamp(440px, 64vh, 680px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  background: var(--bg);
}

.proy-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.proy-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.proy-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(11,13,15,0.82) 0%,
      rgba(11,13,15,0.28) 26%,
      rgba(11,13,15,0.10) 48%,
      rgba(11,13,15,0.62) 76%,
      rgba(11,13,15,0.96) 100%),
    radial-gradient(120% 80% at 12% 108%, rgba(11,13,15,0.70), transparent 58%);
}

.proy-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(30px, 5vw, 64px);
}

.proy-hero__title {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-hi);
  max-width: 22ch;
  margin: 0 0 var(--space-4);
}
.proy-hero__title em {
  font-style: normal;
  background: linear-gradient(180deg, var(--cat-yellow-hi), var(--cat-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.proy-hero__sub {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--text-md);
  max-width: 58ch;
  margin: 0;
}

.proy-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: clamp(20px, 3vw, 32px);
}

.proy-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 3;
  background: linear-gradient(90deg, var(--cat-yellow), var(--molten) 55%, transparent);
}

@media (max-width: 680px) {
  .proy-hero { height: auto; min-height: 62vh; }
  .proy-hero__title { font-size: var(--text-2xl); }
  .proy-hero__sub { font-size: var(--text-base); }
}

/* ---- Video de transición Nube de puntos → 3D → Realidad ---- */
.escaneo-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-hi);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  margin: clamp(18px, 2.5vw, 30px) 0 0;  /* anula el margin lateral UA de <figure> */
}
.escaneo-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Etiquetas de las tres etapas sobre el video */
.escaneo-video__tags {
  position: absolute;
  left: clamp(10px, 1.6vw, 18px);
  right: clamp(10px, 1.6vw, 18px);
  top: clamp(10px, 1.6vw, 18px);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.escaneo-video__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--text-hi);
  background: rgba(11,13,15,0.78);
  border: 1px solid var(--hairline-hi);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.escaneo-video__tag b { color: var(--cat-yellow); font-weight: 700; }

@media (max-width: 680px) {
  .escaneo-video__tags {
    flex-wrap: wrap;
    justify-content: flex-start;
    right: auto;
    max-width: calc(100% - 20px);
  }
  .escaneo-video__tag { font-size: 9px; padding: 4px 6px; }
}

/* ---- Mini línea de proceso bajo el inciso ---- */
.escaneo-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: clamp(18px, 2.5vw, 28px);
}
.escaneo-steps__cell {
  background: var(--surface-1);
  padding: clamp(14px, 2vw, 22px);
}
.escaneo-steps__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--cat-yellow);
  display: block;
  margin-bottom: 6px;
}
.escaneo-steps__value {
  color: var(--text-md);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}
@media (max-width: 680px) {
  .escaneo-steps { grid-template-columns: 1fr; }
}

/* ============================================================
   Proyecto en ejecución (TK Rompe Presión) — chip de estado
   pulsante + barra de avance del hero + video vertical 9:16
   ============================================================ */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--signal, #B4E04A);
  border: 1px solid rgba(180, 224, 74, 0.45);
  background: rgba(180, 224, 74, 0.08);
  border-radius: 999px;
}
.status-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal, #B4E04A);
  animation: chip-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes chip-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(180, 224, 74, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(180, 224, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(180, 224, 74, 0); }
}

.hero-progress {
  max-width: 420px;
  margin-top: 26px;
}
.hero-progress__label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--text-md);
  margin-bottom: 8px;
}
.hero-progress__bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.hero-progress__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cat-yellow, #FFCD11), var(--signal, #B4E04A));
  animation: progress-fill 1.4s var(--ease-out, ease-out) 0.4s backwards;
}
@keyframes progress-fill {
  from { width: 0; }
}

/* video vertical de obra (WhatsApp 9:16) sin recorte agresivo */
.split__media--reel {
  aspect-ratio: 9 / 16;
  width: min(100%, 400px);
  margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
  .status-chip::before { animation: none; box-shadow: none; }
  .hero-progress__fill { animation: none; }
}
