/*
Theme Name: El Pasado
Theme URI: https://elpasado.es
Author: El Pasado
Description: Theme hijo de M2Media para El Pasado (elpasado.es), historia y humanidades: arqueología, arte, literatura, geografía y humanidades digitales; descubrimientos, reseñas y grandes reportajes sobre el pasado. Estilo de revista con titulares en serif (Fraunces, servida desde tu propio servidor) y tonos pergamino y terracota. Necesita el theme padre M2Media (1.16 o posterior) y el plugin M2Media Core.
Template: m2media
Version: 1.4.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elpasado
Tags: news, blog, two-columns, right-sidebar, custom-colors, featured-images, translation-ready, accessibility-ready
*/

/* Fraunces (SIL Open Font License 1.1), autoalojada: sin peticiones a terceros. */
@font-face {
	font-family: "Fraunces";
	src: url("fonts/fraunces-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Respaldo con métricas ajustadas a Fraunces para que el texto no salte al cargar la fuente. */
@font-face {
	font-family: "Fraunces Fallback";
	src: local("Georgia");
	size-adjust: 104%;
	ascent-override: 92%;
	descent-override: 24%;
}

/* ---------- Identidad: pergamino, tinta y terracota (contraste AA comprobado) ---------- */
:root {
	--mm-bg: #f6f1e8;
	--mm-surface: #fffcf6;
	--mm-soft: #ece4d6;
	--mm-ink: #1f1a15;
	--mm-text: #3b332b;
	--mm-muted: #6a5f53;
	--mm-line: #ddd2c1;
	--mm-line-strong: #1f1a15;
	--mm-accent: #9c3d24;
	--mm-on-accent: #ffffff;
	--mm-hot: #b3261e;
	--mm-on-hot: #ffffff;
	--mm-header-bg: rgba(246, 241, 232, .9);
	--mm-font-display: "Fraunces", "Fraunces Fallback", Georgia, serif;
	--mm-heading-weight: 650;
	--mm-radius: 4px;
	--mm-radius-sm: 3px;
}
:root[data-theme="dark"] {
	--mm-bg: #15110e;
	--mm-surface: #1d1814;
	--mm-soft: #27201a;
	--mm-ink: #f4ece1;
	--mm-text: #ddd2c4;
	--mm-muted: #ab9f90;
	--mm-line: #3a3028;
	--mm-line-strong: #f4ece1;
	--mm-accent: #e8a07e;
	--mm-on-accent: #2a1208;
	--mm-hot: #ff7b6b;
	--mm-on-hot: #1d0302;
	--mm-header-bg: rgba(21, 17, 14, .88);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--mm-bg: #15110e;
		--mm-surface: #1d1814;
		--mm-soft: #27201a;
		--mm-ink: #f4ece1;
		--mm-text: #ddd2c4;
		--mm-muted: #ab9f90;
		--mm-line: #3a3028;
		--mm-line-strong: #f4ece1;
		--mm-accent: #e8a07e;
		--mm-on-accent: #2a1208;
		--mm-hot: #ff7b6b;
		--mm-on-hot: #1d0302;
		--mm-header-bg: rgba(21, 17, 14, .88);
	}
}

/* ---------- Tipografía de revista ---------- */
h1, h2, h3, h4 { letter-spacing: -.01em; }
.wordmark { font-size: 1.7rem; letter-spacing: -.02em; }
/* «El» fino y en terracota, «Pasado» en negrita y tinta (Fraunces solo tiene eje de grosor: sin cursiva sintética). */
.wordmark__a { font-weight: 380; color: var(--mm-accent); }
.wordmark__b {
	position: static; top: auto; margin-left: .2em;
	font-family: var(--mm-font-display); font-size: 1em; font-weight: 720; letter-spacing: -.025em;
	color: var(--mm-ink);
}
.card__title { line-height: 1.18; }
.card--lead .card__title { font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -.02em; line-height: 1.04; font-weight: 600; }
.article-header__title { font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.page-header__title { font-weight: 600; letter-spacing: -.02em; }
.section-head__title { font-style: italic; font-weight: 600; letter-spacing: -.005em; }
.section-head__title::before { border-radius: 0; transform: rotate(45deg) scale(.8); }
.article-header__standfirst { font-style: italic; }

/* Imágenes protagonistas, con esquinas sobrias de revista */
.card--lead .card__media { aspect-ratio: 3 / 2; }
.article-media img { aspect-ratio: 3 / 2; }

/* Citas destacadas con aire clásico */
.entry-content blockquote { font-style: italic; border-left-width: 2px; }
.entry-content .wp-block-pullquote { border-block-width: 1px; }
.entry-content .wp-block-pullquote blockquote { font-weight: 500; font-style: italic; }
.has-drop-cap:not(:focus)::first-letter { font-weight: 600; font-size: 4.2em; line-height: .9; margin: .05em .08em 0 0; }

/* La época es seña de identidad de El Pasado: en color de acento */
.badge--period { color: var(--mm-accent); border-style: solid; }

/* =========================================================
   Color de marca y textura: papel antiguo
   Fondo de pergamino con grano; cabecera y pie en tinta sepia, como
   la cubierta de un libro, con un filete terracota.
   El grano es tan suave que no afecta a la lectura ni al contraste.
   ========================================================= */
body {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .14 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.11'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .8 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.05'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .8 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.05'/%3E%3C/svg%3E"); }
}
.site-header,
.site-footer {
	--mm-bg: #2b211a;
	--mm-surface: #3a2d24;
	--mm-soft: rgba(244, 236, 225, .1);
	--mm-ink: #f4ece1;
	--mm-text: #e3d7c7;
	--mm-muted: #c9b9a6;
	--mm-line: rgba(244, 236, 225, .16);
	--mm-line-strong: #f4ece1;
	--mm-accent: #e8a07e;
	--mm-on-accent: #2a1208;
	--mm-focus: #8ab4ff;
	--mm-header-bg: #2b211a;
	color-scheme: dark;
	color: var(--mm-text);
	background-color: #2b211a;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .75 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.07'/%3E%3C/svg%3E");
}
.site-header { -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 3px solid #9c3d24; }
.site-footer { border-top: 3px solid #9c3d24; }

@media (forced-colors: active) { body, .site-header, .site-footer { background-image: none; } }
@media print { body, .site-header, .site-footer { background: none; } }
