/* Reveal on viewport: .anim-* start hidden, .in added by app.js */
.anim-up, .anim-down, .anim-pop, .hero-word, .hero-chars, .hero-circle {
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1.2);
  transition-delay: var(--d, 0s);
}
.anim-up:not(.in)   { opacity: 0; transform: translateY(40px); }
.anim-down:not(.in) { opacity: 0; transform: translateY(-20px); }
.anim-pop:not(.in)  { opacity: 0; transform: scale(.6) rotate(-4deg); }
.hero-word { display: inline-block; }
.hero-word:not(.in) { opacity: 0; transform: translateX(-80px) skewX(-10deg); }
.hero-chars:not(.in) { opacity: 0; transform: translateY(120px); }
.hero-circle:not(.in) { opacity: 0; transform: translateY(-50%) scale(.3) rotate(-90deg); }

/* Hero background icon */
.hero-circle {
  position: absolute; right: -12%; top: 55%; transform: translateY(-50%);
  width: min(70vw, 900px); animation: wobble 6s ease-in-out infinite;
}
.hero-chars img { animation: float 5s ease-in-out 1.2s infinite; }
.cta { animation: pulse 2.4s ease-in-out 1.5s infinite; transition: transform .2s; }
.cta:hover { transform: scale(1.05) rotate(-1deg); animation-play-state: paused; }

.nav-link { position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 3px; width: 100%;
  background: #E1251B; border-radius: 2px; transform: scaleX(0); transition: transform .3s;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: #E1251B; }

.section { padding: clamp(4.5rem, 9vw, 8rem) 1.5rem; scroll-margin-top: 5rem; }
.title {
  font-family: "Montserrat Alternates", sans-serif; font-weight: 900; font-style: italic;
  text-align: center; font-size: clamp(3rem, 8vw, 6rem); line-height: 1; color: #005D25;
}
.title small { display: block; font-size: .5em; }

@keyframes float  { 50% { translate: 0 -12px; } }
@keyframes pulse  { 50% { transform: scale(1.04); box-shadow: 0 0 0 10px rgb(252 226 0 / .25); } }
@keyframes wobble { 50% { rotate: 3deg; } }

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

/* Mobile: icon behind characters so it doesn't clash with the price */
@media (max-width: 1023px) {
  .hero-circle { top: auto; bottom: -10%; right: -20%; width: 110vw; transform: none; }
  .hero-circle:not(.in) { transform: scale(.3) rotate(-90deg); }
}

/* Beneficios cards */
.ben { transition: transform .3s cubic-bezier(.2,.8,.2,1.4), box-shadow .3s; }
.ben:hover { transform: translateY(-10px) rotate(-1.5deg); box-shadow: 0 20px 30px rgb(0 93 37 / .2); }
.ben:hover .ben-icon { animation: bounce-icon .6s ease; }
.ben-icon { display: block; }
.ben-badge { font-family: "Montserrat Alternates", sans-serif; font-weight: 900; font-size: 1.5rem; border-radius: 9999px; padding: .25rem 1rem; line-height: 1.1; }
.ben-badge small { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
@keyframes bounce-icon { 30% { transform: translateY(-14px) scale(1.1); } 60% { transform: translateY(0) scale(.95); } 80% { transform: translateY(-5px); } }

/* Cómo funciona */
.step { position: relative; display: flex; flex-direction: column; align-items: center; }
.step-icon {
  display: grid; place-items: center; width: 7rem; height: 7rem; border-radius: 50%;
  background: #E1251B; color: #FCE200; border: 8px solid #00953B; box-shadow: inset 0 0 0 6px #fff, 0 10px 25px rgb(0 0 0 / .2);
  transition: transform .4s cubic-bezier(.2,.8,.2,1.6);
}
.step:hover .step-icon { transform: scale(1.12) rotate(-8deg); }
.step-num {
  position: absolute; top: -.5rem; left: calc(50% + 2rem); z-index: 1; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center; background: #FCE200; color: #005D25;
  font: 900 1.25rem "Montserrat Alternates", sans-serif; animation: pulse 2.4s ease-in-out infinite;
}
/* dashed connector between steps on desktop */
@media (min-width: 1024px) {
  .steps::before { content: ""; position: absolute; top: 3.5rem; left: 17%; right: 17%; border-top: 4px dashed rgb(252 226 0 / .6); }
}
.step-list li { position: relative; padding-left: 1.4rem; }
.step-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: .6rem; height: .6rem; border-radius: 50%; background: #FCE200; }

/* Tarjetas */
.tier-card { display: block; perspective: 800px; }
.tier-card img { transition: transform .5s cubic-bezier(.2,.8,.2,1.3); filter: drop-shadow(0 18px 20px rgb(0 0 0 / .25)); animation: float 5s ease-in-out infinite; }
.tier:nth-child(2) .tier-card img { animation-delay: -2.5s; }
.tier:hover .tier-card img { transform: rotateY(-14deg) rotateX(8deg) scale(1.05); }
.tier-list li { display: flex; gap: .6rem; }

/* Comprar */
.buy-num { flex-shrink: 0; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: #FCE200; color: #005D25; font: 900 1.2rem "Montserrat Alternates", sans-serif; }
.buy-stack { position: relative; aspect-ratio: 5/4; }
.buy-stack img { position: absolute; width: 78%; filter: drop-shadow(0 20px 25px rgb(0 0 0 / .35)); transition: transform .5s cubic-bezier(.2,.8,.2,1.3); }
.buy-oro { top: 5%; right: 0; transform: rotate(10deg); opacity: .9; }
.buy-plata { bottom: 8%; left: 0; transform: rotate(-6deg); animation: float 5s ease-in-out infinite; }
.buy-stack:hover .buy-plata { transform: rotate(0) scale(1.06); }
.buy-stack:hover .buy-oro { transform: rotate(16deg) translateX(4%); }

/* Modal */
.modal[open] { animation: modal-in .45s cubic-bezier(.2,.8,.2,1.2); }
.modal::backdrop { animation: fade .3s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(40px) scale(.95); } }
@keyframes fade { from { opacity: 0; } }
.field { display: flex; flex-direction: column; gap: .4rem; font-weight: 700; }
.field input { border: 2px solid #e5e2d6; border-radius: 1rem; padding: .85rem 1rem; font-weight: 500; color: #1f2937; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: #00953B; box-shadow: 0 0 0 4px rgb(0 149 59 / .15); }

/* App */
.store img { transition: transform .3s cubic-bezier(.2,.8,.2,1.5); }
.store:hover img { transform: scale(1.08) rotate(-2deg); }
.qr { transition: transform .4s; } .qr:hover { transform: rotate(-3deg) scale(1.05); }
.phones { display: flex; justify-content: center; align-items: center; }
.phone { width: 32%; max-width: 220px; border: 8px solid #1a1a1a; border-radius: 2rem; overflow: hidden; box-shadow: 0 25px 40px rgb(0 0 0 / .35); background: #1a1a1a; }
.phone img { display: block; width: 100%; height: auto; }
.phone:nth-child(1) { rotate: -8deg; margin-right: -6%; translate: 0 8%; }
.phone:nth-child(2) { z-index: 1; width: 38%; max-width: 260px; animation: float 5s ease-in-out infinite; }
.phone:nth-child(3) { rotate: 8deg; margin-left: -6%; translate: 0 8%; }

/* Contacto */
.contact-card { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: 1.5rem; padding: 1.25rem; box-shadow: 0 4px 12px rgb(0 0 0 / .06); transition: transform .3s cubic-bezier(.2,.8,.2,1.5), box-shadow .3s; }
.contact-card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 15px 25px rgb(0 93 37 / .15); }
.contact-ico { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; color: #FDF9EC; flex-shrink: 0; }
.chip { cursor: pointer; border: 2px solid #005D25; border-radius: 9999px; padding: .5rem 1.1rem; font-weight: 700; transition: all .2s; }
.chip:hover { background: rgb(0 149 59 / .08); }
.chip:has(:checked) { background: #005D25; color: #FDF9EC; }
.chip:has(:focus-visible) { outline: 3px solid #FCE200; }
.input { width: 100%; background: #FDF9EC; border: 2px solid transparent; border-radius: 1.5rem; padding: 1.25rem 1.5rem; font-weight: 500; color: #1f2937; transition: border-color .2s, box-shadow .2s; }
.input::placeholder { color: #6b7280; }
.input:focus { outline: none; border-color: #00953B; box-shadow: 0 0 0 4px rgb(0 149 59 / .15); }

/* Footer */
.social { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: rgb(253 249 236 / .1); transition: background .2s, color .2s, transform .3s cubic-bezier(.2,.8,.2,1.6); }
.social:hover { background: #FCE200; color: #005D25; transform: translateY(-4px) rotate(-8deg); }
.footer-link { position: relative; } .footer-link:hover { color: #FCE200; }

/* Legal / FAQ */
.faq { border-bottom: 2px solid #f0ece0; padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 800; color: #005D25; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; transition: rotate .3s; }
.faq[open] summary::after { rotate: 45deg; }
.faq p { margin-top: .6rem; }
.contact-chars img { animation: float 5s ease-in-out infinite; filter: drop-shadow(0 15px 20px rgb(0 0 0 / .15)); }

/* Registro */
.reg-prize { color: #FCE200; display: inline-block; animation: pulse 2.4s ease-in-out infinite; }
.card-back {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 1.586; max-width: 30rem; margin-inline: auto;
  background: linear-gradient(135deg, #222, #0b0b0b); border-radius: 1.5rem; padding: 6%;
  box-shadow: 0 30px 50px rgb(0 0 0 / .45); transition: transform .5s cubic-bezier(.2,.8,.2,1.3); rotate: -4deg;
}
.card-back:hover { transform: rotate(4deg) scale(1.04); }
.cb-line { display: block; height: .35rem; border-radius: 1rem; background: rgb(255 255 255 / .35); }
.cb-qr { width: 26%; aspect-ratio: 1; border-radius: .5rem; background: #fff; padding: 3px; }
.cb-barcode { position: relative; background: #fff; border-radius: .4rem; padding: .5rem .7rem .3rem; width: 58%; }
.cb-barcode::after { content: ""; position: absolute; inset: -6px; border: 3px solid #E1251B; border-radius: .6rem; animation: ping 1.6s ease-out infinite; }
.cb-bars { height: 2.2rem; background: repeating-linear-gradient(90deg, #111 0 2px, #fff 2px 3px, #111 3px 4px, #fff 4px 7px, #111 7px 10px, #fff 10px 11px); }
.cb-num { display: block; text-align: center; font: 700 clamp(.7rem, 2vw, 1rem) ui-monospace, monospace; color: #111; letter-spacing: .08em; }
@keyframes ping { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }

/* Login panel: grows out of the button */
.login-panel {
  position: absolute; right: 0; top: calc(100% + .9rem); z-index: 60; width: min(22rem, 90vw);
  background: #fff; border-radius: 1.75rem; padding: 1.5rem; box-shadow: 0 25px 50px rgb(0 93 37 / .25);
  transform-origin: calc(100% - 4rem) -10px; animation: pop-in .4s cubic-bezier(.2,.8,.2,1.25);
}
.login-panel::before { content: ""; position: absolute; top: -8px; right: 3.5rem; width: 18px; height: 18px; background: #fff; rotate: 45deg; border-radius: 3px; }
.login-panel[hidden] { display: none; }
.login-panel.closing { animation: pop-out .2s ease-in forwards; }
.login-panel form:not([hidden]) { animation: fade .3s ease; }
@keyframes pop-in { from { opacity: 0; transform: scale(.2) translateY(-10px); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.4); } }
.pw-toggle { position: absolute; right: .9rem; top: 50%; translate: 0 -50%; color: #6b7280; cursor: pointer; }
@media (max-width: 959px) { .login-panel { position: static; width: 100%; margin-top: 1rem; box-shadow: 0 10px 25px rgb(0 93 37 / .15); } .login-panel::before { left: 50%; right: auto; } }

/* Panel de socio */
.progress { width: 0; transition: width 1.4s cubic-bezier(.2,.8,.2,1) .3s; }
.progress.go { width: var(--w); }
.promo { position: relative; display: flex; flex-direction: column; gap: .3rem; background: #FDF9EC; border-radius: 1.25rem; padding: 1rem; transition: transform .3s cubic-bezier(.2,.8,.2,1.5); }
.promo:hover { transform: translateY(-4px) rotate(-1deg); }
.promo-tag { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #FCE200; font: 900 1rem "Montserrat Alternates", sans-serif; rotate: 12deg; }
.promo b { padding-right: 2.8rem; }
.promo-btn { margin-top: .4rem; background: #00953B; color: #FDF9EC; font-weight: 800; border-radius: 9999px; padding: .5rem; cursor: pointer; transition: background .2s, transform .2s; }
.promo-btn:hover { transform: scale(1.03); }
.promo-btn.on { background: #005D25; }
.hist { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: .9rem 0; }
.promo-img { width: 100%; height: 7rem; object-fit: contain; margin-bottom: .3rem; filter: drop-shadow(0 8px 10px rgb(0 0 0 / .15)); transition: transform .3s cubic-bezier(.2,.8,.2,1.5); } .promo:hover .promo-img { transform: scale(1.08) rotate(-3deg); }
.tabs { display: flex; gap: .5rem; overflow-x: auto; background: #fff; padding: .4rem; border-radius: 9999px; box-shadow: 0 4px 12px rgb(0 0 0 / .06); width: fit-content; max-width: 100%; }
.tab { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-weight: 800; padding: .7rem 1.3rem; border-radius: 9999px; cursor: pointer; transition: background .25s, color .25s, transform .2s; }
.tab:hover { background: #FDF9EC; }
.tab[aria-selected="true"] { background: #005D25; color: #FDF9EC; transform: scale(1.03); }
.panel-tab:not([hidden]) { animation: fade .4s ease; }
.panel-tab { scroll-margin-top: 8rem; }

/* Birthday countdown */
.bday { position: relative; overflow: hidden; background: linear-gradient(135deg, #E1251B, #b81c14); color: #FDF9EC; border-radius: 2rem; padding: 2rem; box-shadow: 0 20px 40px rgb(225 37 27 / .3); }
.bday-cake { display: grid; place-items: center; width: 6rem; height: 6rem; border-radius: 50%; background: #FCE200; color: #E1251B; border: 6px solid #00953B; box-shadow: inset 0 0 0 4px #fff; animation: wobble 2s ease-in-out infinite; }
.bday-confetti i { position: absolute; top: -10%; width: .6rem; height: 1rem; border-radius: 2px; background: #FCE200; animation: confetti 4s linear infinite; opacity: .8; }
.bday-confetti i:nth-child(odd) { background: #fff; }
.bday-confetti i:nth-child(3n) { background: #00953B; }
.bday-confetti i:nth-child(1) { left: 8%; animation-delay: 0s; }
.bday-confetti i:nth-child(2) { left: 20%; animation-delay: 1.4s; }
.bday-confetti i:nth-child(3) { left: 33%; animation-delay: .6s; }
.bday-confetti i:nth-child(4) { left: 47%; animation-delay: 2.2s; }
.bday-confetti i:nth-child(5) { left: 60%; animation-delay: 1s; }
.bday-confetti i:nth-child(6) { left: 72%; animation-delay: 2.8s; }
.bday-confetti i:nth-child(7) { left: 85%; animation-delay: .3s; }
.bday-confetti i:nth-child(8) { left: 94%; animation-delay: 1.8s; }
@keyframes confetti { to { transform: translateY(260px) rotate(540deg); opacity: 0; } }

/* Polish: browser surfaces & type */
html { overflow-x: clip; }
::selection { background: #FCE200; color: #005D25; }
input, textarea { caret-color: #00953B; }
:focus-visible { outline: 3px solid #FCE200; outline-offset: 3px; border-radius: .5rem; }
.bg-crema :focus-visible, .bg-white :focus-visible { outline-color: #00953B; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { text-underline-offset: .2em; }
html { scrollbar-color: #00953B #FDF9EC; }
.font-mono, .count, .cb-num { font-variant-numeric: tabular-nums; }
.ben-icon img { width: 8rem; height: 8rem; }
#comprar { padding-top: 0; }

/* Tarjetas dropdown (desktop); inline list on mobile */
.dd-menu { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin-top: 1.25rem; font-size: 1rem; }
@media (min-width: 960px) {
  .dropdown { position: relative; }
  .dd-menu {
    position: absolute; left: 50%; top: 100%; margin-top: .9rem; translate: -50% 0; align-items: stretch; gap: .25rem;
    background: #fff; border-radius: 1.25rem; padding: .5rem; min-width: 14rem; box-shadow: 0 20px 40px rgb(0 93 37 / .2);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.96); transform-origin: top center;
    transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1.2), visibility .2s;
  }
  .dd-menu::before { content: ""; position: absolute; inset: -1rem 0 auto; height: 1rem; } /* hover bridge */
  .dropdown:hover .dd-menu, .dropdown:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
  .dd-menu a { display: block; padding: .7rem 1rem; border-radius: .8rem; }
  .dd-menu a:hover { background: #FDF9EC; }
  .dd-menu a::after { display: none; }
  .dd-chev { transition: rotate .25s; }
  .dropdown:hover .dd-chev, .dropdown:focus-within .dd-chev { rotate: 180deg; }
}
.dropdown:has(.dd-menu .active) > .nav-link { color: #E1251B; }

/* Character poses peeking from section edges (desktop only) */
.pose { position: absolute; bottom: 0; z-index: 1; display: none; pointer-events: none; transition: transform 1s cubic-bezier(.2,.8,.2,1.1), opacity .8s; }
.pose img { display: block; height: 100%; width: auto; filter: drop-shadow(0 15px 25px rgb(0 0 0 / .2)); }
.pose-l { left: max(0px, calc(50% - 46rem)); }
.pose-r { right: max(0px, calc(50% - 46rem)); }
.pose-l:not(.in) { transform: translateX(-60%) rotate(-8deg); opacity: 0; }
.pose-r:not(.in) { transform: translateX(60%) rotate(8deg); opacity: 0; }
.pose.in img { animation: sway 6s ease-in-out 1s infinite; transform-origin: bottom center; }
@keyframes sway { 50% { rotate: 1.5deg; } }
@media (min-width: 1280px) { .pose { display: block; } }
.pose-beneficios { height: 22rem; bottom: auto; top: 3rem; right: calc(50% - 38rem); }
.pose-como { height: 22rem; bottom: auto; top: 3rem; left: calc(50% - 40rem); }
.pose-tarjetas { height: 28rem; }
.pose-registro { height: 22rem; bottom: auto; top: 3rem; left: calc(50% - 40rem); }
/* poses sit in the side gutters; keep content clear of them */
@media (min-width: 1280px) and (max-width: 1535px) {
  #beneficios .title, #tarjetas .title { padding-inline: 14rem; }
}
.buy-waldo { position: absolute; right: -2%; bottom: -6%; width: 26% !important; z-index: 2; animation: float 5s ease-in-out .8s infinite !important; rotate: 0deg !important; transform: none !important; opacity: 1 !important; }
