/* ============================================================
   NAVIDAD EN CALLE CHILE — estilos
   Paleta tomada de la ilustración del calendario
   ============================================================ */
:root {
  --crema: #FBF5EC;
  --crema-2: #F6EADB;
  --papel: #FFFDF8;
  --salvia: #C9D9BC;
  --salvia-2: #A9C29A;
  --verde: #2F6A43;
  --rosa: #F4B8C8;
  --rosa-2: #EC93AA;
  --rojo: #E25B45;
  --azul: #AFC2EE;
  --galleta: #D7924F;
  --cafe: #5A3826;
  --cafe-2: #8A6450;
  --sombra: 0 10px 30px rgba(90, 56, 38, .12);
  --radio: 22px;
  --f-titulo: 'Fredoka', system-ui, sans-serif;
  --f-texto: 'Fredoka', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--crema); color: var(--cafe);
  font-family: var(--f-texto); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--crema) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px dashed rgba(90, 56, 38, .12);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--f-titulo); font-size: 26px; white-space: nowrap; }
.logo img { height: 46px; width: auto; }
.logo .estrella { color: var(--rojo); animation: girar 6s linear infinite; display: inline-block; }
.logo b { color: var(--rojo); font-weight: 400; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: background .2s; }
.nav a:hover { background: var(--salvia); }
@media (max-width: 760px) { .nav { display: none; } .logo { font-size: 22px; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: var(--papel); border: 2px solid var(--salvia);
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
}
.eyebrow .punto { width: 8px; height: 8px; border-radius: 50%; background: var(--rojo); animation: latir 1.6s ease-in-out infinite; }
.hero h1 { font-size: clamp(40px, 5.6vw, 70px); margin: 16px 0 12px; }
.hero h1 .rojo { color: var(--rojo); }
.hero h1 .verde { color: var(--verde); }
.hero .bajada { font-size: 19px; color: var(--cafe-2); max-width: 30ch; margin: 0 0 26px; }
.cifras { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.cifra { background: var(--papel); border-radius: 18px; padding: 10px 16px; box-shadow: var(--sombra); text-align: center; min-width: 88px; }
.cifra strong { display: block; font-family: var(--f-titulo); font-size: 34px; line-height: 1; color: var(--rojo); }
.cifra:nth-child(2) strong { color: var(--verde); }
.cifra:nth-child(3) strong { color: var(--galleta); }
.cifra span { font-size: 13px; color: var(--cafe-2); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--rojo); color: #fff; font-weight: 600; font-size: 17px; padding: 14px 24px; border-radius: 999px;
  box-shadow: 0 6px 0 #B9402E; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #B9402E; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #B9402E; }
.btn.sec { background: var(--papel); color: var(--cafe); box-shadow: 0 6px 0 var(--salvia-2); }
.btn.sec:hover { box-shadow: 0 8px 0 var(--salvia-2); }
.acciones { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 24px; }
  .hero .texto { text-align: center; }
  .hero .bajada { margin-inline: auto; }
  .cifras, .acciones { justify-content: center; }
}

/* ---------- Decoración flotante ---------- */
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco svg { width: 100%; height: 100%; }
.flota { animation: flotar 6s ease-in-out infinite; }
.flota.d2 { animation-duration: 7.5s; animation-delay: -2s; }
.flota.d3 { animation-duration: 9s; animation-delay: -4s; }
.gira { animation: girar 14s linear infinite; }

/* ---------- Calendario ---------- */
.cal-zona { position: relative; z-index: 1; }
.cal {
  position: relative; width: 100%; max-width: 640px; margin-inline: auto; aspect-ratio: 1254 / 870;
  perspective: 1400px; animation: respirar 7s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(90, 56, 38, .16));
}
.cal > img { width: 100%; height: 100%; border-radius: 28px; user-select: none; -webkit-user-drag: none; }
.puerta {
  position: absolute; border: 0; padding: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; border-radius: 9px;
}
.puerta .atras {
  position: absolute; inset: 0; border-radius: 9px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #FFF7EE 0%, #F7E3CF 100%);
  box-shadow: inset 0 0 0 2px rgba(90, 56, 38, .12), inset 0 6px 14px rgba(90, 56, 38, .16);
  display: grid; place-items: center; align-content: center; gap: 2px; text-align: center;
}
.puerta .atras .em { font-size: clamp(18px, 3.4vw, 30px); line-height: 1; }
.puerta .atras .mini {
  font-size: clamp(8px, 1.25vw, 11px); font-weight: 600; line-height: 1.1; padding: 0 4px;
  color: var(--cafe); max-width: 100%;
}
.puerta .atras .mini.gano { color: var(--verde); }
.puerta .frente {
  position: absolute; inset: 0; border-radius: 9px;
  background-image: url('../img/calendario-12.png'); background-repeat: no-repeat;
  transform-origin: left center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform 1.1s cubic-bezier(.3, 1.35, .45, 1), box-shadow .3s, filter .3s;
}
.puerta:hover .frente { transform: translateZ(14px) rotateY(-6deg); box-shadow: 4px 6px 14px rgba(90, 56, 38, .25); }
.puerta:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
/* Futuro: cerrado con candado-cinta */
.puerta.futuro .frente::after {
  content: ''; position: absolute; inset: 0; border-radius: 9px; background: rgba(251, 245, 236, .18);
}
.puerta.futuro .candado {
  position: absolute; right: 5%; bottom: 5%; font-size: clamp(9px, 1.5vw, 13px); opacity: .75; z-index: 3;
  transform: translateZ(1px);
}
/* Abierta */
.puerta.abierta .frente { transform: rotateY(-112deg); box-shadow: -6px 4px 12px rgba(90, 56, 38, .18); }
.puerta.abierta:hover .frente { transform: rotateY(-100deg); }
/* Hoy */
.puerta.hoy:not(.abierta) { animation: tironear 2.4s ease-in-out infinite; z-index: 5; }
.puerta.hoy:not(.abierta) .frente { box-shadow: 0 0 0 3px var(--rojo), 0 0 22px 6px rgba(226, 91, 69, .45); }
.puerta.hoy .cartel {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%) translateZ(30px); z-index: 6;
  background: var(--rojo); color: #fff; font-size: clamp(9px, 1.4vw, 12px); font-weight: 700; letter-spacing: .04em;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 0 #B9402E;
  animation: saltito 1.2s ease-in-out infinite;
}
.puerta.hoy.abierta .cartel { display: none; }
.puerta.sacudir { animation: sacudir .5s; }

.cal-ayuda { text-align: center; font-size: 14px; color: var(--cafe-2); margin-top: 14px; }

/* ---------- Secciones ---------- */
section { position: relative; }
.seccion { padding: 80px 0; }
.sec-titulo { text-align: center; margin-bottom: 40px; }
.sec-titulo h2 { font-size: clamp(40px, 5.5vw, 62px); }
.sec-titulo p { color: var(--cafe-2); margin: 10px auto 0; max-width: 52ch; }
.sec-titulo .chip { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rojo); margin-bottom: 8px; }
.ondas { height: 28px; background: radial-gradient(circle at 14px -6px, transparent 16px, var(--papel) 17px) repeat-x; background-size: 28px 28px; }
.ondas.inv { transform: rotate(180deg); }
.banda { background: var(--papel); }
.banda-patron { position: relative; background: var(--crema); isolation: isolate; }
.banda-patron::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .16;
  background: url('../img/patron.jpg') center / 520px repeat;
}

/* ---------- Premio de hoy ---------- */
.hoy-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: center;
  background: var(--crema); border-radius: 32px; padding: 28px; box-shadow: var(--sombra);
  border: 3px solid var(--salvia); position: relative; overflow: hidden;
}
.hoy-foto {
  aspect-ratio: 1; border-radius: 24px; overflow: hidden; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, var(--rosa) 0 14px, #F8CBD7 14px 28px);
  font-size: 92px; position: relative;
}
.hoy-foto img { width: 100%; height: 100%; object-fit: cover; }
.hoy-foto .num {
  position: absolute; left: 12px; top: 12px; background: var(--papel); border-radius: 14px; padding: 4px 12px;
  font-family: var(--f-titulo); font-size: 26px; line-height: 1.1; box-shadow: 0 3px 0 rgba(90, 56, 38, .15);
}
.hoy-info h3 { font-size: clamp(32px, 4vw, 46px); margin: 6px 0 10px; }
.hoy-info .desc { color: var(--cafe-2); margin: 0 0 18px; }
.tag-local {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--papel); font-weight: 600; font-size: 15px; border: 2px solid currentColor;
}
.tag-local .bola { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; }
.tag-local span { color: var(--cafe); }
.datos-sorteo { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.dato { background: var(--papel); border-radius: 16px; padding: 10px 16px; font-size: 14px; color: var(--cafe-2); }
.dato strong { display: block; color: var(--cafe); font-size: 17px; }
.cuenta { display: flex; gap: 8px; margin-top: 4px; }
.cuenta div { background: var(--cafe); color: var(--crema); border-radius: 12px; padding: 6px 10px; text-align: center; min-width: 58px; }
.cuenta b { display: block; font-family: var(--f-titulo); font-size: 30px; line-height: 1; font-weight: 400; }
.cuenta small { font-size: 11px; opacity: .8; }
.ganador-box {
  margin-top: 18px; background: var(--salvia); border-radius: 20px; padding: 14px 18px; display: flex; align-items: center; gap: 14px;
}
.ganador-box .trofeo { font-size: 36px; animation: saltito 1.4s ease-in-out infinite; }
.ganador-box strong { font-family: var(--f-titulo); font-size: 30px; font-weight: 400; display: block; line-height: 1.1; }
.hoy-vacio { text-align: center; padding: 30px 10px; }
.hoy-vacio h3 { font-size: 40px; margin-bottom: 8px; }
@media (max-width: 760px) {
  .hoy-card { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .hoy-foto { max-width: 320px; width: 100%; margin-inline: auto; }
}

/* ---------- Cómo participar ---------- */
.pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: paso; }
.paso {
  background: var(--papel); border-radius: var(--radio); padding: 22px 18px; box-shadow: var(--sombra); position: relative;
  transition: transform .25s;
}
.paso:hover { transform: translateY(-6px) rotate(-1deg); }
.paso .ico { font-size: 40px; margin-bottom: 8px; display: inline-block; }
.paso:hover .ico { animation: saltito .8s ease-in-out; }
.paso h3 { font-size: 26px; margin-bottom: 6px; }
.paso p { margin: 0; font-size: 15px; color: var(--cafe-2); }
.paso::before {
  counter-increment: paso; content: counter(paso); position: absolute; top: -12px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--rojo); color: #fff; display: grid; place-items: center;
  font-family: var(--f-titulo); font-size: 22px; box-shadow: 0 3px 0 #B9402E;
}
@media (max-width: 900px) { .pasos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pasos { grid-template-columns: 1fr; } }

/* Simulador de chances */
.simulador {
  margin-top: 48px; background: var(--papel); border-radius: 32px; padding: 30px; box-shadow: var(--sombra);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center;
}
.simulador h3 { font-size: 36px; margin-bottom: 6px; }
.simulador > div > p { color: var(--cafe-2); margin: 0 0 18px; font-size: 15px; }
.locales-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ltog {
  border: 2px solid var(--crema-2); background: var(--crema); border-radius: 18px; padding: 10px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 500;
  transition: transform .15s, border-color .2s, background .2s;
}
.ltog .em { font-size: 26px; transition: transform .3s; }
.ltog:hover { transform: translateY(-2px); }
.ltog[aria-pressed="true"] { border-color: var(--verde); background: #E8F0E1; }
.ltog[aria-pressed="true"] .em { transform: scale(1.15) rotate(-8deg); }
.urna-zona { text-align: center; }
.urna { position: relative; width: 220px; height: 230px; margin: 0 auto; }
.urna .caja {
  position: absolute; left: 10px; right: 10px; bottom: 0; height: 150px; border-radius: 18px 18px 24px 24px;
  background: linear-gradient(180deg, rgba(175, 194, 238, .35), rgba(175, 194, 238, .6));
  border: 3px solid var(--cafe); overflow: hidden;
}
.urna .tapa {
  position: absolute; left: 0; right: 0; bottom: 146px; height: 22px; border-radius: 12px; background: var(--rojo);
  border: 3px solid var(--cafe); z-index: 3;
}
.urna .tapa::after { content: ''; position: absolute; left: 50%; top: 5px; width: 70px; height: 6px; margin-left: -35px; background: var(--cafe); border-radius: 4px; }
.urna .cartelito { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); font-family: var(--f-titulo); font-size: 22px; z-index: 2; white-space: nowrap; }
.tarjeta-urna {
  position: absolute; width: 44px; height: 30px; border-radius: 5px; border: 2px solid var(--cafe); z-index: 1;
  display: grid; place-items: center; font-size: 14px; background: var(--papel);
  animation: caerUrna .9s cubic-bezier(.4, 1.4, .6, 1) both;
}
.chances-num { font-family: var(--f-titulo); font-size: 52px; line-height: 1; color: var(--rojo); margin-top: 12px; }
.chances-txt { color: var(--cafe-2); font-size: 15px; }
@media (max-width: 800px) { .simulador { grid-template-columns: 1fr; padding: 20px; } }

/* ---------- Locales ---------- */
.locales-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.local-card {
  background: var(--papel); border-radius: 28px; overflow: hidden; box-shadow: var(--sombra);
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.local-card:hover { transform: translateY(-8px) rotate(.6deg); }
.local-ilu {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; overflow: hidden;
  font-size: 80px;
}
.local-ilu img { width: 100%; height: 100%; object-fit: cover; }
.local-ilu .toldo {
  position: absolute; top: 0; left: 0; right: 0; height: 34px;
  background: repeating-linear-gradient(90deg, var(--c) 0 26px, #fff 26px 52px);
  border-bottom-left-radius: 50% 14px; border-bottom-right-radius: 50% 14px;
}
.local-ilu .em { animation: flotar 5s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,.12)); }
.local-body { padding: 18px 20px 22px; }
.local-body h3 { font-size: 32px; }
.local-body .rubro { color: var(--cafe-2); font-size: 15px; margin: 2px 0 12px; }
.local-dias { display: flex; gap: 6px; flex-wrap: wrap; }
.local-dias span {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--f-titulo); font-size: 20px;
  background: var(--crema); border: 2px solid var(--crema-2);
}
.local-dias span.ok { background: var(--salvia); border-color: var(--salvia-2); }
.local-dias span.hoy { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.local-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; color: var(--cafe-2); }
.local-meta a { text-decoration: none; font-weight: 500; color: var(--cafe); }
@media (max-width: 900px) { .locales-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .locales-grid { grid-template-columns: 1fr; } }

/* ---------- Ganadores ---------- */
.ganadores { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gan {
  background: var(--papel); border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  box-shadow: var(--sombra); cursor: pointer; border: 0; text-align: left; width: 100%;
  transition: transform .2s;
}
.gan:hover { transform: scale(1.03); }
.gan .n { width: 50px; height: 50px; flex: none; border-radius: 14px; display: grid; place-items: center; font-family: var(--f-titulo); font-size: 28px; background: var(--salvia); }
.gan .t { font-size: 14px; color: var(--cafe-2); line-height: 1.3; }
.gan .t strong { display: block; color: var(--cafe); font-size: 16px; }
.gan.pend .n { background: var(--crema-2); }
.vacio { text-align: center; color: var(--cafe-2); padding: 20px; }

/* ---------- Bases ---------- */
.bases { max-width: 780px; margin-inline: auto; }
.bases details { background: var(--papel); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--sombra); }
.bases summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.bases summary::-webkit-details-marker { display: none; }
.bases summary::after { content: '+'; font-size: 22px; line-height: 1; transition: transform .2s; }
.bases details[open] summary::after { transform: rotate(45deg); }
.bases details p { margin: 0; padding: 0 20px 18px; color: var(--cafe-2); font-size: 15px; }

/* ---------- Footer ---------- */
footer { background: var(--cafe); color: var(--crema); padding: 40px 0; text-align: center; }
footer .logo { justify-content: center; color: var(--crema); font-size: 30px; }
footer p { opacity: .8; font-size: 14px; margin: 8px 0 0; }
footer a.adm { opacity: .5; font-size: 13px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(90, 56, 38, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, visibility 0s .25s;
}
.modal.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s; }
.modal-caja {
  background: var(--crema); border-radius: 30px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .25); transform: scale(.85) translateY(20px); transition: transform .4s cubic-bezier(.3, 1.5, .5, 1);
  position: relative;
}
.modal.on .modal-caja { transform: none; }
.modal-cerrar {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; z-index: 2;
  background: var(--papel); font-size: 22px; line-height: 1; box-shadow: var(--sombra);
}
.m-head {
  padding: 26px 24px 18px; text-align: center; position: relative;
  background: repeating-linear-gradient(-45deg, var(--salvia) 0 16px, #D6E3CB 16px 32px);
}
.m-head .dia-num { font-family: var(--f-titulo); font-size: 70px; line-height: 1; }
.m-head .fecha { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.m-foto { margin: -6px 24px 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; background: var(--rosa); display: grid; place-items: center; font-size: 80px; }
.m-foto img { width: 100%; height: 100%; object-fit: cover; }
.m-body { padding: 18px 24px 26px; }
.m-body h3 { font-size: 34px; margin-bottom: 8px; }
.m-body .desc { color: var(--cafe-2); margin: 0 0 14px; }
.m-bloq { text-align: center; padding: 10px 0 6px; }
.m-bloq .gran { font-size: 70px; animation: sacudir 2.5s ease-in-out infinite; display: inline-block; }

/* ---------- Toast + confeti ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); z-index: 120; visibility: hidden;
  background: var(--cafe); color: var(--crema); padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); max-width: calc(100% - 32px); text-align: center;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; }
.confeti { position: fixed; z-index: 110; pointer-events: none; top: 0; left: 0; }

/* Barra demo */
.demo-bar {
  position: fixed; left: 12px; bottom: 12px; z-index: 90; background: var(--papel); border: 2px dashed var(--rojo);
  border-radius: 16px; padding: 8px 12px; font-size: 13px; display: flex; gap: 8px; align-items: center; box-shadow: var(--sombra);
  flex-wrap: wrap; max-width: calc(100% - 24px);
}
.demo-bar input { font: inherit; border: 1px solid var(--crema-2); border-radius: 8px; padding: 3px 6px; }
.demo-bar button { font: inherit; border: 0; background: var(--salvia); border-radius: 8px; padding: 4px 10px; cursor: pointer; }

/* ---------- Animaciones ---------- */
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(4deg); } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes latir { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .5; } }
@keyframes respirar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes tironear { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } 85% { transform: rotate(-3deg); } 90% { transform: rotate(2deg); } }
@keyframes saltito { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
.ganador-box .trofeo, .paso .ico { --x: 0; }
.ganador-box .trofeo { animation-name: saltito2; }
@keyframes saltito2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px) rotate(-6deg); } }
.paso:hover .ico { animation-name: saltito2; }
@keyframes sacudir { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-3deg); } 40% { transform: translateX(6px) rotate(3deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes caerUrna { from { transform: translateY(-160px) rotate(var(--r0)); opacity: 0; } 60% { opacity: 1; } to { transform: translateY(0) rotate(var(--r1)); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Fachadas de los locales ---------- */
.local-ilu { aspect-ratio: 1 / 1; }
.local-ilu img { object-position: center 40%; transition: transform .6s cubic-bezier(.3, 1.2, .5, 1); }
.local-card:hover .local-ilu img { transform: scale(1.06); }
.local-emoji {
  position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; border: 3px solid var(--papel);
  box-shadow: 0 4px 10px rgba(90, 56, 38, .2); animation: flotar 5s ease-in-out infinite;
}
.hoy-foto img.fachada, .m-foto img.fachada { object-position: center 40%; }
.m-foto { aspect-ratio: 1 / 1; }
.tag-local .bola { border: 2px solid currentColor; }
.mini-fachada {
  width: 100%; aspect-ratio: 1; border-radius: 12px; background: center 40% / cover no-repeat;
  margin-bottom: 4px; transition: transform .3s, filter .3s; filter: saturate(.75);
}
.ltog[aria-pressed="true"] .mini-fachada { transform: scale(1.04) rotate(-2deg); filter: none; }
.ltog-nom { font-size: 12px; line-height: 1.2; text-align: center; }
.ltog { padding: 8px; }

/* ---------- Logo ---------- */
.top .logo img { height: 46px; width: auto; }
.logo-hero {
  width: min(400px, 82%); height: auto; margin: 0 0 18px -6px;
  animation: logoEntra 1s cubic-bezier(.3, 1.4, .5, 1) both, respirar 6s 1s ease-in-out infinite;
  filter: drop-shadow(0 6px 0 rgba(244, 184, 200, .55));
}
@keyframes logoEntra { from { transform: scale(.85) rotate(-4deg); } to { transform: none; } }
@media (max-width: 900px) { .logo-hero { margin-inline: auto; } }

/* Celular: logo → aviso → calendario → texto */
@media (max-width: 900px) {
  .hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
  .hero .texto { display: contents; }
  .logo-hero { order: 1; width: min(300px, 80%); margin-bottom: 12px; }
  .hero .eyebrow { order: 2; margin-bottom: 18px; }
  .cal-zona { order: 3; width: 100%; margin-bottom: 28px; }
  .hero h1 { order: 4; }
  .hero .bajada { order: 5; }
  .cifras { order: 6; }
  .acciones { order: 7; }
}

/* ---------- Objetivo del año ---------- */
.objetivo { padding: 10px 0 70px; text-align: center; }
.objetivo .chip { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rojo); margin-bottom: 8px; }
.objetivo h2 { font-size: clamp(36px, 5vw, 58px); }
.objetivo h2 .rojo { color: var(--rojo); }
.objetivo > .wrap > p { color: var(--cafe-2); max-width: 60ch; margin: 16px auto 30px; font-size: 18px; }
.pilares { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 0 auto; }
.pilar {
  background: var(--papel); border-radius: 22px; padding: 20px 16px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .25s;
}
.pilar:hover { transform: translateY(-5px) rotate(-1deg); }
.pilar .ico { font-size: 36px; }
.pilar strong { font-family: var(--f-titulo); font-weight: 400; font-size: 26px; }
.pilar span:last-child { font-size: 15px; color: var(--cafe-2); }
@media (max-width: 700px) { .pilares { grid-template-columns: 1fr; } }

.local-body .beneficio { background: var(--crema); border-radius: 12px; padding: 8px 10px; font-size: 14px; margin: -4px 0 12px; }
.lema { display: inline-block; background: var(--salvia); color: var(--verde); font-weight: 600; border-radius: 999px; padding: 6px 14px; font-size: 15px; margin-top: 8px; }

/* ============================================================
   SORTEAR HOY — pantalla completa para filmar
   ============================================================ */
.show {
  position: fixed; inset: 0; z-index: 200; overflow: auto;
  background: radial-gradient(circle at 50% 20%, #FFFDF8 0%, var(--crema) 55%, #F3E3CF 100%);
  display: grid; place-items: center; padding: 18px;
}
.show::before { content: ''; position: absolute; inset: 0; background: url('../img/patron.jpg') center / 460px repeat; opacity: .1; pointer-events: none; }
.show-confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.show-x { position: fixed; top: 12px; right: 12px; z-index: 4; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(90,56,38,.12); font-size: 18px; cursor: pointer; }
.show.corriendo .show-x { opacity: .25; }
.show-in { position: relative; z-index: 2; width: min(560px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.show-logo { width: min(300px, 70vw); filter: drop-shadow(0 5px 0 rgba(244,184,200,.6)); animation: respirar 5s ease-in-out infinite; }
.show-kicker { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rojo); font-size: 15px; }
.show-premio { display: flex; align-items: center; gap: 12px; background: var(--papel); border-radius: 20px; padding: 10px 16px 10px 10px; box-shadow: var(--sombra); text-align: left; max-width: 100%; }
.show-premio b { display: block; font-family: var(--f-titulo); font-weight: 400; font-size: 24px; line-height: 1.1; }
.show-premio span { font-size: 14px; color: var(--cafe-2); }
.show-foto { width: 64px; height: 64px; border-radius: 14px; background: center / cover; flex: none; }
.show-escena { min-height: 320px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.show-btn {
  border: 0; cursor: pointer; font-family: var(--f-texto); font-weight: 700; font-size: clamp(24px, 6vw, 34px); color: #fff;
  background: linear-gradient(180deg, #F06B53, var(--rojo)); padding: 26px 40px; border-radius: 999px;
  box-shadow: 0 10px 0 #B9402E, 0 18px 40px rgba(226,91,69,.45); animation: latidoBtn 1.6s ease-in-out infinite; letter-spacing: .02em;
}
.show-btn:active { transform: translateY(8px); box-shadow: 0 2px 0 #B9402E; }
.show-btn.chico { font-size: 18px; padding: 14px 30px; animation: none; box-shadow: 0 6px 0 #B9402E; margin-top: 8px; }
.show-tip { margin: 0; color: var(--cafe-2); font-size: 15px; }
.show-num {
  font-family: var(--f-titulo); font-size: clamp(160px, 45vw, 260px); line-height: 1; color: var(--rojo);
  text-shadow: 0 8px 0 #F4B8C8; animation: numPop 1s cubic-bezier(.2,1.6,.4,1) both;
}
.show-total { font-weight: 600; color: var(--cafe-2); font-size: 17px; }
.show-slot { display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; }
.show-slot .ch, .show-slot .sep {
  font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: clamp(30px, 9vw, 54px);
  width: clamp(36px, 10vw, 62px); height: clamp(52px, 14vw, 84px); display: grid; place-items: center;
  background: var(--papel); border-radius: 12px; box-shadow: inset 0 -5px 0 rgba(90,56,38,.12), var(--sombra); color: var(--cafe);
}
.show-slot .sep { background: none; box-shadow: none; width: auto; }
.show-slot .ch.fija { background: var(--salvia); color: var(--verde); animation: numPop .45s cubic-bezier(.2,1.6,.4,1); }
.show-gano { font-weight: 800; font-size: clamp(30px, 8vw, 44px); color: var(--verde); letter-spacing: .04em; animation: numPop .7s cubic-bezier(.2,1.6,.4,1) both; }
.show-nombre { font-family: var(--f-titulo); font-size: clamp(64px, 17vw, 110px); line-height: 1; color: var(--rojo); text-shadow: 0 6px 0 #F4B8C8; animation: numPop .9s .15s cubic-bezier(.2,1.6,.4,1) both; }
.show-cod { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 22px; background: var(--papel); padding: 6px 16px; border-radius: 12px; }
.show-feli { margin: 4px 0 0; font-size: 17px; color: var(--cafe-2); }
.show-error { background: #FBD9D2; color: #A33A28; border-radius: 16px; padding: 16px; font-weight: 600; }
.show-pie { font-size: 12px; color: var(--cafe-2); opacity: .85; line-height: 1.6; }
@keyframes latidoBtn { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes numPop { from { transform: scale(.3); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); opacity: 1; } }

/* Tarjeta "Sorteo de hoy" en el panel */
.hoy-sorteo { background: linear-gradient(135deg, #FFF3EC, var(--papel)); border: 3px solid var(--rojo); border-radius: 26px; padding: 18px; margin-bottom: 18px; text-align: center; box-shadow: var(--sombra); }
.hoy-sorteo h2 { font-size: 30px; margin: 0 0 4px; }
.hoy-sorteo p { margin: 0 0 12px; color: var(--cafe-2); }
.hoy-sorteo .show-btn { font-size: 26px; padding: 20px 34px; }
.hoy-sorteo .show-btn[disabled] { animation: none; opacity: .45; cursor: not-allowed; }
.hoy-sorteo.listo { border-color: var(--salvia-2); background: #EEF4E8; }

/* Login con fotos de los locales */
.login-locales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 4px; }
.login-local { border: 3px solid transparent; background: var(--crema); border-radius: 18px; padding: 6px 6px 8px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 1.2; color: var(--cafe); }
.login-local span { display: block; aspect-ratio: 1; border-radius: 13px; background: center 40% / cover; margin-bottom: 6px; }
.login-local[aria-pressed="true"] { border-color: var(--rojo); background: #FFF3EC; }
.login-org { background: none; border: 0; color: var(--cafe-2); text-decoration: underline; cursor: pointer; font-size: 14px; margin-top: 10px; }
#p.grande { font-size: 22px; text-align: center; letter-spacing: .1em; padding: 14px; }

/* Canje de beneficios grande */
.canje-tel { font-size: clamp(26px, 7vw, 34px) !important; text-align: center; letter-spacing: .06em; padding: 16px !important; font-weight: 600; }
.canje-res { margin-top: 16px; border-radius: 22px; padding: 18px; text-align: center; }
.canje-res.si { background: #E3F0DA; border: 3px solid var(--salvia-2); }
.canje-res.no { background: #FBE6E0; border: 3px solid #F0B7A8; }
.canje-res .grande { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.canje-res.si .grande { color: var(--verde); }
.canje-res.no .grande { color: #A33A28; }
.canje-res .quien { font-family: var(--f-titulo); font-size: 34px; line-height: 1.1; }
.canje-res .que { background: var(--papel); border-radius: 14px; padding: 10px 12px; margin: 10px 0; font-weight: 600; }
.canje-res .btn { font-size: 22px; padding: 18px 28px; width: 100%; justify-content: center; margin-top: 6px; }

/* Tipografía de títulos: Fredoka (redondeada, prolija) */
.sec-titulo h2 { font-size: clamp(32px, 4.6vw, 50px); }
.hero h1 { font-size: clamp(36px, 5vw, 62px); }
.objetivo h2 { font-size: clamp(30px, 4.2vw, 46px); }
.local-body h3, .paso h3 { font-size: 22px; }
.hoy-info h3 { font-size: clamp(26px, 3.4vw, 38px); }
.m-body h3 { font-size: 28px; }
.cifra strong, .cuenta b, .chances b, .kpi b, .chances-num { font-weight: 700 !important; }
.pilar strong { font-weight: 600; font-size: 21px; }
.show-num, .show-nombre { font-weight: 700; }
.btn-adm { margin-left: 6px; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--cafe); color: var(--crema); white-space: nowrap; }
.btn-adm:hover { background: #6E4630; }
.top .wrap { gap: 10px; }
.top .der { display: flex; align-items: center; }
