:root {
  --bg: #fdfcff;
  --soft: #f4f1fb;
  --text: #0b0b12;
  --muted: #55526a;
  --dark: #0b0b12;
  --ink: #0b0b12;
  --violet: #7c3aed;
  --orange: #f97316;
  --cyan: #06b6d4;
  --yellow: #facc15;
  --grad: linear-gradient(120deg, var(--violet), var(--ink) 50%, var(--orange));
  --grad-light: linear-gradient(120deg, #a78bfa, var(--orange));
  --radius: 22px;
  --shadow: 0 20px 50px -20px rgba(11, 11, 18, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4, .logo { font-family: "Outfit", sans-serif; line-height: 1.15; }
a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 32px); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section--dark .grad-text { background-image: var(--grad-light); }

.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--wa { fill: currentColor; stroke: none; color: #25d366; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: 1rem; cursor: pointer; border: 0;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-3px); }
.btn--grad { background: var(--grad); background-size: 200% 100%; color: #fff; box-shadow: 0 12px 30px -12px rgba(11, 11, 18, .8); animation: shift 6s ease infinite; }
.btn--ghost { background: #fff; color: var(--text); border: 2px solid #e4e0ee; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--small { padding: .6rem 1.2rem; font-size: .92rem; }
.btn--block { width: 100%; }
@keyframes shift { 0%,100% { background-position: 0 50%; } 50% { background-position: 100% 50%; } }

.pill {
  display: inline-block; padding: .45rem 1rem; border-radius: 999px;
  background: rgba(124, 58, 237, .12); color: var(--violet);
  font-weight: 600; font-size: .88rem; margin-bottom: 1.1rem;
}
.pill--alt { background: rgba(11, 11, 18, .08); color: var(--ink); }
.section--dark .pill { background: rgba(167, 139, 250, .16); color: #c4b5fd; }

/* ===== Logo (letra A en columpio) ===== */
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 900; font-size: 1.5rem; letter-spacing: 1.5px; }
.logo__mark {
  width: 38px; height: 44px; overflow: visible;
  transform-origin: 50% 0;
  animation: swing 4.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
.logo:hover .logo__mark { animation-duration: 2.2s; }
.logo__letter { fill: none; stroke: url(#gradLogo); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.logo__string { stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; opacity: .55; }
.logo__pivot { fill: var(--ink); }
.footer .logo__letter { stroke: url(#gradLogoDark); }
.footer .logo__string { stroke: #fff; }
.footer .logo__pivot { fill: #fff; }

/* Anticipación, impulso, rebotes que se amortiguan y reposo (estilo Pixar) */
@keyframes swing {
  0%   { transform: rotate(0) scale(1, 1); }
  6%   { transform: rotate(7deg) scale(1.06, .92); }
  15%  { transform: rotate(-26deg) scale(.95, 1.06); }
  27%  { transform: rotate(19deg) scale(1, 1); }
  38%  { transform: rotate(-12deg); }
  48%  { transform: rotate(7deg); }
  57%  { transform: rotate(-3.5deg); }
  65%  { transform: rotate(1.5deg); }
  72%, 100% { transform: rotate(0) scale(1, 1); }
}

/* ===== Nav ===== */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.nav.is-scrolled { background: rgba(255, 255, 255, .85); backdrop-filter: blur(14px); box-shadow: 0 6px 30px -18px rgba(0,0,0,.3); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; font-weight: 500; }
.nav__links a:not(.btn):hover { color: var(--violet); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.nav__toggle span { width: 26px; height: 3px; border-radius: 3px; background: var(--text); transition: .3s; }

/* ===== Hero ===== */
.hero { position: relative; padding: 150px 0 110px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 900; margin-bottom: 1.3rem; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 580px; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: 0; animation: float 14s ease-in-out infinite; }
.blob--1 { width: 460px; height: 460px; background: var(--violet); top: -120px; right: -80px; opacity: .4; }
.blob--2 { width: 380px; height: 380px; background: var(--cyan); bottom: -120px; left: -120px; animation-delay: -4s; }
.blob--3 { width: 280px; height: 280px; background: var(--orange); top: 40%; right: 30%; opacity: .3; animation-delay: -8s; }
.blob--4 { width: 500px; height: 500px; background: var(--violet); top: -150px; left: 50%; opacity: .3; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-30px) scale(1.08); } }

.mock { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transform: rotate(2deg); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(1deg) translateY(-14px); } }
.mock__bar { display: flex; gap: 6px; padding: 14px 16px; background: #f1eff7; }
.mock__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.mock__bar i:nth-child(2) { background: var(--yellow); }
.mock__bar i:nth-child(3) { background: #22c55e; }
.mock__body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
.mock__card { padding: 16px; border-radius: 16px; color: #fff; display: flex; flex-direction: column; }
.mock__card span { font-size: .8rem; opacity: .85; }
.mock__card b { font-family: "Outfit"; font-size: 1.5rem; }
.mock__card em { font-style: normal; font-size: .8rem; }
.c1 { background: linear-gradient(135deg, var(--ink), var(--violet)); }
.c2 { background: linear-gradient(135deg, var(--cyan), #3b82f6); }
.mock__chart { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 12px; background: var(--soft); border-radius: 16px; }
.mock__chart i { flex: 1; height: var(--h); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--orange), var(--violet)); animation: grow 1.4s ease both; }
@keyframes grow { from { height: 0; } }

/* ===== Sections ===== */
.section { position: relative; padding: 100px 0; overflow: hidden; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--dark); color: #fff; }
.section--dark .section__head p { color: #b8b5c8; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; position: relative; z-index: 2; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; margin-bottom: .8rem; }
.section__head p { color: var(--muted); font-size: 1.1rem; }

.grid { display: grid; gap: 1.6rem; position: relative; z-index: 2; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Service cards */
.card {
  position: relative; background: #fff; border-radius: var(--radius); padding: 2rem;
  box-shadow: 0 10px 40px -25px rgba(11, 11, 18, .45); border: 1px solid #ece9f4;
  transition: transform .3s, box-shadow .3s; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -22px var(--c1); }
.card__icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1), var(--c2)); margin-bottom: 1.3rem;
  box-shadow: 0 10px 25px -12px var(--c1);
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.card p { color: var(--muted); }

/* Switch */
.switch { position: relative; display: inline-flex; margin-top: 2rem; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.switch__btn { position: relative; z-index: 2; background: none; border: 0; color: #fff; font: 600 .95rem "Inter"; padding: .7rem 1.4rem; border-radius: 999px; cursor: pointer; }
.switch__glider { position: absolute; z-index: 1; top: 6px; bottom: 6px; left: 6px; border-radius: 999px; background: var(--grad-light); transition: left .35s, width .35s; }

/* Plans */
.plans { display: none; }
.plans.is-active { display: grid; animation: fade .5s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(20px); } }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 2.2rem 2rem; backdrop-filter: blur(8px);
  transition: transform .3s;
}
.plan:hover { transform: translateY(-6px); }
.plan--featured { background: linear-gradient(160deg, rgba(124,58,237,.4), rgba(249,115,22,.2)); border: 2px solid var(--orange); transform: scale(1.03); }
.plan--featured:hover { transform: scale(1.03) translateY(-6px); }
.plan__badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--yellow); color: var(--dark); font-weight: 700; font-size: .82rem; padding: .35rem 1rem; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 1.5rem; }
.plan__desc { color: #b8b5c8; margin: .3rem 0 1.4rem; }
.plan__price { font-family: "Outfit"; font-size: 2.6rem; font-weight: 900; margin-bottom: 1.4rem; line-height: 1; }
.plan__price small { display: block; font-size: .85rem; font-weight: 500; color: #b8b5c8; margin-bottom: .3rem; }
.plan__price span { display: block; font-size: .9rem; font-weight: 500; color: var(--yellow); margin-top: .4rem; }
.plan__price--text { font-size: 2rem; }
.plan ul { list-style: none; display: grid; gap: .7rem; margin-bottom: 2rem; flex: 1; }
.plan li { padding-left: 1.8rem; position: relative; color: #e9e7f2; }
.plan li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--grad-light); display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.plan .btn--grad { background: var(--grad-light); background-size: 200% 100%; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step { padding: 2rem 1.6rem; border-radius: var(--radius); background: #fff; border: 1px solid #ece9f4; box-shadow: 0 10px 40px -25px rgba(11,11,18,.45); }
.step b { font-family: "Outfit"; font-size: 3rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h4 { font-size: 1.25rem; margin: .3rem 0 .5rem; }
.step p { color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 1rem; }
.faq details { background: #fff; border-radius: 18px; padding: 1.2rem 1.5rem; border: 1px solid #e4e0ee; transition: box-shadow .3s; }
.faq details[open] { box-shadow: 0 15px 40px -25px var(--ink); border-color: var(--ink); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 1.2rem; transition: transform .3s, background .3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--orange); }
.faq details p { color: var(--muted); margin-top: .8rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 3rem; border-radius: 32px; background: var(--grad); background-size: 200% 200%; animation: shift 10s ease infinite; color: #fff; box-shadow: var(--shadow); }
.contact h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; margin-bottom: 1rem; }
.contact__info p { opacity: .92; font-size: 1.1rem; margin-bottom: 1.8rem; }
.contact__list { list-style: none; display: grid; gap: 1rem; font-weight: 500; font-size: 1.05rem; }
.contact__list li { display: flex; align-items: center; gap: .8rem; }
.contact__list .ico { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.14); }
.contact__list svg.ico:not([viewBox]) { fill: currentColor; stroke: none; }
.contact__list a:hover { text-decoration: underline; }
.form { display: grid; gap: 1rem; background: #fff; color: var(--text); padding: 2rem; border-radius: var(--radius); }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: .8rem 1rem; border-radius: 12px; border: 2px solid #e8e5f0; background: #fbfaff; outline: none; transition: border-color .2s; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--violet); }

/* Footer */
.footer { padding: 2.5rem 0; background: var(--dark); color: #b8b5c8; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer .logo { color: #fff; }
.footer a:hover { color: #fff; }

/* WhatsApp float */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 62px; height: 62px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px -5px rgba(37,211,102,.7); animation: pulse 2.2s infinite; }
.wa-float svg { fill: #fff; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.6); } 70% { box-shadow: 0 0 0 18px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

/* Asistente virtual */
.chat-fab { position: fixed; right: 22px; bottom: 98px; z-index: 60; width: 62px; height: 62px; border: 0; border-radius: 50%; cursor: pointer; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(124,58,237,.8); transition: transform .2s; }
.chat-fab:hover { transform: scale(1.07); }
.chat { position: fixed; right: 22px; bottom: 174px; z-index: 70; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100dvh - 200px)); display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; background: var(--ink); color: #fff; }
.chat__head div { flex: 1; line-height: 1.25; }
.chat__head b { font-family: "Outfit", sans-serif; font-size: .98rem; }
.chat__head small { display: block; color: #bdb8d6; font-size: .78rem; }
.chat__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad-light); display: grid; place-items: center; font-weight: 700; }
.chat__close { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.chat__log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--soft); }
.msg { max-width: 85%; padding: .6rem .85rem; border-radius: 16px; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.msg--user { align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.msg--typing { color: var(--muted); font-style: italic; }
.msg__cta { display: inline-flex; align-items: center; gap: .4rem; margin-top: .55rem; padding: .5rem .85rem; border-radius: 999px; background: #25d366; color: #fff; font-weight: 600; font-size: .88rem; }
.chat__form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid #ece8f6; }
.chat__form input { flex: 1; min-width: 0; border: 1px solid #ddd7ee; border-radius: 999px; padding: .65rem 1rem; font: inherit; font-size: 16px; outline: none; }
.chat__form input:focus { border-color: var(--violet); }
.chat__form button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--violet); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat__form button:disabled { opacity: .5; cursor: default; }
@media (max-width: 480px) {
  .chat { right: 16px; bottom: 16px; height: calc(100dvh - 96px); }
  .chat-fab { right: 16px; }
  body.chat-open .chat-fab, body.chat-open .wa-float { display: none; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(35px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero__inner, .contact { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-6px); }
}
@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; top: 76px; left: 16px; right: 16px; flex-direction: column; gap: 1.2rem;
    padding: 1.8rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav.menu-open { background: rgba(255,255,255,.95); }
  .hero { padding: 120px 0 70px; }
  .grid--3, .steps { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .contact { padding: 1.6rem; }
  .form { padding: 1.4rem; }
  .switch__btn { padding: .6rem .9rem; font-size: .85rem; }
  .footer__inner { justify-content: center; text-align: center; }
}

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