@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

:root {
  --blue:   #004DB5;
  --yellow: #F5C800;
  --white:  #FFFFFF;
  --blue2: #0167B8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background-color: var(--blue);
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 30px 30px;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: transparent;
  color: var(--white);
  overflow-x: hidden;
}

/* ───── HERO ───── */
.hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

/* hand image – left side */
.hero-hand {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 52%;
  object-fit: cover;
  object-position: right center;
}
.hero-hand img {
  max-width: 700px;
}
/* placeholder box when image is missing */
.img-placeholder {
  background: rgba(255,255,255,.12);
  border: 2px dashed rgba(255,255,255,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: .8rem;
  text-align: center;
  border-radius: 8px;
}

/* Pink Promos logo block */
.logo-block {
  position: relative;
  z-index: 2;
}

.logo-pink {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -1px;
}

.logo-promos {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--yellow);
  text-transform: uppercase;
  line-height: 1;
}

.logo-gollo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(.9rem, 2vw, 1.3rem);
  color: var(--white);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* fist icon placeholder next to PINK */
.fist-icon {
  width: clamp(60px, 9vw, 90px);
  height: clamp(60px, 9vw, 90px);
  flex-shrink: 0;
}

.tagline {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--white);
  position: relative;
  z-index: 2;
}

/* ───── SECTION: Analizar ───── */
.section-analizar {
  padding: 56px 0 40px;
}

.analizar-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  color: var(--white);
}

/* hand / phone illustration placeholders */
.illus-placeholder {
  width: 130px;
  height: 150px;
  border-radius: 12px;
}

/* ───── BADGES ───── */
.badges-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 24px 0 0;
}

.badge-card {
  background: rgba(255,255,255,.13);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 12px;
  width: 120px;
  padding: 18px 10px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.badge-label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: .85rem;
  color: var(--yellow);
  line-height: 1.1;
}

.badge-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.7);
}

/* ───── FOOTER TEXT ───── */
.footer-text {
  font-size: 30px;
  line-height: 36px;
  font-weight: bold;
  color: var(--white);
  text-align: center;
  padding: 32px 24px 0;
}
.logo {
  max-width: 100%;
}
/* ───── CTA BUTTON ───── */
.btn-cta {
  background-color: var(--yellow);
  color: var(--blue2);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  border: none;
  border-radius: 10px;
  padding: 16px 52px;
  letter-spacing: .5px;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  color: var(--white);
}
.carga-body .btn-cta {
  min-width: 400px;
  margin-top: 50px;
}
.cta-arrows {
  font-size: 1rem;
  opacity: .7;
}

.carga-outer {
  width: 100%;
  max-width: 836px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
#paso-camara {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 16px;
  gap: 14px;
  align-items: center;
}
.camara-titulo {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
}
.camera-container {
  position: relative;
  width: 100%;
  border: 5px solid var(--yellow);
  overflow: hidden;
  /*background: #000;*/
  background-image: url("../img/Recurso\ 17.png");
  flex: 1;
  max-height: 54vh;
}
#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#guia-mano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  background: #ffffff45;
}
@media (min-width: 993px) {
  #video,
  #scan-foto {
    transform: scaleX(-1);
  }
}
/* Análisis */
#paso-analisis {
  display: none;
  flex-direction: column;
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
}
/* ══════════ NUEVO MÓDULO DE ESCANEO IA ══════════ */
.scan-module {
  --cyan: #00e5ff;
  --cyan-soft: #7df3ff;
  --bg-dark: #004DB5;
  --bg-dark-2: #003c8b;
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--bg-dark-2) 0%, var(--bg-dark) 60%),
    var(--bg-dark);
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
}

/* grid de fondo */
.scan-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .28;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* viñeta para oscurecer bordes */
.scan-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 45%, transparent 40%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

/* marcos (esquinas) */
.frame-top,
.frame-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 5;
  pointer-events: none;
  display: block;
}
.frame-top { top: 0; }
.frame-bottom { bottom: 0; }

/* badge "Escaneando..." */
.scan-header {
  position: absolute;
  top: 8%;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 6;
  padding: 0 8%;
}
.scan-dash {
  flex: 1;
  max-width: 110px;
  height: 8px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cyan) 0 10px,
    transparent 10px 18px
  );
  opacity: .85;
}
.scan-badge {
  flex-shrink: 0;
  padding: 10px 26px;
  border: 2px solid var(--cyan);
  border-radius: 40px;
  color: var(--cyan);
  font-weight: 700;
  font-size: clamp(11px, 3vw, 18px);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(0,229,255,.45), inset 0 0 10px rgba(0,229,255,.15);
  background: rgba(0,229,255,.05);
}

/* loaders */
.loader-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6%;
  z-index: 6;
  position: relative;
}
.loader-row.top {
  position: absolute;
  top: 19%;
  left: 0;
  width: 100%;
  padding: 0 14%;
}
.loader {
  width: 16%;
  max-width: 78px;
  aspect-ratio: 1/1;
  object-fit: contain;
  animation: spin 1.6s linear infinite;
  filter: drop-shadow(0 0 6px rgba(0,229,255,.5));
}
.loader:nth-child(2) { animation-duration: 1.4s; }
.loader:nth-child(3) { animation-duration: 1.8s; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* zona central: foto + línea de escaneo */
.scan-stage {
  position: absolute;
  top: 32%;
  bottom: 24%;
  left: 8%;
  right: 8%;
  z-index: 3;
}
#scan-foto,
.scan-hand {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(0,229,255,.35));
}
.scan-line {
  position: absolute;
  left: -6%;
  right: -6%;
  width: 112%;
  height: auto;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(0,229,255,.8));
  animation: sweep 3.4s ease-in-out infinite;
}
@keyframes sweep {
  0%   { top: 2%;  opacity: 1; }
  50%  { top: 92%; opacity: 1; }
  100% { top: 2%;  opacity: 1; }
}

/* puntos de detección */
.scan-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 3px rgba(0,229,255,.8);
  opacity: 0;
  z-index: 4;
  animation: popDot 4s ease-in-out infinite;
}
.scan-stage .scan-dot:nth-child(3) { top: 18%; left: 30%; animation-delay: .4s; }
.scan-stage .scan-dot:nth-child(4) { top: 34%; left: 64%; animation-delay: 1.1s; }
.scan-stage .scan-dot:nth-child(5) { top: 55%; left: 22%; animation-delay: 1.9s; }
.scan-stage .scan-dot:nth-child(6) { top: 60%; left: 70%; animation-delay: 1.5s; }
.scan-stage .scan-dot:nth-child(7) { top: 78%; left: 48%; animation-delay: .8s; }
@keyframes popDot {
  0%,20%  { opacity: 0; transform: scale(0); }
  32%     { opacity: 1; transform: scale(1.3); }
  70%     { opacity: 1; transform: scale(1); }
  88%     { opacity: 0; transform: scale(.5); }
  100%    { opacity: 0; }
}

/* footer */
.scan-footer {
  position: absolute;
  bottom: 9%;
  left: 0;
  width: 100%;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 5%;
  gap: 4%;
}
.bars {
  width: 22%;
  max-width: 150px;
  display: block;
  object-fit: contain;
}
.footer-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}
.footer-loaders {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}
.footer-loaders .loader {
  width: 9%;
  max-width: 34px;
  min-width: 22px;
}
.loader-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hazard-track {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: 20px;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0% 100%);
  background: repeating-linear-gradient(
    -45deg,
    var(--cyan) 0 10px,
    transparent 10px 20px
  );
  opacity: .9;
}
.base-line {
  position: absolute;
  bottom: 4%;
  left: 6%;
  width: 88%;
  z-index: 5;
  opacity: .9;
  pointer-events: none;
}

/* barra de progreso funcional integrada */
.scan-progress-module {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.scan-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scan-bar-brand {
  color: rgba(255,255,255,0.65);
  font-size: 10px;
  font-family: system-ui, -apple-system, sans-serif;
}
.scan-bar-pct {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
}
.scan-bar-track {
  height: 5px;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  overflow: hidden;
}
.scan-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #00aaff, #F5C800);
  width: 0%;
  transition: width 0.35s ease;
}
#canvas { display:none; }
#form-resultados { display:none; }
#dev-upload-wrap {
  width: 100%;
  text-align: center;
  opacity: 0.45;
}
#dev-upload-wrap label {
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}
#dev-upload { width: 100%; font-size: 0.8rem; }
.head-left {
  min-height:480px;
}
.bajar {
  text-align: center;
}
.bajar img {
  max-width: 50px;
}
.manos {
  display:flex;
  gap:12px;
  width:100%;
  max-width:400px;
  margin-top:20px;
  justify-content: space-between;
}
.manos .btn-cta {
  padding:12px 10px;
  font-size:0.95rem;
  min-width: 30% !important;
  width: 45%;
}
@media (max-width: 992px) {
  .logo-block {
    text-align: center !important;
  }
  .hero-hand {
    width: 80%;
    margin-top: -120px;
  }
  .dedo-grafico {
    width: 100%;
    height: auto;
  }
  .head-left {
    min-height: 200px;
  }
  .hide-mobile {
    display: none;
  }
  .hero-hand img {
    max-width: 480px;
  }
}
@media (max-width: 480px) {
  .carga-body .btn-cta {
    min-width: 200px;
  }
  .section-analizar {
    margin-top: -75px;
  }
}

/* ══════════ FLOATING SCROLL HINT ══════════ */
#scroll-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: bounce-float 2s ease-in-out infinite;
}
#scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
#scroll-hint img {
  width: 100%;
  height: auto;
  display: block;
}
@keyframes bounce-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}