/* Entrada para Emi: el sol de Jujuy, Purmamarca y un mate cebado de lejos. */

#vista-entrada { display: none; }

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

html.con-mate #vista-entrada {
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  background: #073b4c;
}

.entrada {
  width: min(720px, 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  color: #fff6ee;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 209, 102, 0.28), transparent 55%),
    linear-gradient(180deg, #1b3a4a 0%, #073b4c 42%, #3b241c 100%);
  overflow: hidden;
}

.entrada .kicker { color: var(--amarillo); }

.entrada-paso {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 246, 238, 0.72);
}

.entrada h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.8rem, 1rem + 3vw, 3rem);
}

.entrada-texto {
  margin: 0;
  max-width: 38rem;
  min-height: 4.6em;
  font-size: 1.02rem;
  line-height: 1.45;
  color: #ffe8d6;
}

.entrada-escena {
  position: relative;
  flex: 1;
  min-height: 320px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #8ec6df 0%, #f3c9a0 46%, #e7b07a 70%, #6a3a3a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  touch-action: none;
}

.amanecio .entrada-escena,
.entrada-escena.amanecio {
  background: linear-gradient(180deg, #7ec8e3 0%, #ffd59a 38%, #f0a07a 68%, #8a4b3a 100%);
}

.sol {
  position: absolute;
  z-index: 3;
  left: 14%;
  top: 22%;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: top 1.1s ease, transform 1.1s ease;
}

.sol svg { width: 100%; height: 100%; overflow: visible; display: block; }

.sol .rayos {
  transform-origin: 48px 48px;
  animation: girar 28s linear infinite;
}

.sol.listo { top: 7%; transform: scale(1.06); cursor: default; }

.cerros {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 58%;
  z-index: 1;
}

.cerros .capa { fill: #5d6b73; transition: fill 0.9s ease; }
.cerros .cardon { fill: #243038; transition: fill 0.9s ease; }

.amanecio .c1 { fill: #6b2d5b; }
.amanecio .c2 { fill: #c4533a; }
.amanecio .c3 { fill: #e0a106; }
.amanecio .c4 { fill: #d8c7a2; }
.amanecio .c5 { fill: #7f8f45; }
.amanecio .c6 { fill: #b86a45; }
.amanecio .c7 { fill: #4a342c; }
.amanecio .cardon { fill: #1d3a32; }

.lugar {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 16px;
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 246, 238, 0.0);
}

.amanecio .lugar { color: rgba(255, 246, 238, 0.88); transition: color 0.8s ease 0.3s; }

.costa {
  position: absolute;
  z-index: 2;
  right: 6%;
  bottom: 34%;
  width: 108px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.pasando .costa, .entregado .costa { opacity: 1; transform: none; }

.costa text {
  fill: #073b4c;
  font-family: var(--fuente);
  font-size: 13px;
  font-weight: 600;
}

.ruta-luz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.ruta-luz path {
  fill: none;
  stroke: #ffd166;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  stroke-dashoffset: 280;
  opacity: 0;
}

.pasando .ruta-luz path, .entregado .ruta-luz path {
  opacity: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s ease;
}

.mate-zona {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  width: min(280px, 78%);
  transform: translateX(-50%);
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.cebando .mate-zona, .pasando .mate-zona, .entregado .mate-zona { display: flex; }

.termo, .mate-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  touch-action: none;
}

.termo { width: 72px; flex: none; }
.mate-btn { width: 128px; position: relative; }

.termo svg, .mate-btn svg { width: 100%; height: auto; display: block; overflow: visible; }

.agua {
  transform-box: fill-box;
  transform-origin: center bottom;
  transform: scaleY(var(--nivel, 0));
}

.vapor path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
}

.lleno .vapor path { opacity: 0.9; animation: vaho 1.8s ease-in-out infinite; }
.lleno .vapor path:nth-child(2) { animation-delay: 0.35s; }
.lleno .vapor path:nth-child(3) { animation-delay: 0.7s; }

.anillo {
  position: absolute;
  inset: -8px;
  border-radius: 40% 40% 46% 46%;
  border: 3px solid rgba(255, 209, 102, 0.35);
  pointer-events: none;
}

.lleno .anillo { border-color: #ffd166; }

.entrada-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
}

.entrada-acciones .btn { flex: 1 1 12rem; }

.pista-dedo {
  margin: 0;
  width: 100%;
  font-size: 0.92rem;
  color: rgba(255, 246, 238, 0.8);
}

@keyframes girar { to { transform: rotate(360deg); } }

@keyframes vaho {
  0% { transform: translateY(6px); opacity: 0; }
  30% { opacity: 0.9; }
  100% { transform: translateY(-16px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sol, .sol .rayos, .cerros .capa, .lugar, .costa, .ruta-luz path, .vapor path {
    animation: none;
    transition: none;
  }
}
