:root {
  --ink: #17133a;
  --muted: #6b6790;
  --soft: #f6f4ff;
  --line: #e8e4fb;
  --blue: #4338f5;
  --violet: #7c22ee;
  --pink: #c026d3;
  --grad: linear-gradient(100deg, #3b3ff5 0%, #7c22ee 55%, #c026d3 100%);
  --band: linear-gradient(120deg, #3a30e6 0%, #6a26ee 55%, #b21fe0 100%);
  --spring: cubic-bezier(.18, 1.18, .32, 1);
  --shadow: 0 18px 50px rgba(67, 56, 245, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 10px 16px; background: #fff; border-radius: 10px; }
.skip:focus { left: 12px; }
.progress { position: fixed; inset: 0 0 auto; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; z-index: 40; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Cabecera */
.top {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 72px);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.top.scrolled { background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); box-shadow: 0 6px 26px rgba(23, 19, 58, .08); padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; color: var(--blue); }
.brand b { font-weight: 400; color: var(--ink); }
#menu { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); padding: 4px 6px 4px 20px; background: rgba(255, 255, 255, .88); border-radius: 99px; }
#menu a { position: relative; text-decoration: none; font-weight: 600; font-size: 15.5px; padding: 6px 0; }
#menu a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
#menu a:hover::after, #menu a.here::after { transform: scaleX(1); }
#menu a.nav-cta { background: rgba(255, 255, 255, .92); color: var(--violet); padding: 8px 18px; border-radius: 99px; box-shadow: 0 6px 18px rgba(23, 19, 58, .14); }
.menu-button { display: none; width: 44px; height: 44px; padding: 10px; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(23, 19, 58, .14); }
.menu-button i { display: block; height: 2px; margin: 5px 0; background: var(--violet); border-radius: 2px; transition: transform .25s, opacity .25s; }

/* Botones */
.button {
  display: inline-block; padding: 14px 28px; border-radius: 99px;
  background: var(--grad); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 12px 26px rgba(90, 45, 240, .34);
  transition: transform .25s var(--spring), box-shadow .25s;
  background-size: 160% 100%;
}
.button:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 18px 34px rgba(90, 45, 240, .42); }
.button.ghost { background: #fff; color: var(--violet); box-shadow: inset 0 0 0 2px var(--violet); }
.button.light { background: #fff; color: var(--violet); box-shadow: 0 12px 26px rgba(23, 19, 58, .25); }

/* Portada */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 20px;
  padding: 100px clamp(18px, 5vw, 72px) 50px;
}
.waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave:nth-child(2) { opacity: .94; }
.hero-copy, .hero-stage { position: relative; z-index: 2; }
h1 { font-size: clamp(56px, 8.6vw, 124px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; }
.line { display: block; overflow: hidden; padding-bottom: .1em; }
.line > span { display: inline-block; animation: rise .9s var(--spring) both; }
.line.l2 > span { animation-delay: .12s; }
.lead { margin: 18px 0 30px; max-width: 26em; font-size: clamp(18px, 1.5vw, 22px); color: var(--muted); animation: fade .8s .35s both; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; animation: fade .8s .5s both; }

.hero-stage { display: grid; place-items: center; min-height: 520px; }
.blob {
  position: absolute; width: min(84%, 520px); aspect-ratio: 1;
  background: linear-gradient(140deg, rgba(255, 255, 255, .95), rgba(236, 230, 255, .9));
  box-shadow: 0 30px 80px rgba(30, 16, 120, .35);
  border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%;
  animation: morph 11s ease-in-out infinite;
  transform: translate(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -14px));
}
.mascot-button { position: relative; z-index: 2; padding: 0; border-radius: 50%; transform: translate(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 16px)); transition: transform .25s ease-out; }
#mascota { width: clamp(240px, 26vw, 400px); animation: bob 4.4s ease-in-out infinite; }
#mascota.hop { animation: hop .62s var(--spring); }
.say {
  position: absolute; z-index: 3; top: 8%; left: 50%; padding: 8px 16px; border-radius: 16px 16px 16px 4px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap;
  animation: pop .5s .9s var(--spring) both;
}
.say.again { animation: pop .4s var(--spring) both; }
.float {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 8px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); font-size: 14px;
  transform: translate(calc(var(--mx, 0) * var(--depth)), calc(var(--my, 0) * var(--depth)));
  transition: transform .3s ease-out;
}
.float b { display: block; line-height: 1.2; }
.float small { color: var(--muted); }
.f1 { --depth: 32px; top: 16%; left: -2%; animation: pop .6s 1s var(--spring) both, drift 6s 1.6s ease-in-out infinite; }
.f2 { --depth: -26px; bottom: 16%; left: -4%; animation: pop .6s 1.2s var(--spring) both, drift 7s 1.8s ease-in-out infinite; }
.f3 { --depth: 22px; bottom: 26%; right: -1%; animation: pop .6s 1.4s var(--spring) both, drift 5.6s 2s ease-in-out infinite; }

.spark { position: absolute; z-index: 1; pointer-events: none; }
.ring { width: 64px; height: 64px; border: 8px solid rgba(124, 34, 238, .16); border-radius: 50%; animation: drift 8s ease-in-out infinite; }
.r1 { top: 18%; left: 44%; }
.r2 { bottom: 9%; left: 5%; width: 40px; height: 40px; border-color: rgba(67, 56, 245, .2); }
.dots { width: 96px; height: 72px; background-image: radial-gradient(rgba(124, 34, 238, .4) 2px, transparent 2.5px); background-size: 14px 14px; }
.d1 { top: 66%; left: 34%; animation: drift 10s ease-in-out infinite; }

/* Secciones claras */
.block { padding: clamp(70px, 9vw, 120px) clamp(18px, 5vw, 72px); text-align: center; }
.block.soft { background: var(--soft); }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.sub { margin-top: 10px; color: var(--muted); font-size: 19px; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; max-width: 1180px; margin: 52px auto 0; }
.feature {
  padding: 26px 18px 30px; background: #fff; border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 10px 34px rgba(67, 56, 245, .07);
  transform: perspective(700px) rotateX(calc(var(--ty, 0) * 8deg)) rotateY(calc(var(--tx, 0) * 10deg));
  transition: transform .2s ease-out, box-shadow .25s, opacity .7s, translate .7s;
}
.feature:hover { box-shadow: var(--shadow); }
.feature img { width: 150px; margin: 0 auto 8px; transition: transform .4s var(--spring); }
.feature:hover img { transform: translateY(-10px) scale(1.08) rotate(-3deg); }
.feature h3 { font-size: 22px; }
.feature p { color: var(--muted); }

/* Banda de la isla */
.band { position: relative; background: var(--band); color: #fff; padding: 150px clamp(18px, 5vw, 72px) 170px; overflow: hidden; }
.edge { position: absolute; left: 0; width: 100%; height: clamp(60px, 8vw, 120px); fill: #fff; }
.top-edge { top: -1px; transform: scaleY(-1); }
.bottom-edge { bottom: -1px; transform: scaleY(-1); }
.band-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(26px, 5vw, 70px); align-items: center; max-width: 1180px; margin: auto; }
.island-copy p { margin: 14px 0 26px; font-size: 19px; opacity: .92; max-width: 24em; }
.island-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.island-buttons button { padding: 10px 20px; border-radius: 99px; color: #fff; font-weight: 600; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); transition: background .2s, color .2s, transform .25s var(--spring); }
.island-buttons button:hover { transform: translateY(-2px); }
.island-buttons button.on { background: #fff; color: var(--violet); box-shadow: none; }

.screen { position: relative; height: clamp(360px, 38vw, 470px); border-radius: 20px; overflow: hidden; background: linear-gradient(150deg, #241a63, #6d3bd1 55%, #e08ad6); box-shadow: 0 30px 70px rgba(16, 8, 70, .45); }
.taskbar { position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; background: rgba(12, 10, 30, .72); color: #fff; font-size: 13px; }
.taskbar i { width: 18px; height: 18px; background: rgba(255, 255, 255, .28); border-radius: 5px; }
.tray { position: absolute; right: 56px; }
.clock { position: absolute; right: 14px; }

.island {
  position: absolute; right: 12px; bottom: 50px; width: 300px; height: 76px; overflow: hidden;
  background: #09090e; border: 1px solid rgba(255, 255, 255, .1); border-radius: 26px;
  box-shadow: 0 0 10px rgba(139, 44, 245, .5);
  transition: width .5s var(--spring), height .5s var(--spring), border-radius .5s, opacity .25s;
}
.island[data-state="panel"] { width: min(330px, calc(100% - 24px)); height: min(300px, calc(100% - 66px)); border-radius: 24px; }
.island.closed { width: 44px; height: 38px; opacity: 0; }
.in { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; font-size: 13.5px; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; }
.in b { display: block; font-size: 15px; }
.in small { color: #b9b5cc; font-size: 12px; }
.island[data-state="greet"] .in-greet, .island[data-state="notice"] .in-notice, .island[data-state="panel"] .in-panel { opacity: 1; transition-delay: .2s; }
.in-notice em { margin-left: auto; padding: 4px 13px; font-style: normal; font-weight: 600; background: #fff; color: #000; border-radius: 99px; }
.in-panel { flex-direction: column; align-items: stretch; padding: 12px; }
.tabs { display: flex; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 8px; color: #b9b5cc; }
.tabs span { padding: 5px 11px; border-radius: 99px; font-size: 12px; }
.tabs .on { background: rgba(255, 255, 255, .15); color: #fff; }
.msg { align-self: flex-start; max-width: 80%; padding: 7px 11px; border-radius: 12px; background: #24222e; font-size: 12.5px; margin-bottom: 6px; white-space: normal; }
.msg.me { align-self: flex-end; background: #6d28d9; }
.msg.photo { align-self: flex-end; width: 130px; height: 84px; background: linear-gradient(135deg, #4338f5, #e08ad6); }
.sample { position: relative; text-align: center; margin-top: 18px; font-size: 13px; opacity: .75; }

/* Planes */
.switch { display: inline-flex; margin-top: 26px; padding: 5px; background: var(--soft); border-radius: 99px; }
.switch button { padding: 10px 28px; border-radius: 99px; font-weight: 700; color: var(--muted); transition: color .2s, background .2s; }
.switch .on { background: var(--grad); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1000px; margin: 92px auto 0; }
.plan { position: relative; padding: 76px 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 10px 34px rgba(67, 56, 245, .08); transition: transform .3s var(--spring), box-shadow .25s, opacity .7s, translate .7s; }
.plan:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.plan.star { background: var(--band); color: #fff; border: 0; box-shadow: var(--shadow); }
.plan img { position: absolute; top: -66px; left: 50%; width: 130px; margin-left: -65px; transition: transform .4s var(--spring); }
.plan:hover img { transform: translateY(-14px) rotate(4deg) scale(1.08); }
.plan h3 { font-size: 21px; }
.price { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin: 8px 0 4px; }
.price b { font-size: 46px; font-weight: 800; letter-spacing: -.02em; }
.price span { font-size: 14px; opacity: .75; }
.plan p:not(.price) { opacity: .78; }
.soon { display: inline-block; margin-top: 14px; padding: 5px 14px; font-size: 13px; font-weight: 700; color: var(--violet); background: var(--soft); border-radius: 99px; }
.plan.star .soon { background: rgba(255, 255, 255, .95); }
.plans[data-shown="personal"] .plan[data-kind="business"], .plans[data-shown="business"] .plan[data-kind="personal"] { display: none; }

/* Descargas */
.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 1000px; margin: 46px auto 0; }
.card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 20px; background: #fff; border-radius: 26px; box-shadow: 0 10px 34px rgba(67, 56, 245, .08); transition: translate .7s, opacity .7s, transform .3s var(--spring); }
.card:hover { transform: translateY(-6px); }
.card h3 { font-size: 22px; }
.card small { color: var(--muted); font-size: 13.5px; }
.card.later { color: var(--muted); justify-content: center; }

/* Soporte */
.support { position: relative; background: var(--band); color: #fff; padding: 140px clamp(18px, 5vw, 72px) 30px; }
.support .edge { fill: var(--soft); }
.support-inner { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 5vw, 60px); flex-wrap: wrap; }
.support-inner img { width: 200px; animation: bob 4.4s ease-in-out infinite; }
.support p { margin: 8px 0 20px; font-size: 19px; opacity: .92; }
footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; margin-top: 70px; font-size: 14px; }

/* Aparición al desplazarse: solo si el script cargó. */
.js .reveal { opacity: 0; translate: 0 34px; transition: opacity .7s, translate .7s var(--spring), transform .3s var(--spring), box-shadow .25s; transition-delay: var(--delay, 0s); }
.js .reveal.visible { opacity: 1; translate: 0 0; }

@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes hop { 0% { transform: scale(1); } 35% { transform: translateY(-34px) scale(1.08) rotate(-5deg); } 70% { transform: translateY(0) scale(.96, 1.04); } 100% { transform: scale(1); } }
@keyframes morph {
  0%, 100% { border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%; }
  33% { border-radius: 42% 58% 60% 40% / 58% 42% 58% 42%; }
  66% { border-radius: 52% 48% 38% 62% / 42% 60% 40% 58%; }
}

/* En portátiles pequeños la ola se aparta del texto. */
@media (min-width: 901px) and (max-width: 1250px) {
  .waves { left: 18%; width: 82%; }
  .lead { max-width: 20em; }
}

@media (max-width: 900px) {
  .menu-button { display: block; z-index: 2; }
  #menu { position: absolute; top: 100%; left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px; background: #fff; border-radius: 18px; box-shadow: 0 16px 40px rgba(23, 19, 58, .2); }
  #menu.open { display: flex; }
  #menu a { padding: 12px 4px; }
  #menu a.nav-cta { background: none; box-shadow: none; padding: 12px 4px; }
  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; padding-top: 104px; }
  /* La ola queda bajo el texto, detrás de la mascota. */
  .waves { top: auto; bottom: 0; height: 56%; }
  .lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .hero-stage { min-height: 420px; }
  .blob { width: min(82%, 400px); }
  .say { top: 0; left: auto; right: 4%; }
  .f1 { left: 0; top: 14%; }
  .f2 { left: 0; bottom: 8%; }
  .f3 { right: 0; bottom: 30%; }
  .r1, .d1 { display: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .feature img { width: 110px; }
  .f3 { display: none; }
  .band-inner { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .island-copy p { margin-inline: auto; }
  .island-buttons { justify-content: center; }
  .plans, .downloads { grid-template-columns: minmax(0, 1fr); max-width: 420px; gap: 84px; }
  .downloads { gap: 16px; }
  .support-inner { text-align: center; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; translate: 0 0; }
}
