/* Portada para Emi: dos luces, una en Jujuy y otra en España, hasta que se tocan. */

#vista-luz { display: none; }

html.con-luz .barra,
html.con-luz .pie,
html.con-luz #vista-portada,
html.con-luz #vista-juego,
html.con-luz #vista-entrada,
html.con-luz #vista-corazon { display: none; }

html.con-luz #vista-luz {
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  background: #140c18;
}

.luz {
  width: min(720px, 100%);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  color: #fff4f6;
  background:
    radial-gradient(90% 50% at 50% 18%, rgba(255, 140, 170, 0.22), transparent 60%),
    linear-gradient(180deg, #1a1024 0%, #2a1430 48%, #3a1a28 100%);
}

.luz .kicker { color: #ffb4c8; }

.luz h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2rem, 1.1rem + 3.4vw, 3.3rem);
}

.luz-texto {
  margin: 0;
  max-width: 36rem;
  min-height: 4.8em;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #ffe0e8;
}

.luz-cielo {
  position: relative;
  flex: 1;
  min-height: 340px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 40%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.6px 1.6px at 70% 18%, #fff, transparent),
    radial-gradient(1px 1px at 84% 36%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.3px 1.3px at 48% 12%, rgba(255, 220, 230, 0.9), transparent),
    linear-gradient(180deg, #120a1c 0%, #241228 55%, #4a2030 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  touch-action: none;
}

.casa {
  position: absolute;
  top: 28%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 76px;
  color: rgba(255, 244, 246, 0.8);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.casa-jujuy { left: 8%; }
.casa-espana { right: 8%; }

.marco {
  width: 54px;
  height: 68px;
  border-radius: 8px 8px 4px 4px;
  padding: 6px;
  background: #2a1a16;
  box-shadow: 0 0 24px rgba(255, 170, 120, 0.25);
}

.casa-espana .marco {
  background: #15202a;
  box-shadow: 0 0 24px rgba(140, 180, 255, 0.22);
}

.vidrio {
  display: block;
  height: 100%;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 214, 150, 0.95), rgba(255, 140, 90, 0.75));
}

.casa-espana .vidrio {
  background: linear-gradient(180deg, rgba(190, 220, 255, 0.9), rgba(90, 120, 180, 0.7));
}

.juntas .marco { box-shadow: 0 0 32px rgba(255, 150, 180, 0.55); }

.hilos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hilos path {
  fill: none;
  stroke: #ffb7c8;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 160;
  stroke-dashoffset: calc(160 * (1 - var(--union, 0)));
  filter: drop-shadow(0 0 6px rgba(255, 160, 190, 0.8));
}

.centro-luz {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46%;
  width: 108px;
  height: 108px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(255, 214, 224, 0.95) 0 18%, transparent 19% 62%, rgba(255, 160, 186, calc(0.25 + var(--union, 0) * 0.6)) 63% 64%, transparent 65%);
  box-shadow: 0 0 0 10px rgba(255, 180, 200, calc(0.08 + var(--union, 0) * 0.2));
}

.centro-luz:focus-visible { outline: 3px solid #ffd166; outline-offset: 6px; }

.corazon-encuentro {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 46%;
  width: 86px;
  height: 78px;
  transform: translate(-50%, -40%) scale(0.4);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(255, 80, 120, 0.35));
}

.juntas .corazon-encuentro {
  opacity: 1;
  transform: translate(-50%, -58%) scale(1);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.juntas .centro-luz { opacity: 0; pointer-events: none; }

.luz-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.luz-acciones .btn { flex: 1 1 14rem; }

.luz .btn-fantasma { color: #ffe0e8; border-color: rgba(255, 224, 232, 0.45); }

@media (prefers-reduced-motion: reduce) {
  .juntas .corazon-encuentro { transition: none; }
}
