/* Interlude WP: estilos. */

:root {
	--bg: #fff;
	--fg: #0b0b0b;
	--dim: #b4b4b4;
	--red: #e5321b;
	--interlude-color: #111;
	--sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--pad: clamp(1rem, 3vw, 2.5rem);
}

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

html {
	scrollbar-gutter: stable; /* que la barra no cambie el ancho al bloquear el scroll */
	-webkit-text-size-adjust: 100%;
}
html.is-interlude {
	overflow: hidden;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.4;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}
a:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 4px;
}
main:focus {
	outline: none;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	padding: 0.5rem 0.9rem;
	background: var(--fg);
	color: var(--bg);
}

/* ------------------------------------------------------------------ */
/* Estructura                                                          */
/* ------------------------------------------------------------------ */
.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 0 var(--pad);
}
.site-main {
	flex: 1;
}

.site-header {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 1rem;
	align-items: baseline;
	padding: var(--pad) 0;
	font-size: 0.95rem;
}
.site-header p {
	margin: 0;
}
.site-header__name {
	font-weight: 600;
	letter-spacing: -0.02em;
}
.site-header__tagline,
.site-header__count {
	color: #6d6d6d;
}
.site-header__count {
	font-family: var(--mono);
	font-size: 0.8rem;
}

.site-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	padding: 3rem 0 var(--pad);
	font-size: 0.8rem;
	color: #6d6d6d;
}
.site-footer p {
	margin: 0;
}

/* ------------------------------------------------------------------ */
/* Índice: todas las noticias como una sola frase                      */
/* ------------------------------------------------------------------ */
.index {
	margin: 0;
	font-size: clamp(2.1rem, 7.2vw, 7.5rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
	font-weight: 600;
	text-wrap: balance;
}
.index--home {
	margin: 5vh 0 10vh;
}
.index__label {
	display: inline-block;
	margin-right: 0.15em;
	font-family: var(--mono);
	font-size: 0.2em;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--dim);
	vertical-align: 0.9em;
}
.index__link {
	color: var(--fg);
	transition: color 0.25s ease;
}
.index__num {
	margin-left: 0.12em;
	font-family: var(--mono);
	font-size: 0.2em;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--dim);
	vertical-align: top;
	position: relative;
	top: 0.2em;
}
.index__sep {
	color: var(--dim);
}

/* al apuntar a una, las demás se apagan */
.index--home:hover .index__link,
.index--home:focus-within .index__link {
	color: var(--dim);
}
.index--home .index__link:hover,
.index--home .index__link:focus-visible {
	color: var(--fg);
}

/* lista del final de cada página: la actual encendida */
.index--end {
	font-size: clamp(1.4rem, 3.6vw, 3.4rem);
}
.index--end .index__link {
	color: var(--dim);
}
.index--end .index__link[aria-current='page'] {
	color: var(--fg);
}
.index--end:hover .index__link[aria-current='page'] {
	color: var(--dim);
}
.index--end .index__link:hover,
.index--end .index__link:focus-visible {
	color: var(--fg) !important;
}

/* ------------------------------------------------------------------ */
/* Noticia                                                             */
/* ------------------------------------------------------------------ */
.entry {
	padding-top: 4vh;
}
.entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.2rem;
	margin: 0 0 1.5rem;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: #6d6d6d;
}
.entry__num {
	color: var(--fg);
}
.entry__title {
	margin: 0 0 6vh;
	font-size: clamp(3rem, 13vw, 14rem);
	line-height: 0.9;
	letter-spacing: -0.06em;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.entry__title--archive {
	font-size: clamp(2.2rem, 8vw, 7rem);
}
.entry__image {
	margin: 0 0 6vh;
}
.entry__content {
	max-width: 42rem;
	font-size: 1.2rem;
	line-height: 1.5;
}
.entry__content > :first-child {
	margin-top: 0;
}
.entry__content a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.entry__more {
	margin: 14vh 0 4vh;
}

.archive-list {
	list-style: none;
	margin: 0 0 6vh;
	padding: 0;
}
.archive-list__link {
	font-size: clamp(1.6rem, 4vw, 3.4rem);
	font-weight: 600;
	letter-spacing: -0.04em;
}
.archive-list__link:hover {
	color: var(--red);
}
.empty {
	color: #6d6d6d;
}

/* ------------------------------------------------------------------ */
/* Capa de la transición carousel                                      */
/* ------------------------------------------------------------------ */
.interlude-layer {
	position: fixed;
	inset: 0;
	z-index: 2147483000; /* sobre la barra de administración de WordPress */
	overflow: hidden;
	background: var(--interlude-color);
	pointer-events: none;
}
.interlude-strip {
	position: absolute;
	left: 0;
	top: 0;
	transform-origin: 0 0;
	will-change: transform;
}

@media (max-width: 640px) {
	.site-header {
		grid-template-columns: 1fr auto;
	}
	.site-header__tagline {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.index__link {
		transition: none;
	}
}
