/* ==========================================================
   Angel Cardozo — Consultor Jurídico
   Paleta tomada del logo (verde agua del sello) y de la portada
   ========================================================== */
:root {
  --ink: #1d3533;        /* verde tinta, títulos y fondos oscuros */
  --ink-2: #26433f;
  --teal: #6c9f9b;       /* círculo del logo */
  --teal-soft: #dce9e7;
  --paper: #f3f5f3;
  --white: #ffffff;
  --line: #d3dcd9;
  --text: #24312f;
  --muted: #5b6b68;
  --amber: #c9731f;      /* tono cálido de la portada, solo para enlaces y detalles */
  --amber-soft: #fbe9d4;

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-ui: "Barlow", system-ui, sans-serif;
  --f-read: "Source Serif 4", Georgia, serif;

  --wrap: 1160px;
  --gut: clamp(16px, 4vw, 40px);
  --top: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--f-ui); color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.h-section {
  font: 500 clamp(40px, 5.2vw, 64px)/1 var(--f-display);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

/* ---------- Barra superior ---------- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--top); background: #1f2322; color: #e9eeec; transition: box-shadow .2s; }
.topbar.is-scrolled { box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 20px rgba(0,0,0,.18); }
.topbar__in { max-width: var(--wrap); height: 100%; margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 500 22px/1 var(--f-display); letter-spacing: .01em; }
.brand:hover { color: #fff; }
.brand img { border-radius: 4px; }
.menu { display: flex; gap: 4px; align-items: center; }
.menu a { color: #cfd8d5; text-decoration: none; font: 500 15px/1 var(--f-ui); padding: 10px 12px; border-radius: 4px; }
.menu a:hover, .menu a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.menu a.is-active { color: #fff; box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.menu__cta { border: 1px solid rgba(255,255,255,.28); margin-left: 6px; }
.navtoggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.navtoggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 900px) {
  .navtoggle { display: block; }
  .menu { position: fixed; top: var(--top); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #1f2322; padding: 8px var(--gut) 20px; transform: translateY(-120%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .menu a { padding: 15px 4px; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
  .menu__cta { border: 0; margin: 0; }
  body.menu-open .menu { transform: none; visibility: visible; }
  body.menu-open .navtoggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .navtoggle span:nth-child(2) { opacity: 0; }
  body.menu-open .navtoggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Portada (igual a la original) ---------- */
.hero {
  position: relative;
  padding: calc(var(--top) + clamp(40px, 7vw, 80px)) var(--gut) clamp(48px, 8vw, 96px);
  text-align: center;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 300' preserveAspectRatio='none'%3E%3Cg fill-opacity='.10'%3E%3Cpath fill='%23fff' d='M0 0h140L60 120z'/%3E%3Cpath fill='%23000' d='M140 0l100 90L60 120z' fill-opacity='.05'/%3E%3Cpath fill='%23fff' d='M240 90l120-90h-220z'/%3E%3Cpath fill='%23fff' d='M60 120l180-30-70 140z' fill-opacity='.07'/%3E%3Cpath fill='%23000' d='M0 120l60 0 110 110L0 300z' fill-opacity='.04'/%3E%3Cpath fill='%23fff' d='M360 0l90 110-210-20z' fill-opacity='.08'/%3E%3Cpath fill='%23fff' d='M450 110L600 0v160z'/%3E%3Cpath fill='%23000' d='M240 90l210 20-120 120z' fill-opacity='.04'/%3E%3Cpath fill='%23fff' d='M330 230l120-120 150 50-80 140z' fill-opacity='.08'/%3E%3Cpath fill='%23fff' d='M170 230l160 0-60 70H90z' fill-opacity='.06'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat,
    linear-gradient(112deg, #ec613d 0%, #f2903f 24%, #f6bd55 46%, #ead66a 63%, #c4da6b 80%, #a3d26c 100%);
  overflow: hidden;
}
.hero__kicker { margin: 0 0 18px; color: #fff; font: 400 clamp(20px, 2.4vw, 28px)/1.2 var(--f-ui); letter-spacing: .02em; text-shadow: 0 1px 2px rgba(120,50,0,.25); }
.hero__title { max-width: 1000px; margin: 0 auto; }
.hero__title img { width: 100%; margin: 0 auto; }

/* ---------- Currículum ---------- */
.cv { padding: clamp(64px, 9vw, 120px) 0; background: var(--white); }
.cv__in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.cv__body { font: 400 18px/1.7 var(--f-read); color: var(--text); max-width: 64ch; }
.cv__body h3 { font: 600 26px/1.2 var(--f-display); color: var(--ink); letter-spacing: .01em; margin: 0 0 10px; }
.cv__body ul { list-style: none; padding: 0; margin: 0 0 28px; border-left: 3px solid var(--teal); }
.cv__body ul li { font: 500 17px/1.4 var(--f-ui); color: var(--ink); padding: 4px 0 4px 14px; }
.cv__body p { margin: 0 0 1em; }
.cv__body strong { color: var(--ink); font-weight: 600; }
.cv__media { position: sticky; top: calc(var(--top) + 32px); margin: 0; }
.cv__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.cv__media::after { content: ""; display: block; height: 8px; background: linear-gradient(90deg, var(--teal), var(--ink)); }

/* aparición del texto a medida que se baja */
.js [data-reveal-children] > * { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal-children] > .is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal-children] > * { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .cv__in { grid-template-columns: 1fr; }
  .cv__media { position: static; order: -1; }
  .cv__media img { aspect-ratio: 16 / 9; }
}

/* ---------- Servicios ---------- */
.services { padding: clamp(64px, 9vw, 112px) 0; background: var(--paper); }
.services__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; }
.svc__icon { width: 112px; height: 112px; background: var(--white); display: grid; place-items: center; margin-bottom: 18px; }
.svc__icon img { width: 88px; height: 88px; object-fit: contain; }
.svc h3 { font: 500 26px/1.15 var(--f-display); color: var(--ink); margin-bottom: 8px; }
.svc p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 44ch; }
@media (max-width: 900px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .services__grid { grid-template-columns: 1fr; gap: 36px; } .svc { display: grid; grid-template-columns: 80px 1fr; column-gap: 18px; } .svc__icon { width: 80px; height: 80px; grid-row: span 2; margin: 0; } .svc__icon img { width: 62px; height: 62px; } }

/* ---------- Noticias (portada) ---------- */
.news { padding: clamp(64px, 9vw, 112px) 0; }
.news__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.news__head .h-section { margin-bottom: 20px; }
.link-more { font-weight: 600; color: var(--ink); }
.news__layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 64px); border-top: 2px solid var(--ink); padding-top: 32px; }
.news__layout--single { grid-template-columns: minmax(0, 760px); }
.news time, .archive time, .briefs time { display: block; font: 500 14px/1.3 var(--f-ui); color: var(--teal); color: #4e7f7b; margin-bottom: 8px; }
.lead__link { display: block; text-decoration: none; color: inherit; }
.lead__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 20px; }
.lead h3 { font: 500 clamp(30px, 3.4vw, 42px)/1.08 var(--f-display); color: var(--ink); margin-bottom: 14px; }
.lead p { font: 400 18px/1.65 var(--f-read); color: var(--text); margin: 0 0 16px; max-width: 60ch; }
.lead__more { font-weight: 600; text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
.lead__link:hover h3, .briefs a:hover h3 { color: var(--amber); }
.briefs { list-style: none; margin: 0; padding: 0; }
.briefs li + li { border-top: 1px solid var(--line); }
.briefs a { display: block; padding: 18px 0; text-decoration: none; color: inherit; }
.briefs li:first-child a { padding-top: 0; }
.briefs h3 { font: 500 24px/1.15 var(--f-display); color: var(--ink); margin-bottom: 6px; }
.briefs p { margin: 0; color: var(--muted); font-size: 15.5px; }
.empty { color: var(--muted); font-size: 17px; }
@media (max-width: 820px) { .news__layout { grid-template-columns: 1fr; } }

/* ---------- Consulta de expedientes ---------- */
.exp { padding: clamp(64px, 9vw, 112px) 0; background: var(--ink); color: #dbe5e2; }
.exp .h-section { color: #fff; }
.exp__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.exp__intro p { margin: 0 0 24px; max-width: 46ch; }
.exp__intro strong { color: #fff; font-weight: 600; }
.exp__form label { display: block; font: 500 15px/1 var(--f-ui); color: #fff; margin-bottom: 10px; }
.exp__row { display: flex; gap: 0; background: #fff; border-radius: 3px; padding: 4px; }
.exp__row input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 26px/1 var(--f-display); letter-spacing: .04em; color: var(--ink); padding: 10px 12px; }
.exp__row input:focus { outline: none; }
.exp__row:focus-within { box-shadow: 0 0 0 3px var(--amber); }
.exp__row button { border: 0; background: var(--amber); color: #fff; font: 600 16px/1 var(--f-ui); padding: 0 22px; border-radius: 2px; cursor: pointer; }
.exp__row button:hover { background: #ad5f14; }
.exp__row button[disabled] { opacity: .7; cursor: wait; }
.exp__hint { font-size: 14px; color: #a9bcb8; margin: 14px 0 0; }
.exp__hint.is-error { color: #ffc89a; }
.exp__intro .exp__official { color: #fff; }

/* el resultado se presenta como una carátula */
.caratula { background: #fbfbf8; color: var(--text); border-radius: 2px; box-shadow: 0 18px 40px rgba(0,0,0,.25); overflow: hidden; }
.caratula__band { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; padding: 22px 26px 18px; border-bottom: 1px solid #e4e7e2; background: repeating-linear-gradient(0deg, transparent 0 27px, #eef1ec 27px 28px); }
.caratula__iue { font: 600 clamp(34px, 4vw, 46px)/1 var(--f-display); color: var(--ink); letter-spacing: .02em; }
.caratula__iue small { display: block; font: 500 13px/1 var(--f-ui); color: var(--muted); letter-spacing: 0; margin-bottom: 6px; }
.caratula__state { font: 600 13px/1 var(--f-ui); padding: 7px 10px; border-radius: 2px; background: var(--teal-soft); color: var(--ink); }
.caratula__body { padding: 20px 26px 4px; }
.caratula__title { font: 600 21px/1.35 var(--f-read); color: var(--ink); margin: 0 0 10px; }
.caratula__meta { margin: 0 0 18px; font-size: 15px; color: var(--muted); display: grid; gap: 4px; }
.caratula__meta b { color: var(--text); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 4px 26px 24px; max-height: 460px; overflow: auto; }
.timeline li { position: relative; padding: 12px 0 12px 26px; border-left: 2px solid #d9e2df; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: #fbfbf8; border: 2px solid var(--teal); }
.timeline li:first-child::before { background: var(--teal); }
.timeline .t-date { font: 500 14px/1.2 var(--f-ui); color: #4e7f7b; }
.timeline .t-type { font: 600 16px/1.35 var(--f-ui); color: var(--ink); margin: 3px 0 2px; }
.timeline .t-sede { font-size: 14px; color: var(--muted); }
.timeline .t-venc { font-size: 14px; color: #a14f0c; }
.t-decreto { margin-top: 6px; background: none; border: 1px solid var(--line); color: var(--ink); font: 500 13.5px/1 var(--f-ui); padding: 6px 10px; border-radius: 2px; cursor: pointer; }
.t-decreto:hover { border-color: var(--amber); color: var(--amber); }
.t-decreto-text { margin: 10px 0 2px; padding: 12px 14px; background: var(--paper); font: 400 15px/1.6 var(--f-read); white-space: pre-line; border-left: 3px solid var(--amber); }
.caratula__note { margin: 0; padding: 14px 26px 18px; font-size: 13.5px; color: var(--muted); border-top: 1px solid #e4e7e2; }
.caratula--msg .caratula__body { padding-bottom: 22px; }
.caratula--msg p { margin: 0; }
.exp__loading { padding: 40px 26px; color: var(--muted); }
@media (max-width: 900px) { .exp__in { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .exp__row { flex-direction: column; } .exp__row button { padding: 14px; } .caratula__band, .caratula__body, .timeline, .caratula__note { padding-left: 18px; padding-right: 18px; } }

/* ---------- Contacto ---------- */
.contact { padding: clamp(64px, 9vw, 112px) 0; background: var(--paper); }
.contact__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); }
.contact__info > p { max-width: 42ch; margin: 0 0 28px; }
.contact__list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact__list > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact__list dt { color: var(--muted); font-size: 15px; }
.contact__list dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.contact__form { background: var(--white); padding: clamp(22px, 4vw, 36px); border-top: 4px solid var(--teal); }
.field { margin-bottom: 18px; }
.field label { display: block; font: 500 15px/1.2 var(--f-ui); color: var(--ink); margin-bottom: 7px; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea { width: 100%; border: 1px solid #c2ccc9; background: #fff; border-radius: 2px; font: 400 17px/1.4 var(--f-ui); padding: 11px 12px; color: var(--text); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--teal-soft); }
.contact__form button { border: 0; background: var(--ink); color: #fff; font: 600 16px/1 var(--f-ui); padding: 15px 26px; border-radius: 2px; cursor: pointer; }
.contact__form button:hover { background: var(--ink-2); }
.form-status { margin: 14px 0 0; min-height: 1.4em; font-weight: 500; }
.form-status.ok { color: #2e6b45; } .form-status.err { color: #a3330f; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact__in { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
.foot { background: #1f2322; color: #b9c4c1; padding: 48px 0 28px; font-size: 15px; }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot__id { display: flex; gap: 14px; align-items: flex-start; }
.foot__id img { border-radius: 4px; }
.foot__id strong { display: block; color: #fff; font: 500 22px/1.15 var(--f-display); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: #dfe7e4; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__legal { max-width: var(--wrap); margin: 36px auto 0; padding: 20px var(--gut) 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #8d9a97; }
@media (max-width: 760px) { .foot__in { grid-template-columns: 1fr; } }

/* ---------- Páginas interiores ---------- */
.page-head { padding: calc(var(--top) + 56px) 0 36px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head h1 { font: 500 clamp(44px, 6vw, 72px)/1 var(--f-display); color: var(--ink); margin-bottom: 22px; }
.search { display: flex; max-width: 520px; border: 1px solid #c2ccc9; background: #fff; border-radius: 2px; }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; font: 400 17px var(--f-ui); background: transparent; }
.search input:focus { outline: none; }
.search button { border: 0; background: var(--ink); color: #fff; padding: 0 18px; font: 600 15px var(--f-ui); cursor: pointer; }
.archive { padding: 40px 0 96px; }
.archive__count { color: var(--muted); }
.archive__list { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.entry { border-bottom: 1px solid var(--line); }
.entry a { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 28px 0; text-decoration: none; color: inherit; }
.entry--img a { grid-template-columns: 220px 1fr; }
.entry img { width: 220px; aspect-ratio: 4 / 3; object-fit: cover; }
.entry h2 { font: 500 clamp(26px, 3vw, 34px)/1.1 var(--f-display); color: var(--ink); margin-bottom: 8px; }
.entry p { margin: 0; font: 400 17px/1.6 var(--f-read); color: var(--muted); max-width: 62ch; }
.entry a:hover h2 { color: var(--amber); }
@media (max-width: 600px) { .entry--img a { grid-template-columns: 1fr; gap: 14px; } .entry img { width: 100%; aspect-ratio: 16/9; } }
.pager { display: flex; justify-content: space-between; align-items: center; max-width: 900px; padding-top: 28px; color: var(--muted); }
.pager a { font-weight: 600; }

.article { max-width: 760px; margin: 0 auto; padding: calc(var(--top) + 48px) var(--gut) 96px; }
.back { display: inline-block; font-weight: 600; margin-bottom: 20px; }
.back::before { content: "‹ "; }
.article__head h1 { font: 500 clamp(40px, 5.6vw, 64px)/1.02 var(--f-display); color: var(--ink); margin-bottom: 16px; letter-spacing: -.005em; }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.article__meta time { color: #4e7f7b; font-weight: 500; }
.draft { background: var(--amber-soft); color: #8a4a0d; padding: 2px 8px; border-radius: 2px; }
.article__img { margin: 0 0 36px; }
.article__img img { width: 100%; }
.prose { font: 400 19px/1.75 var(--f-read); color: var(--text); }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { font: 500 34px/1.1 var(--f-display); color: var(--ink); margin: 1.6em 0 .5em; }
.prose h3 { font: 600 26px/1.15 var(--f-display); color: var(--ink); margin: 1.4em 0 .4em; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--teal); color: var(--ink); font-style: italic; }
.prose img { margin: 1.4em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--ink); text-decoration-thickness: 1.5px; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.prose li[data-list="bullet"] { list-style-type: disc; }
.article__foot { margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
.article__sign { margin: 0; font: 500 22px/1.2 var(--f-display); color: var(--ink); }
.share { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 15px; }
.share span { color: var(--muted); }
.share a { font-weight: 600; }
.article__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.article__nav a { display: block; padding: 18px; background: var(--paper); text-decoration: none; color: var(--ink); font: 500 20px/1.2 var(--f-display); }
.article__nav a span { display: block; font: 500 14px/1 var(--f-ui); color: var(--muted); margin-bottom: 8px; }
.article__nav .next { text-align: right; grid-column: 2; }
.article__nav a:hover { color: var(--amber); }
@media (max-width: 560px) { .article__nav { grid-template-columns: 1fr; } .article__nav .next { grid-column: auto; } }

@media print {
  .topbar, .foot, .share, .article__nav, .exp__form { display: none !important; }
  .article, .page-head { padding-top: 0; }
}
