* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: grid; place-items: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7; color: #1d1f23; padding: 16px;
}
.card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 16px;
  padding: 28px 24px; box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
h1 { font-size: 1.4rem; margin: 0 0 4px; }
.muted { color: #6b7280; font-size: .92rem; margin: 0; }
.label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; margin: 20px 0 6px; }
.clabe {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.35rem;
  letter-spacing: .03em; background: #f4f5f7; border-radius: 10px; padding: 14px; text-align: center;
  word-break: break-all;
}
button, .btn {
  display: block; width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 10px;
  background: #111827; color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center;
  text-decoration: none;
}
button.secondary { background: #e5e7eb; color: #111827; }
button:disabled { opacity: .5; cursor: default; }
input {
  width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 1rem;
}
input:focus { outline: 2px solid #111827; border-color: transparent; }
.hint { font-size: .85rem; margin-top: 6px; min-height: 1.1em; }
.ok { color: #047857; }
.err { color: #b91c1c; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.hidden { display: none; }
.small { font-size: .85rem; }
.center { text-align: center; }
.urlfield { display: flex; align-items: center; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; }
.urlfield span { padding: 12px 0 12px 12px; color: #6b7280; white-space: nowrap; font-size: .85rem; }
.urlfield input { border: 0; padding-left: 0; min-width: 0; }
.urlfield:focus-within { outline: 2px solid #111827; border-color: transparent; }
.urlfield input:focus { outline: none; }
.danger { margin-top: 28px; border-top: 1px solid #e5e7eb; padding-top: 12px; }
.link-danger { background: none; color: #b91c1c; font-weight: 500; margin-top: 4px; padding: 8px; }
.danger-btn { background: #b91c1c; }
.legal { max-width: 720px; line-height: 1.6; }
.legal h2 { font-size: 1.1rem; margin-top: 28px; }
.madeby { text-align: center; font-size: .82rem; margin: 16px 0 0; }
.madeby a { color: #9ca3af; text-decoration: none; }
.madeby a:hover { text-decoration: underline; }
.qr { text-align: center; margin-top: 20px; }
.qr canvas { width: 200px; height: 200px; image-rendering: pixelated; border-radius: 8px; }

/* Landing */
body.landing {
  --ink: #1a1033;
  --ink-2: #4a4560;
  --rosa: #e4007c;
  --violeta: #7c3aed;
  --naranja: #ea580c;
  --turquesa: #0d9488;
  display: block; place-items: normal; padding: 0; background: #fff; color: var(--ink);
}
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 20px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 20px 0 96px;
  background: linear-gradient(160deg, #fff5ec 0%, #fdf0f7 45%, #f3efff 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(26,16,51,.09) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 70%);
}
.blobs { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.blobs span {
  position: absolute; width: 440px; height: 440px; border-radius: 50%;
  filter: blur(70px); opacity: .45; will-change: transform;
  animation: drift 22s ease-in-out infinite alternate;
}
.blobs span:nth-child(1) { background: #ff5fa8; top: -140px; left: -120px; }
.blobs span:nth-child(2) { background: #a78bfa; top: 8%; right: -160px; animation-duration: 26s; animation-delay: -6s; }
.blobs span:nth-child(3) { background: #fdba74; bottom: -200px; left: 28%; animation-duration: 30s; animation-delay: -12s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 70px) scale(.94); }
}

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 56px; animation: rise .6s cubic-bezier(.2,.8,.2,1) backwards; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { border-radius: 8px; box-shadow: 0 6px 14px -6px rgba(228,0,124,.6); }
.login {
  color: var(--ink); font-weight: 600; text-decoration: none; font-size: .95rem;
  padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.7);
  border: 1px solid rgba(26,16,51,.1); transition: background .2s, border-color .2s;
}
.login:hover { background: #fff; border-color: rgba(124,58,237,.35); }

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-copy > * { animation: rise .8s cubic-bezier(.2,.8,.2,1) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; margin: 18px 0; }
.hero p { font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); max-width: 500px; margin: 0; }
.grad {
  background: linear-gradient(90deg, var(--rosa), var(--violeta), var(--naranja), var(--rosa));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.75); border: 1px solid rgba(124,58,237,.18); color: var(--violeta);
  font-size: .85rem; font-weight: 600; box-shadow: 0 2px 10px rgba(124,58,237,.08);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: ping 2s ease-out infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

/* Buttons */
.landing .cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 10px; width: auto;
  padding: 17px 30px; margin-top: 32px; font-size: 1.05rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--rosa), var(--violeta));
  box-shadow: 0 12px 28px -10px rgba(228,0,124,.6), 0 4px 10px -4px rgba(124,58,237,.4);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.landing .cta::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 5s ease-in-out 1.5s infinite;
}
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.landing .cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(228,0,124,.7), 0 6px 14px -6px rgba(124,58,237,.5); }
.landing .cta:active { transform: translateY(0) scale(.98); }
.landing .cta:focus-visible { outline: 3px solid var(--violeta); outline-offset: 3px; }
.cta .arrow { transition: transform .25s; }
.cta:hover .arrow { transform: translateX(4px); }

/* Hero demo: a mini business page that "copies" itself on a loop */
.demo { position: relative; justify-self: center; width: 100%; max-width: 360px; animation: rise .9s cubic-bezier(.2,.8,.2,1) .3s backwards; }
.demo-card {
  position: relative; background: #fff; border-radius: 22px; padding: 30px 24px 24px;
  box-shadow: 0 30px 60px -20px rgba(76,29,149,.35), 0 0 0 1px rgba(124,58,237,.08);
  animation: float 7s ease-in-out infinite;
}
.demo-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 6px; border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, var(--rosa), var(--violeta), var(--turquesa));
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(-.5deg); }
}
.demo-name { font-weight: 800; font-size: 1.25rem; }
.demo-sub { color: #6b7280; font-size: .9rem; }
.demo .clabe { font-size: 1.05rem; animation: flash 6s infinite; }
@keyframes flash {
  0%, 38%, 78%, 100% { background: #f4f5f7; box-shadow: inset 0 0 0 0 rgba(228,0,124,0); }
  44%, 70% { background: #fdf0f7; box-shadow: inset 0 0 0 2px rgba(228,0,124,.35); }
}
.demo-btn {
  display: grid; place-items: center; height: 50px; margin-top: 16px; border-radius: 12px; overflow: hidden;
  background: var(--ink); color: #fff; font-weight: 600; animation: demoBtn 6s infinite;
}
.demo-btn span { grid-area: 1 / 1; }
.demo-btn .t1 { animation: t1 6s infinite; }
.demo-btn .t2 { opacity: 0; animation: t2 6s infinite; }
@keyframes demoBtn {
  0%, 36% { background: var(--ink); transform: scale(1); }
  40% { transform: scale(.96); }
  44% { background: #059669; transform: scale(1); }
  78% { background: #059669; }
  84%, 100% { background: var(--ink); }
}
@keyframes t1 {
  0%, 38% { opacity: 1; transform: none; }
  42% { opacity: 0; transform: translateY(-14px); }
  80% { opacity: 0; transform: translateY(14px); }
  86%, 100% { opacity: 1; transform: none; }
}
@keyframes t2 {
  0%, 38% { opacity: 0; transform: translateY(14px); }
  42%, 80% { opacity: 1; transform: none; }
  86% { opacity: 0; transform: translateY(-14px); }
  100% { opacity: 0; transform: translateY(14px); }
}
.tap {
  position: absolute; right: 64px; bottom: 27px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(26,16,51,.22); border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 16px rgba(26,16,51,.25); opacity: 0; pointer-events: none;
  animation: tap 6s infinite;
}
@keyframes tap {
  0%, 24% { opacity: 0; transform: translate(34px, 34px) scale(.9); }
  34% { opacity: 1; transform: none; }
  40% { opacity: 1; transform: scale(.78); }
  50%, 100% { opacity: 0; transform: scale(1.7); }
}
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
  background: #fff; color: var(--ink); font-size: .88rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(26,16,51,.35), 0 0 0 1px rgba(26,16,51,.04);
}
.chip-ok { left: -22px; bottom: -24px; animation: bob 6s ease-in-out -2s infinite; }
.chip-ok b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d1fae5; color: #047857; font-size: .75rem; }
.chip-qr { right: -18px; top: -22px; color: var(--violeta); animation: bob 7s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

/* Steps */
.how { padding-block: 80px 24px; }
.section-title { text-align: center; font-size: clamp(1.7rem, 3.6vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 36px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step {
  background: #fff; border: 1px solid #efe9f7; border-radius: 20px; padding: 28px 24px;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.step:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -20px rgba(76,29,149,.35); border-color: transparent; }
.step b {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px;
  color: #fff; font-size: 1.4rem; font-weight: 800; background: var(--g); box-shadow: 0 10px 20px -8px var(--s);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.step:hover b { transform: rotate(-8deg) scale(1.08); }
.step:nth-child(1) { --g: linear-gradient(135deg, var(--rosa), var(--violeta)); --s: rgba(228,0,124,.6); }
.step:nth-child(2) { --g: linear-gradient(135deg, var(--naranja), #db2777); --s: rgba(234,88,12,.6); }
.step:nth-child(3) { --g: linear-gradient(135deg, var(--turquesa), #0e7490); --s: rgba(13,148,136,.6); }
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--ink-2); line-height: 1.5; }

/* Final CTA */
.final { padding-block: 56px 72px; }
.final-panel {
  position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff;
  background: var(--ink); border-radius: 28px; padding: 64px 24px;
}
.final-panel::before {
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background:
    radial-gradient(circle at 32% 32%, rgba(228,0,124,.7), transparent 28%),
    radial-gradient(circle at 68% 40%, rgba(124,58,237,.75), transparent 30%),
    radial-gradient(circle at 50% 70%, rgba(13,148,136,.55), transparent 28%);
  filter: blur(24px);
  animation: swirl 20s linear infinite;
}
@keyframes swirl { to { transform: rotate(360deg); } }
.final h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; max-width: 620px; margin: 0 auto; }
.landing .final .cta { background: #fff; color: var(--ink); box-shadow: 0 14px 30px -12px rgba(0,0,0,.55); }
.landing .final .cta::after { background: linear-gradient(110deg, transparent 35%, rgba(228,0,124,.18) 50%, transparent 65%); }

/* Scroll reveal (only hides content when JS is running) */
.js .reveal:not(.in) { opacity: 0; }
.js .reveal.in { animation: rise .8s cubic-bezier(.2,.8,.2,1) var(--d, 0s) backwards; }

footer { text-align: center; color: #9ca3af; font-size: .85rem; padding: 0 20px 32px; }

@media (max-width: 820px) {
  .topbar { margin-bottom: 36px; }
  .hero { padding-bottom: 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero-copy { text-align: center; }
  .hero p { margin-inline: auto; }
  .demo { max-width: 320px; }
  .how { padding-top: 64px; }
  .final-panel { padding: 48px 14px; }
  .landing .cta { padding: 16px 22px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after { animation: none !important; transition: none !important; }
  .js .reveal:not(.in) { opacity: 1; }
}

.support { display: block; margin-top: 24px; padding: 16px; border-radius: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; text-decoration: none; color: #065f46; text-align: center; }
.support:hover { background: #d1fae5; }
.support-text { display: block; font-weight: 600; margin-bottom: 10px; }
.support-btn { display: block; background: #25d366; color: #fff; font-weight: 700; padding: 12px; border-radius: 10px; }
.legal-link { display: block; margin-top: 8px; font-size: .72rem; color: #9ca3af; }
