/* =========================================================
   LANAIS — blog (se carga después de lanais-home.css y usa sus tokens)
   ========================================================= */

.blog main { position: relative; z-index: 1; }

/* ---------- Migas ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.crumbs li { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs li + li::before { content: "/"; opacity: .5; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--brand-2); }
.crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* ---------- Cabecera del listado ---------- */
.b-hero { padding: clamp(130px, 14vw, 180px) 0 clamp(30px, 4vw, 50px); }
.b-hero .wrap { display: grid; gap: 22px; }
.b-h1 { font-size: clamp(38px, 6vw, 92px); font-weight: 800; letter-spacing: -.045em; line-height: .98; max-width: 17ch; }
.b-h1 em { font-style: normal; display: block; background: linear-gradient(90deg, var(--brand-2) 0%, var(--c-vox) 55%, var(--c-saas) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.blog-list .b-hero .lead { max-width: 720px; }
.js .b-hero .b-h1, .js .b-hero .lead, .js .b-hero .topics { animation: bUp 1s cubic-bezier(.16, 1, .3, 1) both; }
.js .b-hero .lead { animation-delay: .15s; }
.js .b-hero .topics { animation-delay: .3s; }
@keyframes bUp { from { transform: translateY(26px); } to { transform: none; } }

.topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.topics a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; text-decoration: none;
  font-size: 15px; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1px solid var(--stroke);
  transition: border-color .25s, color .25s, background .25s, transform .25s;
}
.topics a small { font-size: 12px; font-weight: 800; color: var(--muted); }
.topics a:hover { border-color: var(--brand-2); color: var(--ink); transform: translateY(-2px); }
.topics a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.topics a.on small { color: rgba(255, 255, 255, .75); }

/* ---------- Meta y etiquetas ---------- */
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
.b-topic {
  position: relative; z-index: 2; display: inline-flex; padding: 4px 11px; border-radius: 99px; text-decoration: none;
  font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--brand-2);
  background: color-mix(in srgb, var(--brand) 14%, transparent); border: 1px solid color-mix(in srgb, var(--brand-2) 30%, transparent);
}
.b-topic:hover { background: color-mix(in srgb, var(--brand) 26%, transparent); }
.b-new { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c-saas); display: inline-flex; align-items: center; gap: 8px; }
.b-new::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-saas); box-shadow: 0 0 0 4px rgba(47, 211, 160, .2); animation: blink 2s ease-in-out infinite; }

/* ---------- Destacado ---------- */
.b-feature {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--card-shadow);
}
.b-feature::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, var(--brand-2), transparent 35%, transparent 65%, var(--c-vox));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7;
}
.b-feature-in { display: grid; gap: 20px; align-content: center; padding: clamp(28px, 4.5vw, 64px); }
.b-feature h2 { text-wrap: balance; font-size: clamp(26px, 3vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.b-feature h2 a { text-decoration: none; }
.b-feature h2 a:hover { color: var(--brand-2); }
.b-feature p { color: var(--muted); font-size: clamp(16px, 1.25vw, 19px); max-width: 640px; }
.b-feature .btn { justify-self: start; }
.b-feature-art { position: relative; min-height: 320px; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%); }
.orbit { position: relative; width: min(300px, 70%); aspect-ratio: 1; }
.orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--stroke-2); animation: spin 26s linear infinite; }
.orbit i:nth-child(2) { inset: 16%; border-style: solid; border-color: color-mix(in srgb, var(--c-vox) 45%, transparent); animation-duration: 18s; animation-direction: reverse; }
.orbit i:nth-child(3) { inset: 34%; border: 0; background: radial-gradient(circle, var(--brand-2), var(--brand) 60%, transparent 72%); filter: blur(2px); animation: pulse 3.2s ease-in-out infinite; }
.orbit i::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--c-saas); box-shadow: 0 0 14px var(--c-saas); }
.orbit i:nth-child(2)::after { background: var(--c-vox); box-shadow: 0 0 14px var(--c-vox); }
.orbit i:nth-child(3)::after { display: none; }
.b-feature-min { position: absolute; right: 24px; bottom: 22px; font-size: 14px; font-weight: 700; color: var(--muted); }
.b-feature-min b { font-size: 34px; color: var(--ink); margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(.92); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }

/* ---------- Rejilla de tarjetas ---------- */
.b-list { padding-top: clamp(50px, 6vw, 80px); }
.b-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 26px); }
.b-card {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 28px 26px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--stroke); overflow: hidden; isolation: isolate;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), border-color .3s, background .3s;
}
.b-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%);
}
.b-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand-2) 45%, transparent); }
.b-card:hover::before { opacity: 1; }
.b-card h3 { text-wrap: pretty; font-size: clamp(19px, 1.5vw, 23px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.b-card h3 a { text-decoration: none; }
.b-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.b-card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; flex: 1; }
.b-more { font-size: 14px; font-weight: 800; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.b-more .arr { transition: transform .25s; color: var(--brand-2); }
.b-card:hover .b-more .arr { transform: translateX(5px); }
.js .b-card.rev { transform: translateY(36px); }
.js .b-card.rev.vis { transform: none; }
.js .b-card.rev.vis:hover { transform: translateY(-6px); }

/* ---------- Paginación ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: clamp(40px, 5vw, 64px); }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 99px; text-decoration: none; font-weight: 800; font-size: 15px; }
.pager .pg { border: 1px solid var(--stroke); background: var(--surface); color: var(--ink-2); transition: border-color .25s, color .25s; }
.pager .pg:hover { border-color: var(--brand-2); color: var(--ink); }
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pg-step { color: var(--brand-2); }
.pager .pg-step:hover { text-decoration: underline; }
.pager .pg-gap { color: var(--muted); min-width: 20px; padding: 0; }

/* ---------- Banda de productos ---------- */
.b-cta-band {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(30px, 4vw, 60px); align-items: center;
  margin-bottom: clamp(80px, 9vw, 130px); padding: clamp(30px, 4.5vw, 64px); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, var(--bg-2)), var(--bg-2)); border: 1px solid var(--stroke);
}
.b-cta-band > div:first-child { display: grid; gap: 18px; }
.b-cta-band .ttl { font-size: clamp(30px, 3.6vw, 54px); }
.b-cta-links { display: grid; gap: 12px; }
.b-prod {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--stroke); transition: transform .3s, border-color .3s;
}
.b-prod img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.b-prod span { display: grid; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.b-prod b { font-size: 18px; color: var(--ink); font-weight: 800; }
.b-prod:hover { transform: translateX(6px); }
.b-prod.p-alt:hover { border-color: var(--c-alt); }
.b-prod.p-vox:hover { border-color: var(--c-vox); }
.b-prod.p-saas:hover { border-color: var(--c-saas); }
.b-prod-n { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid !important; place-items: center; font-weight: 800 !important; color: var(--c-saas) !important; background: color-mix(in srgb, var(--c-saas) 15%, transparent); }

/* ---------- Artículo ---------- */
.post-head { display: grid; gap: 22px; padding-top: clamp(130px, 13vw, 170px); padding-bottom: clamp(30px, 4vw, 50px); }
.post-h1 { font-size: clamp(30px, 3.7vw, 56px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; max-width: 26ch; text-wrap: balance; }
.js .post-h1 { animation: bUp 1s cubic-bezier(.16, 1, .3, 1) both; }
.post-by { display: flex; align-items: center; gap: 14px; }
.post-by img { width: 40px; height: 40px; border-radius: 12px; padding: 6px; background: var(--surface-2); border: 1px solid var(--stroke); object-fit: contain; }
.post-by > span { display: grid; font-size: 14.5px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.post-by b { color: var(--ink); font-size: 15.5px; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(30px, 5vw, 90px); align-items: start; padding-bottom: clamp(50px, 6vw, 80px); }
.post-body { max-width: 740px; display: grid; gap: 1.25em; font-size: clamp(17.5px, 1.25vw, 19.5px); line-height: 1.75; color: var(--ink-2); }
.post-body p { margin: 0; }
.post-lead { font-size: 1.18em; line-height: 1.6; color: var(--ink); font-weight: 600; padding-left: 22px; border-left: 3px solid; border-image: linear-gradient(var(--brand-2), var(--c-vox)) 1; }
.post-questions { margin: .4em 0; padding: 26px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--stroke); }
.post-questions .pq-h { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c-vox); margin-bottom: 12px; }
.post-questions ul { display: grid; gap: 10px; }
.post-questions li { position: relative; padding-left: 28px; color: var(--ink); font-weight: 600; line-height: 1.5; }
.post-questions li::before { content: "?"; position: absolute; left: 0; top: .1em; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--c-vox); }
.post-source { font-size: 15px; color: var(--muted); padding-top: .6em; border-top: 1px solid var(--stroke); }
.post-source a { color: var(--brand-2); font-weight: 700; word-break: break-all; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14.5px; }
.post-share span { font-weight: 800; color: var(--muted); margin-right: 4px; }
.post-share a, .post-share button {
  font: inherit; font-weight: 700; cursor: pointer; padding: 8px 15px; border-radius: 99px; text-decoration: none;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--stroke); transition: border-color .25s, color .25s;
}
.post-share a:hover, .post-share button:hover { border-color: var(--brand-2); color: var(--ink); }
.post-share button.done { border-color: var(--c-saas); color: var(--c-saas); }

.post-aside { position: sticky; top: 110px; }
.b-prod-card { display: grid; gap: 14px; padding: 28px 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--card-shadow); position: relative; overflow: hidden; }
.b-prod-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); pointer-events: none; }
.b-prod-card.p-alt::after { background: radial-gradient(circle, color-mix(in srgb, var(--c-alt) 35%, transparent), transparent 70%); }
.b-prod-card.p-vox::after { background: radial-gradient(circle, color-mix(in srgb, var(--c-vox) 35%, transparent), transparent 70%); }
.b-prod-card.p-saas::after { background: radial-gradient(circle, color-mix(in srgb, var(--c-saas) 30%, transparent), transparent 70%); }
.b-prod-card img { width: 52px; height: 52px; object-fit: contain; }
.b-prod-card .bp-h { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.b-prod-card p { color: var(--muted); font-size: 15.5px; }
.b-prod-card .btn { justify-self: start; margin-top: 4px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 10px; }
.post-nav .pn { display: grid; gap: 8px; padding: 22px 24px; border-radius: var(--radius); text-decoration: none; font-weight: 700; line-height: 1.35; background: var(--surface); border: 1px solid var(--stroke); transition: border-color .3s, transform .3s; }
.post-nav .pn small { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-2); }
.post-nav .pn:hover { border-color: var(--brand-2); transform: translateY(-3px); }
.post-nav .next { text-align: right; grid-column: 2; }
.b-related { padding-top: clamp(60px, 7vw, 100px); }
.b-related .head.row .btn { justify-self: end; }

/* ---------- Guías (artículos propios con HTML) ---------- */
.b-guide { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; padding: 4px 10px; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--c-vox)); }
.post-toc { padding: 22px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--stroke); }
.post-toc .pq-h { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 10px; }
.post-toc ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 6px; font-size: .9em; }
.post-toc a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.post-toc a:hover { color: var(--brand-2); }
.prose { display: grid; gap: 1.1em; }
.prose > * { margin: 0; }
.prose h2 { font-size: clamp(26px, 2.4vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: var(--ink); margin-top: 1.1em; scroll-margin-top: 110px; }
.prose h3 { font-size: clamp(20px, 1.6vw, 24px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--ink); margin-top: .6em; }
.prose h4 { font-size: 1.05em; font-weight: 800; color: var(--ink); }
.prose strong, .prose b { color: var(--ink); font-weight: 700; }
.prose a { color: var(--brand-2); font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand-2) 45%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand-2); }
.prose ul, .prose ol { display: grid; gap: .5em; padding-left: 0; }
.prose ol { list-style: none; counter-reset: li; }
.prose li { position: relative; padding-left: 1.7em; }
.prose ul > li::before { content: ""; position: absolute; left: .35em; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }
.prose ol > li { counter-increment: li; }
.prose ol > li::before { content: counter(li); position: absolute; left: 0; top: .15em; width: 1.35em; height: 1.35em; border-radius: 50%; display: grid; place-items: center; font-size: .75em; font-weight: 800; color: #fff; background: var(--brand); }
.prose blockquote { padding: 18px 24px; border-left: 3px solid var(--c-vox); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 800; background: var(--surface); }
.prose code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: static; max-width: 740px; }
  .b-cta-band { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .b-feature { grid-template-columns: minmax(0, 1fr); }
  .b-feature-art { min-height: 200px; order: -1; }
  .orbit { width: 180px; }
}
@media (max-width: 640px) {
  .b-h1 { font-size: clamp(34px, 10.4vw, 46px); }
  .post-lead { font-size: 1.08em; padding-left: 16px; }
  .b-grid { grid-template-columns: minmax(0, 1fr); }
  .topics { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--pad) * -1); padding: 2px var(--pad) 8px; scrollbar-width: none; }
  .topics::-webkit-scrollbar { display: none; }
  .topics a { flex: none; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .next { grid-column: 1; text-align: left; }
  .b-related .head.row { grid-template-columns: minmax(0, 1fr); }
  .b-related .head.row .btn { justify-self: start; }
  .crumbs span { max-width: 26ch; }
  .post-questions { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit i, .b-new::before { animation: none; }
  .js .b-hero .b-h1, .js .b-hero .lead, .js .b-hero .topics, .js .post-h1 { animation: none; }
}
