/* Pagina de descarga — Calculadora de Coca
   Misma paleta que binary-bandit.css (src/) */

:root {
  --black: #050807;
  --dark: #0a140f;
  --card: #0f1c15;
  --card-hover: #16261d;
  --pink: #10B981;
  --pink-bright: #34D399;
  --white: #f0f4f1;
  --muted: #6b7a72;
  --border: rgba(255, 255, 255, 0.08);
  --grad: linear-gradient(90deg, #0EA5A0 0%, #10B981 30%, #34D399 50%, #10B981 70%, #0EA5A0 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #050807; }

body {
  margin: 0;
  background: linear-gradient(160deg, #071510 0%, #050807 46%, #06120d 100%) fixed;
  color: var(--white);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* grano de pelicula */
.grain {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* halo de color de fondo */
.bg-aura {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 82% 8%, rgba(16, 185, 129, .22), transparent 70%),
    radial-gradient(55% 40% at 8% 34%, rgba(20, 184, 166, .14), transparent 72%),
    radial-gradient(50% 42% at 62% 112%, rgba(5, 150, 105, .18), transparent 70%);
}

/* ---------------- ancho general ---------------- */
main { max-width: 1760px; margin: 0 auto; padding: 0 34px 90px; }

/* ---------------- hero + baraja ---------------- */
.hero-grid {
  display: grid;
  grid-template-columns: .84fr 1.16fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0 6px;
}

.hero { padding: 0; }

.label {
  font-family: 'Space Mono', monospace; font-size: 12px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
  padding-left: 14px; position: relative;
}
.label::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 6px; height: 6px; margin-top: -3px;
  background: var(--pink); border-radius: 50%;
}

h1.glitch {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  line-height: .95; letter-spacing: .01em;
  margin: 0 0 24px; text-transform: uppercase;
  position: relative; display: inline-block;
}

/* efecto glitch con capas de pseudo-elementos */
h1.glitch::before,
h1.glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: var(--black);
  overflow: hidden;
}
h1.glitch::before { color: var(--pink); animation: glitch-a 3.2s infinite steps(2); }
h1.glitch::after  { color: #14B8A6; animation: glitch-b 2.6s infinite steps(2); }

@keyframes glitch-a {
  0%, 92%, 100% { transform: none; opacity: 0; clip-path: inset(0 0 100% 0); }
  93% { opacity: .9; transform: translate(-3px, -1px); clip-path: inset(12% 0 62% 0); }
  96% { opacity: .9; transform: translate(2px, 1px);   clip-path: inset(52% 0 28% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { transform: none; opacity: 0; clip-path: inset(0 0 100% 0); }
  91% { opacity: .8; transform: translate(3px, 1px);   clip-path: inset(24% 0 54% 0); }
  95% { opacity: .8; transform: translate(-2px, -1px); clip-path: inset(64% 0 18% 0); }
}

@media (prefers-reduced-motion: reduce) {
  h1.glitch::before, h1.glitch::after { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}

.lead {
  font-size: 19px; color: #c9c9c4;
  max-width: 60ch; margin: 0 0 28px;
}

.features {
  list-style: none; padding: 0; margin: 0 0 34px;
  display: grid; gap: 8px;
  font-size: 16px; color: var(--muted);
}
.features li::before { content: '—'; color: var(--pink); margin-right: 10px; }
.features b { color: var(--white); font-weight: 500; }

/* ---------------- plataformas (android / ios) ---------------- */
.platforms {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px; margin: 0 0 30px;
}
.platform {
  display: flex; flex-direction: column; gap: 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
  padding: 20px;
}
.platform.soon { opacity: .6; }
.pf-head { display: flex; align-items: center; gap: 13px; }
.pf-ico {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 185, 129, .15); color: var(--pink-bright);
}
.pf-ico svg { width: 26px; height: 26px; }
.platform.soon .pf-ico { background: rgba(255, 255, 255, .06); color: var(--muted); }
.pf-info { display: flex; flex-direction: column; gap: 3px; }
.pf-name {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 25px; line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  color: var(--white);
}
.pf-sub { font-size: 12.5px; color: var(--muted); }
  .pf-cta {
    width: auto; align-self: center;
    justify-content: center;
    font-size: 19px; padding: 14px 34px;
    gap: 10px;
  }
.platform.soon .pf-cta { font-size: 18px; }

/* ---------------- boton de descarga ---------------- */
.cta { margin: 0 0 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 30px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--white); text-decoration: none;
  padding: 18px 40px; border-radius: 6px;
  background: var(--grad); background-size: 200% 100%;
  box-shadow: 0 0 0 1px var(--pink), 0 14px 40px -12px rgba(16, 185, 129, .55);
  transition: transform .18s ease, box-shadow .18s ease, background-position .5s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 0 0 1px var(--pink-bright), 0 20px 50px -12px rgba(16, 185, 129, .7);
}
.btn:active { transform: translateY(0); }
  .btn small {
    font-family: 'Space Mono', monospace;
    font-size: 11px; letter-spacing: .1em; opacity: .75;
    border-left: 1px solid rgba(255, 255, 255, .25);
    padding-left: 12px; align-self: center;
    display: inline-flex; align-items: center;
  }
  .btn-ico { font-size: 26px; line-height: 1; }

.btn.disabled {
  background: var(--card); color: var(--muted);
  box-shadow: 0 0 0 1px var(--border);
  cursor: not-allowed; font-size: 22px;
}
.btn.disabled:hover { transform: none; }

.hint-box {
  font-size: 14px; color: var(--muted);
  border-left: 2px solid var(--pink); padding: 4px 0 4px 16px;
}

/* ---------------- ficha de datos ---------------- */
.meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; margin: 0; padding: 0;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.meta > div { background: var(--dark); padding: 16px 18px; }
.meta dt {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px;
}
.meta dd { margin: 0; font-size: 16px; }

/* ---------------- baraja de cartas ---------------- */
.deck {
  --step: 122px;
  --ang: 7deg;
  --drop: 18px;
  position: relative;
  height: 730px;
}
.deck.deck-few { --step: 152px; --ang: 9deg; --drop: 24px; }
.deck-glow {
  position: absolute; left: 50%; top: 44%;
  width: 920px; height: 920px; margin: -460px 0 0 -460px;
  background: radial-gradient(circle, rgba(16, 185, 129, .30), rgba(20, 184, 166, .14) 46%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.card {
  position: absolute; left: 50%; top: 66px;
  width: 300px; height: 536px; margin: 0 0 0 -150px;
  transform: translate(calc(var(--i) * var(--step)), calc(var(--j) * var(--drop))) rotate(calc(var(--i) * var(--ang)));
  transition: transform .38s cubic-bezier(.2, .7, .3, 1), filter .38s;
  will-change: transform;
}
.card:hover,
.card:focus-within {
  transform: translate(calc(var(--i) * var(--step)), calc(var(--j) * var(--drop) - 22px)) rotate(calc(var(--i) * var(--ang))) scale(1.05);
  z-index: 60 !important;
}

.mock, .shot {
  display: block; width: 100%; height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .35);
}
.shot { object-fit: cover; }

/* pantalla simulada (placeholder) */
.mock {
  position: relative; overflow: hidden;
  padding: 40px 24px 24px;
  background: linear-gradient(165deg, #0d1c15 0%, #070d0a 58%, #0a1610 100%);
}
.mock::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, .10), transparent 42%);
}
.m-notch {
  position: absolute; top: 15px; left: 50%;
  width: 62px; height: 6px; margin-left: -31px; border-radius: 3px;
  background: rgba(255, 255, 255, .16);
}
.m-title {
  display: block; margin-top: 24px;
  font-family: 'Space Mono', monospace; font-size: 14px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--pink-bright);
}
.m-num {
  display: block; margin-top: 22px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 108px; line-height: .88; color: #fff;
}
.m-unit {
  display: block; margin-top: 2px;
  font-family: 'Space Mono', monospace; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
.m-row {
  display: block; height: 17px; border-radius: 9px; margin-top: 23px;
  background: rgba(255, 255, 255, .07);
}
.m-row.short { width: 58%; }
.m-btn {
  position: absolute; left: 24px; right: 24px; bottom: 26px; height: 60px;
  border-radius: 14px;
  background: var(--grad); background-size: 200% 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 26px; letter-spacing: .08em; text-transform: uppercase; color: #fff;
}

/* ---------------- bloques ---------------- */
.block { margin-top: 64px; }

.block h2 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 30px; letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 22px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.changelog { list-style: none; padding: 0; margin: 0; }
.changelog li {
  position: relative; padding: 8px 0 8px 26px;
  color: #c9c9c4; font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.changelog li::before {
  content: '+'; position: absolute; left: 0; top: 8px;
  color: var(--pink); font-family: 'Space Mono', monospace; font-weight: 700;
}

.steps {
  list-style: none; counter-reset: s; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 34px;
}
.steps > li {
  counter-increment: s; position: relative;
  padding: 0 0 0 54px;
}
.steps > li::before {
  content: '0' counter(s);
  position: absolute; left: 0; top: 0;
  font-family: 'Bebas Neue', sans-serif; font-size: 26px;
  color: var(--pink); line-height: 1;
}
.steps > li > b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps p b { display: inline; color: var(--white); }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.steps code {
  font-family: 'Space Mono', monospace; font-size: 13px;
  color: var(--pink-bright); word-break: break-all;
}

.verify {
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--dark); padding: 14px 18px; margin-top: 6px;
}
.verify summary {
  font-family: 'Space Mono', monospace; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
}
.verify summary:hover { color: var(--pink); }
.verify p { color: var(--muted); font-size: 14px; margin: 12px 0 8px; }
.verify code {
  display: block; font-family: 'Space Mono', monospace; font-size: 12px;
  color: var(--ok, #35c07a); word-break: break-all;
}

/* ---------------- donacion ---------------- */
.donate {
  display: grid; grid-template-columns: 1fr auto; gap: 44px; align-items: center;
}
.donate-text { min-width: 0; }
.donate-text p {
  color: #c9c9c4; font-size: 16px; line-height: 1.7;
  margin: 0 0 14px; max-width: 62ch;
}
.donate-text b { color: var(--white); font-weight: 500; }
.donate-thanks { color: var(--pink-bright); font-weight: 500; }

.donate-side { display: flex; align-items: center; gap: 26px; }
.donate-qr {
  margin: 0; padding: 20px; text-align: center;
  border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01));
}
.donate-qr img {
  display: block; width: min(280px, 66vw); aspect-ratio: 1 / 1; height: auto;
  object-fit: contain; background: #fff; padding: 12px; border-radius: 12px;
  cursor: zoom-in;
}
.donate-qr figcaption {
  margin: 14px auto 0; max-width: 280px; font-size: 13px; color: var(--muted);
}
.donate-qr figcaption a { color: var(--pink-bright); }
.qr-zoom-hint {
  display: inline-block; margin-top: 6px;
  color: var(--pink-bright); font-weight: 500;
}
.qr-empty {
  display: flex; align-items: center; justify-content: center;
  width: min(280px, 66vw); aspect-ratio: 1 / 1; padding: 0 24px; text-align: center;
  border: 1px dashed var(--border); border-radius: 12px;
  color: var(--muted); font-size: 14px;
}
.donate-data { display: grid; gap: 8px; width: 300px; }
.donate-data p {
  display: flex; flex-direction: column; gap: 3px;
  margin: 0; padding: 11px 15px; font-size: 14.5px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border); border-radius: 10px;
}
.donate-data span { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.donate-data b { color: var(--white); font-weight: 500; word-break: break-word; }

/* QR a pantalla completa */
.qr-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(3, 8, 6, .88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.qr-lightbox[hidden] { display: none; }
.qr-lightbox img {
  width: min(88vw, 88vh, 560px); height: auto; aspect-ratio: 1 / 1;
  background: #fff; padding: 18px; border-radius: 16px;
  box-shadow: 0 30px 90px -30px rgba(0, 0, 0, .85);
}

/* ---------------- boton flotante whatsapp ---------------- */
.whatsapp-float {
  position: fixed; bottom: 32px; right: 32px;
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 18, 13, .72);
  border: 1px solid rgba(255, 255, 255, .2);
  color: var(--white);
  text-decoration: none;
  z-index: 999;
  backdrop-filter: blur(6px);
  transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover {
  border-color: var(--pink);
  color: var(--pink-bright);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(16, 185, 129, .25);
}

/* ---------------- responsive ---------------- */
@media (max-width: 1300px) {
  .hero-grid { grid-template-columns: 1fr; gap: 6px; padding: 44px 0 0; }
  .deck { --step: 104px; --ang: 7deg; --drop: 16px; height: 630px; }
  .deck.deck-few { --step: 132px; --ang: 9deg; --drop: 22px; }
  .card { width: 256px; height: 458px; margin: 0 0 0 -128px; top: 58px; }
  .donate { grid-template-columns: 1fr; gap: 34px; }
  .donate-side { justify-content: center; }
}

/* Celular: carrusel deslizable, todas las capturas centradas */
@media (max-width: 780px) {
  .hero-grid { padding: 34px 0 0; }
  .deck {
    display: flex;
    gap: 14px;
    height: auto;
    margin: 0 -34px;
    padding: 8px 34px 26px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .deck::-webkit-scrollbar { display: none; }
  .deck-glow { display: none; }
  .deck .card {
    position: relative;
    left: auto; top: auto; margin: 0;
    flex: 0 0 auto;
    width: 232px; height: 414px;
    transform: none;
    scroll-snap-align: center;
  }
  .deck .card:hover,
  .deck .card:focus-within { transform: none; }
  .deck .mock { padding: 30px 18px 18px; }
  .deck .m-title, .deck .m-unit { font-size: 11px; }
  .deck .m-num { font-size: 84px; }
  .deck .m-row { height: 14px; margin-top: 18px; }
  .deck .m-btn { left: 18px; right: 18px; bottom: 18px; height: 48px; font-size: 22px; }
  .donate { grid-template-columns: 1fr; gap: 24px; }
  .donate-side { flex-direction: column; gap: 22px; }
  .donate-data { width: 100%; max-width: 340px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps > li { padding-bottom: 26px; }
}

@media (max-width: 560px) {
  .whatsapp-float { bottom: 18px; right: 18px; width: 58px; height: 58px; }
  .whatsapp-float svg { width: 27px; height: 27px; }
  .platforms { grid-template-columns: 1fr; }
  .btn { font-size: 24px; padding: 16px 26px; width: 100%; justify-content: center; }
  .btn small { display: none; }
  .steps > li { padding-left: 44px; }
  .block { margin-top: 52px; }
}
