:root {
  --ink: #0b1530;
  --ink-2: #33415c;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --accent: #22c55e;
  --dark: #0a1228;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 21, 48, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.container--narrow { width: min(780px, 92%); }

.grad {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--brand); margin-bottom: .8em;
}
.center { text-align: center; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85em 1.4em; border-radius: 999px; font-weight: 600;
  background: linear-gradient(90deg, var(--brand), #3b82f6); color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
  transition: transform .15s ease, box-shadow .15s ease;
  border: 2px solid transparent; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37, 99, 235, .35); }
.btn--sm { padding: .55em 1.1em; font-size: .92rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { border-color: var(--brand); box-shadow: none; }
.btn--light { background: #fff; color: var(--ink); box-shadow: none; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); box-shadow: none; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.25rem; }
.logo__mark {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  font-weight: 800; font-size: 1.05rem; white-space: nowrap; line-height: 1; flex-shrink: 0;
}
.logo__mark span { color: #bbf7d0; }
.logo__text b { color: var(--ink); font-weight: 700; }
.logo--light .logo__text b { color: #fff; }
/* "IA" del nombre: I con remates (IBM Plex Sans) para que no se confunda con l, y en color */
.ia {
  font-family: "IBM Plex Sans", "Inter", sans-serif; font-style: normal; font-weight: 700;
  color: var(--brand); letter-spacing: .02em;
}
.logo__text .ia {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo--light .logo__text .ia, .section--dark .ia, .footer .ia { background: none; color: #67e8f9; }
.logo--light { color: #fff; }
.logo--light .logo__text b { color: var(--brand-2); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; font-weight: 500; color: var(--ink-2); }
.nav__links a:not(.btn):hover { color: var(--brand); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* Hero */
.hero {
  padding: 80px 0 90px;
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(6,182,212,.12), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(37,99,235,.10), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 32px; }
.hero__proof { list-style: none; padding: 0; margin: 0; display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.hero__proof b { color: var(--ink); font-size: 1.3rem; margin-right: 4px; }

.hero__visual { position: relative; }
.chat {
  background: #fff; border-radius: 22px; box-shadow: 0 30px 60px rgba(11,21,48,.15);
  overflow: hidden; border: 1px solid var(--line); max-width: 380px; margin-left: auto;
}
.chat__head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: #075e54; color: #fff; }
.chat__head small { display: block; opacity: .8; font-size: .75rem; }
.chat__avatar { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #075e54; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.chat__body { padding: 16px; background: #efeae2; display: flex; flex-direction: column; gap: 10px; min-height: 300px; }
.msg { margin: 0; padding: 9px 12px; border-radius: 12px; max-width: 85%; font-size: .9rem; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.08); opacity: 0; transform: translateY(8px); animation: pop .4s ease forwards; }
.msg--in { background: #fff; align-self: flex-start; border-top-left-radius: 4px; }
.msg--out { background: #d9fdd3; align-self: flex-end; border-top-right-radius: 4px; }
.msg:nth-child(1) { animation-delay: .3s; }
.msg:nth-child(2) { animation-delay: 1.1s; }
.msg:nth-child(3) { animation-delay: 1.9s; }
.msg:nth-child(4) { animation-delay: 2.7s; }
.file { display: inline-block; margin-top: 4px; padding: 2px 8px; background: rgba(0,0,0,.06); border-radius: 6px; font-size: .8rem; font-weight: 600; }
@keyframes pop { to { opacity: 1; transform: none; } }

.flow {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px;
  font-size: .8rem; font-weight: 600; color: var(--ink-2);
}
.flow span { background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); }
.flow i { width: 18px; height: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* Secciones */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark); color: #e2e8f0; }
.section--dark .section__title { color: #fff; }
.section--dark .section__lead { color: #94a3b8; }
.section--dark .eyebrow { color: var(--brand-2); }
.section__title { text-align: center; }
.section__lead { text-align: center; color: var(--ink-2); max-width: 680px; margin: 0 auto 48px; font-size: 1.08rem; }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); margin-top: 36px; }

.pain { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.pain span { font-size: 1.8rem; }
.pain p { margin: .6em 0 0; color: var(--ink-2); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #bfdbfe; }
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: #eff6ff; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 16px; }
.card p { color: var(--ink-2); }
.card ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; color: var(--muted); }
.card li { padding-left: 1.3em; position: relative; margin: .25em 0; }
.card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.case {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column;
}
.case h3 { color: #fff; }
.case p { color: #a5b4cb; font-size: .95rem; }
.case__result { margin-top: auto; margin-bottom: 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); color: #bbf7d0 !important; font-weight: 500; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: rgba(6,182,212,.15); color: #67e8f9; margin-bottom: 14px; }

.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; position: relative; }
.steps li { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--bg-alt); }
.steps__n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); margin-bottom: 16px; }
.steps p { color: var(--ink-2); margin: 0; }

.why { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why p { color: var(--ink-2); font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 52px; position: relative; color: var(--ink-2); }
.checks li::before { content: "✓"; position: absolute; left: 18px; top: 15px; width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.checks b { color: var(--ink); }

details { border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 12px; background: #fff; }
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; position: relative; padding-right: 30px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); padding-bottom: 8px; }

.section--cta { background: linear-gradient(120deg, #1d4ed8, #0891b2); color: #fff; padding: 80px 0; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta p { opacity: .9; font-size: 1.08rem; max-width: 34em; margin: 0; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

.footer { background: var(--dark); color: #94a3b8; padding: 56px 0 28px; }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__inner p { margin-top: 14px; font-size: .92rem; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer__links a:hover { color: #fff; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 20px; font-size: .85rem; }

/* Página legal */
.legal { padding: 64px 0 96px; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--ink-2); }

/* Animación al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid, .why { grid-template-columns: 1fr; }
  .chat { margin: 0 auto; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4, .steps { grid-template-columns: repeat(2, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px 4%; gap: 0; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 0; }
  .nav__links .btn { margin-top: 8px; }
  .grid--3, .grid--4, .steps { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .msg, .reveal { animation: none; opacity: 1; transform: none; transition: none; }
}
