/* LVNG Journal · modo oscuro, calcado del blog de Biograph: portada con destacados y secciones por tema, página por tema y post. */

.jr { --jbg: #111214; --jtx: rgba(208, 214, 224, .8); --jln: rgba(255, 255, 255, .1); background: var(--jbg); color: #fff; }
body.is-dark { background: #111214; }

/* ---------- Portada y página de tema ---------- */
.jr-hero { padding: calc(var(--hdr) + clamp(56px, 7vw, 110px)) 0 clamp(40px, 4vw, 64px); border-bottom: 1px solid var(--jln); }
.jr-hero__h { font-size: clamp(42px, 4.75vw, 68px); line-height: .95; font-weight: 400; letter-spacing: -.03em; max-width: 1000px; }
.jr-hero__h > span { color: var(--jtx); }
.jr-hero__h .lvng { height: .68em; margin-left: 0; }
.jr-crumb { margin-bottom: 28px; font-size: 14px; color: var(--jtx); }
.jr-crumb a { color: #fff; }
.jr-crumb span { margin: 0 6px; opacity: .5; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(32px, 4vw, 56px); }
.jf { display: inline-flex; align-items: center; height: 36px; padding: 0 13px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2); font-size: 14px; color: #fff; transition: background .3s, color .3s, border-color .3s; }
.jf:hover { border-color: rgba(255, 255, 255, .45); }
.jf.is-on { background: #fff; color: var(--ink); border-color: #fff; }

.jsec { padding: clamp(48px, 5vw, 80px) 0; border-top: 1px solid var(--jln); }
.jsec--feat, .jr-hero + .jsec { border-top: 0; }
.jsec__h { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.jsec__h h2 { font-size: clamp(26px, 2.25vw, 32px); font-weight: 400; letter-spacing: -.02em; line-height: 1.2; }
.jsec__h a { flex: none; font-size: 15.5px; color: var(--jtx); transition: color .3s; }
.jsec__h a span { display: inline-block; transition: transform .4s var(--ease); }
.jsec__h a:hover { color: #fff; }
.jsec__h a:hover span { transform: translateX(4px); }

.jgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.jgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) 20px; }

/* Tarjeta */
.jc { display: flex; flex-direction: column; color: #fff; }
.jc figure { position: relative; margin: 0 0 20px; aspect-ratio: 1.35; border-radius: 8px; overflow: hidden; background: #1c1d21; }
.jc img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), filter .8s var(--ease); }
.jc:hover img { transform: scale(1.045); }
.jchip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; color: #fff; background: rgba(17, 18, 20, .32); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.jc .jchip { position: absolute; left: 18px; top: 18px; }
.jc h3 { font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.jc--big h3 { font-size: clamp(19px, 1.5vw, 22px); }
.jc p { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--jtx); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jby { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 22px; font-size: 13.5px; line-height: 1.35; }
.jby img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; }
.jby small { display: block; color: var(--jtx); font-size: 13px; }

/* ---------- Post ---------- */
.post-hero { position: relative; padding: calc(var(--hdr) + clamp(32px, 4vw, 56px)) 0 0; text-align: center; }
.post-hero .wrap { position: relative; }
.post-back { position: absolute; left: var(--gut); top: 0; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); transition: background .3s; }
.post-back:hover { background: rgba(255, 255, 255, .16); }
.post-back svg { width: 15px; height: 15px; }
.post-meta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--jtx); }
.post-meta > span { opacity: .5; }
.jchip--in { height: 30px; font-size: 13px; }
.post-hero h1 { max-width: 1040px; margin: 26px auto 0; font-size: clamp(36px, 3.6vw, 52px); line-height: 1.04; font-weight: 400; letter-spacing: -.03em; }
.post-lead { max-width: 760px; margin: 22px auto 0; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.6; color: var(--jtx); }
.post-by { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 32px; font-size: 14px; }
.post-by img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; object-position: center 20%; margin-bottom: 6px; }
.post-by small { font-size: 13px; color: var(--jtx); }
.post-by b { font-weight: 500; }
.post-img { max-width: var(--max); margin: clamp(40px, 5vw, 64px) auto 0; padding: 0 var(--gut); }
.post-img img { width: 100%; aspect-ratio: 1.71; object-fit: cover; border-radius: 16px; }

.post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); max-width: var(--max); margin: 0 auto; padding: clamp(56px, 6vw, 96px) var(--gut) 0; }
.post-side { position: sticky; top: calc(var(--hdr) + 32px); align-self: start; max-width: 240px; font-size: 14px; }
.post-side__k { display: flex; align-items: center; gap: 8px; }
.post-side__k i { width: 6px; height: 6px; border-radius: 50%; background: #2fd67f; }
.post-side__v { margin: 6px 0 22px 14px; color: var(--jtx); font-size: 13.5px; }
.post-toc { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--jln); }
.post-toc b { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--jtx); }
.post-toc a { display: block; padding: 6px 0 6px 13px; border-left: 1px solid var(--jln); color: var(--jtx); font-size: 13.5px; line-height: 1.4; transition: color .3s, border-color .3s; }
.post-toc a:hover, .post-toc a.is-on { color: #fff; border-color: #fff; }

.prose { font-size: 17px; line-height: 1.75; color: var(--jtx); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.4em; font-size: clamp(24px, 2vw, 30px); line-height: 1.2; font-weight: 400; letter-spacing: -.02em; color: #fff; scroll-margin-top: calc(var(--hdr) + 24px); }
.prose h3 { margin-top: 1.9em; font-size: 19px; font-weight: 500; line-height: 1.35; color: #fff; }
.prose h2 + p, .prose h3 + p { margin-top: .8em; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose ol { padding-left: 1.3em; list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: rgba(255, 255, 255, .4); }
.prose a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: #fff; }
.prose sup { line-height: 0; }
.prose sup a { text-decoration: none; font-size: 11px; padding: 0 1px; color: #a9bbff; }
.prose strong { font-weight: 500; color: #fff; }
.prose .lvng { color: #fff; }
.prose .key { padding: 26px 28px; border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid var(--jln); font-size: 16px; line-height: 1.65; }
.prose .key b { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: #fff; }
.prose .num { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 1.8em; margin-bottom: 1.8em; }
.prose .num div { padding: 22px 20px; border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid var(--jln); }
.prose .num strong { display: block; font-size: clamp(32px, 2.6vw, 40px); line-height: 1; font-weight: 400; letter-spacing: -.03em; }
.prose .num span { display: block; margin-top: 10px; font-size: 13.5px; line-height: 1.45; }
.prose .pq { margin: 2.4em 0; padding: 4px 0 4px 28px; border-left: 1px solid rgba(255, 255, 255, .35); }
.prose .pq p { font-size: clamp(20px, 1.7vw, 25px); line-height: 1.45; letter-spacing: -.01em; color: #fff; }
.prose .pq cite { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-style: normal; font-size: 13.5px; color: var(--jtx); }
.prose .pq cite::before { content: ""; width: 28px; height: 28px; border-radius: 7px; background: url(/assets/img/juan-retrato.webp) center 20% / cover; }
.prose .pq cite b { color: #fff; font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--jln); vertical-align: top; }
.prose th { color: #fff; font-weight: 500; }

/* Preguntas en oscuro */
.jr .faq { border-top-color: var(--jln); }
.jr .qa { border-bottom-color: var(--jln); }
.jr .qa summary { color: #fff; }
.jr .qa summary i::before, .jr .qa summary i::after { background: #fff; }
.jr .qa__b p { color: var(--jtx); }
.prose .faq { margin-top: 1.2em; }
.post-note { margin-top: 2.4em !important; padding-top: 22px; border-top: 1px solid var(--jln); font-size: 13.5px; line-height: 1.6; }

/* Cierre del post */
.post-cta { max-width: var(--max); margin: clamp(72px, 8vw, 120px) auto 0; padding: 0 var(--gut); }
.post-cta__in { position: relative; display: grid; place-items: center; min-height: clamp(360px, 34vw, 480px); padding: 48px 24px; border-radius: 16px; overflow: hidden; text-align: center; isolation: isolate; }
.post-cta__in > img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: brightness(.5); }
.post-cta__in h2 { font-size: clamp(28px, 2.6vw, 40px); font-weight: 400; letter-spacing: -.025em; }
.post-cta__in p { max-width: 520px; margin: 14px auto 26px; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.55; }
.post-end { max-width: 720px; margin: clamp(56px, 6vw, 96px) auto 0; padding: 0 var(--gut); box-sizing: content-box; }
.post-author { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 28px 0; border-top: 1px solid var(--jln); border-bottom: 1px solid var(--jln); }
.post-author img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; object-position: center 20%; }
.post-author b { display: block; font-weight: 500; }
.post-author small { display: block; color: var(--jtx); font-size: 13.5px; }
.post-author p { margin-top: 12px; color: var(--jtx); font-size: 15px; line-height: 1.6; }
.post-author a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.post-refs { padding-top: 32px; scroll-margin-top: calc(var(--hdr) + 24px); }
.post-refs h2 { font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.post-refs ol { padding-left: 18px; list-style: decimal; font-size: 13px; line-height: 1.6; color: var(--jtx); }
.post-refs li + li { margin-top: 8px; }
.post-refs li:target { color: #fff; }
.post-refs a { color: #a9bbff; }
.post-end + .jsec { margin-top: clamp(56px, 6vw, 96px); }

@media (max-width: 1100px) {
  .post { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .post-side { display: none; }
  .jgrid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .jgrid2, .jgrid3 { grid-template-columns: 1fr; }
  .post-back { display: none; }
  .post-img img { aspect-ratio: 4 / 3; }
  .prose { font-size: 16.5px; }
  .prose .num { grid-template-columns: 1fr; }
  .jr-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--gut) * -1); padding-right: var(--gut); }
  .jr-chips::-webkit-scrollbar { display: none; }
  .jf { flex: none; }
}

/* ---------- Pie en las páginas oscuras del Journal ---------- */
body.is-dark .ftr { background: #111214; color: #fff; border-top-color: rgba(255, 255, 255, .1); }
body.is-dark .ftr__claim small, body.is-dark .ftr__cols a, body.is-dark .ftr__bot, body.is-dark .ftr__bot nav button { color: rgba(208, 214, 224, .7); }
body.is-dark .ftr__cols a:hover, body.is-dark .ftr__bot nav a:hover, body.is-dark .ftr__bot nav button:hover { color: #fff; }
body.is-dark .ftr__bot { border-top-color: rgba(255, 255, 255, .1); }
body.is-dark .ftr .mk { background: #fff; }
body.is-dark .ftr .mk::before { background: var(--ink); }
