/* =====================================================================
   EMMA — Sitio público (landing y páginas legales)
   Autocontenido: misma paleta del kit de acceso (.emma-*), sin app.css.
   ===================================================================== */
:root {
  --bg:#17141f; --bg-2:#1d1927; --surface:#24202e; --line:#36304a;
  --primary:#8465f6; --accent:#a18aff; --hover:#7455e8;
  --text:#ffffff; --muted:#c8c3d0; --soft:#9991ac;
  --warm:#f3eee7; --ink:#1b1724; --ink-muted:#5b5468;
  --wa:#25d366; --radius:18px;
}
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body.sx {
  margin:0; background:var(--bg); color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:17px; line-height:1.6; -webkit-font-smoothing:antialiased;
}
a { color:var(--accent); }
img,svg { max-width:100%; }
.sx-wrap { width:100%; max-width:1180px; margin:0 auto; padding:0 clamp(16px,4vw,40px); }

/* ------------------------------ Marca ------------------------------ */
.sx-brand { display:inline-flex; align-items:center; gap:.6rem; text-decoration:none; font-weight:700; }
.sx-brand__logo {
  width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  background:linear-gradient(135deg,var(--accent),var(--primary)); color:#fff; font-weight:800;
  box-shadow:0 6px 18px rgba(132,101,246,.45);
}
.sx-brand__name { font-size:1.3rem; color:var(--text); letter-spacing:-.02em; }
.sx-brand__name b { color:var(--accent); font-weight:800; }

/* ------------------------------ Botones ---------------------------- */
.sx-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  min-height:48px; padding:0 26px; border-radius:999px; border:1px solid transparent;
  background:var(--primary); color:#fff; font-weight:600; font-size:16px; text-decoration:none;
  box-shadow:0 10px 30px -8px rgba(132,101,246,.7); transition:background .2s, transform .2s, box-shadow .2s;
}
.sx-btn:hover { background:var(--hover); transform:translateY(-1px); }
.sx-btn:focus-visible, .sx a:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.sx-btn--ghost { background:transparent; border-color:var(--line); box-shadow:none; color:var(--text); }
.sx-btn--ghost:hover { background:rgba(255,255,255,.06); }
.sx-btn--light { background:#fff; color:var(--ink); box-shadow:0 10px 30px -10px rgba(0,0,0,.5); }
.sx-btn--light:hover { background:var(--warm); }
.sx-btn--sm { min-height:40px; padding:0 18px; font-size:15px; }

/* ------------------------------ Navegación ------------------------- */
.sx-nav { position:sticky; top:0; z-index:20; background:rgba(23,20,31,.72); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border-bottom:1px solid rgba(255,255,255,.06); }
.sx-nav__in { display:flex; align-items:center; gap:24px; height:68px; }
.sx-nav__links { display:flex; gap:28px; margin-left:auto; }
.sx-nav__links a { color:var(--muted); text-decoration:none; font-size:15px; font-weight:500; }
.sx-nav__links a:hover { color:#fff; }

/* ------------------------------ Hero ------------------------------- */
.sx-hero { position:relative; overflow:hidden; padding:clamp(56px,9vw,112px) 0 clamp(64px,9vw,120px); }
.sx-hero__glow {
  position:absolute; inset:-20% -10% auto auto; width:900px; height:900px; pointer-events:none;
  background:radial-gradient(closest-side, rgba(132,101,246,.38), rgba(132,101,246,0) 70%);
  filter:blur(10px);
}
.sx-hero::after {
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.35;
  background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size:56px 56px; mask-image:radial-gradient(ellipse at 30% 20%, #000 20%, transparent 70%);
  -webkit-mask-image:radial-gradient(ellipse at 30% 20%, #000 20%, transparent 70%);
}
.sx-hero__grid { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:clamp(40px,6vw,80px); align-items:center; }
.sx-pill { display:inline-flex; align-items:center; gap:.55rem; padding:6px 14px; border-radius:999px; border:1px solid var(--line); background:rgba(36,32,46,.7); color:var(--muted); font-size:14px; font-weight:500; }
.sx-dot { width:8px; height:8px; border-radius:50%; background:var(--wa); box-shadow:0 0 0 4px rgba(37,211,102,.18); }
.sx-hero h1 { font-size:clamp(40px,6vw,76px); line-height:1.02; letter-spacing:-.045em; font-weight:800; margin:22px 0 22px; text-wrap:balance; }
.sx-hero h1 em { font-style:normal; background:linear-gradient(100deg,var(--accent) 10%,#d5c9ff 55%,var(--accent) 90%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.sx-lead { color:var(--muted); font-size:clamp(17px,1.5vw,20px); max-width:600px; margin:0; }
.sx-cta { display:flex; flex-wrap:wrap; gap:12px; margin:34px 0 40px; }
.sx-proof { list-style:none; display:flex; flex-wrap:wrap; gap:clamp(20px,4vw,44px); padding:0; margin:0; }
.sx-proof li { display:flex; flex-direction:column; }
.sx-proof b { font-size:22px; letter-spacing:-.02em; }
.sx-proof span { color:var(--soft); font-size:14px; }

/* ------------------------------ Teléfono --------------------------- */
.sx-phone {
  justify-self:center; width:100%; max-width:380px; border-radius:36px; padding:12px;
  background:linear-gradient(160deg,#2c2738,#1a1722); border:1px solid #3b3450;
  box-shadow:0 50px 100px -30px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.03) inset, 0 30px 80px -40px rgba(132,101,246,.7);
  transform:rotate(1.5deg);
}
.sx-phone__bar { display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:26px 26px 0 0; background:#1f2c34; }
.sx-phone__bar b { display:block; font-size:15px; line-height:1.2; }
.sx-phone__bar small { color:#8fb8a7; font-size:12px; }
.sx-phone__avatar { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,var(--accent),var(--primary)); font-weight:800; }
.sx-chat {
  display:flex; flex-direction:column; gap:10px; padding:18px 14px 22px; min-height:440px; border-radius:0 0 26px 26px;
  background:#0b141a radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0/18px 18px;
}
.sx-msg {
  margin:0; max-width:84%; padding:9px 12px; border-radius:14px; font-size:14.5px; line-height:1.45;
  opacity:0; transform:translateY(8px); animation:sx-in .45s cubic-bezier(.2,.8,.2,1) var(--d,0s) forwards;
}
.sx-msg--in { align-self:flex-start; background:#202c33; border-top-left-radius:4px; }
.sx-msg--out { align-self:flex-end; background:#005c4b; border-top-right-radius:4px; }
.sx-card { display:flex; flex-direction:column; gap:2px; padding:12px 14px; }
.sx-card__ok { color:#7ff0b5; font-weight:700; font-size:13px; }
.sx-card b { font-size:15.5px; }
.sx-card small { color:#a9d6c8; font-size:12.5px; margin-top:4px; }
.sx-typing { align-self:flex-start; display:flex; gap:4px; margin:0; padding:12px 14px; border-radius:14px; background:#202c33; opacity:0; animation:sx-in .4s ease var(--d,0s) forwards; }
.sx-typing i { width:6px; height:6px; border-radius:50%; background:#8696a0; animation:sx-dot 1.2s infinite ease-in-out; }
.sx-typing i:nth-child(2) { animation-delay:.15s; } .sx-typing i:nth-child(3) { animation-delay:.3s; }
@keyframes sx-in { to { opacity:1; transform:none; } }
@keyframes sx-dot { 0%,80%,100% { opacity:.3; transform:none; } 40% { opacity:1; transform:translateY(-3px); } }

/* ------------------------------ Secciones -------------------------- */
.sx-sec { padding:clamp(72px,10vw,128px) 0; }
.sx-sec--warm { background:var(--warm); color:var(--ink); }
.sx-eyebrow { margin:0 0 14px; color:var(--accent); font-size:14px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.sx-sec--warm .sx-eyebrow { color:var(--hover); }
.sx-h2 { font-size:clamp(32px,4.2vw,54px); line-height:1.06; letter-spacing:-.035em; font-weight:800; margin:0 0 clamp(36px,5vw,56px); text-wrap:balance; }

.sx-bento { display:grid; grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,1fr)); gap:18px; }
.sx-tile {
  position:relative; padding:30px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--line);
  transition:transform .25s, border-color .25s;
}
.sx-tile:hover { transform:translateY(-3px); border-color:#4e4566; }
.sx-tile--big { grid-row:span 2; background:linear-gradient(165deg,#3a2d73 0%,#24202e 62%); border-color:#4b3e86; display:flex; flex-direction:column; justify-content:flex-end; min-height:320px; }
.sx-tile--big h3 { font-size:30px; }
.sx-tile h3 { margin:16px 0 8px; font-size:21px; letter-spacing:-.02em; }
.sx-tile p { margin:0; color:var(--muted); }
.sx-ico { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:rgba(161,138,255,.14); font-size:22px; }

.sx-steps { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(18px,3vw,36px); counter-reset:none; }
.sx-steps li { padding:32px 28px; border-radius:var(--radius); background:#fff; box-shadow:0 1px 0 rgba(0,0,0,.04), 0 20px 40px -30px rgba(27,23,36,.35); }
.sx-step__n { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--ink); color:#fff; font-weight:800; }
.sx-steps h3 { margin:20px 0 8px; font-size:21px; letter-spacing:-.02em; }
.sx-steps p { margin:0; color:var(--ink-muted); }

.sx-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(32px,6vw,80px); align-items:center; }
.sx-split .sx-h2 { margin-bottom:20px; }
.sx-link { display:inline-block; margin-top:24px; font-weight:600; text-decoration:none; }
.sx-link:hover { text-decoration:underline; }
.sx-checks { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.sx-checks li { position:relative; padding:18px 20px 18px 56px; border-radius:14px; background:var(--surface); border:1px solid var(--line); color:var(--muted); }
.sx-checks li::before { content:"✓"; position:absolute; left:18px; top:17px; width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:rgba(37,211,102,.16); color:var(--wa); font-weight:800; font-size:13px; }
.sx-checks b { color:#fff; }

.sx-final {
  text-align:center; padding:clamp(48px,7vw,84px) clamp(20px,5vw,64px); border-radius:28px;
  background:radial-gradient(120% 140% at 50% 0%, #9c82ff 0%, var(--primary) 45%, #4b33b8 100%);
  box-shadow:0 40px 90px -40px rgba(132,101,246,.9);
}
.sx-final h2 { margin:0 auto 14px; max-width:720px; font-size:clamp(30px,4vw,48px); line-height:1.08; letter-spacing:-.035em; font-weight:800; text-wrap:balance; }
.sx-final p { margin:0 auto 30px; max-width:520px; color:rgba(255,255,255,.88); }

/* ------------------------------ Pie -------------------------------- */
.sx-foot { border-top:1px solid rgba(255,255,255,.07); padding:48px 0 32px; background:var(--bg-2); }
.sx-foot__in { display:flex; flex-wrap:wrap; justify-content:space-between; gap:28px; }
.sx-foot__tag { margin:12px 0 0; color:var(--soft); font-size:15px; }
.sx-foot__links { display:flex; flex-wrap:wrap; gap:14px 28px; align-items:flex-start; }
.sx-foot__links a { color:var(--muted); text-decoration:none; font-size:15px; }
.sx-foot__links a:hover { color:#fff; text-decoration:underline; }
.sx-foot__legal { margin-top:36px; color:var(--soft); font-size:13.5px; }

/* ------------------------------ Legal ------------------------------ */
.sx-legal { padding:clamp(48px,8vw,96px) 0 clamp(64px,9vw,112px); }
.sx-legal__in { max-width:820px; }
.sx-legal h1 { font-size:clamp(34px,5vw,56px); line-height:1.05; letter-spacing:-.04em; font-weight:800; margin:0 0 12px; text-wrap:balance; }
.sx-legal__date { color:var(--soft); margin:0 0 40px; font-size:15px; }
.sx-prose { color:var(--muted); }
.sx-prose h2 { color:#fff; font-size:22px; letter-spacing:-.02em; margin:44px 0 12px; }
.sx-prose h3 { color:#fff; font-size:17px; margin:24px 0 6px; }
.sx-prose p, .sx-prose li { margin:0 0 12px; }
.sx-prose ul, .sx-prose ol { padding-left:1.3em; margin:0 0 16px; }
.sx-prose b { color:#fff; }
.sx-prose code { font-size:.86em; padding:2px 6px; border-radius:6px; background:var(--surface); color:var(--accent); word-break:break-word; }
.sx-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:32px 0 12px; }
.sx-box { padding:26px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--line); }
.sx-box h2 { margin-top:0; font-size:19px; }
.sx-box ol { margin-bottom:8px; }
.sx-box p { margin:0; font-size:15px; }

/* ------------------------------ Responsivo ------------------------- */
@media (max-width: 960px) {
  .sx-hero__grid, .sx-split { grid-template-columns:1fr; }
  .sx-phone { transform:none; }
  .sx-bento { grid-template-columns:1fr 1fr; }
  .sx-bento > :last-child { grid-column:span 2; }
  .sx-tile--big { grid-row:auto; grid-column:span 2; min-height:240px; }
  .sx-steps { grid-template-columns:1fr; }
}
@media (max-width: 640px) {
  body.sx { font-size:16px; }
  .sx-nav__links { display:none; }
  .sx-nav__in .sx-btn { margin-left:auto; }
  .sx-bento, .sx-cards { grid-template-columns:1fr; }
  .sx-bento > :last-child { grid-column:auto; }
  .sx-tile--big { grid-column:auto; }
  .sx-cta .sx-btn { flex:1 1 100%; }
  .sx-chat { min-height:340px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .sx-msg, .sx-typing { animation:none; opacity:1; transform:none; }
  .sx-typing i { animation:none; }
  .sx-tile, .sx-btn { transition:none; }
}
