/* ===========================================================================
   Blog de lawkit — hoja de estilos
   Reutiliza los tokens de marca de tailwind.config.js (paleta "Grafito + mandarina").
   Sitio en modo claro únicamente, igual que la app. Fuente del sistema para todo,
   Figtree solo para el wordmark "lawkit".
   Versión: subir el ?v=N en los <link> al editar este archivo (romper caché).
   =========================================================================== */

:root {
  --primary: #FF7A2E;
  --primary-dark: #E2620F;
  --teal: #1C6E63;
  --teal-soft: #D6EBE7;
  --carbon: #1F2125;
  --ink2: #3A3D44;
  --bone: #FAFAF7;
  --soft: #EFEEEA;
  --line: #DED9CF;
  --muted: #6F6C64;

  --maxw: 1180px;
  --prose: 720px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 33, 37, 0.04), 0 8px 24px rgba(31, 33, 37, 0.06);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Figtree", var(--font-sans);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--carbon);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---- Barra de progreso de lectura ---- */
.lk-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary);
  z-index: 60;
  transition: width 0.1s linear;
}

/* ---- Header ---- */
.lk-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.lk-header-in {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lk-brand { display: inline-flex; align-items: center; gap: 9px; }
.lk-brand svg { width: 24px; height: 24px; }
.lk-brand .word {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--carbon);
}
.lk-brand .tag {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 9px;
  margin-left: 2px;
}
.lk-nav { display: flex; align-items: center; gap: 22px; }
.lk-nav a { color: var(--ink2); font-weight: 600; font-size: 15px; }
.lk-nav a:hover { color: var(--carbon); text-decoration: none; }
.lk-cta {
  background: var(--primary);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 9px;
}
.lk-cta:hover { background: var(--primary-dark); text-decoration: none !important; }

/* ---- Layout artículo: contenido + TOC lateral ---- */
.lk-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.lk-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: start;
  padding: 40px 0 72px;
}
.lk-main { min-width: 0; max-width: var(--prose); }

/* ---- Breadcrumb ---- */
.lk-crumbs {
  font-size: 13.5px;
  color: var(--muted);
  margin: 28px 0 8px;
}
.lk-crumbs a { color: var(--muted); }
.lk-crumbs a:hover { color: var(--carbon); }
.lk-crumbs .sep { margin: 0 7px; color: var(--line); }

/* ---- Encabezado del artículo ---- */
.lk-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: #FFF1E8;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.lk-main h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 6px 0 16px;
  font-weight: 800;
}
.lk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 8px;
}
.lk-meta .author { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink2); }
.lk-meta .avatar { width: 30px; height: 30px; border-radius: 50%; }

/* ---- Tipografía del cuerpo ---- */
.lk-main h2 {
  font-size: clamp(23px, 2.7vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
  font-weight: 800;
  scroll-margin-top: 80px;
}
.lk-main h3 {
  font-size: 20px;
  margin: 30px 0 10px;
  font-weight: 700;
}
.lk-main p { margin: 0 0 18px; }
.lk-main ul, .lk-main ol { margin: 0 0 20px; padding-left: 22px; }
.lk-main li { margin: 8px 0; }
.lk-main strong { font-weight: 700; }

/* ---- Respuesta corta (TL;DR) — clave para GEO ---- */
.lk-tldr {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0 36px;
  box-shadow: var(--shadow);
}
.lk-tldr h2 {
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
}
.lk-tldr p, .lk-tldr ul { margin-bottom: 0; }
.lk-tldr li { margin: 6px 0; }

/* ---- Tabla de datos clave ---- */
.lk-table-wrap { overflow-x: auto; margin: 24px 0 30px; }
.lk-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lk-main th, .lk-main td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lk-main thead th {
  background: var(--soft);
  font-weight: 700;
  color: var(--carbon);
}
.lk-main tbody tr:last-child td { border-bottom: none; }

/* ---- Cita / destacado ---- */
.lk-main blockquote {
  margin: 24px 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--teal);
  color: var(--ink2);
  font-style: italic;
}

/* ---- FAQ (acordeón con <details>) ---- */
.lk-faq { margin: 14px 0 8px; }
.lk-faq details {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  margin: 10px 0;
  overflow: hidden;
}
.lk-faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.lk-faq summary::-webkit-details-marker { display: none; }
.lk-faq summary::after { content: "+"; color: var(--primary); font-weight: 800; }
.lk-faq details[open] summary::after { content: "\2212"; }
.lk-faq details[open] summary { border-bottom: 1px solid var(--line); }
.lk-faq .answer { padding: 14px 18px 18px; color: var(--ink2); }
.lk-faq .answer p:last-child { margin-bottom: 0; }

/* ---- Caja CTA dentro del artículo ---- */
.lk-cta-box {
  background: var(--carbon);
  color: var(--bone);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 38px 0;
}
.lk-cta-box h3 { margin: 0 0 8px; color: #fff; font-size: 21px; }
.lk-cta-box p { margin: 0 0 16px; color: #C9C6BE; }
.lk-cta-box a.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
}
.lk-cta-box a.btn:hover { background: var(--primary-dark); text-decoration: none; }

/* ---- Caja de autor ---- */
.lk-author {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 40px 0 24px;
}
.lk-author img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.lk-author .name { font-weight: 800; font-size: 17px; }
.lk-author .role { color: var(--muted); font-size: 14.5px; margin: 2px 0 8px; }
.lk-author .bio { font-size: 15px; color: var(--ink2); margin: 0 0 8px; }
.lk-author .links a { font-weight: 600; font-size: 14.5px; }

/* ---- Disclaimer ---- */
.lk-disclaimer {
  font-size: 14px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 11px;
  padding: 16px 18px;
  margin: 22px 0;
}

/* ---- Tabla de contenidos (aside) ---- */
.lk-toc {
  position: sticky;
  top: 84px;
  font-size: 14.5px;
}
.lk-toc .toc-title {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}
.lk-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.lk-toc li { margin: 0; }
.lk-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.4;
}
.lk-toc a:hover { color: var(--carbon); text-decoration: none; }
.lk-toc a.active {
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ---- Footer ---- */
.lk-footer {
  background: var(--carbon);
  color: #C9C6BE;
  margin-top: 40px;
}
.lk-footer-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}
.lk-footer a { color: #C9C6BE; }
.lk-footer a:hover { color: #fff; }
.lk-footer .word { font-family: var(--font-brand); font-weight: 800; color: #fff; letter-spacing: -0.03em; }

/* ===========================================================================
   Índice del blog (tarjetas)
   =========================================================================== */
.lk-hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--bone));
}
.lk-hero-in { max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 44px; }
.lk-hero h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.025em; margin: 10px 0 12px; font-weight: 800; }
.lk-hero p { font-size: 19px; color: var(--ink2); max-width: 620px; margin: 0; }

.lk-cards {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.lk-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lk-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31,33,37,0.10); text-decoration: none; }
.lk-card .pilar {
  align-self: flex-start;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-soft);
  padding: 4px 9px; border-radius: 999px; margin-bottom: 12px;
}
.lk-card h2 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 8px; color: var(--carbon); font-weight: 800; }
.lk-card p { color: var(--ink2); font-size: 15.5px; margin: 0 0 16px; }
.lk-card .read { margin-top: auto; color: var(--primary-dark); font-weight: 700; font-size: 14.5px; }
.lk-card.soon { opacity: 0.62; }
.lk-card.soon .read { color: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .lk-article-grid { grid-template-columns: 1fr; gap: 0; }
  .lk-toc { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .lk-nav a:not(.lk-cta) { display: none; }
  .lk-header-in { padding: 0 16px; }
  .lk-wrap, .lk-hero-in, .lk-cards, .lk-footer-in { padding-left: 16px; padding-right: 16px; }
  .lk-brand .tag { display: none; }
}
