/* PixAstro — landing */
:root {
  --bg: #05060f;
  --bg-2: #0a0d1f;
  --ink: #f4f6ff;
  --ink-2: #d3d8f5;
  --ink-3: #a9b1d9;
  --line: rgba(170, 185, 255, .22);
  --glass: rgba(18, 22, 48, .55);
  --blue: #5b8cff;
  --violet: #a46bff;
  --rose: #ff6b9a;
  --cyan: #5ee7ff;
  --radius: 22px;
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.02em; margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }
::selection { background: var(--violet); color: #fff; }

/* ---------- Cielo de fondo ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.nebula { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.nebula span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32;
  animation: drift 38s var(--ease) infinite alternate;
}
.nebula span:nth-child(1) { width: 60vmax; height: 60vmax; left: -18vmax; top: -22vmax;
  background: radial-gradient(circle, #3a2bff 0%, transparent 65%); }
.nebula span:nth-child(2) { width: 55vmax; height: 55vmax; right: -20vmax; top: 18vh;
  background: radial-gradient(circle, #b0307a 0%, transparent 65%); animation-duration: 46s; animation-delay: -12s; }
.nebula span:nth-child(3) { width: 50vmax; height: 50vmax; left: 20vw; bottom: -30vmax;
  background: radial-gradient(circle, #0f6fa8 0%, transparent 65%); animation-duration: 52s; animation-delay: -24s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, 4vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, -3vh, 0) scale(.95); }
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(var(--max), calc(100% - 32px));
  display: flex; align-items: center; gap: 24px;
  padding: 10px 12px 10px 16px; z-index: 10;
  border: 1px solid transparent; border-radius: 999px;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
}
.nav.scrolled { background: rgba(8, 10, 26, .62); border-color: var(--line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px "Space Grotesk", sans-serif; }
.brand img { filter: drop-shadow(0 0 10px rgba(91, 140, 255, .7)); }
.links { display: flex; gap: 26px; margin-left: auto; }
.links a { text-decoration: none; color: var(--ink-2); font-size: 15px; transition: color .2s; }
.links a:hover { color: var(--ink); }
.nav-end { display: flex; gap: 10px; align-items: center; }
.lang {
  background: transparent; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px;
  font: 600 13px Inter, sans-serif; padding: 7px 12px; cursor: pointer; transition: color .2s, border-color .2s;
}
.lang:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- Botones ---------- */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; gap: 10px; height: var(--h); padding: 0 24px;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 16px;
  background: var(--ink); color: #0a0c1d; transition: transform .25s var(--ease), box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-glow {
  position: relative; color: #fff; isolation: isolate;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--rose), var(--violet), var(--blue));
  background-size: 200% 100%; animation: flow 6s linear infinite;
  box-shadow: 0 10px 40px -10px rgba(140, 100, 255, .8);
}
.btn-glow:hover { box-shadow: 0 16px 60px -10px rgba(160, 110, 255, 1); }
.btn-glow .ver:not(:empty) { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--ink-3); }
@keyframes flow { to { background-position: 200% 0; } }

/* ---------- Portada ---------- */
.hero {
  position: relative; min-height: 100svh;
  width: min(var(--max), calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding: 120px 0 80px;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); color: var(--ink-2); font-size: 14px; backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
h1 { font-size: clamp(42px, 6.4vw, 80px); line-height: 1.02; font-weight: 700; }
.shine {
  background: linear-gradient(90deg, #b9c8ff, #c49bff, #ff9ac0, #c49bff, #b9c8ff);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 9s linear infinite;
}
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; margin: 24px 0 34px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.platforms { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 34px 0 0; color: var(--ink-3); font-size: 14px; }
.platforms li { position: relative; }
.platforms li + li::before { content: ""; position: absolute; left: -12px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

.hero-visual { position: relative; perspective: 1200px; }
.frame {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #000;
  box-shadow: 0 40px 120px -30px rgba(80, 90, 255, .55), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform-style: preserve-3d; transition: transform .5s var(--ease);
}
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; animation: kenburns 28s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-3%, 2%); } }
.frame figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 14px; font-size: 13px; color: var(--ink-2);
  background: rgba(5, 6, 15, .55); backdrop-filter: blur(10px); border: 1px solid var(--line);
}
.frame figcaption span:first-child { color: var(--ink); font-weight: 600; }
.orbit { position: absolute; inset: -12%; pointer-events: none; }
.orbit i {
  position: absolute; inset: 0; border: 1px solid rgba(150, 160, 255, .12); border-radius: 50%;
  animation: spin 40s linear infinite;
}
.orbit i::after {
  content: ""; position: absolute; top: 50%; left: -4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px 3px var(--cyan);
}
.orbit i:nth-child(2) { inset: 8%; animation-duration: 28s; animation-direction: reverse; }
.orbit i:nth-child(2)::after { background: var(--rose); box-shadow: 0 0 14px 3px var(--rose); top: 10%; left: 20%; }
.orbit i:nth-child(3) { inset: -8%; animation-duration: 60s; border-style: dashed; opacity: .6; }
.orbit i:nth-child(3)::after { background: #fff; box-shadow: 0 0 10px 2px #fff; top: 80%; left: 88%; width: 4px; height: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border: 1.5px solid var(--ink-3); border-radius: 14px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-2); animation: wheel 2s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Secciones ---------- */
.section { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 110px 0; }
.head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.head p { color: var(--ink-2); margin: 16px 0 0; }
.head a { color: var(--cyan); }
.eyebrow {
  display: inline-block; margin: 0 0 14px !important; font: 600 13px Inter, sans-serif; letter-spacing: .18em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.08; }

.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(30, 36, 80, .5), rgba(12, 14, 34, .55));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.glow { overflow: hidden; }
.glow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(140, 120, 255, .22), transparent 45%);
}
.glow:hover::before { opacity: 1; }

/* ---------- Antes / después ---------- */
.compare {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 50px 140px -40px rgba(120, 80, 255, .55); user-select: none; touch-action: pan-y; background: #000;
}
.compare > img, .compare .before img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.compare .before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 18px rgba(255, 255, 255, .8); pointer-events: none; }
.compare .handle span {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(10, 12, 30, .6); border: 2px solid #fff; backdrop-filter: blur(6px);
}
.compare .handle span::before, .compare .handle span::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; border: solid #fff; border-width: 0 0 2px 2px; margin-top: -5px;
}
.compare .handle span::before { left: 12px; transform: rotate(45deg); }
.compare .handle span::after { right: 12px; transform: rotate(-135deg); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.tag { position: absolute; top: 16px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(5, 6, 15, .6); border: 1px solid var(--line); backdrop-filter: blur(8px); pointer-events: none; }
.tag-l { left: 16px; } .tag-r { right: 16px; }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps .card { padding: 34px 30px; }
.steps svg { width: 44px; height: 44px; color: var(--cyan); margin-bottom: 22px; filter: drop-shadow(0 0 10px rgba(94, 231, 255, .5)); }
.steps h3 { font-size: 24px; margin-bottom: 10px; }
.steps p { color: var(--ink-2); margin: 0; font-size: 16px; }
.num { position: absolute; top: 24px; right: 26px; font: 700 42px "Space Grotesk", sans-serif; color: transparent; -webkit-text-stroke: 1px rgba(160, 175, 255, .25); }

.pipeline {
  margin-top: 44px; overflow: hidden; padding: 6px 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; gap: 12px; width: max-content; animation: marquee 50s linear infinite; }
.pipeline:hover .track { animation-play-state: paused; }
.track span {
  white-space: nowrap; padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--glass);
}
.track span::before { content: "✦"; margin-right: 8px; color: var(--violet); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Funciones ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid .card { padding: 30px; }
.grid .wide { grid-column: span 2; }
.grid h3 { font-size: 21px; margin-bottom: 10px; }
.grid p { margin: 0; color: var(--ink-2); font-size: 16px; }
.grid .card::after {
  content: ""; position: absolute; top: 0; left: 30px; width: 54px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery .shot:first-child, .gallery .shot:last-child { grid-column: span 2; }
.shot { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.shot img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.2s var(--ease); }
.shot:first-child img, .shot:last-child img { aspect-ratio: 21 / 9; }
.shot:hover img { transform: scale(1.06); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 22px 18px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(transparent, rgba(3, 4, 12, .95)); font-size: 14px; color: var(--ink);
}
.shot figcaption b { color: var(--ink); font: 600 18px "Space Grotesk", sans-serif; }
.shot figcaption small { color: var(--ink-2); font-size: 12px; }

/* ---------- Descargas ---------- */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 18px; align-items: center;
  padding: 28px; text-decoration: none; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.dl:hover { transform: translateY(-6px); border-color: rgba(160, 140, 255, .5); box-shadow: 0 30px 80px -30px rgba(130, 100, 255, .7); }
.dl svg { width: 42px; height: 42px; color: var(--ink); grid-row: span 2; }
.dl h3 { font-size: 22px; }
.dl p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.dl .size { grid-column: 2; font-size: 13px; color: var(--ink-3); }
.dl .size:empty { display: none; }
.dl .go {
  position: absolute; top: 22px; right: 22px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-2); transition: background .3s, color .3s, transform .3s var(--ease);
}
.dl:hover .go { background: var(--ink); color: #0a0c1d; transform: translateY(3px); }
.stores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.store {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-radius: 18px;
  border: 1px dashed rgba(170, 185, 255, .4); background: rgba(10, 12, 30, .55); color: var(--ink-2); cursor: not-allowed;
}
.store svg { width: 34px; height: 34px; }
.store small { display: block; font-size: 12px; }
.store b { color: var(--ink); font: 600 19px "Space Grotesk", sans-serif; }
.soon {
  margin-left: auto; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: #fff; background: linear-gradient(90deg, rgba(91, 140, 255, .35), rgba(164, 107, 255, .35)); border: 1px solid rgba(164, 107, 255, .5);
}
.note { text-align: center; color: var(--ink-3); font-size: 13px; max-width: 640px; margin: 30px auto 0; }

/* ---------- Pie ---------- */
.foot {
  width: min(var(--max), calc(100% - 32px)); margin: 40px auto 0; padding: 34px 0 44px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 24px; color: var(--ink-3); font-size: 14px;
}
.foot .brand { font-size: 16px; color: var(--ink); }
.foot p { margin: 0 auto 0 0; }
.foot-links { display: flex; gap: 22px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Aparición al desplazar ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Pantallas pequeñas ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; gap: 48px; text-align: left; }
  .hero-visual { max-width: 640px; }
  .steps, .grid, .downloads { grid-template-columns: 1fr 1fr; }
  .grid .wide { grid-column: span 2; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .links { display: none; }
  .nav-end { margin-left: auto; }
  .section { padding: 80px 0; }
  .steps, .grid, .downloads, .stores, .gallery { grid-template-columns: 1fr; }
  .grid .wide, .gallery .shot:first-child, .gallery .shot:last-child { grid-column: auto; }
  .shot:first-child img, .shot:last-child img { aspect-ratio: 16 / 10; }
  .compare > img, .compare .before img { aspect-ratio: 4 / 3; }
  .frame figcaption { flex-direction: column; gap: 0; }
  .foot { flex-direction: column; text-align: center; }
  .foot p { margin: 0; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
