/*
 * base.css — Variables de marca, tipografía autoalojada, reset ligero
 * y estilos tipográficos base.
 *
 * @package PeritacionesJudiciales
 */

/* ----------------------------------------------------------------
   1. Variables de marca (paleta y tipografía)
------------------------------------------------------------------- */
:root {
	--color-navy: #0E2A4C;
	--color-navy-dark: #0A2039;
	--color-graphite: #4C5566;
	--color-blue-grey: #7C8DA6;
	--color-sand: #B99B65;
	--color-bg: #FAF9F6;
	--color-bg-alt: #F2F0EA;
	--color-white: #FFFFFF;
	--color-text: #1E2530;
	--color-text-muted: #565F6B;
	--color-border: #E2E1D9;
	--color-focus: #B99B65;

	--font-heading: "Playfair Display", "Georgia", serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 14px;
	--container-width: 1180px;

	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 1rem;
	--space-4: 1.5rem;
	--space-5: 2.5rem;
	--space-6: 4rem;
	--space-7: 6rem;

	--shadow-sm: 0 1px 2px rgba(14, 42, 76, 0.06);
	--shadow-md: 0 8px 24px rgba(14, 42, 76, 0.08);

	--header-height: 84px;
}

/* ----------------------------------------------------------------
   2. Tipografía autoalojada (woff2, subconjunto "latin" — cubre
      correctamente el español: á é í ó ú ñ ü ¿ ¡).
------------------------------------------------------------------- */
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-600-italic.woff2") format("woff2");
	font-weight: 600;
	font-style: italic;
	font-display: swap;
}

/* ----------------------------------------------------------------
   3. Reset ligero
------------------------------------------------------------------- */
*, *::before, *::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, picture, svg {
	max-width: 100%;
	height: auto;
	display: block;
}
a {
	color: inherit;
	text-decoration: none;
}
ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
button {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
}
input, textarea, select {
	font: inherit;
	color: inherit;
}

/* ----------------------------------------------------------------
   4. Tipografía base
------------------------------------------------------------------- */
h1, h2, h3, h4 {
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--color-navy);
	line-height: 1.25;
	margin: 0 0 var(--space-3);
}
h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------
   5. Accesibilidad: foco visible y navegación por teclado
------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

.pj-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-navy);
	color: var(--color-white);
	padding: var(--space-2) var(--space-3);
	z-index: 1000;
	border-radius: 0 0 var(--radius-sm) 0;
}
.pj-skip-link:focus {
	left: 0;
}
