/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* Aqui solo va lo que no puede ser clase global de Bricks: keyframes, clases que viajan
   dentro del marcado, la rejilla de sangrado y estados que pone el JS. Comentarios en ASCII. */


/* Fuentes del kit de Elementor (Google Fonts, OFL): DM Sans (cuerpo), Space Grotesk (titulares, botones),
   Inter Tight (texto pequeno). Variables, subset latin, servidas desde el tema (la web antigua las pedia a Google).
   Bricks no las pide a Google: ajuste disableGoogleFonts. Generadas con tools/fuentes.py. */
@font-face {
	font-family: 'DM Sans';
	font-style: italic;
	font-weight: 100 1000;
	font-display: swap;
	src: url(fonts/dm-sans-italic-latin.woff2) format('woff2');
	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;
}
@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 100 1000;
	font-display: swap;
	src: url(fonts/dm-sans-latin.woff2) format('woff2');
	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;
}
@font-face {
	font-family: 'Space Grotesk';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url(fonts/space-grotesk-latin.woff2) format('woff2');
	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;
}
@font-face {
	font-family: 'Inter Tight';
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url(fonts/inter-tight-italic-latin.woff2) format('woff2');
	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;
}
@font-face {
	font-family: 'Inter Tight';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url(fonts/inter-tight-latin.woff2) format('woff2');
	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;
}


/* Puente de tipografia por breakpoint (migracion desde Elementor). Los valores se editan en Bricks
   (Variables globales: --text-X, --text-X-tablet, --text-X-movil); aqui solo se cambia cual manda en cada
   corte. Una linea por rol del kit en cada @media. Cortes de Elementor: tablet 1024, movil 767. */
@media (max-width: 1024px) {
	:root:root {
		--text-cuerpo: var(--text-cuerpo-tablet);
		--text-h1: var(--text-h1-tablet);
		--text-h2: var(--text-h2-tablet);
		--text-subtitulo: var(--text-subtitulo-tablet);
		--text-boton: var(--text-boton-tablet);
		--text-negrita: var(--text-negrita-tablet);
		--text-pequeno: var(--text-pequeno-tablet);
		--text-grande: var(--text-grande-tablet);
		--text-mayus: var(--text-mayus-tablet);
	}
}
@media (max-width: 767px) {
	:root:root {
		--text-cuerpo: var(--text-cuerpo-movil);
		--text-h1: var(--text-h1-movil);
		--text-h2: var(--text-h2-movil);
		--text-subtitulo: var(--text-subtitulo-movil);
		--text-boton: var(--text-boton-movil);
		--text-negrita: var(--text-negrita-movil);
		--text-pequeno: var(--text-pequeno-movil);
		--text-grande: var(--text-grande-movil);
		--text-mayus: var(--text-mayus-movil);
	}
}

/* Familias del kit (las usan los widgets traducidos con su marcado: tools/elementor/widgets_cs.py) */
:root {
	--fuente-cuerpo: "DM Sans";
	--fuente-titulos: "Space Grotesk";
	--fuente-sistema: Helvetica;
}

/* Fondo de la web (kit de Elementor: body con el color "Fondo") */
body {
	background-color: var(--dark);
}

/* Cabecera fija y flotante: las anclas (#seccion) dejan hueco arriba. Ajustar al alto del header. */
html {
	scroll-padding-top: 12rem;
}

/* Header fijo como el de Elementor (fixed + espaciador): sticky. El headerSticky de Bricks es fixed sin
   espaciador y tapa el contenido. Quitar si el header de la web no es fijo. */
#brx-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}


/* Comunes de una migracion desde Elementor (cada una sale de un fallo real; ver Lecciones en CLAUDE.md). */

/* Iconos de Font Awesome como los SVG de Elementor: el dibujo encajado y centrado en una caja de 1em x 1em.
   La fuente de Bricks lo pinta a su ancho natural y pegado a la izquierda. Un icono mas ancho que alto
   necesita su linea (YouTube: 576/512). */
i[class*="fa-"] { text-align: center; }
i.fa-youtube::before { font-size: calc(512em / 576); }

/* Acordeones: el anidado de Elementor anima la altura en lineal; Bricks pone la transicion en linea sin curva.
   La duracion va en el ajuste "transition" de cada acordeon (Elementor: 400). */
.brxe-accordion-nested .accordion-content-wrapper { transition-timing-function: linear; }

/* reCAPTCHA v3 de los formularios de Bricks: sin la insignia flotante (como suele estar con Contact Form 7;
   comprobar en la web antigua). */
.grecaptcha-badge { visibility: hidden; }
/* Aviso de error de reCAPTCHA que Bricks pinta en cada formulario con claves puestas ("Clave de sitio no valida"):
   lo oculta su capa, pero es un .form-group y una clase de formulario con .form-group { display: block } sin capa lo
   deja siempre visible. Oculto salvo cuando Bricks le pone .show (fallo real al enviar). */
.brxe-form .form-group.recaptcha-error:not(.show) { display: none; }


/* Rejilla a sangre: un lado pegado al borde de la pantalla, el otro alineado con el contenedor. */
.seccion-asim-grid {
	display: grid;
	grid-template-columns: 1fr var(--container-wide) 1fr;
}
.bleed-right-content {
	grid-column: 2 / -1;
}
.bleed-left-content {
	grid-column: 1 / 3;
}


/* Animaciones compartidas (keyframes: no pueden ser clase global). */
@keyframes marquee {
	to { transform: translateX(-50%); }
}
@keyframes girar {
	to { transform: rotate(1turn); }
}
/* Marquee: la pista contiene DOS copias identicas del contenido y se desplaza la mitad. */
.marquee-pista {
	display: flex;
	width: max-content;
	animation: marquee var(--marquee-duracion, 20s) linear infinite;
}
/* Clase doblada: gana al ancho por defecto de los elementos de Bricks. */
.marquee-pista.marquee-pista {
	width: max-content;
	max-width: none;
}
.marquee-pista.marquee-pista > * {
	flex: 0 0 auto;
	width: max-content;
	max-width: none;
}
.marquee-pista.marquee-pista img {
	flex: 0 0 auto;
	width: auto;
	max-width: none;
}
.girar {
	animation: girar 6s linear infinite;
}


/* Reveals a prueba de fallos: visibles por defecto; web.js anade .oculto al arrancar
   y lo quita al entrar en pantalla. Sin JS, todo se ve. */
.revelar-palabras .palabra {
	transition: color .6s cubic-bezier(.65,0,.35,1);
	transition-delay: calc(var(--i, 0) * 120ms);
}
.revelar-palabras.oculto .palabra {
	color: var(--brand-6);
}
[data-revelar-grupo] > * {
	transition: translate .9s cubic-bezier(.22,.68,.36,1.2), opacity .3s ease-out;
	transition-delay: calc(var(--i, 0) * 120ms);
}
[data-revelar-grupo] > .oculto {
	opacity: 0;
	translate: 0 -50rem;
}

/* Reduced motion desmonta la animacion entera, no solo baja la duracion. */
@media (prefers-reduced-motion: reduce) {
	.marquee-pista,
	.girar {
		animation: none;
	}
	.revelar-palabras .palabra,
	[data-revelar-grupo] > * {
		transition-duration: .01ms;
		transition-delay: 0s;
	}
}
