/* DaLic Abogados — hoja de estilos única. Fuentes alojadas en el propio sitio (licencia OFL). */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  /* Paleta de la identidad visual */
  --azul: #1B2E4B;
  --noche: #111D31;
  --laton: #A3844B;        /* acentos sobre fondo claro (líneas y detalles, no texto pequeño) */
  --laton-texto: #7E6435;  /* latón oscurecido para texto sobre fondo claro (contraste AA) */
  --laton-claro: #C2A46A;  /* acentos sobre fondo oscuro */
  --marfil: #F6F3EC;
  --tinta: #1D2633;
  --tinta-suave: #4A5565;
  --borde: #E2DCCF;
  --fondo: #FFFFFF;
  --foco: #C98A00;
  --whatsapp: #1F7A4D;
  --ancho: 72rem;
  --radio: 4px;
  --serif: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--fondo);
}

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

h1, h2, h3, .h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--azul);
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); margin: 2.5rem 0 1rem; }
h3, .h3 { font-size: 1.45rem; margin: 1.75rem 0 .5rem; }
.tarjeta .h3, .ubicacion .h3 { margin-top: 0; }

a { color: var(--azul); text-underline-offset: .18em; text-decoration-color: var(--laton); }
a:hover { color: var(--laton-texto); }

:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 1.25rem; }
.angosto { max-width: 46rem; }

.saltar {
  position: absolute; left: -999px; top: 0;
  background: var(--noche); color: #fff; padding: .75rem 1rem; z-index: 100;
}
.saltar:focus { left: 1rem; top: 1rem; color: #fff; }

/* Cabecera */
.cabecera { border-bottom: 1px solid var(--borde); background: var(--fondo); }
.cabecera .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem 1.5rem; flex-wrap: wrap; padding-top: .85rem; padding-bottom: .85rem;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { width: 172px; height: 49px; display: block; }
@media (max-width: 24rem) { .logo img { width: 147px; height: 42px; } }
.cabecera-acciones { display: flex; align-items: center; gap: .75rem; margin-left: auto; order: 2; }
.nav { order: 3; }
@media (min-width: 64rem) {
  .nav { order: 2; margin-left: auto; }
  .cabecera-acciones { order: 3; margin-left: 0; }
}

.idioma {
  font-size: .9rem; font-weight: 600; letter-spacing: .04em; text-decoration: none;
  color: var(--azul); border: 1px solid var(--borde); border-radius: var(--radio); padding: .3rem .7rem;
}
.idioma:hover { border-color: var(--laton); color: var(--azul); }

.menu-boton {
  display: none; background: none; border: 1px solid var(--borde); border-radius: var(--radio);
  padding: .4rem .8rem; font: inherit; font-weight: 600; color: var(--azul); cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.nav a { text-decoration: none; color: var(--tinta); padding: .35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--azul); border-bottom-color: var(--laton); }

@media (max-width: 63.99rem) {
  .js .menu-boton { display: inline-block; }
  .nav { width: 100%; }
  .js .nav { display: none; }
  .js .nav.abierta { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: .7rem 0; width: 100%; border-bottom: 1px solid var(--borde); }
}

/* Secciones */
main { display: block; }
.portada {
  background: var(--azul); color: #E6EAF0; padding: 4.5rem 0 4rem;
  border-bottom: 4px solid var(--laton);
}
.portada h1 { color: #fff; max-width: 44rem; }
.portada p.entrada { font-size: 1.2rem; color: #D5DCE6; max-width: 42rem; }
.cabeza-pagina { background: var(--marfil); padding: 2.75rem 0 2rem; border-bottom: 1px solid var(--borde); }
.cabeza-pagina h1::after {
  content: ""; display: block; width: 3rem; height: 2px; background: var(--laton); margin-top: .9rem;
}
.cabeza-pagina p { color: var(--tinta-suave); max-width: 44rem; margin: 0; }
.seccion { padding: 3.25rem 0; }
.seccion.alt { background: var(--marfil); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.seccion > .contenedor > h2:first-child, .seccion > .contenedor > div > h2:first-child { margin-top: 0; }

.migas { font-size: .9rem; color: var(--tinta-suave); margin-bottom: .75rem; }
.migas ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.migas li + li::before { content: "›"; margin-right: .4rem; color: var(--laton); }

.rejilla { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.tarjeta {
  border: 1px solid var(--borde); border-top: 3px solid var(--azul); border-radius: var(--radio);
  padding: 1.4rem; background: var(--fondo); display: flex; flex-direction: column;
}
.tarjeta h3 { margin-top: 0; }
.tarjeta p { margin: 0 0 1rem; color: var(--tinta-suave); }
.tarjeta .mas { margin-top: auto; font-weight: 600; }

.lista-check { padding-left: 1.2rem; }
.lista-check li { margin-bottom: .45rem; }
.lista-check li::marker { color: var(--laton); }

.boton {
  display: inline-block; background: var(--azul); color: #fff; text-decoration: none;
  padding: .75rem 1.3rem; border-radius: var(--radio); border: 2px solid var(--azul);
  font: inherit; font-weight: 600; cursor: pointer;
}
.boton:hover { background: var(--noche); border-color: var(--noche); color: #fff; }
.boton.sec { background: transparent; color: var(--azul); }
.boton.sec:hover { background: var(--azul); color: #fff; }
.boton.claro { background: var(--laton-claro); border-color: var(--laton-claro); color: var(--noche); }
.boton.claro:hover { background: #fff; border-color: #fff; color: var(--noche); }
.boton.sec.claro { background: transparent; border-color: #fff; color: #fff; }
.boton.sec.claro:hover { background: #fff; color: var(--noche); }
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.nota {
  border-left: 3px solid var(--laton); background: var(--marfil);
  padding: 1rem 1.25rem; margin: 1.5rem 0; color: var(--tinta-suave);
}
.nota p:last-child { margin-bottom: 0; }

/* Respuesta breve al inicio de servicios y artículos (AEO) */
.respuesta {
  border: 1px solid var(--borde); border-left: 4px solid var(--azul); background: var(--marfil);
  padding: 1rem 1.25rem; margin: 0 0 2rem;
}
.respuesta p { margin: 0; }
.respuesta strong { color: var(--azul); }

/* Ficha del despacho */
.ficha { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; gap: .5rem 1.25rem; margin: 0 0 1.5rem; }
.ficha dt { font-weight: 600; color: var(--azul); }
.ficha dd { margin: 0; }
@media (max-width: 36rem) { .ficha { grid-template-columns: 1fr; } .ficha dd { margin-bottom: .5rem; } }

.datos-contacto { list-style: none; padding: 0; margin: 0; }
.datos-contacto li { padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.datos-contacto strong {
  display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--laton-texto);
}

.ubicacion { border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.4rem; background: var(--marfil); }
.espacio-arriba { margin-top: 1.5rem; }

/* Formulario */
.formulario { display: grid; gap: 1.1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .3rem; }
.campo .ayuda { font-size: .9rem; color: var(--tinta-suave); font-weight: normal; }
.campo input, .campo select, .campo textarea {
  width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #A9A397;
  border-radius: var(--radio); background: #fff; color: var(--tinta);
}
.campo textarea { min-height: 9rem; resize: vertical; }
.consentimiento { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.consentimiento input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; flex-shrink: 0; accent-color: var(--azul); }
.oculto { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.estado-form { font-weight: 600; }

/* Columnas */
.dos-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 52rem) { .dos-col { grid-template-columns: 1fr; } }

/* Pie */
.pie { background: var(--noche); color: #D3D9E2; padding: 2.75rem 0 1.5rem; font-size: .95rem; border-top: 4px solid var(--laton); }
.pie a { color: #fff; text-decoration-color: var(--laton-claro); }
.pie a:hover { color: var(--laton-claro); }
.pie .logo-pie { width: 172px; height: 49px; display: block; margin-bottom: 1rem; }
.pie .columnas { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.pie h2 {
  color: var(--laton-claro); font-family: var(--sans); font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .75rem;
}
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { margin-bottom: .35rem; }
.pie .aviso-legal { border-top: 1px solid rgba(255,255,255,.18); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; color: #AEB8C6; }

/* Botón flotante de WhatsApp */
.whatsapp {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--whatsapp); color: #fff; text-decoration: none;
  padding: .7rem 1rem; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.22); font-weight: 600;
}
.whatsapp:hover { color: #fff; background: #17603C; }
.whatsapp svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
@media (max-width: 30rem) { .whatsapp .texto { position: absolute; left: -5000px; } .whatsapp { padding: .85rem; } }

/* Blog */
.articulo-meta { color: var(--tinta-suave); font-size: .95rem; }
.prose p, .prose li { max-width: 44rem; }
.prose h2 { margin-top: 2.25rem; }

@media print {
  .whatsapp, .nav, .menu-boton, .saltar, .idioma { display: none !important; }
  .portada, .pie { background: none; color: #000; }
  .portada h1 { color: var(--azul); }
}
