/*
 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
*/

/* General: sin scroll horizontal ni barras de scroll, selección en gris oscuro */
body { overflow-x: hidden; }
html, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
::-moz-selection { color: #fff; background: #292929; }
::selection { color: #fff; background: #292929; }

/* La barra negra del Figma simula el navegador: no forma parte del diseño */
.arr-barra { display: none !important; }

/* Proyecto: vídeo */
.arr-video { position: relative; width: 100%; aspect-ratio: 1262 / 741; background: #000; }
.arr-video__media { display: block; width: 100%; height: 100%; object-fit: contain; }
.arr-video__play { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; }


/* Proyecto: galería */
.arr-galeria { display: flex; flex-direction: column; gap: var(--espacio-gap, 10px); }
.arr-galeria__fila { display: flex; gap: var(--espacio-gap, 10px); align-items: flex-start; }
.arr-galeria__item { flex-basis: 0; min-width: 0; }
/* La caja tiene la proporción exacta de la foto: sin recortar, para que no asome (a veces) solo
   un lado del borde negro de la película */
.arr-galeria__item img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767px) {
	.arr-galeria__fila { flex-direction: column; }
	.arr-galeria__item { flex-basis: auto; width: 100%; }
}


/* Transición entre páginas (View Transitions): la imagen principal de la home
   se convierte en el vídeo de la página de proyecto. Sin soporte, no pasa nada. */
@view-transition { navigation: auto; }

.single-proyecto .arr-video { view-transition-name: proyecto-img; }

::view-transition-group(proyecto-img) {
	animation-duration: .6s;
	animation-timing-function: cubic-bezier(.7, 0, .2, 1);
}
::view-transition-old(proyecto-img),
::view-transition-new(proyecto-img) {
	height: 100%;
	width: 100%;
	object-fit: cover;
	overflow: clip;
}
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; }

@media (prefers-reduced-motion: reduce) {
	::view-transition-group(*),
	::view-transition-old(*),
	::view-transition-new(*) { animation: none !important; }
}

/* Proyecto: navegación anterior / siguiente */
.arr-nav-proyecto { position: relative; display: block; width: 200px; max-width: 100%; }
.arr-nav-proyecto img { display: block; width: 100%; height: auto; transition: opacity .3s ease; }

/* Navegación AJAX */
body.arr-cargando, body.arr-cargando a { cursor: progress; }

/* Proyecto: descripción y créditos (contenido de WordPress) */
.arr-creditos p { margin: 0 0 .95em; }
.arr-creditos > :last-child { margin-bottom: 0; }


/* ==========================================================================
   Móvil (≤ 767px, diseño de 402 px)
   ========================================================================== */

/* Los enlaces del header son flex: el texto se alinea con justify-content */
.arr-menu .arr-logo { justify-content: center; }
.arr-menu .arr-contacto { justify-content: flex-end; }

/* Antes el contacto pasaba a ser el correo en móvil; ahora es "(contact)" siempre */
.arr-solo-movil { display: none !important; }

@media (max-width: 767px) {
	/* Idioma y correo ocupan lo mismo a cada lado para que el logo quede centrado */
	.arr-menu .arr-idioma,
	.arr-menu .arr-contacto { flex: 1 1 0 !important; width: auto !important; white-space: nowrap; }
	.arr-menu .arr-logo { flex: 0 0 auto !important; width: auto !important; }

	/* Proyecto: título / rol / año en una fila */
	#brx-content .arr-metadatos { padding: 10px 5px !important; }
	#brx-content .arr-metadatos > :nth-child(1) { width: 38% !important; }
	#brx-content .arr-metadatos > :nth-child(2) { width: 38% !important; white-space: nowrap; }
	#brx-content .arr-metadatos > :nth-child(3) { width: 24% !important; }

	/* Galería: sigue en filas de 3, con huecos de 5 px */
	#brx-content #galeria { padding: 5px !important; }
	.arr-galeria,
	.arr-galeria__fila { gap: 5px; }
	.arr-galeria__fila { flex-direction: row; }
	.arr-galeria__item { flex-basis: 0; width: auto; }

	/* Anterior / siguiente */
	#brx-content .arr-ver-mas { padding: 100px 10px !important; }
	#brx-content .arr-ver-mas > .brxe-shortcode { width: 18vw !important; }

	/* Footer en columna */
	#brx-footer .arr-footer-fila { flex-direction: column; align-items: center; text-align: center; gap: 32px; padding: 90px 10px 20px !important; }
	#brx-footer .arr-footer-logos { order: 4; width: 50% !important; max-width: 524px; height: auto; margin-top: 20px; }
}


/* ==========================================================================
   Reproductor de vídeo a pantalla completa
   ========================================================================== */
body.arr-player-abierto { overflow: hidden; }

.arr-player {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: #000;
	color: #fff;
	font-size: var(--texto-base, 11px);
	letter-spacing: 0.005em;
	text-transform: uppercase;
}
.arr-player button {
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
	cursor: pointer;
}
.arr-player button:hover,
.arr-player button:focus-visible { text-decoration: line-through; }
/* El header y los controles van sobre el vídeo */
.arr-player__top, .arr-player__bottom, .arr-player__tiempo { text-shadow: 0 0 8px rgba(0, 0, 0, .45); }

.arr-player__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	cursor: pointer;
}

.arr-player__top,
.arr-player__bottom { position: absolute; left: 0; right: 0; z-index: 2; transition: opacity .35s ease; }

.arr-player__top { top: 0; height: 44px; pointer-events: none; }
.arr-player__top > * { position: absolute; top: 13px; line-height: 1; pointer-events: auto; }
.arr-player__titulo { left: 8px; width: 180px; line-height: .95; }
.arr-player__rol { left: 31.7%; }
.arr-player__anio { left: 69%; }
.arr-player__cerrar { right: 14px; }

.arr-player__tiempo {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	transform: translate(-50%, -50%);
	pointer-events: none;
	transition: opacity .35s ease;
}

.arr-player__bottom {
	bottom: 12px;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 0 10px;
}
.arr-player__barra {
	position: relative;
	flex: 1;
	height: 20px;
	cursor: pointer;
	touch-action: none;
}
.arr-player__barra::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 50%;
	height: 1px;
	background: rgba(255, 255, 255, .45);
}
.arr-player__progreso {
	position: absolute;
	left: 0; top: 50%;
	height: 1px;
	width: 0;
	background: #fff;
}
.arr-player__volumen { white-space: nowrap; }
.arr-player__volumen button[aria-pressed="true"] { text-decoration: line-through; }

/* En reproducción y sin mover el ratón, los controles se esconden */
.arr-player.is-idle { cursor: none; }
.arr-player.is-idle .arr-player__top,
.arr-player.is-idle .arr-player__bottom,
.arr-player.is-idle .arr-player__tiempo { opacity: 0; }

@media (max-width: 767px) {
	.arr-player__top { top: 0; }
	.arr-player__rol,
	.arr-player__anio { display: none; }
	.arr-player__bottom { flex-wrap: wrap; row-gap: 8px; bottom: 12px; }
	.arr-player__barra { order: -1; flex-basis: 100%; }
	.arr-player [data-act="fs"] { display: none; }
	.arr-player__volumen { margin-left: auto; }
}


/* ==========================================================================
   Footer, About e índice (diseño de mayo: header "(about) ARRIGURI (contact)")
   ========================================================================== */
.arr-footer-fila > * { flex: 0 0 auto; }
.arr-footer-fila a { color: inherit; text-decoration: none; }
.arr-footer-enlaces a:hover,
.arr-footer-enlaces a:focus-visible { text-decoration: line-through; }

/* About: texto centrado e inclinado */
/* La pantalla del About es una viewport entera: el footer solo se ve al hacer scroll,
   y el "sello" queda fijo y centrado mientras tanto. */
.arr-about { min-height: 100vh; min-height: 100lvh; }
.arr-about .arr-about__texto {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 1;
	width: max-content;
	max-width: calc(100vw - 20px);
	text-align: center;
	text-transform: uppercase;
	transform: translate(-50%, -50%) rotate(-8deg);
}
/* "PRODUCTION @LABIE.WTF – HOME @ARRATE.STUDIO" en una sola línea */
.arr-about .arr-about__texto p:nth-child(4) { white-space: nowrap; }
/* El header del About es fijo, como el sello, y sin rebote al hacer scroll */
body:has(.arr-about) #brx-header { position: fixed; top: 0; left: 0; right: 0; }
html:has(.arr-about), body:has(.arr-about) { overscroll-behavior: none; }
body:has(.arr-about) #brx-footer { position: relative; z-index: 2; background: var(--color-blanco, #fff); }
.arr-about .arr-about__texto p { margin: 0 0 1.3em; }
.arr-about .arr-about__texto p:last-child { margin-bottom: 0; }
.arr-about .arr-about__texto a { color: inherit; text-decoration: line-through; }
.arr-about .arr-about__correo { text-transform: lowercase; }
.arr-about .arr-about__correo a { text-decoration: none; }

/* Índice: el header se queda fijo y la lista pasa por debajo */
body:not(.home) #brx-header { position: sticky; top: 0; z-index: 20; background: var(--color-blanco, #fff); }

/* ==========================================================================
   Proyecto: apertura (vídeo principal), galería, vídeo secundario y créditos
   ========================================================================== */
.arr-titulo { display: block; }

.arr-apertura { padding: 0 10px; }
.arr-apertura__etiqueta { margin: 0 0 11px; font-weight: 500; line-height: 1.1; }
.arr-apertura--solo-galeria .arr-apertura__etiqueta {
	margin-bottom: 21px;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-weight: 400;
}
.arr-video-siguiente {
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	font-weight: 500;
	color: inherit;
	cursor: pointer;
}
.arr-video-siguiente:hover,
.arr-video-siguiente:focus-visible { text-decoration: line-through; }

/* Vídeo centrado: 1274 de 1728. La caja toma siempre la proporción real del vídeo (--r), sin
   recortarlo ni deformarlo; si es muy alto o cuadrado, se limita por la altura de la pantalla. */
.arr-video { --r: 1.7032; width: min(73.73%, calc(82vh * var(--r))); width: min(73.73%, calc(82svh * var(--r))); margin: 0 auto; aspect-ratio: 1274 / 748; }

.arr-apertura__pie {
	margin: 18px 0 26px;
	text-align: center;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	color: var(--color-texto-suave, #292929);
}
.arr-apertura__pie a { color: inherit; text-decoration: none; }
.arr-apertura__pie a:hover { text-decoration: line-through; }

/* Créditos centrados (contenido de WordPress) */
.arr-creditos p { margin: 0 0 1.1em; }
.arr-creditos > :last-child { margin-bottom: 0; }

@media (max-width: 767px) {
	.arr-video { width: min(100%, calc(80svh * var(--r))); }
	.arr-apertura { padding: 0 5px; display: flex; flex-direction: column; }
	.arr-apertura > .arr-video { order: 1; }
	.arr-apertura > .arr-apertura__etiqueta { order: 2; margin: 11px 0 0; }
	.arr-apertura > .arr-apertura__pie { order: 3; }
	.arr-bloque-extra { padding: 0 5px; }
	#brx-content #galeria { padding: 5px !important; }
	#brx-content .arr-creditos { margin-top: 90px !important; }
	#brx-content .arr-ver-mas { padding: 100px 10px !important; }
}


/* ==========================================================================
   Bloques de proyecto (vídeo - galería - vídeo - galería) y cursor "Play"
   ========================================================================== */
.arr-apertura--sucesiva { margin-top: 10px; }
.arr-bloque-galeria { padding: 0 10px; }
.arr-apertura__etiqueta--galeria {
	margin: 0 0 21px;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-weight: 400;
}
.arr-bloques > .arr-bloque-galeria + .arr-apertura--sucesiva,
.arr-bloques > .arr-apertura + .arr-bloque-galeria { margin-top: 10px; }

@media (max-width: 767px) {
	.arr-bloque-galeria { padding: 0 5px; }
}

/* Con ratón, el cursor sobre el vídeo es la palabra "Play" */
@media (hover: hover) and (pointer: fine) {
	.arr-video, .arr-video * { cursor: none; }
}
.arr-cursor {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 90;
	pointer-events: none;
	color: #fff;
	mix-blend-mode: difference;
	font-size: var(--texto-base, 11px);
	letter-spacing: 0.005em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity .15s ease;
}
.arr-cursor.is-visible { opacity: 1; }

/* Header fijo en todas las páginas menos la home: el contenido se desvanece por
   debajo al hacer scroll */
body:not(.home) #brx-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 14px;
	background: linear-gradient(to bottom, var(--color-blanco, #fff), rgba(255, 255, 255, 0));
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s ease;
}
/* Solo con la página desplazada (header pegado) */
body.arr-scrolleado:not(.home) #brx-header::after { opacity: 1; }
/* Los saltos a un ancla no dejan el contenido tapado por el header */
html { scroll-padding-top: 100px; }

/* En la home, el panel del índice (menú arriba) también se desvanece bajo el header */
body.home.arr-indice-abierto .arr-menu::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 14px;
	background: linear-gradient(to bottom, var(--color-blanco, #fff), rgba(255, 255, 255, 0));
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s ease;
}
/* Solo cuando la lista del panel está desplazada */
body.home.arr-indice-abierto.arr-panel-scrolleado .arr-menu::after { opacity: 1; }

/* Galería: los vídeos llenan su hueco igual que las fotos */
.arr-galeria__item video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Páginas legales (Legal Notice, Privacy Policy, Cookie Policy, Accessibility).
   Diseño provisional: no hay frame en el Figma.
   ========================================================================== */
.arr-legal { padding: 0; }
.arr-legal .arr-legal__texto {
	width: min(620px, calc(100% - 20px));
	margin: 120px auto 160px;
	font-size: var(--texto-base, 11px);
	line-height: 1.35;
	letter-spacing: 0.005em;
}
.arr-legal .arr-legal__texto h1,
.arr-legal .arr-legal__texto h2 {
	margin: 2.6em 0 0.8em;
	font-size: inherit;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.arr-legal .arr-legal__texto > :first-child { margin-top: 0; }
.arr-legal .arr-legal__texto p { margin: 0 0 1em; }
.arr-legal .arr-legal__texto ul { margin: 0 0 1em; padding-left: 1.2em; }
.arr-legal .arr-legal__texto li { margin: 0 0 0.35em; }
.arr-legal .arr-legal__texto a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 767px) {
	.arr-legal .arr-legal__texto { margin: 60px auto 100px; }
}


/* Anterior / siguiente: al pasar el ratón la foto se aclara y aparece el título inclinado */
.arr-nav-proyecto__titulo {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 6%;
	text-align: center;
	font-size: var(--texto-base, 11px);
	line-height: 1.05;
	letter-spacing: 0.005em;
	color: var(--color-texto-suave, #292929);
	transform: rotate(-10deg);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}
.arr-nav-proyecto:hover img,
.arr-nav-proyecto:focus-visible img { opacity: .22; }
.arr-nav-proyecto:hover .arr-nav-proyecto__titulo,
.arr-nav-proyecto:focus-visible .arr-nav-proyecto__titulo { opacity: 1; }


/* ==========================================================================
   Transición entre la home y el resto de páginas: el menú sube (o baja) despacio
   y el contenido nuevo aparece suavemente cuando ya está colocado.
   ========================================================================== */
.arr-menu { view-transition-name: arr-menu; }
html.arr-vt-menu::view-transition-group(arr-menu) {
	animation-duration: .95s;
	animation-timing-function: cubic-bezier(.7, 0, .2, 1);
}
html.arr-vt-menu::view-transition-old(root) { animation: arr-vt-salida .35s ease both; mix-blend-mode: normal; }
html.arr-vt-menu::view-transition-new(root) { animation: arr-vt-entrada .9s ease .55s both; mix-blend-mode: normal; }
html.arr-vt-menu::view-transition { background: #fff; }
@keyframes arr-vt-salida { to { opacity: 0; } }
@keyframes arr-vt-entrada { from { opacity: 0; } to { opacity: 1; } }

/* Entre páginas normales, el contenido nuevo también entra con un fundido más suave */
::view-transition-old(root) { animation-duration: .3s; }
::view-transition-new(root) { animation-duration: .6s; }

/* ==========================================================================
   Lightbox de la galería
   ========================================================================== */
body.arr-lightbox-abierto { overflow: hidden; }
.arr-galeria__item { cursor: pointer; }

.arr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-blanco, #fff);
	color: var(--color-negro, #000);
	font-size: var(--texto-base, 11px);
	letter-spacing: 0.005em;
	cursor: pointer;
	opacity: 0;
	transition: opacity .3s ease;
}
.arr-lightbox.is-visible { opacity: 1; }
.arr-lightbox__medio {
	display: block;
	max-width: min(1600px, calc(100vw - 160px));
	max-height: calc(100vh - 160px);
	max-height: calc(100svh - 160px);
	width: auto;
	height: auto;
	object-fit: contain;
	transition: opacity .25s ease;
	-webkit-user-drag: none;
}
.arr-lightbox__medio.is-cambiando { opacity: 0; }
.arr-lightbox__cerrar,
.arr-lightbox__cuenta {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}
.arr-lightbox__cerrar { top: 14px; cursor: pointer; }
.arr-lightbox__cerrar:hover, .arr-lightbox__cerrar:focus-visible { text-decoration: line-through; }
.arr-lightbox__cuenta { bottom: 14px; pointer-events: none; }

@media (max-width: 767px) {
	.arr-lightbox__medio { max-width: calc(100vw - 20px); max-height: calc(100svh - 130px); }
}


/* ==========================================================================
   Interlineado general
   ========================================================================== */
/* (sin tocar la barra de administración de WordPress) */
body, body *:not(#wpadminbar):not(#wpadminbar *) { line-height: 1.2 !important; }

/* ==========================================================================
   (contact) en móvil: el header crece y deja ver (@arriguri) y el correo.
   En la home (transparente) las dos líneas se abren hacia arriba, sin fondo.
   ========================================================================== */
@media (max-width: 767px) {
	body:not(.home) .arr-menu { height: auto !important; min-height: var(--header-alto, 39px); flex-wrap: wrap; align-content: flex-start; }
	body:not(.home) .arr-contacto-menu {
		position: static;
		order: 9;
		width: 100%;
		justify-content: space-between;
		max-height: 0;
		overflow: hidden;
		padding: 0;
		opacity: 0;
		transition: max-height .35s ease, padding .35s ease, opacity .3s ease, visibility 0s linear .35s;
	}
	body:not(.home).arr-contacto-abierto .arr-contacto-menu {
		max-height: 40px;
		padding: 8px 0 2px;
		opacity: 1;
		visibility: visible;
		transition: max-height .35s ease, padding .35s ease, opacity .3s ease .05s;
	}
	/* En móvil (contact) se queda, y volver a pulsarlo cierra */
	body.arr-contacto-abierto .arr-contacto { opacity: 1 !important; pointer-events: auto !important; }

	/* Home: transparente, las dos líneas sobre el menú */
	body.home .arr-contacto-menu {
		top: auto;
		bottom: 100%;
		left: 10px;
		right: 10px;
		justify-content: space-between;
		padding-bottom: 6px;
	}
	body.home.arr-indice-abierto .arr-contacto-menu {
		bottom: auto;
		top: 100%;
		padding: 6px 0;
		background: var(--color-blanco, #fff);
	}

	/* El título del proyecto empieza a la misma altura que los filtros de la lista */
	#brx-content .arr-metadatos { padding-top: 28px !important; }
}

/* Tablet: el logo del footer se encoge para que quepan los enlaces */
@media (min-width: 768px) and (max-width: 1200px) {
	#brx-footer .arr-footer-logos { width: 34vw !important; }
}
