/* ============================================================
   BIOSCAN 5D · MODO UMBRAL — v3
   Cambios: sin iconos en preguntas, transiciones inmersivas
   (fade+slide tipo landing), anillo reposicionado y visible,
   sin marcas de reloj, laser girando en calculo, anillo 100%
   al final, full-screen app nativa, iconos PRO en resultado.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #050505; --bg-soft: #0d0d0f;
  --gold: #C9A227; --gold-deep: #B8860B; --orange: #D13F26; --orange-bright: #EF5036;
  --text: #F2F2F0; --text-soft: #C8C8CC; --text-dim: #9A9AA0;
  --line: rgba(255,255,255,0.10); --card: rgba(22,22,25,0.85);
  --accent: var(--orange);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body, html {
  background: #000 !important; margin: 0; height: 100%;
  font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased;
}
[x-cloak] { display: none !important; }

#scanner-wrapper-master {
  width: 100%; min-height: 100vh; min-height: 100dvh; background: #000;
  display: flex; justify-content: center; align-items: center;
  padding: 20px 0; position: relative; overflow: hidden;
}
.sonar-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 50% 38%, #15151a 0%, #000 70%); }

/* IPHONE FRAME (solo PC) */
.iphone-frame {
  position: relative; width: 400px; height: 850px; background: #000;
  border-radius: 55px; z-index: 10;
  box-shadow: 0 0 0 4px #2a2a2e, 0 0 0 9px #5a5a5e, 0 0 0 10px #000, 0 40px 80px rgba(0,0,0,0.85);
  display: flex; flex-direction: column; overflow: hidden;
}
.dynamic-island { position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 35px; background: #000; border-radius: 20px; z-index: 20; }
.screen-gloss { position: absolute; inset: 0; pointer-events: none; z-index: 15; border-radius: 55px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0) 40%); }

/* FULL-SCREEN APP NATIVA en movil (punto 8) */
@media (max-width: 768px) {
  #scanner-wrapper-master { padding: 0; align-items: stretch; height: 100vh; height: 100dvh; }
  .iphone-frame { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
  .dynamic-island, .screen-gloss, .sonar-bg { display: none; }
}

.app-content {
  width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden;
  padding: 40px 24px 60px; scrollbar-width: none;
  background: var(--bg); display: flex; flex-direction: column; align-items: center;
}
.app-content::-webkit-scrollbar { display: none; }
@media (max-width: 768px) {
  .app-content { padding: max(40px, env(safe-area-inset-top)) 22px max(40px, env(safe-area-inset-bottom)); }
}

/* ============================================================
   ORBE + ANILLO NEÓN REAL (funciona en iOS Safari)
   Clave: el glow NO usa drop-shadow CSS (iOS lo aplana).
   Usa filtros SVG nativos <feGaussianBlur> + capas de trazo.
   El detalle visual vive en el <svg> del HTML; aquí van
   posiciones, animaciones y el núcleo dorado palpitante.
   ============================================================ */
.orb-container {
  position: relative; width: 132px; height: 132px; margin: 6px 0 22px;
  display: flex; justify-content: center; align-items: center; flex-shrink: 0; z-index: 50;
}
.orb-container.compact { width: 100px; height: 100px; margin: 2px 0 14px; }

/* Núcleo dorado central — palpita a ~60bpm. NO CAMBIAR (pedido Carlos) */
.orb-core {
  position: absolute; width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; z-index: 2;
  background: radial-gradient(circle at 50% 42%, var(--gold) 0%, var(--gold-deep) 45%, rgba(120,80,10,0.25) 75%, transparent 100%);
  box-shadow: 0 0 14px 2px rgba(201,162,39,0.55), 0 0 28px 6px rgba(201,162,39,0.25);
  animation: latido 1s ease-in-out infinite;
}
.orb-container.compact .orb-core { width: 38px; height: 38px; }
@keyframes latido {
  0%,100% { transform: scale(1); box-shadow: 0 0 14px 2px rgba(201,162,39,0.5), 0 0 26px 5px rgba(201,162,39,0.2); }
  50% { transform: scale(1.08); box-shadow: 0 0 20px 4px rgba(201,162,39,0.7), 0 0 40px 9px rgba(201,162,39,0.35); }
}
.orb-spark {
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle, #FFF4D6, var(--gold)); 
  animation: spark 1s ease-in-out infinite;
}
@keyframes spark { 0%,100% { opacity: 0.85; transform: scale(1);} 50% { opacity: 1; transform: scale(1.2);} }

/* El SVG del anillo se posiciona sobre el núcleo */
.ring-svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 1; pointer-events: none; }
.orb-container.compact .ring-svg { width: 100px; height: 100px; }

/* Láser que recorre el círculo durante el cálculo */
.laser-rotate { transform-origin: 66px 66px; animation: girar 1.4s linear infinite; }
/* Anillo completo encendido (resultado) pulsa suave */
.ring-done { animation: ringPulse 2.6s ease-in-out infinite; transform-origin: 66px 66px; }

@keyframes girar { to { transform: rotate(360deg); } }
@keyframes ringPulse { 0%,100% { opacity: 0.92; } 50% { opacity: 1; } }

/* ---------- TIPOGRAFIA ---------- */
.step-card { width: 100%; text-align: center; position: relative; }
.sello { font-size: 10px; color: var(--text-dim); letter-spacing: 3.5px; text-transform: uppercase;
  margin-bottom: 14px; display: block; font-weight: 600; }
.titulo { font-size: 27px; font-weight: 800; color: var(--text); line-height: 1.15;
  letter-spacing: -0.5px; margin: 0 0 16px; text-shadow: 0 0 24px rgba(201,162,39,0.25); }
.titulo.sm { font-size: 22px; }
.parrafo { font-size: 15px; color: var(--text-soft); line-height: 1.6; margin-bottom: 16px; }
.parrafo strong { color: var(--text); font-weight: 600; }
.firma-tech { font-size: 9.5px; color: var(--text-dim); letter-spacing: 1.5px; line-height: 1.5;
  margin-top: 26px; text-transform: uppercase; max-width: 300px; margin-left: auto; margin-right: auto; }

/* ---------- ANIMACIONES DE ENTRADA (tipo landing) ---------- */
@keyframes revealUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes revealScale { from { opacity: 0; transform: scale(0.96) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.anim-card > * { opacity: 0; animation: revealUp 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
.anim-card > *:nth-child(1){animation-delay:.05s} .anim-card > *:nth-child(2){animation-delay:.15s}
.anim-card > *:nth-child(3){animation-delay:.25s} .anim-card > *:nth-child(4){animation-delay:.35s}
.anim-card > *:nth-child(5){animation-delay:.45s} .anim-card > *:nth-child(6){animation-delay:.55s}
.anim-card > *:nth-child(7){animation-delay:.65s} .anim-card > *:nth-child(8){animation-delay:.75s}

/* ---------- FORMULARIO ---------- */
.form-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px 20px; margin-top: 18px; backdrop-filter: blur(6px); }
.input { width: 100%; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text); padding: 15px 18px; font-family: inherit; font-size: 15px;
  border-radius: 50px; margin-bottom: 13px; text-align: center; transition: all 0.25s; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 16px rgba(201,162,39,0.22); }
.input::placeholder { color: rgba(255,255,255,0.4); }
.consent { display: flex; align-items: flex-start; gap: 10px; text-align: left; margin-bottom: 18px; padding: 0 2px; }
.consent input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--orange); flex-shrink: 0; }
.consent label { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }

/* ---------- BOTONES ---------- */
.btn { background: linear-gradient(95deg, var(--orange), var(--orange-bright));
  color: #fff; width: 100%; padding: 16px; border-radius: 50px; text-align: center;
  font-family: inherit; font-weight: 800; text-transform: uppercase; font-size: 13.5px;
  letter-spacing: 0.8px; border: none; cursor: pointer;
  box-shadow: 0 12px 30px rgba(209,63,38,0.38); transition: 0.25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(209,63,38,0.55); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid rgba(255,255,255,0.18);
  width: 100%; padding: 14px; border-radius: 50px; font-family: inherit; font-weight: 500;
  font-size: 13px; cursor: pointer; margin-top: 11px; transition: 0.25s; }
.btn-ghost:hover { border-color: var(--gold); color: var(--text); }

/* ---------- PREPARACION ---------- */
.prep-texto { font-size: 15.5px; color: var(--text-soft); line-height: 1.6; margin-bottom: 20px; opacity: 0; animation: revealUp 0.9s forwards; }
.prep-1 { animation-delay: 0.2s; } .prep-2 { animation-delay: 1.4s; } .prep-3 { animation-delay: 2.6s; }
.respira { font-size: 20px; color: var(--gold); font-weight: 600; line-height: 1.5; margin: 24px 0;
  opacity: 0; animation: revealUp 0.9s 3.6s forwards, breathe 4s 4.5s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }

/* ============================================================
   CUESTIONARIO — sin iconos, con transicion inmersiva
   ============================================================ */
.q-bloque-titulo { font-size: 11px; color: var(--gold); letter-spacing: 3px; text-transform: uppercase;
  font-weight: 700; margin-bottom: 6px; text-shadow: 0 0 16px rgba(201,162,39,0.4); }
.q-counter { font-size: 11.5px; color: var(--text-dim); margin-bottom: 22px; }

/* Wrapper que se anima en cada cambio de pregunta */
.q-body { width: 100%; }
.q-body.enter { animation: qEnter 0.5s cubic-bezier(.2,.7,.2,1); }
@keyframes qEnter { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: translateX(0); } }
.q-body.leave { animation: qLeave 0.28s ease forwards; }
@keyframes qLeave { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-26px); } }

.q-texto { font-size: 18px; color: var(--text); font-weight: 500; line-height: 1.42; margin-bottom: 22px; text-align: left; }
.q-opciones { display: flex; flex-direction: column; gap: 11px; width: 100%; }
.q-opcion { background: rgba(24,24,28,0.85); border: 1.5px solid rgba(255,255,255,0.09); border-radius: 14px;
  padding: 15px 17px; color: var(--text-soft); font-size: 14px; line-height: 1.4; text-align: left;
  cursor: pointer; transition: all 0.22s; display: flex; align-items: center; gap: 12px; }
.q-opcion:hover { border-color: rgba(201,162,39,0.45); background: rgba(32,32,38,0.9); color: var(--text); }
.q-opcion.sel { border-color: var(--orange-bright); background: rgba(209,63,38,0.14); color: var(--text); box-shadow: 0 0 18px rgba(209,63,38,0.22); }
.q-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25);
  flex-shrink: 0; transition: all 0.2s; position: relative; }
.q-check.sq { border-radius: 6px; }
.q-opcion.sel .q-check { border-color: var(--orange-bright); background: var(--orange-bright); }
.q-opcion.sel .q-check::after { content: ''; position: absolute; top: 3px; left: 6px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.multi-hint { font-size: 11.5px; color: var(--text-dim); margin-bottom: 14px; text-align: left; }
.q-nav { display: flex; gap: 11px; margin-top: 24px; width: 100%; }
.q-nav .btn { flex: 2; } .q-nav .btn-ghost { flex: 1; margin-top: 0; }

/* ============================================================
   TRANSICION ENTRE BLOQUES — mas movimiento, anillo encima
   ============================================================ */
.transicion { position: absolute; inset: 0; background: var(--bg); z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 36px 28px; text-align: center; animation: fadeIn 0.4s; }
.trans-orb { margin-bottom: 30px; opacity: 0; animation: revealScale 0.8s 0.05s forwards; }
.trans-l1 { font-size: 16px; color: var(--text-soft); line-height: 1.5; margin-bottom: 16px;
  opacity: 0; animation: revealUp 0.8s 0.45s cubic-bezier(.2,.7,.2,1) forwards; }
.trans-l2 { font-size: 21px; color: var(--gold); font-weight: 600; font-style: italic; line-height: 1.4;
  margin-bottom: 34px; opacity: 0; animation: revealUp 0.85s 0.95s cubic-bezier(.2,.7,.2,1) forwards;
  text-shadow: 0 0 20px rgba(201,162,39,0.3); }
.trans-btn-wrap { opacity: 0; animation: revealScale 0.7s 1.5s forwards; width: 100%; max-width: 280px; }

/* ---------- CALCULO ---------- */
.calc-titulo { font-size: 23px; color: var(--text); font-weight: 800; margin-bottom: 12px; }
.calc-texto { font-size: 15px; color: var(--text-soft); margin-top: 16px; min-height: 22px; animation: fadeIn 0.5s; }

/* ---------- REVISION (desplegable) ---------- */
.rev-toggle { display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--text-soft); cursor: pointer; margin-top: 12px; padding: 10px; }
.rev-toggle:hover { color: var(--text); }
.rev-chevron { transition: transform 0.3s; }
.rev-chevron.open { transform: rotate(180deg); }
.rev-panel { overflow: hidden; transition: max-height 0.4s ease; }
.rev-item { background: rgba(20,20,24,0.7); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; margin-bottom: 9px; text-align: left; }
.rev-q { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; line-height: 1.3; }
.rev-a { font-size: 13.5px; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rev-edit { font-size: 11px; color: var(--orange-bright); cursor: pointer; flex-shrink: 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.rev-edit:hover { text-decoration: underline; }

/* ============================================================
   RESULTADO
   ============================================================ */
.res-label { font-size: 11px; color: var(--text-dim); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; }
.perfil-nombre { font-size: 31px; font-weight: 900; color: var(--text); text-transform: uppercase;
  letter-spacing: -0.5px; margin-bottom: 8px; text-shadow: 0 0 28px var(--accent); }
.perfil-sub { font-size: 14.5px; color: var(--accent); font-style: italic; margin-bottom: 26px; line-height: 1.4; }
.divisor { width: 44px; height: 2px; background: var(--accent); opacity: 0.5; margin: 0 auto 24px; border-radius: 2px; }

.felicitacion { background: linear-gradient(135deg, rgba(201,162,39,0.14), rgba(209,63,38,0.07));
  border: 1px solid rgba(201,162,39,0.32); border-radius: 16px; padding: 18px;
  margin-bottom: 24px; font-size: 14.5px; color: var(--text); line-height: 1.55; text-align: left; }
.felicitacion strong { color: var(--gold); }
.felicitacion .feli-badge { font-size: 26px; display: block; margin-bottom: 8px; }

/* Bloques con icono PRO */
.bloque-perfil { text-align: left; margin-bottom: 20px; width: 100%; }
.bp-titulo { font-size: 11px; color: var(--accent); letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 700; margin-bottom: 7px; display: flex; align-items: center; gap: 9px; }
.bp-ico { width: 22px; height: 22px; flex-shrink: 0; }
.bp-texto { font-size: 14px; color: var(--text-soft); line-height: 1.55; }

.radar-box { width: 100%; max-width: 320px; margin: 28px auto; padding: 16px; background: rgba(13,13,15,0.7); border-radius: 16px; border: 1px solid var(--line); }

.destino-card { background: linear-gradient(160deg, rgba(201,162,39,0.08), rgba(0,0,0,0.2));
  border: 1.5px solid rgba(201,162,39,0.28); border-radius: 18px; padding: 22px 20px;
  margin: 26px 0; width: 100%; text-align: left; }
.destino-intro { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin-bottom: 14px; }
.destino-nombre { font-size: 24px; font-weight: 900; color: var(--gold); text-transform: uppercase; margin-bottom: 6px; text-shadow: 0 0 22px rgba(201,162,39,0.4); }
.destino-maestria { font-size: 13px; color: var(--orange-bright); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

.cierre { margin-top: 22px; }
.cierre-titulo { font-size: 17px; color: var(--text); font-weight: 700; line-height: 1.4; margin-bottom: 14px; }
.cierre p { font-size: 14px; color: var(--text-soft); line-height: 1.6; margin-bottom: 14px; }
.cierre p strong { color: var(--text); }
.cta-wrap { width: 100%; margin-top: 18px; }
.acceso-nota { font-size: 11.5px; color: var(--text-dim); margin-top: 14px; line-height: 1.6; }

/* Logo 5D final */
.logo-5d-final { width: 64px; height: 64px; margin: 28px auto 10px; display: block; opacity: 0.95; }
.firma-marca { font-size: 11px; color: var(--text-dim); margin-top: 6px; letter-spacing: 1px; }

/* ---------- UTILES ---------- */
.error-msg { color: #ff7b7b; font-size: 13px; margin-bottom: 13px; padding: 10px; background: rgba(255,107,107,0.08); border-radius: 8px; border: 1px solid rgba(255,107,107,0.2); }
.spinner { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--orange-bright); border-radius: 50%; animation: girar 0.8s linear infinite; margin: 0 auto; }

/* ============================================================
   Modal de aviso de repetición del BioScan (Regla 3)
   Usa las variables de marca para coherencia total.
   ============================================================ */
.aviso-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.78); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: avisoFade .25s ease;
}
@keyframes avisoFade { from { opacity: 0; } to { opacity: 1; } }
.aviso-card {
  max-width: 380px; width: 100%;
  background: linear-gradient(165deg, var(--bg-soft), #0b0b0d);
  border: 1px solid rgba(201,162,39,0.3); border-radius: 22px;
  padding: 30px 26px; text-align: center;
  animation: avisoUp .3s ease;
}
@keyframes avisoUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.aviso-icono { font-size: 34px; margin-bottom: 10px; }
.aviso-titulo {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600;
  color: var(--gold); margin-bottom: 12px;
}
.aviso-texto {
  font-size: 14px; color: var(--text-soft); line-height: 1.6; margin-bottom: 22px;
}
.aviso-botones { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   Bullets teaser del Módulo PRO (bajo el botón de transformación)
   ============================================================ */
.pro-teaser {
  display: flex; flex-direction: column; gap: 12px;
  margin: 18px 0 6px; padding: 18px 16px;
  background: rgba(239,80,54,0.05);
  border: 1px solid rgba(239,80,54,0.18);
  border-radius: 16px;
}
.pt-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: var(--text-soft); line-height: 1.4; text-align: left;
}
.pt-ico {
  flex-shrink: 0; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.pt-ico svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--orange-bright); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

