/* Blog de Mainds — mismos colores, tipografías y logo que www.mainds.app */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff;
  --bg2: #f7f6ff;
  --bg3: #eeeeff;
  --border: rgba(79,70,229,0.12);
  --border2: rgba(79,70,229,0.22);
  --indigo: #4f46e5;
  --indigo-l: #6366f1;
  --indigo-dark: #3730a3;
  --indigo-glow: rgba(99,102,241,0.18);
  --purple: #7c3aed;
  --purple-l: #8b5cf6;
  --violet-soft: rgba(109,40,217,0.07);
  --text: #0f0e1a;
  --text2: #4b4869;
  --text3: #6e6a8a;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --r: 14px; --r-sm: 9px; --r-lg: 22px;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--indigo); }
img { max-width: 100%; display: block; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; background: linear-gradient(135deg, var(--indigo), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }

/* Tonos de categoría */
.hue-indigo { --h1: #4f46e5; --h2: #818cf8; --hs: #eef0ff; }
.hue-violet { --h1: #7c3aed; --h2: #c084fc; --hs: #f5efff; }
.hue-teal   { --h1: #0f766e; --h2: #5eead4; --hs: #e9faf7; }
.hue-green  { --h1: #047857; --h2: #86efac; --hs: #ecfbf1; }
.hue-pink   { --h1: #be185d; --h2: #f9a8d4; --hs: #fdf0f6; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px/1 var(--font); padding: 11px 22px; border-radius: var(--r-sm); text-decoration: none; white-space: nowrap; transition: all .15s; cursor: pointer; border: 1px solid transparent; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--indigo), var(--purple)); box-shadow: 0 4px 16px var(--indigo-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px var(--indigo-glow); }
.btn-ghost { color: var(--text2); border-color: var(--border2); background: #fff; }
.btn-ghost:hover { color: var(--indigo); border-color: var(--indigo); background: var(--violet-soft); }
.btn-lg { font-size: 16px; padding: 15px 28px; }

/* ── Navegación ── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav-in { max-width: 1240px; margin: 0 auto; height: 76px; padding: 0 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand-mark { height: 34px; width: auto; color: var(--indigo-dark); }
.brand-word { font-size: 27px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.brand-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--indigo); background: var(--violet-soft); border: 1px solid var(--border2); padding: 4px 9px; border-radius: 100px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; overflow: hidden; }
.nav-links a { font-size: 14px; color: var(--text2); text-decoration: none; white-space: nowrap; transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--indigo); }
.nav-cta { display: flex; gap: 10px; flex-shrink: 0; }
.nav-burger { display: none; margin-left: auto; width: 42px; height: 42px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 9px; border-radius: var(--r-sm); }
.nav-burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; flex-direction: column; padding: 8px 20px 24px; border-top: 1px solid var(--border); background: #fff; }
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 18px; font-weight: 500; color: var(--text); text-decoration: none; }
.nav-mobile a.btn { margin-top: 18px; border: 0; color: #fff; padding: 16px; }
@media (max-width: 1260px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 720px) { .nav-cta { display: none; } .nav-burger { display: flex; } .nav-in { padding: 0 16px; height: 66px; } .brand-word { font-size: 24px; } .brand-mark { height: 28px; } }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--bg2), #fff); border-bottom: 1px solid var(--border); }
.orb { position: absolute; border-radius: 50%; pointer-events: none; }
.orb1 { width: 640px; height: 640px; top: -260px; right: -140px; background: radial-gradient(circle, rgba(99,102,241,.14), transparent 70%); }
.orb2 { width: 480px; height: 480px; bottom: -260px; left: -140px; background: radial-gradient(circle, rgba(124,58,237,.10), transparent 70%); }
.hero-in { position: relative; max-width: 820px; margin: 0 auto; padding: 84px 24px 72px; text-align: center; }
.hero-sm .hero-in { padding: 56px 24px 52px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--indigo); background: #fff; border: 1px solid var(--border2); padding: 5px 14px 5px 6px; border-radius: 100px; margin-bottom: 26px; box-shadow: 0 2px 10px rgba(79,70,229,.06); }
.pill-dot { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo-l), var(--purple-l)); display: grid; place-items: center; }
.pill-mark { width: 16px; height: auto; color: #fff; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.06; letter-spacing: -.035em; font-weight: 600; margin-bottom: 20px; }
.hero-sub { font-size: 18px; color: var(--text2); font-weight: 300; max-width: 620px; margin: 0 auto 30px; }
.cat-emoji { font-size: 46px; margin: 18px 0 10px; }
.back { font-size: 14px; color: var(--text3); text-decoration: none; }
.back:hover { color: var(--indigo); }
.search { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--border2); border-radius: 100px; padding: 6px 8px 6px 20px; box-shadow: 0 10px 32px rgba(79,70,229,.10); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--indigo); box-shadow: 0 10px 36px rgba(79,70,229,.18); }
.search svg { width: 20px; height: 20px; color: var(--text3); flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: 400 16px var(--font); color: var(--text); padding: 12px 0; background: transparent; }

/* ── Contenedores ── */
.wrap { max-width: 1240px; margin: 0 auto; padding: 56px 32px 0; }
.section-title { font-size: 30px; letter-spacing: -.025em; font-weight: 600; margin-bottom: 26px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--indigo); margin-bottom: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text3); }

/* ── Chips y filtros ── */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--h1, var(--indigo)); background: var(--hs, var(--bg3)); padding: 5px 12px; border-radius: 100px; text-decoration: none; position: relative; z-index: 2; }
a.chip:hover { filter: brightness(.96); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter { font: 500 14px var(--font); color: var(--text2); background: #fff; border: 1px solid var(--border2); padding: 9px 16px; border-radius: 100px; cursor: pointer; transition: all .15s; }
.filter span { font-size: 12px; color: var(--text3); margin-left: 4px; }
.filter:hover { border-color: var(--indigo); color: var(--indigo); }
.filter.is-on { background: var(--text); color: #fff; border-color: var(--text); }
.filter.is-on span { color: rgba(255,255,255,.7); }

/* ── Portadas ── */
.cover { position: relative; overflow: hidden; background: var(--bg3); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cover-art { background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.55), transparent 45%), linear-gradient(135deg, var(--h2), var(--h1)); display: grid; place-items: center; }
.cover-mark { width: 46%; max-width: 260px; height: auto; color: rgba(255,255,255,.92); filter: drop-shadow(0 8px 24px rgba(15,14,26,.18)); transition: transform .5s; }
.cover-emoji { position: absolute; right: 18px; bottom: 14px; font-size: 26px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); box-shadow: 0 6px 18px rgba(15,14,26,.12); }

/* ── Tarjetas ── */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(79,70,229,.13); border-color: var(--border2); }
.card:hover .cover img, .card:hover .cover-mark, .featured:hover .cover img, .featured:hover .cover-mark { transform: scale(1.04); }
.card-link { position: absolute; inset: 0; z-index: 1; }
.card-cover { aspect-ratio: 16 / 9; }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; flex: 1; }
.card h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
.card p { font-size: 15px; color: var(--text2); font-weight: 300; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; }
.featured { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; background: #fff; border: 1px solid var(--border); border-radius: 26px; overflow: hidden; box-shadow: 0 20px 60px rgba(79,70,229,.10); transition: box-shadow .2s, transform .2s; }
.featured:hover { transform: translateY(-3px); box-shadow: 0 26px 70px rgba(79,70,229,.16); }
.featured-cover { min-height: 340px; }
.featured-body { padding: 44px 44px 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; justify-content: center; }
.featured h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
.featured p { color: var(--text2); font-weight: 300; font-size: 17px; }
.read-more { font-weight: 600; color: var(--indigo); margin-top: 6px; }
.empty { text-align: center; padding: 56px 20px; color: var(--text2); background: var(--bg2); border-radius: var(--r-lg); }
.empty-emoji { font-size: 40px; margin-bottom: 10px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .featured { grid-template-columns: 1fr; } .featured-cover { min-height: 0; aspect-ratio: 16 / 8; } }
@media (max-width: 640px) {
  .wrap { padding: 40px 16px 0; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .featured-body { padding: 26px 22px 28px; }
  .hero-in { padding: 56px 16px 48px; }
  .hero-sub { font-size: 16px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 24px; padding: 0 16px 4px; scrollbar-width: none; }
  .filter { flex-shrink: 0; }
}

/* ── Entrada ── */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--indigo), var(--purple)); }
.post-head { max-width: 820px; margin: 0 auto; padding: 48px 24px 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.crumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--text3); }
.crumbs a { color: var(--text3); text-decoration: none; }
.crumbs a:hover { color: var(--indigo); }
.draft-note { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; padding: 8px 14px; border-radius: var(--r-sm); font-size: 14px; }
.post-head h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.post-lead { font-size: 20px; color: var(--text2); font-weight: 300; line-height: 1.55; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 15px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo-l), var(--purple-l)); display: grid; place-items: center; flex-shrink: 0; }
.avatar-mark { width: 28px; height: auto; color: #fff; }
.post-cover { max-width: 1080px; margin: 0 auto; border-radius: 26px; aspect-ratio: 21 / 9; }
.post-cover .cover-mark { width: 30%; }
.post-layout { max-width: 1080px; margin: 0 auto; padding: 48px 24px 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; }
.toc-side { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 28px; }
.toc-title { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.toc ol { list-style: none; border-left: 2px solid var(--border); }
.toc li a { display: block; font-size: 14px; color: var(--text2); text-decoration: none; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; line-height: 1.4; }
.toc li.d3 a { padding-left: 26px; font-size: 13px; }
.toc li a:hover, .toc li a.is-on { color: var(--indigo); border-left-color: var(--indigo); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-row a, .share-row button { font: 500 13px var(--font); color: var(--text2); background: var(--bg2); border: 1px solid var(--border); border-radius: 100px; padding: 7px 12px; text-decoration: none; cursor: pointer; }
.share-row a:hover, .share-row button:hover { color: var(--indigo); border-color: var(--border2); }

.prose { max-width: 700px; font-size: 18px; line-height: 1.75; color: #29263f; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.025em; font-weight: 600; color: var(--text); margin-top: 1.9em; scroll-margin-top: 100px; position: relative; }
.prose h3 { font-size: 22px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; color: var(--text); margin-top: 1.6em; scroll-margin-top: 100px; position: relative; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--border2); text-decoration: none; opacity: 0; transition: opacity .15s; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose a { color: var(--indigo); text-decoration: underline; text-decoration-color: rgba(79,70,229,.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--indigo); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--indigo-l); }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote { border-left: 4px solid var(--indigo-l); background: var(--bg2); padding: 18px 22px; border-radius: 0 var(--r) var(--r) 0; color: var(--text2); font-size: 18px; }
.prose blockquote p + p { margin-top: .6em; }
.prose img, .prose figure img { border-radius: var(--r); margin: 0 auto; }
.prose figcaption { text-align: center; font-size: 14px; color: var(--text3); margin-top: 10px; }
.prose hr { border: 0; height: 1px; background: var(--border2); margin: 2.4em 0; }
.prose code { font-size: .88em; background: var(--bg3); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: #15132b; color: #e6e4ff; padding: 18px 20px; border-radius: var(--r); overflow-x: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg2); font-weight: 600; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2em !important; }
.tags span { font-size: 13px; color: var(--text3); background: var(--bg2); padding: 4px 10px; border-radius: 100px; }
.cta-card { margin-top: 2.6em !important; display: flex; gap: 22px; align-items: flex-start; background: linear-gradient(135deg, var(--bg2), #fff); border: 1px solid var(--border2); border-radius: var(--r-lg); padding: 28px; }
.cta-mark { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--indigo), var(--purple)); display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 8px 22px var(--indigo-glow); }
.cta-logo { width: 34px; height: auto; color: #fff; }
.cta-card h2 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.015em; }
.cta-card p { font-size: 16px; color: var(--text2); margin-bottom: 16px; font-weight: 300; line-height: 1.6; }
.cta-card .btn { text-decoration: none; color: #fff; }
.related { padding-top: 80px; }
@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .toc-side { position: static; order: 2; margin-top: 40px; }
  .toc-side .toc { display: none; }
  .prose { max-width: none; }
}
@media (max-width: 640px) {
  .post-head { padding: 32px 16px 24px; }
  .post-lead { font-size: 18px; }
  .post-cover { border-radius: 0; aspect-ratio: 16 / 9; }
  .post-layout { padding: 32px 16px 0; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
  .prose .anchor { display: none; }
  .cta-card { flex-direction: column; padding: 22px; }
}

/* ── Banda final y pie ── */
.newsband { margin-top: 96px; background: radial-gradient(circle at 85% 10%, rgba(139,92,246,.35), transparent 50%), linear-gradient(135deg, #1e1b4b, #312e81 60%, #4c1d95); color: #fff; }
.newsband-in { max-width: 1240px; margin: 0 auto; padding: 64px 32px; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.newsband .kicker { color: #c7d2fe; }
.newsband h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; margin-bottom: 12px; }
.newsband em { background: none; color: #c4b5fd; -webkit-text-fill-color: #c4b5fd; }
.newsband p { color: rgba(255,255,255,.78); max-width: 560px; font-weight: 300; font-size: 17px; }
.newsband-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.newsband .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.newsband .btn-ghost:hover { background: rgba(255,255,255,.16); }
.foot { border-top: 1px solid var(--border); background: #fff; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand-foot .brand-mark { height: 26px; }
.brand-foot .brand-word { font-size: 21px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { font-size: 14px; color: var(--text3); text-decoration: none; }
.foot-links a:hover { color: var(--indigo); }
.foot-copy { text-align: center; font-size: 13px; color: var(--text3); padding: 0 16px 28px; }
@media (max-width: 640px) { .newsband-in, .foot-in { padding-left: 16px; padding-right: 16px; } .newsband-cta .btn { flex: 1 1 100%; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.3em; }
.prose li > input[type="checkbox"] { accent-color: var(--indigo); margin-right: 8px; transform: translateY(1px); }

/* ── «En resumen» y preguntas frecuentes ── */
.tldr { background: linear-gradient(135deg, var(--bg2), #fff); border: 1px solid var(--border2); border-radius: var(--r-lg); padding: 20px 24px; }
.tldr-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo); margin-bottom: 8px; }
.tldr ul { margin: 0; }
.tldr li { font-size: 17px; }
.faq { margin-top: 2.2em !important; }
.faq h2 { margin-bottom: .6em; }
.faq details { border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; background: #fff; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--indigo); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details > div { margin-top: 10px; color: var(--text2); font-size: 16.5px; }
