/* Intro al entrar (una vez por visita): la papeleta cae en la urna, cuenta los días que faltan y la urna se abre.
   Solo se ve si el script de la cabecera pone la clase .i-si (no sale con «reducir movimiento» ni después del 29N). */
.i-intro { display: none; }
.i-si .i-intro { display: block; position: fixed; inset: 0; z-index: 9999; overflow: hidden; color: #fff; font-family: var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; animation: i-quitar 0s 3.2s forwards; }
/* Las dos hojas oscuras que se abren al final, desde el centro */
.i-intro::before, .i-intro::after { content: ''; position: absolute; left: 0; right: 0; height: 50.5%; background: var(--noche, #0e0d0b); }
.i-intro::before { top: 0; animation: i-arriba .6s cubic-bezier(.75,0,.2,1) 2.15s forwards; }
.i-intro::after { bottom: 0; animation: i-abajo .6s cubic-bezier(.75,0,.2,1) 2.15s forwards; }
.i-centro { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: radial-gradient(60% 45% at 50% 42%, rgba(227,191,126,.16), transparent 70%); animation: i-desvanece .25s ease-in 2.05s forwards; }

/* Urna y papeleta */
.i-urna { width: min(54vw, 210px); height: auto; overflow: visible; margin-bottom: 18px; transform-origin: 50% 100%; animation: i-golpe .3s ease-out .78s; }
.i-sobre { transform-box: view-box; animation: i-cae .9s cubic-bezier(.45,0,.55,1) .1s both; }
.i-caja-fondo { fill: rgba(255,255,255,.04); }
.i-caja { fill: rgba(255,255,255,.07); stroke: var(--oro2, #f2d8a2); stroke-width: 2.5; }
.i-29 { font: 900 22px var(--sans); letter-spacing: -.02em; fill: var(--oro2, #f2d8a2); opacity: .55; text-anchor: middle; }

/* Cuenta atrás */
.i-faltan, .i-num, .i-dias { margin: 0; opacity: 0; }
.i-faltan { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--oro2, #f2d8a2); animation: i-entra .4s ease-out .6s forwards; }
.i-num { font-family: var(--cursiva); font-style: italic; font-weight: 400; font-size: clamp(6rem, 32vw, 9.5rem); line-height: .95; letter-spacing: -.02em; padding: 0 .1em; background: linear-gradient(92deg, var(--oro2, #f2d8a2), var(--oro, #c9a26b) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; animation: i-entra .45s cubic-bezier(.2,.9,.3,1.3) .72s forwards; }
.i-dias { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; animation: i-entra .4s ease-out .95s forwards; }
.i-marca { position: absolute; z-index: 1; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .9rem; font-weight: 800; color: rgba(255,255,255,.7); animation: i-desvanece .25s ease-in 2.05s forwards; }
.i-marca img { width: 22px; height: 22px; }

/* Al tocar, se salta: misma salida pero ya */
.i-intro.i-fin { animation: i-quitar2 0s .7s forwards; }
.i-intro.i-fin::before { animation: i-arriba2 .55s cubic-bezier(.75,0,.2,1) .1s forwards; }
.i-intro.i-fin::after { animation: i-abajo2 .55s cubic-bezier(.75,0,.2,1) .1s forwards; }
.i-intro.i-fin .i-centro, .i-intro.i-fin .i-marca { animation: i-desvanece2 .2s ease-in forwards; }

@keyframes i-cae {
  0% { transform: translateY(-70px); opacity: 0; }
  14% { opacity: 1; }
  45% { transform: translateY(36px); }
  72% { transform: translateY(146px) rotate(-7deg); }
  82% { transform: translateY(138px) rotate(-5deg); }
  100% { transform: translateY(146px) rotate(-7deg); opacity: 1; }
}
@keyframes i-golpe { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.04, .97); } }
@keyframes i-entra { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes i-desvanece { to { opacity: 0; transform: scale(.97); } }
@keyframes i-desvanece2 { to { opacity: 0; transform: scale(.97); } }
@keyframes i-arriba { to { transform: translateY(-101%); } }
@keyframes i-arriba2 { to { transform: translateY(-101%); } }
@keyframes i-abajo { to { transform: translateY(101%); } }
@keyframes i-abajo2 { to { transform: translateY(101%); } }
@keyframes i-quitar { to { visibility: hidden; pointer-events: none; } }
@keyframes i-quitar2 { to { visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .i-intro { display: none !important; } }
