/* ═══════════════════════════════════════════════════════════
   super.lawyers · diseño sencillo y sereno
   Blanco roto · Gris muy oscuro · Mostaza suave como acento
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #232323;
  --ink-2: #3B3B3B;
  --ink-3: #6B6A67;
  --ink-4: #9C9A95;
  --rule: #ECE8E0;
  --accent: #E6C25A;
  --accent-soft: #F5EAC9;
  --accent-ink: #8A6A12;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --narrow: 700px;
  --gutter: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* alias usados por el panel de administración */
  --paper: var(--bg); --paper-2: #F3F0EA; --white: var(--surface); --rule-strong: var(--ink);
  --lacre: #B3402F; --lacre-dark: #8F3123; --lacre-tint: #F8E6E2;
  --serif-display: var(--sans); --serif-text: var(--sans); --display: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ── Marca ───────────────────────────────────────── */
.wordmark { font-weight: 650; font-size: 19px; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.wordmark .dot, .wordmark .hl { color: #D3A62E; background: none; padding: 0; }

/* ── Cabecera ────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 40; background: rgba(250, 248, 244, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.header.is-stuck { border-bottom-color: var(--rule); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font-size: 15px; color: var(--ink-3); padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; border-radius: 8px; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 720px) {
  .menu-btn { display: inline-grid; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--rule); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; font-size: 17px; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { background: none; color: var(--ink); font-weight: 600; }
}

/* ── Botones y pequeños elementos ────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 550; border: 1px solid var(--accent); background: var(--accent); color: var(--ink);
  cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; white-space: nowrap;
}
.btn:hover { background: #DDB64A; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(230, 194, 90, .28); }
.btn--ghost { background: transparent; border-color: var(--rule); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-4); box-shadow: none; }
.btn--lacre, .btn--yellow { background: var(--accent); border-color: var(--accent); }
.btn svg { width: 16px; height: 16px; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--ink); }
.eyebrow { font-size: 13px; font-weight: 550; color: var(--ink-3); letter-spacing: .01em; }
.eyebrow::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.meta { font-size: 13.5px; color: var(--ink-4); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.meta .sep::before { content: "·"; }
.hl { background: none; color: inherit; }

/* ── Portada ─────────────────────────────────────── */
.intro { padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(40px, 6vw, 72px); }
.intro h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -.035em; font-weight: 650; margin: 18px 0 18px; max-width: 16ch; }
.intro h1 .u { background: linear-gradient(transparent 70%, var(--accent-soft) 70%); }
.intro p { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-3); max-width: 46ch; margin: 0 0 30px; }
.intro .actions { display: flex; gap: 12px; flex-wrap: wrap; }

.section { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.section-head a { font-size: 15px; }

/* ── Tarjetas ────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 32px); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 14px; }
.card__img { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card__img--portrait { aspect-ratio: 4 / 5; }
.card__img, .art-cover .img { position: relative; }
.card__img::after, .art-cover .img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(35, 35, 35, .08); pointer-events: none; }
.card:hover .card__img img { transform: scale(1.03); }
.card__cat { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.card h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; margin: 0; }
.card h3 a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s var(--ease); }
.card:hover h3 a { background-size: 100% 2px; }
.card p { margin: 0; color: var(--ink-3); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: 2px; }
.center { text-align: center; margin-top: 56px; }

/* ── Listado de artículos ────────────────────────── */
.page-head { padding-top: clamp(48px, 8vw, 96px); padding-bottom: 32px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 48px); letter-spacing: -.03em; font-weight: 650; line-height: 1.1; margin: 0 0 12px; }
.page-head p { color: var(--ink-3); font-size: 18px; margin: 0; max-width: 52ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 40px; }
.chip { font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3); background: var(--surface); transition: all .2s; }
.chip:hover { color: var(--ink); border-color: var(--ink-4); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { margin-left: auto; position: relative; }
.search input { width: 240px; max-width: 100%; padding: 8px 14px 8px 36px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); font-size: 14px; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-4); }
@media (max-width: 720px) { .search { margin-left: 0; width: 100%; } .search input { width: 100%; } }
.pager { display: flex; justify-content: space-between; margin-top: 56px; }
.empty { padding-top: 48px; padding-bottom: 48px; color: var(--ink-3); }

/* ── Artículo ────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 0; z-index: 60; }
.art-head { padding-top: clamp(48px, 8vw, 88px); padding-bottom: 32px; }
.art-head .back { font-size: 14px; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 28px; }
.art-head .back svg { width: 15px; height: 15px; }
.art-head .back:hover { color: var(--ink); }
.art-head h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.12; letter-spacing: -.03em; font-weight: 650; margin: 14px 0 16px; }
.art-head .subtitle { font-size: clamp(18px, 1.8vw, 20px); color: var(--ink-3); line-height: 1.5; margin: 0 0 24px; }
.art-cover { margin: 8px auto 0; max-width: calc(820px + 2 * var(--gutter)); }
.art-cover .img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 2 / 1; background: var(--paper-2); }
.art-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-cover--portrait { max-width: calc(460px + 2 * var(--gutter)); }
.art-cover--portrait .img { aspect-ratio: 4 / 5; }
.art-cover figcaption { font-size: 13px; color: var(--ink-4); margin-top: 10px; }
.art-body { padding-top: 48px; padding-bottom: 24px; }

.prose { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.35em; }
.prose h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.02em; font-weight: 650; color: var(--ink); margin: 2.2em 0 .7em; scroll-margin-top: 90px; }
.prose h3 { font-size: 19px; font-weight: 600; color: var(--ink); margin: 1.8em 0 .5em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.4em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--ink-4); }
.prose blockquote { margin: 2em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-size: 1.12em; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th { text-align: left; font-weight: 600; color: var(--ink); padding: 10px 14px; border-bottom: 1px solid var(--ink-4); }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose hr { border: 0; height: 1px; background: var(--rule); margin: 2.4em 0; }
.prose img { border-radius: var(--radius); }
.prose code { font-size: .88em; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; }

.admonition { font-size: 16.5px; line-height: 1.65; margin: 2em 0; padding: 20px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); }
.admonition-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 6px !important; }
.admonition-title::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.admonition p:last-child { margin-bottom: 0; }
.admonition.ejemplo { background: #FBF6E8; border-color: #F1E5C2; }
.admonition.importante { border-left: 3px solid var(--accent); }

.keypoints { margin: 48px 0 0; padding: 26px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); }
.keypoints h2 { font-size: 17px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.01em; }
.keypoints ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.keypoints li { position: relative; padding-left: 24px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.keypoints li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.sources { margin: 36px 0 0; font-size: 14.5px; color: var(--ink-3); }
.sources h2 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.sources ol { margin: 0; padding-left: 18px; }
.sources li { margin: 5px 0; }
.sources a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.sources a:hover { text-decoration-color: var(--accent); color: var(--ink); }

.art-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.share { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.share span { font-size: 14px; color: var(--ink-3); margin-right: 6px; }
.share-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-3); cursor: pointer; transition: all .2s; }
.share-btn:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.share-btn svg { width: 15px; height: 15px; }
.share-btn.is-done { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.disclaimer { font-size: 13.5px; color: var(--ink-4); margin: 28px 0 0; }
.related { border-top: 1px solid var(--rule); }

/* ── Sobre mí / contacto ─────────────────────────── */
.about { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.about__photo { aspect-ratio: 1; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 56px; font-weight: 650; color: var(--accent-ink); overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; } .about__photo { width: 140px; } }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__info p { color: var(--ink-3); margin: 0 0 16px; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--rule); background: var(--surface); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-3); }
.check input { margin-top: 4px; accent-color: var(--accent); }
.check a { text-decoration: underline; text-decoration-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14.5px; margin-bottom: 14px; }
.flash--error { background: var(--lacre-tint); color: var(--lacre-dark); }
.flash--ok { background: var(--accent-soft); color: var(--ink); }

/* ── Pie ─────────────────────────────────────────── */
.footer { border-top: 1px solid var(--rule); padding-top: 40px; padding-bottom: 40px; margin-top: 24px; font-size: 14px; color: var(--ink-3); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a:hover { color: var(--ink); }
.footer .note { width: 100%; font-size: 12.5px; color: var(--ink-4); margin: 8px 0 0; }

/* ── Movimiento sutil ────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
