/* ===== Variables y base ===== */
:root {
  --bg: #0b1020;
  --bg-soft: #11182f;
  --band: #0f1530;
  --card: #161e3a;
  --card-border: #243056;
  --text: #e8ecf6;
  --muted: #9aa6c4;
  --brand: #5b8cff;
  --brand-2: #7c5cff;
  --accent: #2dd4bf;
  --radius: 16px;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Botones ===== */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: 0 8px 24px rgba(91, 140, 255, .25);
  border: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(91, 140, 255, .35); }
.btn-large { padding: 16px 30px; font-size: 1.05rem; }
.btn-small { padding: 9px 18px; font-size: .9rem; }
.btn-block { display: block; text-align: center; width: 100%; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--card-border);
  color: var(--text);
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--brand); background: rgba(91,140,255,.08); }
.btn-link { color: var(--brand); font-weight: 600; align-self: center; }
.btn-link:hover { text-decoration: underline; }

/* ===== Cabecera ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 16, 32, .72);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn-small { color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 96px 0 88px;
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(700px 360px at 0% 10%, rgba(45,212,191,.14), transparent 60%);
  overflow: hidden;
}
.hero-inner { max-width: 820px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow.center, .section-title.center, .section-sub.center { text-align: center; }
.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 800;
  margin-bottom: 22px;
}
.hl {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 640px; }
.hero-cta { display: flex; gap: 18px; flex-wrap: wrap; margin: 34px 0 14px; }
.hero-note { color: var(--muted); font-size: .92rem; }

/* ===== Secciones genéricas ===== */
.section { padding: 84px 0; }
.band { padding: 84px 0; background: var(--band); border-top: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.05); }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.02em; font-weight: 800; margin-bottom: 14px; }
.section-sub { color: var(--muted); margin-bottom: 12px; }
.center { text-align: center; }

/* ===== Grids y tarjetas ===== */
.grid { display: grid; gap: 22px; margin-top: 42px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--brand); }
.card .icon { font-size: 1.9rem; margin-bottom: 14px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .96rem; }

.band-foot { text-align: center; margin-top: 38px; color: var(--muted); }
.band-foot a { color: var(--brand); font-weight: 600; }
.band-foot.small { font-size: .95rem; }

/* ===== Add-on ===== */
.addon {
  display: flex; align-items: center; gap: 22px;
  margin-top: 34px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.addon-icon { font-size: 2.1rem; line-height: 1; }
.addon-text { flex: 1; }
.addon-tag { color: var(--accent); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.addon-text h3 { margin-bottom: 6px; }
.addon-text p { color: var(--muted); font-size: .96rem; }
.addon-price { font-size: 1.5rem; font-weight: 700; white-space: nowrap; text-align: right; }
.addon-price span { font-size: .8rem; font-weight: 500; color: var(--muted); display: block; }
.addon-price small { font-size: .85rem; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) {
  .addon { flex-direction: column; text-align: center; align-items: center; }
  .addon-price { text-align: center; }
}

/* ===== Planes ===== */
.plans { align-items: stretch; }
.plan {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex; flex-direction: column;
  position: relative;
}
.plan.featured {
  border-color: var(--brand);
  box-shadow: 0 16px 50px rgba(91,140,255,.22);
  background: linear-gradient(180deg, rgba(91,140,255,.10), var(--card));
  transform: translateY(-8px);
}
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.plan-name { font-size: 1.3rem; font-weight: 800; }
.plan-tag { color: var(--muted); margin-bottom: 16px; font-size: .95rem; }
.plan-price { font-size: 1.9rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -.02em; }
.plan-price span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.plan-price small { display: block; font-size: .9rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.plan-list { list-style: none; margin-bottom: 26px; flex: 1; }
.plan-list li { padding: 8px 0 8px 28px; position: relative; color: var(--text); font-size: .96rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.plan-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* ===== Pasos ===== */
.steps .step { text-align: center; padding: 8px; }
.step-num {
  width: 52px; height: 52px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 800; font-size: 1.3rem;
  box-shadow: 0 8px 22px rgba(91,140,255,.3);
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); }

/* ===== Sobre mí ===== */
.about-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-text .btn { margin-top: 10px; }
.about-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 20px 18px; text-align: center;
}
.mini-card strong { display: block; font-size: 1.8rem; margin-bottom: 8px; }
.mini-card span { color: var(--muted); font-size: .92rem; }

/* ===== Portfolio / Work ===== */
.grid-work { grid-template-columns: repeat(3, 1fr); }
.work {
  display: flex; flex-direction: column;
  padding: 26px 24px;
}
.work-kind {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.work h3 { font-size: 1.16rem; margin-bottom: 10px; letter-spacing: -.01em; }
.work > p { color: var(--muted); font-size: .95rem; }
.work-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(45,212,191,.08);
  border: 1px solid rgba(45,212,191,.22);
  color: var(--text) !important;
  font-size: .92rem; font-weight: 500;
}
.work-result strong { color: var(--accent); }
.work-foot {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.work-link { color: var(--brand); font-weight: 700; font-size: .94rem; }
.work-link:hover { text-decoration: underline; }
.work-sec { color: var(--muted); font-weight: 600; font-size: .88rem; }
.work-sec:hover { color: var(--text); }
.work-note { color: var(--muted); font-size: .85rem; font-style: italic; }
.work-intro { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ===== Páginas de detalle ===== */
.detail-hero { padding: 72px 0 56px; }
.detail-back {
  display: inline-block; margin-bottom: 20px;
  color: var(--muted); font-weight: 600; font-size: .92rem;
}
.detail-back:hover { color: var(--text); }
.detail-body { max-width: 760px; }
.detail-body > p { color: var(--muted); font-size: 1.06rem; }
.detail-section { padding: 64px 0; }
.detail-list { max-width: 760px; margin-top: 24px; }
.detail-result { margin-top: 26px; font-size: 1rem; }

/* ===== CTA final ===== */
.cta-final {
  padding: 90px 0;
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124,92,255,.25), transparent 60%),
    var(--bg-soft);
}
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.cta-final p { color: var(--muted); font-size: 1.1rem; margin-bottom: 30px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== Pie ===== */
.site-footer { padding: 48px 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner { text-align: center; }
.footer-inner .brand { font-size: 1.4rem; display: inline-block; margin-bottom: 10px; }
.footer-inner p { color: var(--muted); margin-bottom: 4px; }
.footer-inner a { color: var(--brand); }
.muted { color: var(--muted); font-size: .88rem; }

/* ===== Chatbot demo ===== */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px 13px 16px;
  border: none; cursor: pointer; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-family: inherit; font-weight: 700; font-size: .95rem;
  box-shadow: 0 12px 30px rgba(91,140,255,.4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(91,140,255,.5); }
.chat-fab .fab-emoji { font-size: 1.25rem; line-height: 1; }
.chat-fab.hidden { display: none; }

.chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 61;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 44px);
  display: none; flex-direction: column; overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--card-border); border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.chat-panel.open { display: flex; }

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(135deg, rgba(91,140,255,.16), rgba(124,92,255,.10));
}
.chat-header .chat-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 1.2rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.chat-header h4 { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.chat-header p { font-size: .8rem; color: var(--muted); }
.chat-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1.5rem; line-height: 1; padding: 4px 6px;
}
.chat-close:hover { color: var(--text); }

.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: .93rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--card-border); border-bottom-left-radius: 5px; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-bottom-right-radius: 5px; }
.chat-typing { display: inline-flex; gap: 4px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chatblink 1.2s infinite both; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatblink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-suggests { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 6px; }
.chat-chip {
  font-family: inherit; font-size: .82rem; cursor: pointer;
  background: rgba(91,140,255,.10); color: var(--text);
  border: 1px solid var(--card-border); border-radius: 999px; padding: 7px 12px;
}
.chat-chip:hover { border-color: var(--brand); }

.chat-input-row { display: flex; gap: 8px; padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.chat-input {
  flex: 1; resize: none; font-family: inherit; font-size: .93rem;
  background: var(--card); color: var(--text);
  border: 1px solid var(--card-border); border-radius: 12px; padding: 11px 13px; max-height: 96px;
}
.chat-input:focus { outline: none; border-color: var(--brand); }
.chat-send {
  flex: none; width: 44px; border: none; cursor: pointer; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 1.15rem;
}
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-foot { text-align: center; font-size: .72rem; color: var(--muted); padding: 0 14px 12px; }

@media (max-width: 480px) {
  .chat-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 16px); max-height: none; }
  .chat-fab { right: 14px; bottom: 14px; }
}

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .grid-3, .grid-work { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .plan.featured { transform: none; }
  .nav-links a:not(.btn-small) { display: none; }
  .hero { padding: 70px 0 64px; }
  .section, .band { padding: 64px 0; }
}
