/*
Theme Name: Sacando la lengua
Template: astra
Description: Tema hijo de Sacando la lengua sobre Astra. Todo el diseño vive aquí (módulo 10). Dirección visual «Bocadillo nocturno».
Author: Sacando la lengua
Version: 0.3.0
Text Domain: sll-child
*/

/* ==========================================================================
   Fuentes autoalojadas (SIL OFL 1.1; licencias en assets/fonts/). Eje wght libre.
   ========================================================================== */
@font-face {
	font-family: "Bricolage Grotesque";
	src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Atkinson Hyperlegible Next";
	src: url("assets/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Atkinson Hyperlegible Next";
	src: url("assets/fonts/atkinson-hyperlegible-next-italic.woff2") format("woff2");
	font-weight: 200 800;
	font-style: italic;
	font-display: swap;
}

/* ==========================================================================
   Variables. Los hexadecimales viven SOLO en este bloque (tres veces: claro,
   oscuro automático y oscuro elegido). Fuera de aquí, solo var(--sll-*).
   Modo: prefers-color-scheme por defecto; html[data-sll-modo] manda si el
   visitante eligió. .sll-panel-* sirve para mostrar un modo concreto (guía).
   ========================================================================== */
:root,
.sll-panel-claro {
	color-scheme: light;
	--sll-fondo: #FBF7EE;
	--sll-superficie: #FFFFFF;
	--sll-texto: #1B1530;
	--sll-texto-suave: #4F4868;
	--sll-violeta: #6C4DF6;
	--sll-violeta-texto: #5A3BE0;
	--sll-acento: #D92F67;
	--sll-acento-texto: #C42158;
	--sll-enlace: #1F5FBF;
	--sll-ok: #1F7A4D;
	--sll-pista-fondo: #FFF0BF;
	--sll-pista-texto: #5C4300;
	--sll-pista-borde: #8A6400;
	--sll-borde: #8B8499;
	--sll-linea: #E4DCCB;
	--sll-boton-fondo: #6C4DF6;
	--sll-boton-hover: #5A3BE0;
	--sll-boton-texto: #FFFFFF;
	--sll-foco: #5A3BE0;
	--sll-sombra: rgba(27, 21, 48, 0.14);
	--bloque-ortografia: #B3264F;
	--bloque-gramatica: #1F5FBF;
	--bloque-lexico-semantica: #1F7A4D;
	--bloque-comunicacion: #A5520A;
	--bloque-literatura: #6C4DF6;
	--bloque-escritura: #0F766E;
	--bloque-pau: #46557A;
	--bloque-general: #6B6580;
	--bloque-comprension-lectora: var(--bloque-comunicacion);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-sll-modo="claro"]) {
		color-scheme: dark;
		--sll-fondo: #14101F;
		--sll-superficie: #1E1830;
		--sll-texto: #FBF7EE;
		--sll-texto-suave: #BDB5D1;
		--sll-violeta: #6C4DF6;
		--sll-violeta-texto: #A996FF;
		--sll-acento: #FF7AA5;
		--sll-acento-texto: #FF7AA5;
		--sll-enlace: #7DB2FF;
		--sll-ok: #5FD39A;
		--sll-pista-fondo: #2E2610;
		--sll-pista-texto: #FFD95A;
		--sll-pista-borde: #FFD95A;
		--sll-borde: #8E86A6;
		--sll-linea: #342C4B;
		--sll-boton-fondo: #6C4DF6;
		--sll-boton-hover: #7357F7;
		--sll-boton-texto: #FFFFFF;
		--sll-foco: #A996FF;
		--sll-sombra: rgba(0, 0, 0, 0.5);
		--bloque-ortografia: #FF7AA5;
		--bloque-gramatica: #7DB2FF;
		--bloque-lexico-semantica: #5FD39A;
		--bloque-comunicacion: #FFB36B;
		--bloque-literatura: #A996FF;
		--bloque-escritura: #5EE0D0;
		--bloque-pau: #B7C3E6;
		--bloque-general: #BDB5D1;
		--bloque-comprension-lectora: var(--bloque-comunicacion);
	}
}

html[data-sll-modo="oscuro"],
.sll-panel-oscuro {
	color-scheme: dark;
	--sll-fondo: #14101F;
	--sll-superficie: #1E1830;
	--sll-texto: #FBF7EE;
	--sll-texto-suave: #BDB5D1;
	--sll-violeta: #6C4DF6;
	--sll-violeta-texto: #A996FF;
	--sll-acento: #FF7AA5;
	--sll-acento-texto: #FF7AA5;
	--sll-enlace: #7DB2FF;
	--sll-ok: #5FD39A;
	--sll-pista-fondo: #2E2610;
	--sll-pista-texto: #FFD95A;
	--sll-pista-borde: #FFD95A;
	--sll-borde: #8E86A6;
	--sll-linea: #342C4B;
	--sll-boton-fondo: #6C4DF6;
	--sll-boton-hover: #7357F7;
	--sll-boton-texto: #FFFFFF;
	--sll-foco: #A996FF;
	--sll-sombra: rgba(0, 0, 0, 0.5);
	--bloque-ortografia: #FF7AA5;
	--bloque-gramatica: #7DB2FF;
	--bloque-lexico-semantica: #5FD39A;
	--bloque-comunicacion: #FFB36B;
	--bloque-literatura: #A996FF;
	--bloque-escritura: #5EE0D0;
	--bloque-pau: #B7C3E6;
	--bloque-general: #BDB5D1;
	--bloque-comprension-lectora: var(--bloque-comunicacion);
}

html[data-sll-modo="claro"] {
	color-scheme: light;
}

/* Fuentes y medidas (no son colores). */
:root {
	--sll-fuente-texto: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
	--sll-fuente-titulos: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, sans-serif;
	--sll-radio: 22px;
	--sll-objetivo: 44px;
	--sll-ritmo: 1.6;
}

/* ==========================================================================
   Astra hereda la paleta: se redefinen sus variables globales (0-8).
   0 enlaces · 1 enlaces al pasar · 2 titulares · 3 texto · 4 fondo ·
   5 superficie · 6 texto fuerte · 7 línea · 8 texto fuerte
   ========================================================================== */
:root:root {
	--ast-global-color-0: var(--sll-enlace);
	--ast-global-color-1: var(--sll-acento-texto);
	--ast-global-color-2: var(--sll-texto);
	--ast-global-color-3: var(--sll-texto);
	--ast-global-color-4: var(--sll-fondo);
	--ast-global-color-5: var(--sll-superficie);
	--ast-global-color-6: var(--sll-texto);
	--ast-global-color-7: var(--sll-linea);
	--ast-global-color-8: var(--sll-texto);
}

/* ==========================================================================
   Base: fondo, texto, titulares
   ========================================================================== */
html {
	background-color: var(--sll-fondo);
}

:root body,
:root body.ast-separate-container,
:root body #page,
:root body .site-content {
	background-color: var(--sll-fondo);
	color: var(--sll-texto);
}

:root body {
	font-family: var(--sll-fuente-texto);
	font-size: 1.125rem;
	line-height: var(--sll-ritmo);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:root body p,
:root body li {
	line-height: var(--sll-ritmo);
}

:root body :is(h1, h2, h3, h4, h5, h6, .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6) {
	font-family: var(--sll-fuente-titulos);
	color: var(--sll-texto);
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-wrap: balance;
}

:root body :is(h1, .entry-content h1) {
	font-size: clamp(2.25rem, 5vw + 0.5rem, 3.5rem);
	font-weight: 800;
}

:root body :is(h2, .entry-content h2) {
	font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
	font-weight: 800;
}

:root body :is(h3, .entry-content h3) {
	font-size: clamp(1.4rem, 2vw + 0.5rem, 1.75rem);
	font-weight: 700;
}

:root body :is(h4, .entry-content h4) {
	font-size: 1.25rem;
	font-weight: 700;
}

:root body :is(h5, h6, .entry-content h5, .entry-content h6) {
	font-size: 1.125rem;
	font-weight: 700;
}

:root body :is(strong, b, th) {
	font-weight: 700;
}

/* Enlaces: subrayados siempre (no se confía solo en el color). */
:root body :is(.entry-content, .sll-prosa, .ast-footer-copyright) a:not(.sll-boton):not(.wp-block-button__link) {
	color: var(--sll-enlace);
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

:root body :is(.entry-content, .sll-prosa, .ast-footer-copyright) a:not(.sll-boton):not(.wp-block-button__link):hover {
	color: var(--sll-acento-texto);
}

/* Foco visible en todo. */
:root body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--sll-foco);
	outline-offset: 3px;
	border-radius: 6px;
}

::selection {
	background: var(--sll-violeta);
	color: var(--sll-boton-texto);
}

/* ==========================================================================
   Cabecera y pie de Astra (constructor): colores propios
   ========================================================================== */
:root body :is(.main-header-bar, .ast-primary-header-bar, .ast-above-header-bar, .ast-below-header-bar, .ast-mobile-header-wrap .main-header-bar) {
	background-color: var(--sll-fondo);
	border-bottom: 1px solid var(--sll-linea);
}

:root body #masthead {
	position: relative;
}

:root body :is(.site-footer, .site-below-footer-wrap[data-section="section-below-footer-builder"]) {
	background-color: var(--sll-fondo);
	color: var(--sll-texto-suave);
}

:root body .ast-footer-copyright.site-footer-focus-item {
	color: var(--sll-texto-suave);
	font-family: var(--sll-fuente-texto);
	font-size: 1rem;
}

/* Reducción de movimiento global. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
